Class: Trello::Token

Inherits:
BasicData show all
Defined in:
lib/trello/token.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BasicData

#==, #initialize, many, one, #refresh!, register_attributes

Constructor Details

This class inherits a constructor from Trello::BasicData

Class Method Details

.find(token) ⇒ Object

Finds a token



8
9
10
# File 'lib/trello/token.rb', line 8

def find(token)
  super(:tokens, token)
end

Instance Method Details

#update_fields(fields) ⇒ Object

:nodoc:



14
15
16
17
18
19
# File 'lib/trello/token.rb', line 14

def update_fields(fields)
  attributes[:id]          = fields['id']
  attributes[:member_id]   = fields['idMember']
  attributes[:created_at]  = Time.iso8601(fields['dateCreated'])
  attributes[:permissions] = fields['permissions'] || {}
end