tinderbot 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00e856dd541aa48de6a2e9fc02d33dbfc9d55a65
4
- data.tar.gz: b059da4facf4db2ff64b80067d45f5f9642b4cf1
3
+ metadata.gz: 9e89d1bf14528e439e89866b3ec9e75452f429c0
4
+ data.tar.gz: d1a3c038c99dd793854b204a84c23f48062bc624
5
5
  SHA512:
6
- metadata.gz: 7181c4ac6fb5ab568fbd525a1b535003e25d66072685424d9eb340eab84c392aa557eb8de9f08a129fd349f301ed1a99c1dbb339625143212d5c0e03d33f25c7
7
- data.tar.gz: 5ab43184640e78d9b5e849323fe0935fe3ba3b83f25fc4e9cf1bc15fbf7424a4478fba109552602ea4b3679931dcdf226d823aa572a4959cc5aa765961b7fcb0
6
+ metadata.gz: d93a860c48752a0a3067a15663f97a9a89495479f66d39772bb4bc1ad49ea15290136bb5e6c7864461378641b0c3797df7bf095a1aed78b5d0d58d5d8375b21a
7
+ data.tar.gz: fe417b4a5c1aadb65d69627c3d603166977ca50dc02113753f84e47af279c9a9ab7357e6344e7f7cb5e5f9decefb55e14cade91963439dc463e5e43e6e37e5b0
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Tinderbot
2
2
 
3
3
  [![Build](https://travis-ci.org/jvenezia/tinderbot.svg?branch=master)](https://travis-ci.org/jvenezia/tinderbot)
4
+ [![Gem Version](https://badge.fury.io/rb/tinderbot.svg)](http://badge.fury.io/rb/tinderbot)
4
5
 
5
6
  Tinderbot is a ruby wrapper for the Tinder API.
6
7
 
@@ -74,19 +75,19 @@ You can interact with Tinderbot with command lines.
74
75
  ```
75
76
  > tinderbot
76
77
  Commands:
77
- tinderbot autolike # Automatically like recommended people. Stops when there is no more people to like.
78
- tinderbot dislike USER_ID # Dislike user.
78
+ tinderbot autolike # Automatically like recommended people (Stops when there is no more people to like)
79
+ tinderbot dislike USER_ID # Dislike user
79
80
  tinderbot help [COMMAND] # Describe available commands or one specific command
80
- tinderbot like USER_ID # Like user.
81
- tinderbot me # Get your profile data.
82
- tinderbot recommended # Get recommended users.
83
- tinderbot send USER_ID MESSAGE # Sends message to user
81
+ tinderbot like USER_ID # Like user
82
+ tinderbot me # Get your profile data
83
+ tinderbot recommended # Get recommended users
84
+ tinderbot send USER_ID MESSAGE # Send message to user
84
85
  tinderbot updates # Get updates
85
- tinderbot user USER_ID # Get user profile data.
86
+ tinderbot user USER_ID # Get user profile data
86
87
  ```
87
88
 
88
89
  ## Contributing
89
- Feel free to contribute !
90
+ Feel free to contribute!
90
91
 
91
92
  1. Fork it ( https://github.com/jvenezia/tinderbot/fork )
92
93
  2. Create your feature branch (`git checkout -b my-new-feature`)
@@ -94,5 +95,5 @@ Feel free to contribute !
94
95
  4. Push to the branch (`git push origin my-new-feature`)
95
96
  5. Create a new Pull Request
96
97
 
97
- ## Licence
98
+ ## License
98
99
  Released under the MIT License, which can be found in `LICENSE.txt`.
@@ -5,13 +5,13 @@ module Tinderbot
5
5
  class Application < Thor
6
6
  FACEBOOK_CREDENTIALS_FILE = 'facebook_credentials.pstore'
7
7
 
8
- desc 'me', 'Get your profile data.'
8
+ desc 'me', 'Get your profile data'
9
9
  def me
10
10
  tinder_client = sign_in
11
11
  puts tinder_client.me
12
12
  end
13
13
 
14
- desc 'user USER_ID', 'Get user profile data.'
14
+ desc 'user USER_ID', 'Get user profile data'
15
15
  def user(user_id)
16
16
  tinder_client = sign_in
17
17
  puts tinder_client.user user_id
@@ -23,31 +23,31 @@ module Tinderbot
23
23
  puts tinder_client.updates
24
24
  end
25
25
 
26
- desc 'recommended', 'Get recommended users.'
26
+ desc 'recommended', 'Get recommended users'
27
27
  def recommended
28
28
  tinder_client = sign_in
29
29
  puts tinder_client.recommended_users
30
30
  end
31
31
 
32
- desc 'like USER_ID', 'Like user.'
32
+ desc 'like USER_ID', 'Like user'
33
33
  def like(user_id)
34
34
  tinder_client = sign_in
35
35
  puts tinder_client.like user_id
36
36
  end
37
37
 
38
- desc 'dislike USER_ID', 'Dislike user.'
38
+ desc 'dislike USER_ID', 'Dislike user'
39
39
  def dislike(user_id)
40
40
  tinder_client = sign_in
41
41
  puts tinder_client.dislike user_id
42
42
  end
43
43
 
44
- desc 'send USER_ID MESSAGE', 'Sends message to user'
44
+ desc 'send USER_ID MESSAGE', 'Send message to user'
45
45
  def send(user_id, message)
46
46
  tinder_client = sign_in
47
47
  puts tinder_client.send_message user_id, message
48
48
  end
49
49
 
50
- desc 'autolike', 'Automatically like recommended people. Stops when there is no more people to like.'
50
+ desc 'autolike', 'Automatically like recommended people (Stops when there is no more people to like)'
51
51
  def autolike
52
52
  tinder_client = sign_in
53
53
 
@@ -60,7 +60,7 @@ module Tinderbot
60
60
 
61
61
  def sign_in
62
62
  puts 'Connecting to tinder...'
63
- tinder_client = Tinderbot::Tinder::Client.new
63
+ tinder_client = Tinderbot::Tinder::Client.new logs_enabled: true
64
64
  store = PStore.new(FACEBOOK_CREDENTIALS_FILE)
65
65
  facebook_authentication_token, facebook_user_id = get_last_facebook_credentials(store)
66
66
  tinder_authentication_token = get_tinder_authentication_token(store, tinder_client, facebook_authentication_token, facebook_user_id)
@@ -4,9 +4,10 @@ module Tinderbot
4
4
  TINDER_API_URL = 'https://api.gotinder.com'
5
5
  CONNECTION_USER_AGENT = 'Tinder/3.0.4 (iPhone; iOS 7.1; Scale/2.00)'
6
6
 
7
- attr_accessor :connection
7
+ attr_accessor :connection, :logs_enabled
8
8
 
9
- def initialize
9
+ def initialize(options = {})
10
+ @logs_enabled = options[:logs_enabled]
10
11
  build_connection
11
12
  end
12
13
 
@@ -37,6 +38,7 @@ module Tinderbot
37
38
 
38
39
  def like(user_id)
39
40
  @connection.get "like/#{user_id}"
41
+ puts "Liked #{user_id}" if @logs_enabled
40
42
  end
41
43
 
42
44
  def like_all(user_ids)
@@ -45,6 +47,7 @@ module Tinderbot
45
47
 
46
48
  def dislike(user_id)
47
49
  @connection.get "pass/#{user_id}"
50
+ puts "Disliked #{user_id}" if @logs_enabled
48
51
  end
49
52
 
50
53
  def dislike_all(user_ids)
@@ -1,3 +1,3 @@
1
1
  module Tinderbot
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  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
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Venezia