yify 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -229
  3. data/lib/yify.rb +7 -3
  4. data/lib/yify/client.rb +307 -95
  5. data/lib/yify/models/actor.rb +6 -0
  6. data/lib/yify/models/api_response.rb +0 -2
  7. data/lib/yify/models/base.rb +18 -0
  8. data/lib/yify/models/bookmark.rb +6 -0
  9. data/lib/yify/models/comment.rb +1 -9
  10. data/lib/yify/models/director.rb +6 -0
  11. data/lib/yify/models/movie.rb +0 -48
  12. data/lib/yify/models/parental_guide.rb +6 -0
  13. data/lib/yify/models/profile.rb +1 -5
  14. data/lib/yify/models/review.rb +6 -0
  15. data/lib/yify/models/session.rb +0 -4
  16. data/lib/yify/models/torrent.rb +6 -0
  17. data/lib/yify/models/user.rb +1 -13
  18. data/lib/yify/response.rb +1 -12
  19. data/lib/yify/support/utils.rb +24 -1
  20. data/lib/yify/version.rb +1 -1
  21. data/spec/fixtures/vcr_cassettes/Yify_Client/should_add_a_movie_bookmark.yml +59 -0
  22. data/spec/fixtures/vcr_cassettes/Yify_Client/should_delete_a_comment.yml +59 -0
  23. data/spec/fixtures/vcr_cassettes/Yify_Client/should_delete_a_movie_bookmark.yml +59 -0
  24. data/spec/fixtures/vcr_cassettes/Yify_Client/should_edit_a_user_profile.yml +61 -0
  25. data/spec/fixtures/vcr_cassettes/Yify_Client/should_get_a_user_key.yml +59 -0
  26. data/spec/fixtures/vcr_cassettes/Yify_Client/should_get_a_user_profile.yml +56 -0
  27. data/spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_bookmarks.yml +59 -0
  28. data/spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_comments.yml +106 -60
  29. data/spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_details.yml +42 -29
  30. data/spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_parental_guides.yml +106 -0
  31. data/spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_reviews.yml +285 -0
  32. data/spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_suggestions.yml +69 -0
  33. data/spec/fixtures/vcr_cassettes/Yify_Client/should_get_upcoming_movies.yml +31 -159
  34. data/spec/fixtures/vcr_cassettes/Yify_Client/should_get_user_details.yml +35 -16
  35. data/spec/fixtures/vcr_cassettes/Yify_Client/should_like_a_comment.yml +59 -0
  36. data/spec/fixtures/vcr_cassettes/Yify_Client/should_like_a_movie.yml +59 -0
  37. data/spec/fixtures/vcr_cassettes/Yify_Client/should_list_movies.yml +36 -14
  38. data/spec/fixtures/vcr_cassettes/Yify_Client/should_make_a_comment.yml +60 -0
  39. data/spec/fixtures/vcr_cassettes/Yify_Client/should_make_a_request.yml +60 -0
  40. data/spec/fixtures/vcr_cassettes/Yify_Client/should_recover_forgotten_passwords.yml +59 -0
  41. data/spec/fixtures/vcr_cassettes/Yify_Client/should_register_a_user.yml +29 -12
  42. data/spec/fixtures/vcr_cassettes/Yify_Client/should_report_a_comment.yml +59 -0
  43. data/spec/fixtures/vcr_cassettes/Yify_Client/should_reset_a_password.yml +29 -12
  44. data/spec/models/base_spec.rb +21 -0
  45. data/spec/response_spec.rb +7 -11
  46. data/spec/spec_helper.rb +8 -4
  47. data/spec/yify_spec.rb +97 -57
  48. data/yify.gemspec +1 -1
  49. metadata +44 -38
  50. data/lib/yify/models/requested_movie.rb +0 -17
  51. data/lib/yify/models/upcoming_movie.rb +0 -15
  52. data/spec/fixtures/vcr_cassettes/Yify_Client/should_add_a_request.yml +0 -43
  53. data/spec/fixtures/vcr_cassettes/Yify_Client/should_edit_a_profile.yml +0 -42
  54. data/spec/fixtures/vcr_cassettes/Yify_Client/should_get_a_profile.yml +0 -44
  55. data/spec/fixtures/vcr_cassettes/Yify_Client/should_get_requests_list.yml +0 -52
  56. data/spec/fixtures/vcr_cassettes/Yify_Client/should_login_a_user.yml +0 -42
  57. data/spec/fixtures/vcr_cassettes/Yify_Client/should_post_a_comment.yml +0 -42
  58. data/spec/fixtures/vcr_cassettes/Yify_Client/should_recover_passwords.yml +0 -42
  59. data/spec/fixtures/vcr_cassettes/Yify_Client/should_vote_on_requests.yml +0 -42
  60. data/spec/models/api_response_spec.rb +0 -6
  61. data/spec/models/comment_spec.rb +0 -13
  62. data/spec/models/movie_spec.rb +0 -53
  63. data/spec/models/profile_spec.rb +0 -21
  64. data/spec/models/requested_movie_spec.rb +0 -20
  65. data/spec/models/session_spec.rb +0 -8
  66. data/spec/models/upcoming_movie_spec.rb +0 -13
  67. data/spec/models/user_spec.rb +0 -17
