Sha256: d7e0cd1c1acb667e787c16180ab5d4d05e238f0beb63ca7b358990b0967fc75b

Contents?: true

Size: 740 Bytes

Versions: 2

Compression:

Stored size: 740 Bytes

Contents

require 'cpaas-sdk/api'
require 'cpaas-sdk/config'
require 'cpaas-sdk/resources'
require 'cpaas-sdk/version'

module Cpaas
  class << self
    attr_accessor :config, :api
  end

  #
  # Configure the SDK with client_id and client_secret.
  #
  # @param client_id [String] Private project secret
  # @param client_secret [String] Private project secret
  # @param base_url [String] JSON URL of the server to be used.
  #
  # @example
  #   Cpaas.configure do |config|
  #     config.client_id: '<private project key>',
  #     config.client_secret: '<private project secret>',
  #     config.base_url: '<base url>'
  #   end
  #
  def self.configure
    yield self.config = Cpaas::Config.new

    self.api = Cpaas::Api.new(config)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cpaas-sdk-1.1.0 lib/cpaas-sdk.rb
cpaas-sdk-1.0.0 lib/cpaas-sdk.rb