Class: Wes::Data::API::CreatorUser
- Inherits:
-
Object
- Object
- Wes::Data::API::CreatorUser
show all
- Extended by:
- Base
- Defined in:
- lib/wes/data/api/creator_user.rb
Class Method Summary
collapse
Methods included from Base
add_state, apply_pagination, client, configuration, map_objects, routes
Class Method Details
.all ⇒ Object
11
12
13
14
15
|
# File 'lib/wes/data/api/creator_user.rb', line 11
def all
map_objects(
client.get(routes.creator_users), model_klass
)
end
|
.create(data) ⇒ Object
17
18
19
20
|
# File 'lib/wes/data/api/creator_user.rb', line 17
def create(data)
attributes = client.post(routes.creator_user, data).first
attributes.nil? ? nil : model_klass.new(attributes)
end
|
.find(key, value) ⇒ Object
22
23
24
25
|
# File 'lib/wes/data/api/creator_user.rb', line 22
def find(key, value)
attributes = client.get(find_route(key, value)).first
attributes.nil? ? nil : model_klass.new(attributes)
end
|