Class: Tiltify::UsersResource
Instance Attribute Summary
Attributes inherited from Resource
#client
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
Instance Method Details
#campaigns(user_id:) ⇒ Object
12
13
14
15
|
# File 'lib/tiltify/resources/users.rb', line 12
def campaigns(user_id:)
response = get_request("users/#{user_id}/campaigns")
Collection.from_response(response, type: Campaign)
end
|
4
5
6
|
# File 'lib/tiltify/resources/users.rb', line 4
def me
User.new get_request("user").body.dig("data")
end
|
#retrieve(user_id:) ⇒ Object
8
9
10
|
# File 'lib/tiltify/resources/users.rb', line 8
def retrieve(user_id:)
User.new get_request("users/#{user_id}").body.dig("data")
end
|
#teams(user_id:) ⇒ Object
17
18
19
20
|
# File 'lib/tiltify/resources/users.rb', line 17
def teams(user_id:)
response = get_request("users/#{user_id}/teams")
Collection.from_response(response, type: Team)
end
|