Class: TinderPyro::Client
- Inherits:
-
Object
- Object
- TinderPyro::Client
- Defined in:
- lib/pyro/client.rb
Instance Method Summary collapse
- #dislike(user_id) ⇒ Object
- #fetch_updates(last_activity_time = Time.now) ⇒ Object
- #get_nearby_users ⇒ Object
- #info_for_user(user_id) ⇒ Object
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #like(user_id) ⇒ Object
- #profile ⇒ Object
- #send_message(user_id, message) ⇒ Object
- #sign_in(facebook_id, facebook_token) ⇒ Object
- #update_location(latitude, longitude) ⇒ Object
Constructor Details
Instance Method Details
#dislike(user_id) ⇒ Object
7 8 9 |
# File 'lib/pyro/client.rb', line 7 def dislike(user_id) @requestor.get_request("pass/#{user_id}") end |
#fetch_updates(last_activity_time = Time.now) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/pyro/client.rb', line 11 def fetch_updates(last_activity_time = Time.now) @requestor.post_request( :updates, last_activity_date: Utilities.format_time(last_activity_time) ) end |
#get_nearby_users ⇒ Object
18 19 20 |
# File 'lib/pyro/client.rb', line 18 def get_nearby_users @requestor.get_request('user/recs') end |
#info_for_user(user_id) ⇒ Object
22 23 24 |
# File 'lib/pyro/client.rb', line 22 def info_for_user(user_id) @requestor.get_request("user/#{user_id}") end |
#like(user_id) ⇒ Object
26 27 28 |
# File 'lib/pyro/client.rb', line 26 def like(user_id) @requestor.get_request("like/#{user_id}") end |
#profile ⇒ Object
30 31 32 |
# File 'lib/pyro/client.rb', line 30 def profile @requestor.get_request(:profile) end |
#send_message(user_id, message) ⇒ Object
34 35 36 37 38 39 |
# File 'lib/pyro/client.rb', line 34 def (user_id, ) @requestor.post_request( "user/matches/#{user_id}", message: ) end |
#sign_in(facebook_id, facebook_token) ⇒ Object
41 42 43 |
# File 'lib/pyro/client.rb', line 41 def sign_in(facebook_id, facebook_token) @requestor.auth_request(facebook_id, facebook_token) end |
#update_location(latitude, longitude) ⇒ Object
45 46 47 |
# File 'lib/pyro/client.rb', line 45 def update_location(latitude, longitude) @requestor.post_request("user/ping", lat: latitude, lon: longitude) end |