public static YifyPostRequest GetForgotUserPasswordRequest(string appKey, string email) { YifyPostRequest req = new YifyPostRequest(); req.Uri = RequestUriHelper.ForgotUserPassword.ToRequestUri(Base_URI, RESPONSE_TYPE); req.Data.Add("application_key", appKey); req.Data.Add("email", email); return(req); }
public static YifyPostRequest GetDeleteCommentReqeust(string appKey, string userKey, int commentID) { YifyPostRequest req = new YifyPostRequest(); req.Uri = RequestUriHelper.DeleteComment.ToRequestUri(Base_URI, RESPONSE_TYPE); req.Data.Add("application_key", appKey); req.Data.Add("user_key", userKey); req.Data.Add("comment_id", commentID.ToString()); return(req); }
public static YifyPostRequest GetDeleteMovieBookmarkReqeust(string appKey, string userKey, int movieID) { YifyPostRequest req = new YifyPostRequest(); req.Uri = RequestUriHelper.DeleteMovieBookmark.ToRequestUri(Base_URI, RESPONSE_TYPE); req.Data.Add("application_key", appKey); req.Data.Add("user_key", userKey); req.Data.Add("movie_id", movieID.ToString()); return(req); }
public static YifyPostRequest GetResetUserPasswordRequest(string appKey, string resetCode, string newPassword) { YifyPostRequest req = new YifyPostRequest(); req.Uri = RequestUriHelper.ResetUserPassword.ToRequestUri(Base_URI, RESPONSE_TYPE); req.Data.Add("application_key", appKey); req.Data.Add("reset_code", resetCode); req.Data.Add("new_password", newPassword); return(req); }
public static YifyPostRequest GetMakeRequestReqeust(string appKey, string userKey, string movieTitle, string requestMessage) { YifyPostRequest req = new YifyPostRequest(); req.Uri = RequestUriHelper.MakeRequest.ToRequestUri(Base_URI, RESPONSE_TYPE); req.Data.Add("application_key", appKey); req.Data.Add("user_key", userKey); req.Data.Add("movie_title", movieTitle); req.Data.Add("request_message", requestMessage); return(req); }
public static YifyPostRequest GetMakeCommentReqeust(string appKey, string userKey, int movieID, string commentText) { YifyPostRequest req = new YifyPostRequest(); req.Uri = RequestUriHelper.MakeComment.ToRequestUri(Base_URI, RESPONSE_TYPE); req.Data.Add("application_key", appKey); req.Data.Add("user_key", userKey); req.Data.Add("movie_id", movieID.ToString()); req.Data.Add("comment_text", commentText); return(req); }
public static YifyPostRequest GetUserKeyRequest(string username, string password, string appKey, bool withRecentDownloads) { YifyPostRequest req = new YifyPostRequest(); req.Uri = RequestUriHelper.GetUserKey.ToRequestUri(Base_URI, RESPONSE_TYPE); req.Data.Add("username", username); req.Data.Add("password", password); req.Data.Add("application_key", appKey); req.Data.Add("with_recently_downloaded", withRecentDownloads.ToString().ToLowerInvariant()); return(req); }
public static YifyPostRequest GetRegisterUserRequest(string appKey, string userName, string password, string email) { YifyPostRequest req = new YifyPostRequest(); req.Uri = RequestUriHelper.RegisterUser.ToRequestUri(Base_URI, RESPONSE_TYPE); req.Data.Add("application_key", appKey); req.Data.Add("username", userName); req.Data.Add("password", password); req.Data.Add("email", email); return(req); }
public static string SendPostRequest(YifyPostRequest req) { using (WebClient c = new WebClient()) { if (PROXY != null) { c.Proxy = PROXY; } c.Encoding = Encoding.UTF8; byte[] res = c.UploadValues(req.Uri, req.Data); if (res.Length == 0) { return(string.Empty); } else { return(Encoding.UTF8.GetString(res)); } } }