@@ -1,17 +1,21 @@
1
1
  require "yify"
2
2
  require "vcr"
3
- require "pry"
3
+ require "pry-byebug"
4
4
 
5
5
  VCR.configure do |c|
6
6
  c.cassette_library_dir = "spec/fixtures/vcr_cassettes"
7
7
  c.hook_into :webmock
8
8
  c.filter_sensitive_data("<USERNAME>") { ENV["username"] }
9
+ c.filter_sensitive_data("<USERNAME>") { ENV["username_variant"] }
9
10
  c.filter_sensitive_data("<PASSWORD>") { ENV["password"] }
10
- c.filter_sensitive_data("<NEWPASSWORD>") { ENV["new_password"] }
11
+ c.filter_sensitive_data("<NEW_PASSWORD>") { ENV["new_password"] }
11
12
  c.filter_sensitive_data("<EMAIL>") { ENV["email"] }
12
13
  c.filter_sensitive_data("<HASH>") { ENV["hash"] }
13
- c.filter_sensitive_data("<USERID>") { ENV["user_id"] }
14
- c.filter_sensitive_data("<IPADDRESS>") { ENV["ip_address"] }
14
+ c.filter_sensitive_data("<USER_ID>") { ENV["user_id"] }
15
+ c.filter_sensitive_data("<IP_ADDRESS>") { ENV["ip_address"] }
16
+ c.filter_sensitive_data("<APPLICATION_KEY>") { ENV["application_key"] }
17
+ c.filter_sensitive_data("<USER_KEY>") { ENV["user_key"] }
18
+ c.filter_sensitive_data("<PASSWORD_RESET_CODE>") { ENV["reset_code"] }
15
19
  end
16
20
 
17
21
  RSpec.configure do |c|
@@ -7,97 +7,137 @@ describe Yify::Client do
7
7
  end
8
8
 
9
9
  it "should have a base_uri configured" do
10
- expect(subject.class.base_uri).to eq("http://yts.to/api")
11
- end
12
-
13
- it "should get upcoming movies", :vcr do
14
- response = subject.upcoming
15
- expect(response.result.first.movie_title).to eq("Persecuted (2014)")
10
+ expect(subject.class.base_uri).to eq("http://yts.to/api/v2")
16
11
  end
17
12
 
18
13
  it "should list movies", :vcr do
19
- options = { limit: 1 }
20
- response = subject.list(options)
21
- expect(response.result.count).to eq(1)
14
+ response = subject.list_movies({ limit: 3 })
15
+ expect(response.result.count).to eq(3)
22
16
  end
23
17
 
24
- it "should list by imdb id", :vcr do
25
- options = { imdb_id: ["tt0111161", "tt0068646"] }
26
- response = subject.list_imdb(options)
27
- expect(response.result.first.movie_title_clean).to eq("The Godfather")
18
+ it "should get movie details", :vcr do
19
+ response = subject.movie_details({ movie_id: 353, with_images: true, with_cast: true })
20
+ expect(response.result.title).to eq("Confessions of a Dangerous Mind")
28
21
  end
29
22
 
30
- it "should get movie details", :vcr do
31
- response = subject.movie(353)
32
- expect(response.result.movie_title_clean).to eq("We Were Soldiers")
23
+ it "should get movie suggestions", :vcr do
24
+ response = subject.movie_suggestions(353)
25
+ expect(response.result.first.title).to eq("The Insider")
33
26
  end
34
27
 
