Class: Trello::Token

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

Instance Attribute Summary

Attributes inherited from BasicData

#client

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BasicData

#==, client, create, #initialize, many, one, parse, parse_many, path_name, #refresh!, register_attributes, save

Constructor Details

This class inherits a constructor from Trello::BasicData

Class Method Details

.find(token, params = {webhooks: true}) ⇒ Object

Finds a token



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

def find(token, params = {webhooks: true})
  client.find(:token, token, params)
end

Instance Method Details

#update_fields(fields) ⇒ Object

:nodoc:



14
15
16
17
18
19
20
# 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'] || {}
  attributes[:webhooks]    = fields['webhooks']
end