Class: Vidsy::Data::API::User
- Inherits:
-
Client
- Object
- Client
- Vidsy::Data::API::User
show all
- Defined in:
- lib/vidsy/data/api/user.rb
Class Method Summary
collapse
Methods inherited from Client
set_api_key, set_endpoint, set_routes, set_version
Class Method Details
.create(params) ⇒ Object
12
13
14
15
|
# File 'lib/vidsy/data/api/user.rb', line 12
def self.create(params)
users = post(routes.user, params)
users.first.id
end
|
.find(id) ⇒ Object
7
8
9
10
|
# File 'lib/vidsy/data/api/user.rb', line 7
def self.find(id)
users = get "#{routes.user}/#{id}"
users.size == 0 ? nil : users.first
end
|