Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @todo range and string regex validations
- */
- const string_required_null = {
- required: true,
- type: 'string',
- default: null,
- };
- const string_not_required_null = {
- required: false,
- type: 'string',
- default: null,
- };
- const boolean_not_required_false = {
- required: false,
- type: 'boolean',
- default: false,
- };
- const number_required_null = {
- required: true,
- type: 'number',
- default: null,
- };
- module.exports = {
- COMMENT_ADD: {
- user_key: string_required_null,
- application_key: string_required_null,
- movie_id: number_required_null,
- comment_text: string_required_null,
- },
- COMMENT_DELETE: {
- user_key: string_required_null,
- application_key: string_required_null,
- comment_id: number_required_null,
- },
- COMMENT_LIKE: {
- user_key: string_required_null,
- application_key: string_required_null,
- comment_id: number_required_null,
- },
- COMMENT_REPORT: {
- user_key: string_required_null,
- application_key: string_required_null,
- comment_id: number_required_null,
- },
- LIKE_MOVIE: {
- user_key: string_required_null,
- application_key: string_required_null,
- movie_id: number_required_null,
- },
- LIST_MOVIES: {
- limit: {
- required: false,
- type: 'number',
- default: 20,
- },
- page: {
- required: false,
- type: 'number',
- default: 1,
- },
- quality: {
- required: false,
- type: 'string',
- default: 'all',
- },
- minimum_rating: {
- required: false,
- type: 'number',
- default: 0,
- },
- query_term: {
- required: false,
- type: 'number',
- default: 0,
- },
- genre: {
- required: false,
- type: 'string',
- default: 'all',
- },
- sort_by: {
- required: false,
- type: 'string',
- default: 'date_added',
- },
- order_by: {
- required: false,
- type: 'string',
- default: 'desc',
- },
- with_rt_ratings: boolean_not_required_false,
- },
- MOVIE_BOOKMARK_ADD: {
- user_key: string_required_null,
- application_key: string_required_null,
- movie_id: number_required_null,
- },
- MOVIE_BOOKMARK_DELETE: {
- user_key: string_required_null,
- application_key: string_required_null,
- movie_id: number_required_null,
- },
- MOVIE_BOOKMARK_GET: {
- user_key: string_required_null,
- with_rt_ratings: boolean_not_required_false,
- },
- MOVIE_COMMENTS: {
- movie_id: number_required_null,
- },
- MOVIE_DETAILS: {
- movie_id: number_required_null,
- with_images: boolean_not_required_false,
- with_cast: boolean_not_required_false,
- },
- MOVIE_PARENTAL_GUIDES: {
- movie_id: number_required_null,
- },
- MOVIE_REVIEWS: {
- movie_id: number_required_null,
- },
- MOVIE_SUGGESTIONS: {
- movie_id: number_required_null,
- },
- REQUEST_MAKE: {
- user_key: string_required_null,
- application_key: string_required_null,
- movie_title: string_required_null,
- request_message: string_not_required_null,
- },
- USER_DETAILS: {
- user_id: number_required_null,
- with_recently_downloaded: boolean_not_required_false,
- },
- USER_FORGOT_PASSWORD: {
- application_key: string_required_null,
- email: string_required_null,
- },
- USER_KEY: {
- application_key: string_required_null,
- username: string_required_null,
- password: string_required_null,
- },
- USER_PROFILE: {
- user_key: string_required_null,
- },
- USER_REGISTER: {
- application_key: string_required_null,
- username: string_required_null,
- password: string_required_null,
- email: string_required_null,
- },
- USER_RESET_PASSWORD: {
- application_key: string_required_null,
- reset_code: string_required_null,
- new_password: string_required_null,
- },
- /**
- * @todo add avatar_image parameter of type image
- * */
- USER_SETTINGS_EDIT: {
- user_key: string_required_null,
- application_key: string_required_null,
- new_password: string_not_required_null,
- about_text: string_not_required_null,
- },
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement