Sha256: 7405ad28a010f7c985c42e44b5e5d05636c1543dabd2b55424fb8d4a1bf0084a

Contents?: true

Size: 539 Bytes

Versions: 2

Compression:

Stored size: 539 Bytes

Contents

module Sesame
  class Client
    include Api

    def initialize(email:, password:)
      login(email: email, password: password)
      @email = email
    end

    def sesames
      get_sesames['sesames'].collect do |sesame_attrs|
        Sesame.new(sesame_attrs).auth_token(@auth_token)
      end
    end

    def sesame(device_id:)
      Sesame.new('device_id' => device_id).auth_token(@auth_token).refresh!
    end

    def inspect
      %(#<#{self.class.name}:#{format('0x%.14x', (object_id << 1))} user: #{@email}>)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sesame-ruby-0.1.2 lib/sesame/client.rb
sesame-ruby-0.1.1 lib/sesame/client.rb