Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean-up #138

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 16 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,22 @@ proxying.txt
config.py
api_abstract.py
*.pyc
__pycache__
__pycache__/
find.py
*.log
*.egg-info
env/
maxime.py

.idea/
.vscode/

smstoken.txt
*_token.txt

google/protobuf/.DS_Store

google/.DS_Store
/google/

.DS_Store
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
MIT License

Copyright (c) 2017 fabien bessez
Copyright (c) 2017 Fabien Bessez

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
of this software and associated documentation files (the 'Software'), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
Expand All @@ -12,7 +12,7 @@ furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
Expand Down
71 changes: 43 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ First off, I want to give a shoutout to <a href='https://gist.github.com/rtt/104

**Note: This was updated in June 2018 so it might be outdated.**

### Installation

The new project's structure allow its installation via pip, as it follows:

```
$ git clone ...
$ python3 -m pip install -r requirements.txt
$ python3 -m pip install -e .
```

Because it is not authorized by Tinder to analyse their API, the package is not uploaded on PyPI.

### API Details
<table>
<tbody>
Expand All @@ -30,7 +42,7 @@ First off, I want to give a shoutout to <a href='https://gist.github.com/rtt/104
<tbody>
<tr>
<td>X-Auth-Token</td>
<td>See "How to get facebook_token" below</td>
<td></td>
<td></td>
</tr>
<tr>
Expand Down Expand Up @@ -99,7 +111,7 @@ Note: All curls must be sent with the headers as well (the only exception is tha
<tr>
<td>/user/matches/_id</td>
<td>Send Message to that id</td>
<td>{"message": TEXT GOES HERE}</td>
<td>{'message': TEXT GOES HERE}</td>
<td>POST</td>
</tr>
<tr>
Expand All @@ -117,13 +129,13 @@ Note: All curls must be sent with the headers as well (the only exception is tha
<tr>
<td>/user/ping</td>
<td>Change your location</td>
<td>{"lat": lat, "lon": lon}</td>
<td>{'lat': lat, 'lon': lon}</td>
<td>POST</td>
</tr>
<tr>
<td>/updates</td>
<td>Get all updates since the given date -- inserting "" will give you all updates since creating a Tinder account (i.e. matches, messages sent, etc.)</td>
<td>{"last_activity_date": ""} Input a timestamp: '2017-03-25T20:58:00.404Z' for updates since that time.</td>
<td>Get all updates since the given date -- inserting '' will give you all updates since creating a Tinder account (i.e. matches, messages sent, etc.)</td>
<td>{'last_activity_date': ''} Input a timestamp: '2017-03-25T20:58:00.404Z' for updates since that time.</td>
<td>POST</td>
</tr>
<tr>
Expand All @@ -135,49 +147,49 @@ Note: All curls must be sent with the headers as well (the only exception is tha
<tr>
<td>/profile</td>
<td>Change your search preferences</td>
<td>{"age_filter_min": age_filter_min, "gender_filter": gender_filter, "gender": gender, "age_filter_max": age_filter_max, "distance_filter": distance_filter}</td>
<td>{'age_filter_min': age_filter_min, 'gender_filter': gender_filter, 'gender': gender, 'age_filter_max': age_filter_max, 'distance_filter': distance_filter}</td>
<td>POST</td>
</tr>
<tr>
<td>/profile</td>
<td>(Tinder Plus Only) hide/show age</td>
<td>{"hide_age":boolean}</td>
<td>{'hide_age':boolean}</td>
<td>POST</td>
</tr>
<tr>
<td>/profile</td>
<td>(Tinder Plus Only) hide/show distance</td>
<td>{"hide_distance":boolean}</td>
<td>{'hide_distance':boolean}</td>
<td>POST</td>
</tr>
<tr>
<td>/profile</td>
<td>(Tinder Plus Only) hide/show ads</td>
<td>{"hide_ads":boolean}</td>
<td>{'hide_ads':boolean}</td>
<td>POST</td>
</tr>
<tr>
<td>/profile</td>
<td>(Tinder Plus Only) Set Tinder Blend options to "Recent Activity": Shows more recently active users</td>
<td>{"blend":"recency"}</td>
<td>(Tinder Plus Only) Set Tinder Blend options to 'Recent Activity': Shows more recently active users</td>
<td>{'blend':'recency'}</td>
<td>POST</td>
</tr>
<tr>
<td>/profile</td>
<td>(Tinder Plus Only) Set Tinder Blend options to "Optimal": Scientifically proven to get you more matches</td>
<td>{"blend":"optimal"}</td>
<td>(Tinder Plus Only) Set Tinder Blend options to 'Optimal': Scientifically proven to get you more matches</td>
<td>{'blend':'optimal'}</td>
<td>POST</td>
</tr>
<tr>
<td>/profile</td>
<td>(Tinder Plus Only) Set discovery settings to only people who already liked you</td>
<td>{"discoverable_party":"liked"}</td>
<td>{'discoverable_party':'liked'}</td>
<td>POST</td>
</tr>
<tr>
<td>/passport/user/travel</td>
<td>(Tinder Plus Only) Travel to coordinate</td>
<td>{"lat":lat,"lon":lon}</td>
<td>{'lat':lat,'lon':lon}</td>
<td>POST</td>
</tr>
<tr>
Expand All @@ -200,13 +212,13 @@ Note: All curls must be sent with the headers as well (the only exception is tha
<tr>
<td>/v2/profile/spotify/theme</td>
<td>Set Spotify song</td>
<td>{"id":song_id}</td>
<td>{'id':song_id}</td>
<td>PUT</td>
</tr>
<tr>
<td>/profile/username</td>
<td>Change your webprofile username</td>
<td>{"username": username}</td>
<td>{'username': username}</td>
<td>PUT</td>
</tr>
<tr>
Expand All @@ -223,14 +235,14 @@ Note: All curls must be sent with the headers as well (the only exception is tha
</tr>
<tr>
<td>/v2/meta</td>
<td>Get your own meta data from V2 API (extra data like "top_picks" info)</td>
<td>Get your own meta data from V2 API (extra data like 'top_picks' info)</td>
<td>{}</td>
<td>GET</td>
</tr>
<tr>
<td>/report/_id</td>
<td>Report someone --&gt; There are only a few accepted causes... (see tinder_api.py for options)</td>
<td>{"cause": cause, "text": explanation}</td>
<td>{'cause': cause, 'text': explanation}</td>
<td>POST</td>
</tr>
<tr>
Expand All @@ -253,13 +265,13 @@ Note: All curls must be sent with the headers as well (the only exception is tha
</tr>
<tr>
<td>/matches/{match id}</td>
<td>Get a match from its id (thanks <a href="https://github.com/jtabet"> @jtabet </a>)</td>
<td>Get a match from its id (thanks <a href='https://github.com/jtabet'> @jtabet </a>)</td>
<td>{}</td>
<td>GET</td>
</tr>
<tr>
<td>/message/{message id}</td>
<td>Get a message from its id (thanks <a href="https://github.com/jtabet"> @jtabet </a>)</td>
<td>Get a message from its id (thanks <a href='https://github.com/jtabet'> @jtabet </a>)</td>
<td>{}</td>
<td>GET</td>
</tr>
Expand All @@ -272,7 +284,7 @@ Note: All curls must be sent with the headers as well (the only exception is tha
<tr>
<td>/passport/user/travel</td>
<td>Change your swiping location</td>
<td>{"lat": latitutde, "lon": longitude}</td>
<td>{'lat': latitutde, 'lon': longitude}</td>
<td>POST</td>
</tr>
<tr>
Expand All @@ -284,7 +296,7 @@ Note: All curls must be sent with the headers as well (the only exception is tha
<tr>
<td>/profile/job</td>
<td>Set job</td>
<td>{"company":{"id":"17767109610","name":"University of Miami","displayed":true},"title":{"id":"106123522751852","name":"Research Assistant","displayed":true}}</td>
<td>{'company':{'id':'17767109610','name':'University of Miami','displayed':true},'title':{'id':'106123522751852','name':'Research Assistant','displayed':true}}</td>
<td>PUT</td>
</tr>
<tr>
Expand All @@ -296,7 +308,7 @@ Note: All curls must be sent with the headers as well (the only exception is tha
<tr>
<td>/profile/school</td>
<td>Set school(s)</td>
<td>{"schools":[{"id":school_id}]}</td>
<td>{'schools':[{'id':school_id}]}</td>
<td>PUT</td>
</tr>
<tr>
Expand Down Expand Up @@ -425,7 +437,7 @@ With your token ready, add it to tinder_config_ex.py (value for tinder_token). Y
```

<h3> Sorting: </h3>
<h4> Sorting matches by "age", "message_count", and "gender" </h4>
<h4> Sorting matches by 'age', 'message_count', and 'gender' </h4>

```javascript
[
Expand Down Expand Up @@ -459,12 +471,12 @@ With your token ready, add it to tinder_config_ex.py (value for tinder_token). Y

<h3> Friends' Pingtimes: </h3>
<h4> friends_pingtimes() will return the following for each facebook friend of yours who has a Tinder
friend_pingtime_by_name("Joakim Noah") will return the pingtime for only that particular friend.
friend_pingtime_by_name('Joakim Noah') will return the pingtime for only that particular friend.
The following is a sample result for friends_pingtimes(): </h4>

`
"Joakim Noah -----> 15 days, 16 hrs 46 min 57 sec"
"Carmelo Anthony ------> 0 days, 22 hrs 23 min 45 sec"
'Joakim Noah -----> 15 days, 16 hrs 46 min 57 sec'
'Carmelo Anthony ------> 0 days, 22 hrs 23 min 45 sec'
...
`

Expand Down Expand Up @@ -508,3 +520,6 @@ The following is a sample result for friends_pingtimes(): </h4>
}
}
```
### TODO
- Write a better updated README.md
- Continue adding features to User class
217 changes: 0 additions & 217 deletions Tinder API.ipynb

This file was deleted.

41 changes: 0 additions & 41 deletions fb_auth_token.py

This file was deleted.