tinder_client 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -11
- data/.gitignore +1 -0
- data/Gemfile +4 -1
- data/README.md +32 -29
- data/lib/dry_helper.rb +36 -0
- data/lib/tasks/tinder.rake +6 -6
- data/lib/tinder/client.rb +18 -11
- data/lib/tinder/get_recommended_users.rb +47 -43
- data/lib/tinder/get_updates.rb +58 -59
- data/lib/tinder/version.rb +1 -1
- data/lib/tinder.rb +1 -6
- data/tinder_client.gemspec +8 -8
- metadata +33 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ed345df67d63946c331dff8a6761abf893db474b727d350715c62468939a92e
|
4
|
+
data.tar.gz: ccab26f332ee7e3151e9d6935ff48a149109b148954e4dcd8cc72c10a44633c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2772f7e1b70e7243e132a4d2b535cb9053462a7a2557752577da958437987425f0634d176c706f84fc6f7df7a2c00c75251d4a5a7e51ab8ce73f55474fd0908b
|
7
|
+
data.tar.gz: bbb9a23c0b84322adb7c833834c36c6ba528d71e64920126ced91d89ba75c2d0a4a7d626add9013fc3008e54968dfde75d02e7a5adcc049bfa8ab2cbfb6d2c3d
|
data/.circleci/config.yml
CHANGED
@@ -3,25 +3,16 @@ jobs:
|
|
3
3
|
build:
|
4
4
|
parallelism: 1
|
5
5
|
docker:
|
6
|
-
- image: circleci/ruby:2.6.
|
6
|
+
- image: circleci/ruby:2.6.4
|
7
7
|
environment:
|
8
8
|
BUNDLE_JOBS: 2
|
9
9
|
BUNDLE_RETRY: 3
|
10
|
-
BUNDLE_PATH: ~/.
|
10
|
+
BUNDLE_PATH: ~/.bundler
|
11
11
|
steps:
|
12
12
|
- checkout
|
13
|
-
- run:
|
14
|
-
name: bundle lock
|
15
|
-
command: mkdir -p ~/.cache; bundle lock --update
|
16
|
-
- restore_cache:
|
17
|
-
key: bundle-{{ checksum "Gemfile.lock" }}
|
18
13
|
- run:
|
19
14
|
name: bundle install
|
20
15
|
command: bundle check &>/dev/null || bundle install
|
21
|
-
- save_cache:
|
22
|
-
key: bundle-{{ checksum "Gemfile.lock" }}
|
23
|
-
paths:
|
24
|
-
- ~/.cache/bundler
|
25
16
|
- run:
|
26
17
|
name: rspec
|
27
18
|
path: .
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
|
+
gem 'bundler', '~> 1.17.2'
|
3
|
+
|
4
|
+
gem 'codecov'
|
2
5
|
|
3
6
|
gem 'faraday', '~> 0.15.0'
|
4
7
|
gem 'hashdiff', ['>= 1.0.0.beta1'] # fix for webmock
|
5
8
|
gem 'rspec', '~> 3.8'
|
6
|
-
gem 'webmock', '
|
9
|
+
gem 'webmock', '3.6.0'
|
7
10
|
|
8
11
|
gem 'dry-initializer', git: 'https://github.com/dry-rb/dry-initializer.git'
|
9
12
|
gem 'dry-struct', git: 'https://github.com/dry-rb/dry-struct.git'
|
data/README.md
CHANGED
@@ -1,50 +1,53 @@
|
|
1
1
|
RSpec Tests: [![CircleCI](https://circleci.com/gh/patrickclery/tinder_client.svg?style=svg)](https://circleci.com/gh/patrickclery/tinder_client)
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/tinder_client`. To experiment with that code, run `bin/console` for an interactive prompt.
|
6
|
-
|
7
|
-
TODO: Delete this and the text above, and describe your gem
|
8
|
-
|
9
|
-
## Installation
|
10
|
-
|
11
|
-
Add this line to your application's Gemfile:
|
12
|
-
|
13
|
-
```ruby
|
14
|
-
gem 'tinder_client'
|
15
|
-
```
|
3
|
+
Code Coverage: [![codecov](https://codecov.io/gh/patrickclery/tinder_client/branch/master/graph/badge.svg)](https://codecov.io/gh/patrickclery/tinder_client)
|
16
4
|
|
17
|
-
|
18
|
-
|
19
|
-
$ bundle
|
20
|
-
|
21
|
-
Or install it yourself as:
|
5
|
+
# TinderClient
|
22
6
|
|
23
|
-
|
7
|
+
A Ruby gem to interact with Tinder's REST API.
|
24
8
|
|
25
9
|
## Usage
|
26
10
|
|
11
|
+
### Rake Commands
|
12
|
+
|
27
13
|
```ruby
|
28
|
-
rake tinder:
|
14
|
+
rake tinder:updates # Fetch updates
|
29
15
|
rake tinder:profile # Fetch my profile
|
30
16
|
rake tinder:recommendations # Fetch recommendations
|
31
17
|
rake tinder:save_token # Save an API token to $token_path ake tinder:get_updates # Fetch updates
|
32
18
|
```
|
33
19
|
|
34
|
-
|
20
|
+
To grab a token, call a rake command & specify the `phone_number` or `api_token` in your environment variables.
|
35
21
|
|
36
|
-
|
22
|
+
### `rake tinder:save_token`
|
37
23
|
|
38
|
-
|
24
|
+
```
|
25
|
+
$ rake tinder:save_token \
|
26
|
+
phone_number=15556667777 \
|
27
|
+
tinder_token_path=/tmp
|
28
|
+
Enter the confirmation code sent to 15556667777>
|
29
|
+
123456
|
30
|
+
Validating...
|
31
|
+
Done!
|
32
|
+
Your refresh token is eyJhbGciOiJIUzI1NiJ9.MTc3ODk5MDk4MDM.5q4R0H08rE0Dd9KgxMPp6jcTfIBLCXgEuVZfC9znJTE
|
33
|
+
Logging in...
|
34
|
+
Done!
|
35
|
+
Your tinder API token is 12a3bc45-a123-123a-1a23-1234abc4de5f
|
36
|
+
Saved to /tmp/tinder_access_token.txt
|
37
|
+
```
|
39
38
|
|
40
|
-
## Contributing
|
41
39
|
|
42
|
-
|
40
|
+
### Use Tinder Test-Helpers in your RSpec Tests
|
43
41
|
|
44
|
-
|
42
|
+
`tinder_client` has _[webmock](https://github.com/bblimke/webmock) stubs_ you can include in your project to get fake responses back from Tinder:
|
45
43
|
|
46
|
-
|
44
|
+
```ruby
|
45
|
+
gem_dir = Gem::Specification.find_by_name("tinder_client").gem_dir
|
46
|
+
require "#{gem_dir}/spec/tinder/contexts/http_request_stubs"
|
47
47
|
|
48
|
-
|
48
|
+
RSpec.describe 'some test' do
|
49
|
+
include_context 'http_request_stubs'
|
49
50
|
|
50
|
-
|
51
|
+
# Your tests that use Tinder HTTP requests go here
|
52
|
+
end
|
53
|
+
```
|
data/lib/dry_helper.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'dry-types'
|
2
|
+
require 'dry-struct'
|
3
|
+
|
4
|
+
# This automatically transforms keys to symbols when you pass Structs a hash
|
5
|
+
# that has string keys
|
6
|
+
class Dry::Struct
|
7
|
+
transform_keys(&:to_sym)
|
8
|
+
end
|
9
|
+
|
10
|
+
# The following allow you to access types with Types.<type reference>
|
11
|
+
#
|
12
|
+
# ```ruby
|
13
|
+
# email = Types.string.constrained(
|
14
|
+
# format: /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i
|
15
|
+
# )
|
16
|
+
# drinking_age = Types.integer.constrained(gt: 21)
|
17
|
+
# ````
|
18
|
+
module Types
|
19
|
+
include Dry.Types()
|
20
|
+
|
21
|
+
class << self
|
22
|
+
|
23
|
+
# @param String The key of the Dry::Type -- see Dry::Types.type_keys
|
24
|
+
def [] (type_key)
|
25
|
+
Dry::Types[type_key]
|
26
|
+
end
|
27
|
+
|
28
|
+
# This aliases all the Dry::Types keys as class methods
|
29
|
+
Dry::Types.type_keys.each do |method_name|
|
30
|
+
define_method method_name do
|
31
|
+
Dry::Types[method_name]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
data/lib/tasks/tinder.rake
CHANGED
@@ -9,7 +9,7 @@ require "tinder"
|
|
9
9
|
# `tinder_token_path` - where to store access_token.txt
|
10
10
|
|
11
11
|
def fetch_token(phone_number)
|
12
|
-
client = Tinder::Client
|
12
|
+
client = Tinder::Client.new
|
13
13
|
|
14
14
|
# Request a code
|
15
15
|
client.request_code(phone_number)
|
@@ -50,7 +50,7 @@ namespace :tinder do
|
|
50
50
|
|
51
51
|
desc 'Fetch my profile'
|
52
52
|
task :profile do
|
53
|
-
client = Tinder::Client
|
53
|
+
client = Tinder::Client.new
|
54
54
|
client.api_token = IO.read(token_path).chomp
|
55
55
|
profile = client.profile
|
56
56
|
puts profile
|
@@ -58,18 +58,18 @@ namespace :tinder do
|
|
58
58
|
|
59
59
|
desc 'Fetch recommendations'
|
60
60
|
task :recommendations do
|
61
|
-
client = Tinder::Client
|
61
|
+
client = Tinder::Client.new
|
62
62
|
client.api_token = IO.read(token_path).chomp
|
63
63
|
|
64
|
-
feed = client.get_recommended_users
|
64
|
+
feed = client.get_recommended_users
|
65
65
|
feed.each do |person|
|
66
66
|
puts person
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
70
|
desc 'Fetch updates'
|
71
|
-
task :
|
72
|
-
client = Tinder::Client
|
71
|
+
task :updates do
|
72
|
+
client = Tinder::Client.new
|
73
73
|
client.api_token = IO.read(token_path).chomp
|
74
74
|
|
75
75
|
updates = client.get_updates
|
data/lib/tinder/client.rb
CHANGED
@@ -1,26 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "tinder"
|
4
|
+
require "faraday"
|
5
|
+
|
1
6
|
module Tinder
|
2
7
|
|
3
8
|
class Client
|
4
9
|
# Always prefer V2 endpoints as the API is less buggy than V1
|
5
|
-
BASE_URI = 'https://api.gotinder.com
|
10
|
+
BASE_URI = 'https://api.gotinder.com'
|
6
11
|
ENDPOINTS = {
|
7
|
-
request_code:
|
8
|
-
login:
|
9
|
-
validate:
|
12
|
+
request_code: "/v2/auth/sms/send?auth_type=sms",
|
13
|
+
login: "/v2/auth/login/sms",
|
14
|
+
validate: "/v2/auth/sms/validate?auth_type=sms",
|
15
|
+
recommendations: "/v2/recs/core",
|
16
|
+
updates: "/updates"
|
10
17
|
}
|
11
18
|
|
12
19
|
attr_accessor :api_token
|
13
20
|
attr_accessor :refresh_token
|
14
21
|
|
15
22
|
def post(url, **data)
|
16
|
-
response = Faraday.post(url, JSON.generate(data), headers
|
17
|
-
JSON.parse(response.body)
|
23
|
+
response = Faraday.post(url, JSON.generate(data), headers)
|
24
|
+
JSON.parse(response.body) unless response.body.nil?
|
18
25
|
end
|
19
26
|
|
20
27
|
def get(url, **data)
|
21
28
|
# GET requests won't get a response using JSON
|
22
|
-
response = Faraday.get(url, data, headers
|
23
|
-
JSON.parse(response.body)
|
29
|
+
response = Faraday.get(url, data, headers)
|
30
|
+
JSON.parse(response.body) unless response.body.nil?
|
24
31
|
end
|
25
32
|
|
26
33
|
# @param phone_number String
|
@@ -60,10 +67,10 @@ module Tinder
|
|
60
67
|
|
61
68
|
protected
|
62
69
|
|
63
|
-
def headers
|
70
|
+
def headers
|
64
71
|
{
|
65
|
-
|
66
|
-
|
72
|
+
"app_version": "6.9.4",
|
73
|
+
"platform": "ios",
|
67
74
|
"content-type": "application/json",
|
68
75
|
"User-agent": "Tinder/7.5.3 (iPhone; iOS 10.3.2; Scale/2.00)",
|
69
76
|
"Accept": "application/json",
|
@@ -6,7 +6,7 @@ module Tinder
|
|
6
6
|
yield get_recommended_users && return
|
7
7
|
end
|
8
8
|
|
9
|
-
data = get(
|
9
|
+
data = get(endpoint(:recommendations))
|
10
10
|
|
11
11
|
fail 'Connection Timeout' unless data.dig('data', 'timeout').nil?
|
12
12
|
|
@@ -18,62 +18,66 @@ module Tinder
|
|
18
18
|
results = Array(data.dig('data', 'results'))
|
19
19
|
return [] if results.first.is_a?(String) && results.first == 'You are out of likes today. Come back later to continue swiping on more people.'
|
20
20
|
|
21
|
-
|
21
|
+
results.map { |user_data| RecommendedUser.new(user_data) }
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
# Return this object
|
25
26
|
class RecommendedUser < Dry::Struct
|
26
27
|
|
27
|
-
attribute :type,
|
28
|
+
attribute :type, Types.string
|
28
29
|
attribute :user do
|
29
|
-
attribute :_id,
|
30
|
-
attribute :bio,
|
31
|
-
attribute :birth_date,
|
32
|
-
attribute :name,
|
33
|
-
attribute :photos,
|
34
|
-
attribute :id,
|
35
|
-
attribute :crop_info do
|
36
|
-
attribute :user do
|
37
|
-
attribute :width_pct,
|
38
|
-
attribute :x_offset_pct,
|
39
|
-
attribute :height_pct,
|
40
|
-
attribute :y_offset_pct,
|
30
|
+
attribute :_id, Types.string
|
31
|
+
attribute :bio, Types.string
|
32
|
+
attribute :birth_date, Types.string
|
33
|
+
attribute :name, Types.string
|
34
|
+
attribute :photos, Types.array do
|
35
|
+
attribute :id, Types.string
|
36
|
+
attribute? :crop_info do
|
37
|
+
attribute? :user do
|
38
|
+
attribute :width_pct, Types.float
|
39
|
+
attribute :x_offset_pct, Types.float
|
40
|
+
attribute :height_pct, Types.float
|
41
|
+
attribute :y_offset_pct, Types.float
|
41
42
|
end
|
42
|
-
attribute :algo do
|
43
|
-
attribute :width_pct,
|
44
|
-
attribute :x_offset_pct,
|
45
|
-
attribute :height_pct,
|
46
|
-
attribute :y_offset_pct,
|
43
|
+
attribute? :algo do
|
44
|
+
attribute :width_pct, Types.float
|
45
|
+
attribute :x_offset_pct, Types.float
|
46
|
+
attribute :height_pct, Types.float
|
47
|
+
attribute :y_offset_pct, Types.float
|
47
48
|
end
|
48
|
-
attribute :processed_by_bullseye,
|
49
|
-
attribute :user_customized,
|
50
|
-
attribute :url,
|
51
|
-
attribute :processedFiles,
|
52
|
-
attribute :fileName,
|
53
|
-
attribute :extension,
|
49
|
+
attribute :processed_by_bullseye, Types.bool
|
50
|
+
attribute :user_customized, Types.bool
|
51
|
+
attribute? :url, Types.string
|
52
|
+
attribute? :processedFiles, Types.array
|
53
|
+
attribute? :fileName, Types.string
|
54
|
+
attribute? :extension, Types.string
|
54
55
|
end
|
55
56
|
end
|
56
|
-
attribute :gender,
|
57
|
-
attribute :jobs,
|
58
|
-
attribute :schools,
|
59
|
-
attribute :name,
|
57
|
+
attribute :gender, Types.integer
|
58
|
+
attribute :jobs, Types.array
|
59
|
+
attribute :schools, Types.array do
|
60
|
+
attribute :name, Types.string
|
60
61
|
end
|
61
|
-
attribute :
|
62
|
-
|
63
|
-
|
62
|
+
attribute? :city do
|
63
|
+
attribute :name, Types.string
|
64
|
+
end
|
65
|
+
attribute? :is_traveling, Types.bool
|
66
|
+
attribute? :hide_age, Types.bool
|
67
|
+
attribute? :hide_distance, Types.bool
|
64
68
|
end
|
65
69
|
attribute :facebook do
|
66
|
-
attribute :common_connections,
|
67
|
-
attribute :connection_count,
|
68
|
-
attribute :common_interests,
|
70
|
+
attribute :common_connections, Types.array
|
71
|
+
attribute :connection_count, Types.integer
|
72
|
+
attribute :common_interests, Types.array
|
69
73
|
end
|
70
|
-
attribute :spotify,
|
71
|
-
attribute :distance_mi,
|
72
|
-
attribute :content_hash,
|
73
|
-
attribute :s_number,
|
74
|
-
attribute :teasers,
|
75
|
-
attribute :type,
|
76
|
-
attribute :string,
|
74
|
+
attribute :spotify, Types.hash
|
75
|
+
attribute :distance_mi, Types.integer
|
76
|
+
attribute :content_hash, Types.string
|
77
|
+
attribute :s_number, Types.integer
|
78
|
+
attribute :teasers, Types.array do
|
79
|
+
attribute :type, Types.string
|
80
|
+
attribute :string, Types.string
|
77
81
|
end
|
78
82
|
end
|
79
83
|
end
|
data/lib/tinder/get_updates.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
module Tinder
|
2
|
-
|
3
2
|
class Client
|
4
3
|
# This includes the matches, as well as the messages, so must be parsed
|
5
4
|
def get_updates(since = Time.now)
|
6
|
-
response =
|
5
|
+
response = post(endpoint(:updates))
|
7
6
|
|
8
7
|
fail 'Connection Timeout' unless response.dig('data', 'timeout').nil?
|
9
8
|
fail 'Rate Limited' if response.dig('error', 'message') == 'RATE_LIMITED'
|
@@ -16,69 +15,69 @@ module Tinder
|
|
16
15
|
|
17
16
|
class Updates < Dry::Struct
|
18
17
|
|
19
|
-
attribute :blocks,
|
20
|
-
attribute :deleted_lists,
|
21
|
-
attribute :goingout,
|
22
|
-
attribute :harassing_messages,
|
23
|
-
attribute :inbox,
|
24
|
-
attribute :_id,
|
25
|
-
attribute :match_id,
|
26
|
-
attribute :sent_date,
|
27
|
-
attribute :message,
|
28
|
-
attribute :to,
|
29
|
-
attribute :from,
|
30
|
-
attribute :created_date,
|
31
|
-
attribute :timestamp,
|
18
|
+
attribute :blocks, Types.array.of(Types.string)
|
19
|
+
attribute :deleted_lists, Types.array
|
20
|
+
attribute :goingout, Types.array
|
21
|
+
attribute :harassing_messages, Types.array
|
22
|
+
attribute :inbox, Types.array do
|
23
|
+
attribute :_id, Types.string
|
24
|
+
attribute :match_id, Types.string
|
25
|
+
attribute :sent_date, Types.string
|
26
|
+
attribute :message, Types.string
|
27
|
+
attribute :to, Types.string
|
28
|
+
attribute :from, Types.string
|
29
|
+
attribute :created_date, Types.string
|
30
|
+
attribute :timestamp, Types.send('coercible.string')
|
32
31
|
end
|
33
|
-
attribute :poll_interval,
|
34
|
-
attribute :liked_messages,
|
35
|
-
attribute :message_id,
|
36
|
-
attribute :updated_at,
|
37
|
-
attribute :liker_id,
|
38
|
-
attribute :match_id,
|
39
|
-
attribute :is_liked,
|
32
|
+
attribute :poll_interval, Types.hash
|
33
|
+
attribute :liked_messages, Types.array do
|
34
|
+
attribute :message_id, Types.string
|
35
|
+
attribute :updated_at, Types.string
|
36
|
+
attribute :liker_id, Types.string
|
37
|
+
attribute :match_id, Types.string
|
38
|
+
attribute :is_liked, Types.bool
|
40
39
|
end
|
41
|
-
attribute :lists,
|
42
|
-
attribute :matches,
|
43
|
-
attribute :_id,
|
44
|
-
attribute :closed,
|
45
|
-
attribute :common_friend_count,
|
46
|
-
attribute :common_like_count,
|
47
|
-
attribute :created_date,
|
48
|
-
attribute :dead,
|
49
|
-
attribute :following,
|
50
|
-
attribute :following_moments,
|
51
|
-
attribute :id,
|
52
|
-
attribute :is_boost_match,
|
53
|
-
attribute :is_fast_match,
|
54
|
-
attribute :is_super_like,
|
55
|
-
attribute :last_activity_date,
|
56
|
-
attribute :message_count,
|
57
|
-
attribute :messages,
|
58
|
-
attribute :_id,
|
59
|
-
attribute :match_id,
|
60
|
-
attribute :sent_date,
|
61
|
-
attribute :message,
|
62
|
-
attribute :to,
|
63
|
-
attribute :from,
|
64
|
-
attribute :created_date,
|
65
|
-
attribute :timestamp,
|
40
|
+
attribute :lists, Types.array
|
41
|
+
attribute :matches, Types.array do
|
42
|
+
attribute :_id, Types.string
|
43
|
+
attribute :closed, Types.bool
|
44
|
+
attribute :common_friend_count, Types.integer
|
45
|
+
attribute :common_like_count, Types.integer
|
46
|
+
attribute :created_date, Types.string
|
47
|
+
attribute :dead, Types.bool
|
48
|
+
attribute :following, Types.bool
|
49
|
+
attribute :following_moments, Types.bool
|
50
|
+
attribute :id, Types.string
|
51
|
+
attribute :is_boost_match, Types.bool
|
52
|
+
attribute :is_fast_match, Types.bool
|
53
|
+
attribute :is_super_like, Types.bool
|
54
|
+
attribute :last_activity_date, Types.string
|
55
|
+
attribute :message_count, Types.integer
|
56
|
+
attribute :messages, Types.array do
|
57
|
+
attribute :_id, Types.string
|
58
|
+
attribute :match_id, Types.string
|
59
|
+
attribute :sent_date, Types.string
|
60
|
+
attribute :message, Types.string
|
61
|
+
attribute :to, Types.string
|
62
|
+
attribute :from, Types.string
|
63
|
+
attribute :created_date, Types.string
|
64
|
+
attribute :timestamp, Types.send('coercible.string')
|
66
65
|
end
|
67
|
-
attribute :muted,
|
68
|
-
attribute :participants,
|
69
|
-
attribute :pending,
|
66
|
+
attribute :muted, Types.bool
|
67
|
+
attribute :participants, Types.array
|
68
|
+
attribute :pending, Types.bool
|
70
69
|
attribute :person do
|
71
|
-
attribute :bio,
|
72
|
-
attribute :birth_date,
|
73
|
-
attribute :gender,
|
74
|
-
attribute :name,
|
75
|
-
attribute :ping_time,
|
76
|
-
attribute :photos,
|
70
|
+
attribute? :bio, Types.string
|
71
|
+
attribute :birth_date, Types.string
|
72
|
+
attribute :gender, Types.integer
|
73
|
+
attribute :name, Types.string
|
74
|
+
attribute :ping_time, Types.string
|
75
|
+
attribute :photos, Types.array
|
77
76
|
end
|
78
|
-
attribute :readreceipt,
|
79
|
-
attribute :seen,
|
77
|
+
attribute :readreceipt, Types.hash
|
78
|
+
attribute :seen, Types.hash
|
80
79
|
end
|
81
|
-
attribute :squads,
|
80
|
+
attribute :squads, Types.array
|
82
81
|
|
83
82
|
end
|
84
83
|
end
|
data/lib/tinder/version.rb
CHANGED
data/lib/tinder.rb
CHANGED
data/tinder_client.gemspec
CHANGED
@@ -27,12 +27,12 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
|
29
29
|
spec.add_dependency "bundler"
|
30
|
-
spec.add_dependency "dry-initializer"
|
31
|
-
spec.add_dependency "dry-struct"
|
32
|
-
spec.add_dependency "dry-types"
|
33
|
-
spec.add_dependency "faraday"
|
34
|
-
spec.add_dependency "hashdiff"
|
35
|
-
spec.add_dependency "rake"
|
36
|
-
spec.add_dependency "rspec"
|
37
|
-
spec.add_dependency "webmock"
|
30
|
+
spec.add_dependency "dry-initializer"
|
31
|
+
spec.add_dependency "dry-struct"
|
32
|
+
spec.add_dependency "dry-types"
|
33
|
+
spec.add_dependency "faraday"
|
34
|
+
spec.add_dependency "hashdiff"
|
35
|
+
spec.add_dependency "rake"
|
36
|
+
spec.add_dependency "rspec"
|
37
|
+
spec.add_dependency "webmock"
|
38
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tinder_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Clery
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,114 +28,114 @@ dependencies:
|
|
28
28
|
name: dry-initializer
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: dry-struct
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: dry-types
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: faraday
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0
|
75
|
+
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: hashdiff
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '0'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '0'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: webmock
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: '0'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: '0'
|
139
139
|
description: A client for Tinder written in Ruby
|
140
140
|
email:
|
141
141
|
- patrick.clery@gmail.com
|
@@ -156,6 +156,7 @@ files:
|
|
156
156
|
- Rakefile
|
157
157
|
- bin/console
|
158
158
|
- bin/setup
|
159
|
+
- lib/dry_helper.rb
|
159
160
|
- lib/tasks/tinder.rake
|
160
161
|
- lib/tinder.rb
|
161
162
|
- lib/tinder/account_settings.rb
|