Class: LivePaper::Link
- Inherits:
-
BaseObject
- Object
- BaseObject
- LivePaper::Link
- Defined in:
- lib/live_paper/link.rb
Constant Summary
Constants inherited from BaseObject
BaseObject::AUTH_URL, BaseObject::AUTH_VALIDATION_URL, BaseObject::LP_API_HOST
Instance Attribute Summary collapse
-
#payoff_id ⇒ Object
Returns the value of attribute payoff_id.
-
#trigger_id ⇒ Object
Returns the value of attribute trigger_id.
Attributes inherited from BaseObject
#date_created, #date_modified, #id, #link, #name
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from BaseObject
#assign_attributes, create, #delete, #errors, get, #initialize, list, parse, #rel, request_access_token, request_project_id, rest_request, #save, #update
Constructor Details
This class inherits a constructor from LivePaper::BaseObject
Instance Attribute Details
#payoff_id ⇒ Object
Returns the value of attribute payoff_id.
5 6 7 |
# File 'lib/live_paper/link.rb', line 5 def payoff_id @payoff_id end |
#trigger_id ⇒ Object
Returns the value of attribute trigger_id.
5 6 7 |
# File 'lib/live_paper/link.rb', line 5 def trigger_id @trigger_id end |
Class Method Details
.api_url ⇒ Object
22 23 24 |
# File 'lib/live_paper/link.rb', line 22 def self.api_url "#{LP_API_HOST}/api/v2/projects/#{$project_id}/links" end |
.item_key ⇒ Object
30 31 32 |
# File 'lib/live_paper/link.rb', line 30 def self.item_key :link end |
.list_key ⇒ Object
26 27 28 |
# File 'lib/live_paper/link.rb', line 26 def self.list_key :links end |
Instance Method Details
#parse(jsondata) ⇒ Object
7 8 9 10 11 |
# File 'lib/live_paper/link.rb', line 7 def parse(jsondata) data = JSON.parse(jsondata, symbolize_names: true)[self.class.item_key] assign_attributes data self end |