Class: Podio::OAuthToken

Inherits:
Struct
  • Object
show all
Defined in:
lib/podio.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ OAuthToken

Returns a new instance of OAuthToken.



57
58
59
60
61
62
63
# File 'lib/podio.rb', line 57

def initialize(params = {})
  self.access_token  = params['access_token']
  self.refresh_token = params['refresh_token']
  self.reference     = params['ref']
  self.expires_at    = Time.now + params['expires_in'] if params['expires_in']
  self.expires_in    = params['expires_in'] if params['expires_in']
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token

Returns:

  • (Object)

    the current value of access_token



56
57
58
# File 'lib/podio.rb', line 56

def access_token
  @access_token
end

#expires_atObject

Returns the value of attribute expires_at

Returns:

  • (Object)

    the current value of expires_at



56
57
58
# File 'lib/podio.rb', line 56

def expires_at
  @expires_at
end

#expires_inObject

Returns the value of attribute expires_in

Returns:

  • (Object)

    the current value of expires_in



56
57
58
# File 'lib/podio.rb', line 56

def expires_in
  @expires_in
end

#referenceObject

Returns the value of attribute reference

Returns:

  • (Object)

    the current value of reference



56
57
58
# File 'lib/podio.rb', line 56

def reference
  @reference
end

#refresh_tokenObject

Returns the value of attribute refresh_token

Returns:

  • (Object)

    the current value of refresh_token



56
57
58
# File 'lib/podio.rb', line 56

def refresh_token
  @refresh_token
end

#refreshedObject

Returns the value of attribute refreshed

Returns:

  • (Object)

    the current value of refreshed



56
57
58
# File 'lib/podio.rb', line 56

def refreshed
  @refreshed
end