tinderbot 0.0.11 → 0.0.12

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: 4f15c6d4f351a3dcbdc6015ef8db68fb2e59cf04
4
- data.tar.gz: e4f70c97e2eb3c4c2fcb85fbaf4a94d932922f1c
3
+ metadata.gz: 78771b3208889d11013685095fbb5df7308f384f
4
+ data.tar.gz: d466cc493314c7d38d87a1d228a4c8532b811e8e
5
5
  SHA512:
6
- metadata.gz: a76748c82c2d987b35014e3ce90b3be20b155555228d54d7d0ba5e972eac83ac65353644db3da761902d1a8467afc8a485e6a1b9328e2451e47bfa3bb885bff4
7
- data.tar.gz: 4bc4e04e4db803aaaf2f85b7f40b40017526107f2a115d4e5ee0c35d0f3e79c23853ea11cf8484d4a0efe13e9ed3c8eb4c907cb92d698e1586bcf9fada3fa000
6
+ metadata.gz: f86529717dee07dbfb29638c24f4841e34776a06ae6eb2c43d59839bd201b83bbf9663b6b70ef16f0746d5533a6cd91af951133a47c7f59c426a8c873791ce78
7
+ data.tar.gz: d1da5aacc052aabd98bd23a82a7a364efdf768869cec34aeed937fbc936ecd0e8acb80d8a19c919cd11351c683ca80669c2864f1ccfd681ed2648f8f5c76d566
data/README.md CHANGED
@@ -53,12 +53,12 @@ tinder_client.sign_in tinder_authentication_token
53
53
 
54
54
  ### Interacting with the Tinder API
