Sha256: 85d27dc21995d4b52695f773fac45cb241a4ddfd1f1b5f7a9112f97e0690120a

Contents?: true

Size: 684 Bytes

Versions: 17

Compression:

Stored size: 684 Bytes

Contents

require "blurb/account"
require "blurb/client"

class Blurb
  attr_accessor :client, :account

  def initialize(
    # Default to env variables
    client_id: ENV["BLURB_CLIENT_ID"],
    client_secret: ENV["BLURB_CLIENT_SECRET"],
    refresh_token: ENV["BLURB_REFRESH_TOKEN"],
    region: ENV["BLURB_REGION"],
    profile_id: ENV["BLURB_PROFILE_ID"] # profile_id can be left nil
  )
    @client = Client.new(client_id: client_id, client_secret: client_secret)
    @account = Account.new(refresh_token: refresh_token, region: region, client: @client, profile_id: profile_id)
  end

  def profiles
    @account.profiles
  end

  def active_profile
    @account.active_profile
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
blurb-0.5.9 lib/blurb.rb
blurb-0.5.8 lib/blurb.rb
blurb-0.5.6 lib/blurb.rb
blurb-0.5.5 lib/blurb.rb
blurb-0.5.2 lib/blurb.rb
blurb-0.5.1 lib/blurb.rb
blurb-0.4.12 lib/blurb.rb
blurb-0.4.11 lib/blurb.rb
blurb-0.4.10 lib/blurb.rb
blurb-0.4.8 lib/blurb.rb
blurb-0.4.7 lib/blurb.rb
blurb-0.4.6 lib/blurb.rb
blurb-0.4.5 lib/blurb.rb
blurb-0.4.4 lib/blurb.rb
blurb-0.4.2 lib/blurb.rb
blurb-0.4.1 lib/blurb.rb
blurb-0.4.0 lib/blurb.rb