35
28
  it "should get movie comments", :vcr do
36
- response = subject.comments(353)
37
- expect(response.result.first.comment_text).to eq("thanxxxxxxx")
29
+ response = subject.movie_comments(353)
30
+ expect(response.result.first.comment_text).to eq("thank you")
31
+ end
32
+
33
+ it "should get movie reviews", :vcr do
34
+ response = subject.movie_reviews(353)
35
+ expect(response.result.first.user_rating).to eq(5)
36
+ end
37
+
38
+ it "should get movie parental guides", :vcr do
39
+ response = subject.movie_parental_guides(353)
40
+ expect(response.result.first.type).to eq("Nudity")
41
+ end
42
+
43
+ it "should get upcoming movies", :vcr do
44
+ response = subject.list_upcoming
45
+ expect(response.result.first.title).to eq("Double Impact")
38
46
  end
39
47
 
40
48
  it "should get user details", :vcr do
41
- response = subject.user(16)
42
- expect(response.result.user_name).to eq("YIFY")
49
+ response = subject.user_details({ user_id: 16, with_recently_downloaded: true })
50
+ expect(response.result.username).to eq("YIFY")
43
51
  end
44
52
 
45
- it "should register a user", :vcr do
46
- options = { username: ENV["username"], password: ENV["password"], email: ENV["email"] }
47
- response = subject.register(options)
48
- expect(response.result.status).to include("An activation email has been sent")
53
+ it "should get a user key", :vcr do
54
+ params = { application_key: ENV["application_key"], username: ENV["username"], password: ENV["password"] }
55
+ request = subject.user_get_key(params)
56
+ expect(request.response["status_message"]).to eq("User successfully logged in")
49
57
  end
50
58
 
51
- it "should login a user", :vcr do
52
- options = { username: ENV["username"], password: ENV["password"] }
53
- response = subject.login(options)
54
- expect(response.result.hash).to eq(ENV["hash"])
59
+ it "should get a user profile", :vcr do
60
+ response = subject.user_profile(ENV["user_key"])
61
+ expect(response.result.group).to eq("user")
55
62
  end
56
63
 
57
- it "should recover passwords", :vcr do
58
- response = subject.send_password_reset(ENV["email"])
59
- expect(response.result.status).to include("password reset code has been sent")
64
+ it "should edit a user profile", :vcr do
65
+ params = { application_key: ENV["application_key"], user_key: ENV["user_key"], about_text: "RUBY FTW!" }
66
+ response = subject.user_edit_settings(params)
67
+ expect(response.result.about_text).to eq("RUBY FTW!")
68
+ end
69
+
70
+ it "should register a user", :vcr do
71
+ params = { application_key: ENV["application_key"], username: ENV["username"], password: ENV["password"], email: ENV["email"] }
72
+ request = subject.user_register(params)
73
+ expect(request.response["status_message"]).to eq("User was successfully registered")
74
+ end
75
+
76
+ it "should recover forgotten passwords", :vcr do
77
+ params = { application_key: ENV["application_key"], email: ENV["email"] }
78
+ request = subject.user_forgot_password(params)
79
+ expect(request.response["status_message"]).to eq("Reset password code has been sent")
60
80
  end
61
81
 
62
82
  it "should reset a password", :vcr do
63
- options = { code: ENV["code"], newpassword: ENV["new_password"] }
64
- response = subject.reset_password(options)
65
- expect(response.result.status).to include("password has been changed")
83
+ params = { application_key: ENV["application_key"], reset_code: ENV["reset_code"], new_password: ENV["new_password"] }
84
+ request = subject.user_reset_password(params)
85
+ expect(request.response["status_message"]).to eq("User password was successfully changed")
86
+ end
87
+
88
+ it "should like a movie", :vcr do
89
+ params = { application_key: ENV["application_key"], user_key: ENV["user_key"], movie_id: 353 }
90
+ request = subject.like_movie(params)
91
+ expect(request.response["status_message"]).to eq("Movie has been successfully liked")
92
+ end
93
+
94
+ it "should get movie bookmarks", :vcr do
95
+ params = { user_key: ENV["user_key"], movie_id: 353, with_rt_rattings: true }
96
+ response = subject.get_movie_bookmarks(params)
97
+ expect(response.result.movies.first.id).to eq(353)
66
98
  end
67
99
 