55
55
  ```ruby
56
- user = tinder_client.profile #=> returns an instance of Tinderbot::Tinder::Models::User
56
+ user = tinder_client.profile #=> returns an instance of Tinderbot::Model::User
57
57
  user.original_tinder_json #=> {...} original json from tinder's API
58
58
  user.id #=> 1234
59
59
  user.name #=> 'Bob'
60
60
  user.bio #=> 'I am awesome'
61
- user.birth_date #=> #<Date: 2014-05-01>
61
+ user.birth_date #=> #<Date: 2014-05-01>
62
62
  user.gender #=> :male (or :female)
63
63
  user.photo_urls #=> ['http://photo_1_url.jpg', 'http://photo_2_url.jpg']
64
64
 
data/Rakefile CHANGED
@@ -3,4 +3,9 @@ require 'bundler/gem_tasks'
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task default: :spec
6
+ task default: :spec
7
+
8
+ desc 'Open an irb session preloaded with this library'
9
+ task :console do
10
+ sh 'irb -rubygems -I lib -r tinderbot.rb'
11
+ end
@@ -6,54 +6,63 @@ module Tinderbot
6
6
  FACEBOOK_CREDENTIALS_FILE = 'facebook_credentials.pstore'
7
7
 
8
8
  desc 'profile', 'Get your profile data'
9
+
9
10
  def profile
10
11
  tinder_client = sign_in
11
12
  puts tinder_client.profile.to_yaml
12
13
  end
13
14
 
14
15
  desc 'user USER_ID', 'Get user profile data'
16
+
15
17
  def user(user_id)
16
18
  tinder_client = sign_in
17
19
  puts tinder_client.user(user_id).to_yaml
18
20
  end
19
21
 
20
22
  desc 'updates', 'Get updates'
23
+
21
24
  def updates
22
25
  tinder_client = sign_in
23
26
  puts tinder_client.updates.to_yaml
24
27
  end
25
28
 
26
29
  desc 'recommended', 'Get recommended users'
30
+
27
31
  def recommended
28
32
  tinder_client = sign_in
29
33
  puts tinder_client.recommended_users.to_yaml
30
34
  end
31
35
 
32
36
  desc 'like USER_ID', 'Like user'
37
+
33
38
  def like(user_id)
34
39
  tinder_client = sign_in
35
40
  tinder_client.like user_id
36
41
  end
37
42
 
38
43
  desc 'dislike USER_ID', 'Dislike user'
44
+
39
45
  def dislike(user_id)
40
46
  tinder_client = sign_in
41
47
  tinder_client.dislike user_id
42
48
  end
43
49
 
44
50
  desc 'send USER_ID MESSAGE', 'Send message to user'
51
+
45
52
  def send(user_id, message)
46
53
  tinder_client = sign_in
47
54
  puts tinder_client.send_message user_id, message
48
55
  end
49
56
 
50
57
  desc 'location ALTITUDE,LONGITUDE', 'Update location using latitude and longitude, e.g. tinderbot location 40.7313029,-73.9884189'
58
+
51
59
  def location(location)
52
60
  tinder_client = sign_in
53
61
  tinder_client.update_location(location)
54
62
  end
55
63
 
56
64
  desc 'autolike', 'Automatically like recommended people (Stops when there is no more people to like)'
65
+
57
66
  def autolike
58
67
  tinder_client = sign_in
59
68
 
@@ -85,11 +94,20 @@ module Tinderbot
85
94
  end
86
95
 
87
96
  def get_facebook_credentials
88
- puts 'Enter your facebook credentials.'
89
- facebook_email = ask('Email:')
90
- facebook_password = ask('Password (typing will be hidden):', echo: false)
91
- puts "\n"
97
+ if ENV['FACEBOOK_EMAIL']
98
+ facebook_email = ENV['FACEBOOK_EMAIL']
99
+ else
100
+ puts 'Enter your facebook credentials.'
101
+ facebook_email = ask('Email:')
102
+ end
92
103
 
104
+ if ENV['FACEBOOK_PASSWORD']
105
+ facebook_password = ENV['FACEBOOK_PASSWORD']
106
+ else
107
+ facebook_password = ask('Password (typing will be hidden):', echo: false)
108
+ end
109
+
110
+ puts "\n"
93
111
  puts 'Getting your facebook authentication token...'
94
112
  facebook_authentication_token, facebook_user_id = Tinderbot::Facebook.get_credentials(facebook_email, facebook_password)
95
113
  return facebook_authentication_token, facebook_user_id
@@ -109,4 +127,4 @@ module Tinderbot
109
127
  end
110
128
  end
111
129
  end
112
- end
130
+ end
@@ -1,3 +1,3 @@
1
1
  module Tinderbot
2
- VERSION = '0.0.11'
2
+ VERSION = '0.0.12'
3
3
  end
metadata CHANGED
@@ -1,139 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tinderbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Venezia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-23 00:00:00.000000000 Z
11
+ date: 2015-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: coveralls
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0.7'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0.7'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: thor
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
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
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: faraday
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
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
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: faraday_middleware
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
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
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: watir-webdriver
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ~>
116
116
  - !ruby/object:Gem::Version
117
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
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: json
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ~>
130
130
  - !ruby/object:Gem::Version
131
131
  version: '1.8'
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
138
  version: '1.8'
139
139
  description: 'Ruby wrapper for the Tinder API and automatic liker bot. '
@@ -144,8 +144,8 @@ executables:
144
144
  extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
- - ".gitignore"
148
- - ".travis.yml"
147
+ - .gitignore
148
+ - .travis.yml
149
149
  - Gemfile
150
150
  - LICENSE.txt
151
151
  - README.md
@@ -179,17 +179,17 @@ require_paths:
179
179
  - lib
180
180
  required_ruby_version: !ruby/object:Gem::Requirement
181
181
  requirements:
182
- - - ">="
182
+ - - '>='
183
183
  - !ruby/object:Gem::Version
184
184
  version: '0'
185
185
  required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  requirements:
187
- - - ">="
187
+ - - '>='
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  requirements: []
191
191
  rubyforge_project:
192
- rubygems_version: 2.2.2
192
+ rubygems_version: 2.0.14
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: Ruby wrapper for the Tinder API and automatic liker bot.