Class: Playapi::Entity
- Extended by:
- Utils
- Defined in:
- lib/playapi/entity.rb
Class Method Summary collapse
Methods included from Utils
Methods inherited from Identity
#==, fetch, #id, #initialize, store
Methods inherited from Base
#[], attr_reader, #attrs, fetch, fetch_or_new, from_response, identity_map, #initialize, store, #update
Constructor Details
This class inherits a constructor from Playapi::Identity
Class Method Details
.create(opts) ⇒ Object
15 16 17 18 |
# File 'lib/playapi/entity.rb', line 15 def create(opts) url = "api/v2/entities" get_object(:get, "entity", url, {:entity => opts}) end |
.get(id) ⇒ Object
10 11 12 13 |
# File 'lib/playapi/entity.rb', line 10 def get(id) url = "api/v2/entities/#{id}" get_object(:get, "entity", url) end |
.update(id, opts) ⇒ Object
20 21 22 23 |
# File 'lib/playapi/entity.rb', line 20 def update(id, opts) url = "api/v2/entities/#{id}" get_object(:put, "entity", url, {:entity => opts}) end |