{"info":{"_postman_id":"1ebce58a-168c-463f-9103-3340b0ab522a","name":"Mod-Gurad API Documentation","description":"<html><head></head><body><h4 id=\"responses-for-various-requests--\">RESPONSES FOR VARIOUS REQUESTS -</h4>\n<blockquote>\n<p>An <strong>Unauthorized</strong> request, results in a <em><strong>HTTP 401</strong></em> status code</p>\n</blockquote>\n<blockquote>\n<p>A <strong>proper</strong> request might result in <em><strong>HTTP 429</strong></em> status code if <em><strong>API rate limit</strong></em> is reached</p>\n</blockquote>\n<h4 id=\"request-structure-multipartform-data--\">Request structure (multipart/form-data) -</h4>\n<blockquote>\n<p><strong>NOTE</strong>: Remember requests must be of multipart/form-data</p>\n</blockquote>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameters</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>strategy (<strong>required</strong>)</td>\n<td>This field accepts either <strong>1</strong> or <strong>2</strong> as its value , <strong>1</strong> means <strong>API strategy</strong> , <strong>2</strong> means <strong>API + Publisher/Consumer strategy</strong></td>\n</tr>\n<tr>\n<td>image_file</td>\n<td>This field accepts image file , so provide the image file and make sure that you don't provide the image_link along with this as well and I have set the size limit of image to be less than <strong>5 MB</strong> , you can increase/decrease that as well , in the multer.js file located in the middleware folder.</td>\n</tr>\n<tr>\n<td>image_moderation</td>\n<td>This field accepts <strong>nudity,gore,wad,offensive</strong> as value, you can only choose from these moderation models.</td>\n</tr>\n<tr>\n<td>image_link</td>\n<td>This field accepts complete <strong>URL/URI</strong> of the image , including the http or https , and make sure that you don't provide the image_file along with this as well</td>\n</tr>\n<tr>\n<td>isProfane</td>\n<td>This field accepts text and returns whether the text was profane or not!</td>\n</tr>\n<tr>\n<td>filter_profanity</td>\n<td>This field accepts <strong>text</strong> with or without <strong>profanity/bad-words</strong> and returns the profanity/bad-words <strong>filtered text</strong></td>\n</tr>\n<tr>\n<td>isMalicious</td>\n<td>This field accepts <strong>URL</strong> of a website and returns whether it is malicious or not!</td>\n</tr>\n<tr>\n<td>isSpam[content]</td>\n<td>This field accepts <strong>text</strong> and detects whether the text is spam or not, for detecting it also needs ip address and useragent of the sender, perfect use-case : comments on a post, sending the ip address &amp; useragent of the commenter</td>\n</tr>\n<tr>\n<td>isSpam[ip]</td>\n<td>This field accepts <strong>ip</strong> address of the text sender, needed to help detect whether the text is spam or not</td>\n</tr>\n<tr>\n<td>isSpam[useragent]</td>\n<td>This field accepts the browsers <strong>useragent</strong> of the text sender, needed to help detect whether the text is spam or not</td>\n</tr>\n<tr>\n<td>isSpam[name]</td>\n<td>This field accepts name of the spam <strong>text</strong> sender , for more accruacy , but not compulsory</td>\n</tr>\n<tr>\n<td>isSpam[email]</td>\n<td>This field accepts <strong>email</strong> of the spam text sender , for more accruacy , but not compulsory</td>\n</tr>\n<tr>\n<td>isSpamEmail</td>\n<td>This field accepts any <strong>email</strong> and determines whether that email is marked as spam or not</td>\n</tr>\n<tr>\n<td>metadata</td>\n<td>This is just the reference info that client can provide along with the request ,it can be of any type and this will be returned back with the response and this will not be stored by the server , use-case : if you are using our API + publisher/consumer strategy , you might need to know info of some request later down the road, so for that you can add some metadata on each and every request, which will be propagated through and will be available at the consumer end</td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"14691472","collectionId":"1ebce58a-168c-463f-9103-3340b0ab522a","publishedId":"UV5TEyxx","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-10-12T13:48:10.000Z"},"item":[{"name":"Api or Api+Pub/Con strategy","id":"c2cc9a32-aef4-47df-af9c-d3ad2c00b61f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"AUTH_KEY","value":"THIS_IS_VERIFIED_REQUEST","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"strategy","value":"2","type":"text"},{"key":"image_file","type":"file","src":"/C:/Users/Swastik gowda/Pictures/Saved Pictures/nsfw.jpg","disabled":true},{"key":"image_moderation","value":"nudity","type":"text","disabled":true},{"key":"image_link","value":"https://i.natgeofe.com/n/46b07b5e-1264-42e1-ae4b-8a021226e2d0/domestic-cat_thumb_square.jpg","type":"text","disabled":true},{"key":"isMalicious","value":"https://www.nighorizon.com","type":"text"},{"key":"isProfane","value":"wassup mate ?","type":"text"},{"key":"filter_profanity","value":"what the hell mate ?","type":"text","disabled":true},{"key":"isSpam[ip]","value":"123.123.1.1","type":"text","disabled":true},{"key":"isSpam[useragent]","value":"CommentorsAgent 1.0 WebKit","type":"text","disabled":true},{"key":"isSpam[content]","value":"check out my blog","type":"text","disabled":true},{"key":"isSpam[email]","value":"not.a.spammer@gmail.com","type":"text","disabled":true},{"key":"isSpam[name]","value":"john doe","type":"text","disabled":true},{"key":"isSpamEmail","value":"jexihot163@specialistblog.com","type":"text","disabled":true},{"key":"metadata","value":"123456","type":"text"}]},"url":"localhost:3000/modGuard","description":"<h4 id=\"responses-for-content-moderation-requests-\">Responses for content moderation requests-</h4>\n<blockquote>\n<p>A <strong>successful</strong> moderation request, results in a <em><strong>HTTP 200</strong></em> status code</p>\n</blockquote>\n<blockquote>\n<p>A <strong>bad</strong> moderation request, results in a <em><strong>HTTP 400</strong></em> status code</p>\n</blockquote>\n<blockquote>\n<p><strong>NOTE</strong>: Must provide the auth_key in the header of each and every request! \nMake sure you change the default auth_key in the .env file.</p>\n</blockquote>\n<blockquote>\n<p>Below is an example request -</p>\n</blockquote>\n","urlObject":{"port":"3000","path":["modGuard"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c2cc9a32-aef4-47df-af9c-d3ad2c00b61f"},{"name":"Publisher Consumer","id":"0766067f-7f8e-4334-96a8-894e41e1cfb8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"AUTH_KEY","value":"THIS_IS_VERIFIED_REQUEST","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"strategy","value":"2","type":"text"},{"key":"image_file","type":"file","src":"/C:/Users/Swastik gowda/Pictures/Saved Pictures/abstract1.jpg","disabled":true},{"key":"image_moderation","value":"nudity,wad","type":"text"},{"key":"image_link","value":"https://cdn.britannica.com/q:60/91/181391-050-1DA18304/cat-toes-paw-number-paws-tiger-tabby.jpg","type":"text"},{"key":"isProfane","value":"what the hell mate ?","type":"text"},{"key":"filter_profanity","value":"what the hell mate ?","type":"text"},{"key":"isMalicious","value":"http://www.amazon.com","type":"text"},{"key":"isSpam[ip]","value":"115.13.94.65","type":"text"},{"key":"isSpam[useragent]","value":"CommentorsAgent 1.0 WebKit","type":"text"},{"key":"isSpam[content]","value":"Very nice blog! Check out my blog!","type":"text"},{"key":"isSpam[email]","value":"not.a.spammer@gmail.com","type":"text"},{"key":"isSpam[name]","value":"john doe","type":"text"},{"key":"isSpamEmail","value":"swastikdragon@gmail.com","type":"text"},{"key":"metadata","value":"swastik","type":"text","disabled":true}]},"url":"localhost:3000/modGuard/pubcon","description":"<h4 id=\"responses-for-content-moderation-requests-\">Responses for content moderation requests-</h4>\n<blockquote>\n<p>A <strong>successful</strong> moderation request, results in a <em><strong>HTTP 200</strong></em> status code</p>\n</blockquote>\n<blockquote>\n<p>A <strong>bad</strong> moderation request, results in a <em><strong>HTTP 400</strong></em> status code</p>\n</blockquote>\n<blockquote>\n<p><strong>NOTE</strong>: Must provide the auth_key in the header of each and every request! \nMake sure you change the default auth_key in the .env file.</p>\n</blockquote>\n<blockquote>\n<p>Below is an example request -</p>\n</blockquote>\n","urlObject":{"port":"3000","path":["modGuard","pubcon"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"0766067f-7f8e-4334-96a8-894e41e1cfb8"}]}