Class: Yify::Client
Instance Method Summary collapse
-
#comments(movie_id) ⇒ Object
- GET
-
comments See: yts.to/api#commentDocs.
-
#list(options) ⇒ Object
- GET
-
list See: yts.to/api#listDocs.
-
#list_imdb(options) ⇒ Object
- GET
-
list_imbd See: yts.to/api#listimdbDocs.
-
#login(options) ⇒ Object
- POST
-
login See: yts.to/api#loginDocs.
-
#make_request(options) ⇒ Object
- POST
-
make_request See: yts.to/api#makerequestsDocs.
-
#movie(id) ⇒ Object
- GET
-
movie See: yts.to/api#movieDocs.
-
#post_comment(options) ⇒ Object
- POST
-
post_comment See: yts.to/api#commentpostDocs.
-
#profile(hash) ⇒ Object
- GET
-
profile See: yts.to/api#profileDocs.
-
#register(options) ⇒ Object
- POST
-
register See: yts.to/api#registerDocs.
-
#requests(options) ⇒ Object
- GET
-
requests See: yts.to/api#requestsDocs.
-
#reset_password(options) ⇒ Object
- POST
-
reset_password See: yts.to/api#resetPasswordDocs.
-
#send_password_reset(email) ⇒ Object
- POST
-
send_password_reset yts.to/api#passRecoveryDoc.
-
#upcoming ⇒ Object
- GET
-
upcoming See: yts.to/api#upcomingDocs.
-
#update_profile(options) ⇒ Object
- POST
-
update_profile See: yts.to/api#editProfileDocs.
-
#user(user_id) ⇒ Object
- GET
-
user See: yts.to/api#userDocs.
-
#vote(options) ⇒ Object
- POST
-
vote See: yts.to/api#voteDocs.
Instance Method Details
#comments(movie_id) ⇒ Object
60 61 62 63 |
# File 'lib/yify/client.rb', line 60 def comments(movie_id) data = self.class.get("/comments", { query: { movieid: movie_id } }) Yify::Response.new(data, :comment) end |
#list(options) ⇒ Object
- GET
-
list
See: yts.to/api#listDocs
Get a list of movies, this method can be used to search or filter.
27 28 29 30 |
# File 'lib/yify/client.rb', line 27 def list() data = self.class.get("/list", { query: }) Yify::Response.new(data, :movie_list) end |
#list_imdb(options) ⇒ Object
38 39 40 41 |
# File 'lib/yify/client.rb', line 38 def list_imdb() data = self.class.get("/listimdb", { query: }) Yify::Response.new(data, :movie_list) end |
#login(options) ⇒ Object
104 105 106 107 |
# File 'lib/yify/client.rb', line 104 def login() data = self.class.post("/login", { body: }) Yify::Response.new(data, :session) end |
#make_request(options) ⇒ Object
168 169 170 171 |
# File 'lib/yify/client.rb', line 168 def make_request() data = self.class.post("/makerequest", { body: }) Yify::Response.new(data, :api_response) end |
#movie(id) ⇒ Object
49 50 51 52 |
# File 'lib/yify/client.rb', line 49 def movie(id) data = self.class.get("/movie", { query: { id: id } }) Yify::Response.new(data, :movie) end |
#post_comment(options) ⇒ Object
71 72 73 74 |
# File 'lib/yify/client.rb', line 71 def post_comment() data = self.class.post("/commentpost", { body: }) Yify::Response.new(data, :api_response) end |
#profile(hash) ⇒ Object
135 136 137 138 |
# File 'lib/yify/client.rb', line 135 def profile(hash) data = self.class.get("/profile", { query: { hash: hash } }) Yify::Response.new(data, :profile) end |
#register(options) ⇒ Object
93 94 95 96 |
# File 'lib/yify/client.rb', line 93 def register() data = self.class.post("/register", { body: }) Yify::Response.new(data, :api_response) end |
#requests(options) ⇒ Object
157 158 159 160 |
# File 'lib/yify/client.rb', line 157 def requests() data = self.class.get("/requests", { query: }) Yify::Response.new(data, :request_list) end |
#reset_password(options) ⇒ Object
124 125 126 127 |
# File 'lib/yify/client.rb', line 124 def reset_password() data = self.class.post("/resetpassconfirm", { body: }) Yify::Response.new(data, :api_response) end |
#send_password_reset(email) ⇒ Object
- POST
-
send_password_reset
Send a password reset email to the specified email address.
115 116 117 118 |
# File 'lib/yify/client.rb', line 115 def send_password_reset(email) data = self.class.post("/sendresetpass", { body: { email: email } }) Yify::Response.new(data, :api_response) end |
#upcoming ⇒ Object
15 16 17 18 |
# File 'lib/yify/client.rb', line 15 def upcoming data = self.class.get("/upcoming") Yify::Response.new(data, :upcoming_movie) end |
#update_profile(options) ⇒ Object
146 147 148 149 |
# File 'lib/yify/client.rb', line 146 def update_profile() data = self.class.post("/editprofile", { body: }) Yify::Response.new(data, :api_response) end |
#user(user_id) ⇒ Object
82 83 84 85 |
# File 'lib/yify/client.rb', line 82 def user(user_id) data = self.class.get("/user", { query: { id: user_id } }) Yify::Response.new(data, :user) end |
#vote(options) ⇒ Object
179 180 181 182 |
# File 'lib/yify/client.rb', line 179 def vote() data = self.class.post("/vote", { body: }) Yify::Response.new(data, :api_response) end |