Tinder Pyro
A wrapper for the Tinder App API.
Installation
Add this line to your application's Gemfile
:
gem 'tinder_pyro', '~> 0.0.1'
And then execute:
$ bundle
Alternatively, install it via command line:
$ gem install tinder_pyro
Getting Your oauth Token
Before using pyro, you must grab your Facebook oauth token. This is best done by installing (Charles)[http://www.charlesproxy.com/]. This will allow you to view all HTTP requests from your phone to the network. Note that Tinder uses SSL so you must set up SSL proxying.
After setting up your proxy, all you need to do in log out and then back in to
the Tinder app. Make sure you are recording with Charles, and it will give you a
request to https://api.gotinder.com/auth
that looks like:
{
"facebook_token":"CAAGm0PX4ZCp...",
"facebook_id": "547255555"
}
Now use your Facebook ID and token as shown below.
Usage
Authenticating
FACEBOOK_ID = '547255555'
FACEBOOK_TOKEN = 'CAAGm0PX4ZCp...'
pyro = TinderPyro::Client.new
pyro.sign_in(FACEBOOK_ID, FACEBOOK_TOKEN)
Interacting with users
# Get nearby users
pyro.get_nearby_users
user_id = '51ddbe849573ef0d12011111'
# Get a user's info
pyro.info_for_user(user_id)
# Swipe Right
pyro.like(user_id)
# Swipe Left
pyro.dislike(user_id)
# Send a saucy message
pyro.(user_id, 'I luv u plz b my friend')
Interacting with yourself
# Update your location
# Note: this request often takes around 30 seconds
latitude = 16.7758
longitude = 3.0094
pyro.update_location(latitude, longitude)
# Fetch updates (messages, likes, etc)
pyro.fetch_updates
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Add tests and make sure they pass
- Create new Pull Request
Credits
- Neal Kemp
- Carolyn Atterbury for coming up with the name
Copyright © 2014 Neal Kemp
Released under the MIT License, which can be found in the repository in LICENSE.txt
.