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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98fa0c94eb84588a78f917644c41c5a53cb46bed
4
- data.tar.gz: 6a9a980b9d191d4b85fa7921d80aaa16264fdbd6
3
+ metadata.gz: 455a2bcb49a008f8de8e8d7663b5a7ee111a3afe
4
+ data.tar.gz: a2f55072970526bb6663e4ee0dea2cbcf47d9b79
5
5
  SHA512:
6
- metadata.gz: 40d41f4d09f375b8fe4b12d918f00971ebc793219c5dde22453c9d499b05db8d02b5981c33f8703a1e301b59b763bef35ddaf08f62fcf7ea1a1862ee1db21831
7
- data.tar.gz: a99d62a37a6abd5cdd02b8a45889b440467441727b2ccecfcf4573646dbe6f74668a8075f9d1cdfa54b6893534c0536b8b8c697917fb92267863abd4e17071ae
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.me #=> returns an instance of Tinderbot::Tinder::Models::User
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 me # Get your profile data
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 'me', 'Get your profile data'
9
- def me
8
+ desc 'profile', 'Get your profile data'
9
+ def profile
10
10
  tinder_client = sign_in
11
- puts tinder_client.me.to_yaml
11
+ puts tinder_client.profile.to_yaml
12
12
  end
13
13
 
14
14
  desc 'user USER_ID', 'Get user profile data'
@@ -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(title: 'Journal').when_present.click
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
@@ -20,7 +20,7 @@ module Tinderbot
20
20
  @connection.headers['X-Auth-Token'] = authentication_token
21
21
  end
22
22
 
23
- def me
23
+ def profile
24
24
  Tinderbot::Tinder::Models::User.build_from_tinder_json JSON.parse(@connection.get('profile').body)
25
25
  end
26
26
 
@@ -1,3 +1,3 @@
1
1
  module Tinderbot
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
File without changes
@@ -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 '.me' do
14
- let(:me_tinder_raw_json) { open('spec/fixtures/me.json').read }
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.me }
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.7
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/me.json
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/me.json
181
+ - spec/fixtures/profile.json
182
182
  - spec/fixtures/recommended_users.json
183
183
  - spec/fixtures/updates.json
184
184
  - spec/fixtures/user.json