68
- it "should get a profile", :vcr do
69
- response = subject.profile(ENV["hash"])
70
- expect(response.result.user_id).to eq(ENV["user_id"].to_i)
100
+ it "should add a movie bookmark", :vcr do
101
+ params = { application_key: ENV["application_key"], user_key: ENV["user_key"], movie_id: 353 }
102
+ request = subject.add_movie_bookmark(params)
103
+ expect(request.response["status_message"]).to eq("Movie has been successfully bookmarked")
71
104
  end
72
105
 
73
- it "should edit a profile", :vcr do
74
- options = { hash: ENV["hash"], about: "RUBY FTW!" }
75
- response = subject.update_profile(options)
76
- expect(response.result.status).to include("changes made successfully")
106
+ it "should delete a movie bookmark", :vcr do
107
+ params = { application_key: ENV["application_key"], user_key: ENV["user_key"], movie_id: 353 }
108
+ request = subject.delete_movie_bookmark(params)
109
+ expect(request.response["status_message"]).to eq("Movie bookmarked has been removed")
77
110
  end
78
111
 
79
- it "should post a comment", :vcr do
80
- options = { hash: ENV["hash"], text: "RUBY FTW!", movieid: 353 }
81
- response = subject.post_comment(options)
82
- expect(response.result.status).to include("successfully posted comment")
112
+ it "should make a comment", :vcr do
113
+ params = { application_key: ENV["application_key"], user_key: ENV["user_key"], movie_id: 353, comment_text: "Hello World!" }
114
+ request = subject.make_comment(params)
115
+ expect(request.response["status_message"]).to eq("Comment has been successfully submitted")
83
116
  end
84
117
 
85
- it "should get requests list", :vcr do
86
- options = { page: "confirmed", limit: 2 }
87
- response = subject.requests(options)
88
- expect(response.result.first.movie_title_clean).to eq("American Wedding")
118
+ it "should like a comment", :vcr do
119
+ params = { application_key: ENV["application_key"], user_key: ENV["user_key"], comment_id: 379208 }
120
+ request = subject.like_comment(params)
121
+ expect(request.response["status_message"]).to eq("Comment has been successfully liked")
89
122
  end
90
123
 
91
- it "should add a request", :vcr do
92
- options = { hash: ENV["hash"], request: "tt0111161" }
93
- response = subject.make_request(options)
94
- expect(response.result.error).to include("Movie has already been uploaded")
124
+ it "should report a comment", :vcr do
125
+ params = { application_key: ENV["application_key"], user_key: ENV["user_key"], comment_id: 379208 }
126
+ request = subject.report_comment(params)
127
+ expect(request.response["status_message"]).to eq("Comment has been successfully reported")
95
128
  end
96
129
 
97
- it "should vote on requests", :vcr do
98
- options = { hash: ENV["hash"], requestid: "1169" }
99
- response = subject.vote(options)
100
- expect(response.result.status).to include("Vote submission successful")
130
+ it "should delete a comment", :vcr do
131
+ params = { application_key: ENV["application_key"], user_key: ENV["user_key"], comment_id: 379208 }
132
+ request = subject.delete_comment(params)
133
+ expect(request.response["status_message"]).to eq("Comment has been successfully deleted")
134
+ end
135
+
136
+ it "should make a request", :vcr do
137
+ params = { application_key: ENV["application_key"], user_key: ENV["user_key"], movie_title: "Hello World!", request_message: "Please ignore this request!" }
138
+ request = subject.make_request(params)
139
+ expect(request.response["status_message"]).to eq("Request has been successfully submitted")
101
140
  end
102
141
 
103
142
  end
143
+
@@ -28,5 +28,5 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency "rspec"
29
29
  spec.add_development_dependency "vcr"
30
30
  spec.add_development_dependency "webmock"
31
- spec.add_development_dependency "pry"
31
+ spec.add_development_dependency "pry-byebug"
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Lunsford
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-13 00:00:00.000000000 Z
11
+ date: 2015-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -137,7 +137,7 @@ dependencies:
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
- name: pry
140
+ name: pry-byebug
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
@@ -164,42 +164,47 @@ files:
164
164
  - Rakefile
165
165
  - lib/yify.rb
166
166
  - lib/yify/client.rb
167
+ - lib/yify/models/actor.rb
167
168
  - lib/yify/models/api_response.rb
168
169
  - lib/yify/models/base.rb
