tinderbot 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/tinderbot/cli/application.rb +3 -3
- data/lib/tinderbot/facebook.rb +1 -1
- data/lib/tinderbot/tinder/client.rb +1 -1
- data/lib/tinderbot/version.rb +1 -1
- data/spec/fixtures/{me.json → profile.json} +0 -0
- data/spec/tinder/client_spec.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 455a2bcb49a008f8de8e8d7663b5a7ee111a3afe
|
4
|
+
data.tar.gz: a2f55072970526bb6663e4ee0dea2cbcf47d9b79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98d4fcf63c78ba51bda08f98adae38bea7aba9277bd28b69b94894241539238677aeca6c6bbcbc7a3f295955ca30dcdf94b4633e621a4d74232666da0e00e46a
|
7
|
+
data.tar.gz: f15103549046be9bb66dbafb90ad11ef2e73d68af61768a5db731418dcd7439c552532078bbf811ff45141da97839bccddbaf9417ecd6d129fb58ffba7be6c75
|
data/README.md
CHANGED
@@ -52,7 +52,7 @@ tinder_client.sign_in tinder_authentication_token
|
|
52
52
|
|
53
53
|
### Interacting with the Tinder API
|
54
54
|
```ruby
|
55
|
-
user = tinder_client.
|
55
|
+
user = tinder_client.profile #=> returns an instance of Tinderbot::Tinder::Models::User
|
56
56
|
user.original_tinder_json #=> {...} original json from tinder's API
|
57
57
|
user.id #=> 1234
|
58
58
|
user.name #=> 'Bob'
|
@@ -92,7 +92,7 @@ Commands:
|
|
92
92
|
tinderbot dislike USER_ID # Dislike user
|
93
93
|
tinderbot help [COMMAND] # Describe available commands or one specific command
|
94
94
|
tinderbot like USER_ID # Like user
|
95
|
-
tinderbot
|
95
|
+
tinderbot profile # Get your profile data
|
96
96
|
tinderbot recommended # Get recommended users
|
97
97
|
tinderbot send USER_ID MESSAGE # Send message to user
|
98
98
|
tinderbot updates # Get updates
|
@@ -5,10 +5,10 @@ module Tinderbot
|
|
5
5
|
class Application < Thor
|
6
6
|
FACEBOOK_CREDENTIALS_FILE = 'facebook_credentials.pstore'
|
7
7
|
|
8
|
-
desc '
|
9
|
-
def
|
8
|
+
desc 'profile', 'Get your profile data'
|
9
|
+
def profile
|
10
10
|
tinder_client = sign_in
|
11
|
-
puts tinder_client.
|
11
|
+
puts tinder_client.profile.to_yaml
|
12
12
|
end
|
13
13
|
|
14
14
|
desc 'user USER_ID', 'Get user profile data'
|
data/lib/tinderbot/facebook.rb
CHANGED
@@ -12,7 +12,7 @@ module Tinderbot
|
|
12
12
|
facebook_authentication_token = /#access_token=(.*)&expires_in/.match(browser.url).captures[0]
|
13
13
|
|
14
14
|
browser.goto 'https://www.facebook.com/'
|
15
|
-
browser.link(
|
15
|
+
browser.link(class: 'fbxWelcomeBoxName').when_present.click
|
16
16
|
facebook_user_id = /fbid=(.*)&set/.match(browser.link(class: 'profilePicThumb').when_present.href).captures[0]
|
17
17
|
|
18
18
|
browser.close
|
data/lib/tinderbot/version.rb
CHANGED
File without changes
|
data/spec/tinder/client_spec.rb
CHANGED
@@ -10,13 +10,13 @@ describe Tinderbot::Tinder::Client do
|
|
10
10
|
it { expect(connection.headers[:user_agent]).to eq(Tinderbot::Tinder::Client::CONNECTION_USER_AGENT) }
|
11
11
|
end
|
12
12
|
|
13
|
-
describe '.
|
14
|
-
let(:me_tinder_raw_json) { open('spec/fixtures/
|
13
|
+
describe '.profile' do
|
14
|
+
let(:me_tinder_raw_json) { open('spec/fixtures/profile.json').read }
|
15
15
|
|
16
16
|
before { expect(connection).to receive(:get).with('profile').and_return(connection) }
|
17
17
|
before { expect(connection).to receive(:body).and_return(me_tinder_raw_json) }
|
18
18
|
|
19
|
-
subject { tinder_client.
|
19
|
+
subject { tinder_client.profile }
|
20
20
|
|
21
21
|
it { should eql? Tinderbot::Tinder::Models::User.build_from_tinder_json(JSON.parse(me_tinder_raw_json)) }
|
22
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tinderbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Venezia
|
@@ -144,7 +144,7 @@ files:
|
|
144
144
|
- lib/tinderbot/tinder/client.rb
|
145
145
|
- lib/tinderbot/tinder/models/user.rb
|
146
146
|
- lib/tinderbot/version.rb
|
147
|
-
- spec/fixtures/
|
147
|
+
- spec/fixtures/profile.json
|
148
148
|
- spec/fixtures/recommended_users.json
|
149
149
|
- spec/fixtures/updates.json
|
150
150
|
- spec/fixtures/user.json
|
@@ -178,7 +178,7 @@ signing_key:
|
|
178
178
|
specification_version: 4
|
179
179
|
summary: Ruby wrapper for the Tinder API and automatic liker bot.
|
180
180
|
test_files:
|
181
|
-
- spec/fixtures/
|
181
|
+
- spec/fixtures/profile.json
|
182
182
|
- spec/fixtures/recommended_users.json
|
183
183
|
- spec/fixtures/updates.json
|
184
184
|
- spec/fixtures/user.json
|