From 8c54dc92147d87f6f1e3723dad029ca22ee0c54b Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Sun, 6 Mar 2022 15:14:46 +0100 Subject: [PATCH 1/2] API: services/reddit.json --- api/services/reddit.json | 320 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 320 insertions(+) create mode 100644 api/services/reddit.json diff --git a/api/services/reddit.json b/api/services/reddit.json new file mode 100644 index 0000000..b76be94 --- /dev/null +++ b/api/services/reddit.json @@ -0,0 +1,320 @@ +{ + "name": "Reddit", + "actions": [], + "reactions": [ + { + "name": "Reddit_JoinSubreddit", + "description": { + "en": "Subscribe to a Subbreddit", + "fr": "S'abonner à un Subreddit" + }, + "label": { + "en": "Join a Subbreddit", + "fr": "Rejoindre un Subreddit" + }, + "params": [ + { + "name": "sub_name", + "type": "string", + "description": { + "en": "The name of the subreddit", + "fr": "Le nom du subreddit" + } + } + ], + "returns": [ + { + "name": "SUB_NAME", + "type": "string", + "description": { + "en": "The name of the subreddit", + "fr": "Le nom du subreddit" + } + }, + { + "name": "SUB_ID", + "type": "string", + "description": { + "en": "The ID of the subreddit", + "fr": "L'ID du subreddit" + } + } + ] + }, + { + "name": "Reddit_LeaveSubreddit", + "description": { + "en": "Unsubscribe to a Subbreddit", + "fr": "Se désabonner à un Subreddit" + }, + "label": { + "en": "Leave a Subbreddit", + "fr": "Quitter un Subreddit" + }, + "params": [ + { + "name": "sub_name", + "type": "string", + "description": { + "en": "The name of the subreddit", + "fr": "Le nom du subreddit" + } + } + ], + "returns": [ + { + "name": "SUB_NAME", + "type": "string", + "description": { + "en": "The name of the subreddit", + "fr": "Le nom du subreddit" + } + }, + { + "name": "SUB_ID", + "type": "string", + "description": { + "en": "The ID of the subreddit", + "fr": "L'ID du subreddit" + } + } + ] + }, + { + "name": "Reddit_PostInSubreddit", + "description": { + "en": "Post in a Subbreddit", + "fr": "Créer un post dans un Subreddit" + }, + "label": { + "en": "Create a post", + "fr": "Créer un post" + }, + "params": [ + { + "name": "sub_name", + "type": "string", + "description": { + "en": "The name of the subreddit", + "fr": "Le nom du subreddit" + } + }, + { + "name": "title", + "type": "string", + "description": { + "en": "The title of the post", + "fr": "Le titre du post" + } + }, + { + "name": "body", + "type": "string", + "description": { + "en": "The content of the post", + "fr": "Le contenu du post" + } + } + ], + "returns": [ + { + "name": "SUB_NAME", + "type": "string", + "description": { + "en": "The name of the parent subreddit", + "fr": "Le nom du subreddit parent" + } + }, + { + "name": "SUB_ID", + "type": "string", + "description": { + "en": "The ID of the subreddit parent", + "fr": "L'ID du subreddit parent" + } + }, + { + "name": "POST_ID", + "type": "string", + "description": { + "en": "The ID of the post", + "fr": "L'ID du post" + } + } + ] + }, + { + "name": "Reddit_ReplyToPost", + "description": { + "en": "Reply to Post in a Subbreddit", + "fr": "Créer un réponse à un post dans un Subreddit" + }, + "label": { + "en": "Reply to a post", + "fr": "Répondre à un post" + }, + "params": [ + { + "name": "post_id", + "type": "string", + "description": { + "en": "The ID of the post", + "fr": "L'ID du post" + } + }, + { + "name": "reply_body", + "type": "string", + "description": { + "en": "The content of the reply", + "fr": "Le contenu de la réponse" + } + } + ], + "returns": [ + { + "name": "SUB_NAME", + "type": "string", + "description": { + "en": "The name of the parent subreddit", + "fr": "Le nom du subreddit parent" + } + }, + { + "name": "SUB_ID", + "type": "string", + "description": { + "en": "The ID of the parent subreddit", + "fr": "L'ID du subreddit parent" + } + }, + { + "name": "POST_ID", + "type": "string", + "description": { + "en": "The ID of the post", + "fr": "L'ID du post" + } + }, + { + "name": "REPLY_ID", + "type": "string", + "description": { + "en": "The ID of the reply", + "fr": "L'ID de la réponse" + } + } + ] + }, + { + "name": "Reddit_Upvote", + "description": { + "en": "Upvote a Post in a Subbreddit", + "fr": "Liker un un post dans un Subreddit" + }, + "label": { + "en": "Upvote to a post", + "fr": "Liker un post" + }, + "params": [ + { + "name": "post_id", + "type": "string", + "description": { + "en": "The ID of the post", + "fr": "L'ID du post" + } + } + ], + "returns": [ + { + "name": "SUB_NAME", + "type": "string", + "description": { + "en": "The name of the parent subreddit", + "fr": "Le nom du subreddit parent" + } + }, + { + "name": "SUB_ID", + "type": "string", + "description": { + "en": "The ID of the parent subreddit", + "fr": "L'ID du subreddit parent" + } + }, + { + "name": "POST_ID", + "type": "string", + "description": { + "en": "The ID of the upvoted post", + "fr": "L'ID du post liké" + } + }, + { + "name": "UPVOTE_COUNT", + "type": "integer", + "description": { + "en": "The count of upvote of the post", + "fr": "Le nombre d'upvote sur le post" + } + } + ] + }, + { + "name": "Reddit_Downvote", + "description": { + "en": "Downvote a Post in a Subbreddit", + "fr": "Disliker un un post dans un Subreddit" + }, + "label": { + "en": "Downvote to a post", + "fr": "Disliker un post" + }, + "params": [ + { + "name": "post_id", + "type": "string", + "description": { + "en": "The ID of the post", + "fr": "L'ID du post" + } + } + ], + "returns": [ + { + "name": "SUB_NAME", + "type": "string", + "description": { + "en": "The name of the parent subreddit", + "fr": "Le nom du subreddit parent" + } + }, + { + "name": "SUB_ID", + "type": "string", + "description": { + "en": "The ID of the parent subreddit", + "fr": "L'ID du subreddit parent" + } + }, + { + "name": "POST_ID", + "type": "string", + "description": { + "en": "The ID of the downvoted post", + "fr": "L'ID du post disliké" + } + }, + { + "name": "DOWNVOTE_COUNT", + "type": "integer", + "description": { + "en": "The count of downvote of the post", + "fr": "Le nombre de downvote sur le post" + } + } + ] + } + ] +} \ No newline at end of file From e43ef602d3b0bb57b706e33286cc9039e2f5760d Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Sun, 6 Mar 2022 15:25:23 +0100 Subject: [PATCH 2/2] API: service: Reddit: sub_name => sib_id --- api/services/reddit.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/services/reddit.json b/api/services/reddit.json index b76be94..79eb989 100644 --- a/api/services/reddit.json +++ b/api/services/reddit.json @@ -14,7 +14,7 @@ }, "params": [ { - "name": "sub_name", + "name": "sub_id", "type": "string", "description": { "en": "The name of the subreddit", @@ -53,11 +53,11 @@ }, "params": [ { - "name": "sub_name", + "name": "sub_id", "type": "string", "description": { - "en": "The name of the subreddit", - "fr": "Le nom du subreddit" + "en": "The ID of the subreddit", + "fr": "Le ID du subreddit" } } ], @@ -92,11 +92,11 @@ }, "params": [ { - "name": "sub_name", + "name": "sub_id", "type": "string", "description": { - "en": "The name of the subreddit", - "fr": "Le nom du subreddit" + "en": "The ID of the subreddit", + "fr": "Le ID du subreddit" } }, {