170
+ - lib/yify/models/bookmark.rb
169
171
  - lib/yify/models/comment.rb
172
+ - lib/yify/models/director.rb
170
173
  - lib/yify/models/movie.rb
174
+ - lib/yify/models/parental_guide.rb
171
175
  - lib/yify/models/profile.rb
172
- - lib/yify/models/requested_movie.rb
176
+ - lib/yify/models/review.rb
173
177
  - lib/yify/models/session.rb
174
- - lib/yify/models/upcoming_movie.rb
178
+ - lib/yify/models/torrent.rb
175
179
  - lib/yify/models/user.rb
176
180
  - lib/yify/response.rb
177
181
  - lib/yify/support/utils.rb
178
182
  - lib/yify/version.rb
179
- - spec/fixtures/vcr_cassettes/Yify_Client/should_add_a_request.yml
180
- - spec/fixtures/vcr_cassettes/Yify_Client/should_edit_a_profile.yml
181
- - spec/fixtures/vcr_cassettes/Yify_Client/should_get_a_profile.yml
183
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_add_a_movie_bookmark.yml
184
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_delete_a_comment.yml
185
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_delete_a_movie_bookmark.yml
186
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_edit_a_user_profile.yml
187
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_get_a_user_key.yml
188
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_get_a_user_profile.yml
189
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_bookmarks.yml
182
190
  - spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_comments.yml
183
191
  - spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_details.yml
184
- - spec/fixtures/vcr_cassettes/Yify_Client/should_get_requests_list.yml
192
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_parental_guides.yml
193
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_reviews.yml
194
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_suggestions.yml
185
195
  - spec/fixtures/vcr_cassettes/Yify_Client/should_get_upcoming_movies.yml
186
196
  - spec/fixtures/vcr_cassettes/Yify_Client/should_get_user_details.yml
197
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_like_a_comment.yml
198
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_like_a_movie.yml
187
199
  - spec/fixtures/vcr_cassettes/Yify_Client/should_list_by_imdb_id.yml
188
200
  - spec/fixtures/vcr_cassettes/Yify_Client/should_list_movies.yml
189
- - spec/fixtures/vcr_cassettes/Yify_Client/should_login_a_user.yml
190
- - spec/fixtures/vcr_cassettes/Yify_Client/should_post_a_comment.yml
191
- - spec/fixtures/vcr_cassettes/Yify_Client/should_recover_passwords.yml
201
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_make_a_comment.yml
202
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_make_a_request.yml
203
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_recover_forgotten_passwords.yml
192
204
  - spec/fixtures/vcr_cassettes/Yify_Client/should_register_a_user.yml
205
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_report_a_comment.yml
193
206
  - spec/fixtures/vcr_cassettes/Yify_Client/should_reset_a_password.yml
194
- - spec/fixtures/vcr_cassettes/Yify_Client/should_vote_on_requests.yml
195
- - spec/models/api_response_spec.rb
196
- - spec/models/comment_spec.rb
197
- - spec/models/movie_spec.rb
198
- - spec/models/profile_spec.rb
199
- - spec/models/requested_movie_spec.rb
200
- - spec/models/session_spec.rb
201
- - spec/models/upcoming_movie_spec.rb
202
- - spec/models/user_spec.rb
207
+ - spec/models/base_spec.rb
203
208
  - spec/response_spec.rb
204
209
  - spec/spec_helper.rb
205
210
  - spec/support/utils_spec.rb
@@ -225,35 +230,36 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
230
  version: '0'
226
231
  requirements: []
227
232
  rubyforge_project:
228
- rubygems_version: 2.2.2
233
+ rubygems_version: 2.4.6
229
234
  signing_key:
230
235
  specification_version: 4
231
236
  summary: YIFY Torrents API
232
237
  test_files:
233
- - spec/fixtures/vcr_cassettes/Yify_Client/should_add_a_request.yml
234
- - spec/fixtures/vcr_cassettes/Yify_Client/should_edit_a_profile.yml
235
- - spec/fixtures/vcr_cassettes/Yify_Client/should_get_a_profile.yml
238
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_add_a_movie_bookmark.yml
239
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_delete_a_comment.yml
240
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_delete_a_movie_bookmark.yml
241
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_edit_a_user_profile.yml
242
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_get_a_user_key.yml
243
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_get_a_user_profile.yml
244
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_bookmarks.yml
236
245
  - spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_comments.yml
237
246
  - spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_details.yml
238
- - spec/fixtures/vcr_cassettes/Yify_Client/should_get_requests_list.yml
247
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_parental_guides.yml
248
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_reviews.yml
249
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_get_movie_suggestions.yml
239
250
  - spec/fixtures/vcr_cassettes/Yify_Client/should_get_upcoming_movies.yml
240
251
  - spec/fixtures/vcr_cassettes/Yify_Client/should_get_user_details.yml
252
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_like_a_comment.yml
253
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_like_a_movie.yml
241
254
  - spec/fixtures/vcr_cassettes/Yify_Client/should_list_by_imdb_id.yml
242
255
  - spec/fixtures/vcr_cassettes/Yify_Client/should_list_movies.yml
243
- - spec/fixtures/vcr_cassettes/Yify_Client/should_login_a_user.yml
244
- - spec/fixtures/vcr_cassettes/Yify_Client/should_post_a_comment.yml
245
- - spec/fixtures/vcr_cassettes/Yify_Client/should_recover_passwords.yml
256
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_make_a_comment.yml
257
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_make_a_request.yml
258
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_recover_forgotten_passwords.yml
246
259
  - spec/fixtures/vcr_cassettes/Yify_Client/should_register_a_user.yml
260
+ - spec/fixtures/vcr_cassettes/Yify_Client/should_report_a_comment.yml
247
261
  - spec/fixtures/vcr_cassettes/Yify_Client/should_reset_a_password.yml
248
- - spec/fixtures/vcr_cassettes/Yify_Client/should_vote_on_requests.yml
249
- - spec/models/api_response_spec.rb
250
- - spec/models/comment_spec.rb
251
- - spec/models/movie_spec.rb
252
- - spec/models/profile_spec.rb
253
- - spec/models/requested_movie_spec.rb
254
- - spec/models/session_spec.rb
255
- - spec/models/upcoming_movie_spec.rb
256
- - spec/models/user_spec.rb
262
+ - spec/models/base_spec.rb
257
263
  - spec/response_spec.rb
258
264
  - spec/spec_helper.rb
259
265
  - spec/support/utils_spec.rb
@@ -1,17 +0,0 @@
1
- module Yify
2
- module Models
3
- class RequestedMovie < UpcomingMovie
4
- attribute :cover_image, String
5
- attribute :short_description, String
6
- attribute :movie_count, String
7
- attribute :request_id, String
8
- attribute :movie_rating, String
9
- attribute :movie_year, String
10
- attribute :votes, String
11
- attribute :genre, String
12
- attribute :movie_title_clean, String
13
- attribute :user_id, String
14
- attribute :user_name, String
15
- end
16
- end
17
- end
@@ -1,15 +0,0 @@
1
- module Yify
2
- module Models
3
- class UpcomingMovie < Base
4
- attribute :movie_title, String
5
- attribute :movie_cover, String
6
- attribute :imdb_code, String
7
- attribute :imdb_link, String
8
- attribute :uploader, String
9
- attribute :uploader_uid, Integer
10
- attribute :date_added, DateTime
11
- attribute :date_added_epoch, DateTime
12
- attribute :username, String
13
- end
14
- end
15
- end
@@ -1,43 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: http://yts.to/api/makerequest
6
- body:
7
- encoding: UTF-8
8
- string: hash=<HASH>&request=tt0111161
9
- headers: {}
10
- response:
11
- status:
12
- code: 200
13
- message: OK
14
- headers:
15
- Server:
16
- - UA Server 9001
17
- Date:
18
- - Mon, 20 Oct 2014 00:12:56 GMT
19
- Content-Type:
20
- - application/json
21
- Transfer-Encoding:
22
- - chunked
23
- Connection:
24
- - keep-alive
25
- Access-Control-Allow-Origin:
26
- - "*"
27
- Age:
28
- - '0'
29
- X-Cache:
30
- - uncached
31
- Accept-Ranges:
32
- - bytes
33
- X-Frame-Options:
34
- - SAMEORIGIN
35
- X-Content-Type-Options:
36
- - nosniff
37
- body:
38
- encoding: UTF-8
39
- string: '{"status":"fail","error":"Movie has already been uploaded, MovieID:
40
- 1002"}'
41
- http_version:
42
- recorded_at: Mon, 20 Oct 2014 00:12:56 GMT
43
- recorded_with: VCR 2.9.3