From 09647617a91e030245bc5eb4193fe4e9f3bc59b2 Mon Sep 17 00:00:00 2001 From: "Matheus Cesar C. - Matsukii" Date: Thu, 3 Oct 2019 00:18:10 -0300 Subject: [PATCH] added npm links to srcs and json response samples --- README.md | 100 ++++++++++++++++++++++++++++++++++++++++++++++++ sample.json | 24 ++++++++++++ src/sample.json | 18 --------- srcs.md | 11 +++++- 4 files changed, 134 insertions(+), 19 deletions(-) create mode 100644 README.md create mode 100644 sample.json delete mode 100644 src/sample.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..14bd589 --- /dev/null +++ b/README.md @@ -0,0 +1,100 @@ +# opentk-apis +A set of useful apis + + +# this API uses: +* open-graph-crapper +* word filter [only english support up to now] +* atob and btoa base64 +* express +* js-video-url-parser + +* qrcode-svg + +## Inside but not in use: +* metafetch [unused, secondary] +* nano-memoize [unused] +* mysql + + +# usage + +## Og tag getter +https://open-toolkit-api-tolls.herokuapp.com/apis/ogtags?u=[URL] +parameters:
+u: url
+response:
+ +* json + +### see samples file or below + + +## SVG QR Code generator +https://open-toolkit-api-tolls.herokuapp.com/apis/qr?u=[URL]&d=[true]/[false]&w=[width]&c=[color]&bg=[background]
+parameters:
+u: data
+d: dark/light [true/false] (if true generates a lighet qr)
+w: width
+c: HEX color *without the #* _default colors: for dark themes=#CCCCCC and light=#222222_
+bg: background color in HEX *without the #* _default is transparent_ +*if any param was send, a message will be showed* + +response:
+* SVG document + + +## Video URL parser +http://opentk-apis.herokuapp.com/apis/vidurl?u=[URL] +params:
+u: video url + +response:
+* json + +## Bad-word message filter +https://open-toolkit-api-tolls.herokuapp.com/apis/filter?msg=[message_to_filter] +params:
+msg: message + +response:
+* json + + +# responses + +## og tags response sample:
+``` + { + "name": "GitHub", + "title": "Build software better, together", + "desc": "description...", + "type": "", + "url": "https://github.com", + "img": "https://github.githubassets.com/images/modules/open_graph/github-logo.png" + } +``` + +## video url parser:
+``` + { + "id": "jYCGSuNDy4M", + "mediaType": "video", + "provider": "youtube" + } +``` +## bad-word filter:
+``` + { + "msg":"****" + } +``` + + +# Modules credits + +[qrcode-svg by papnkukn](https://github.com/papnkukn/qrcode-svg)
+[bad-words by web-mech](https://github.com/web-mech/badwords)
+[jsVideoUrlParser by Zod-](https://github.com/Zod-/jsVideoUrlParser)
+[openGraphScraper by jshemas](https://github.com/jshemas/openGraphScraper)
+[metafetch by brahma-dev](https://github.com/brahma-dev/metafetch)
diff --git a/sample.json b/sample.json new file mode 100644 index 0000000..f8b487c --- /dev/null +++ b/sample.json @@ -0,0 +1,24 @@ +{ +"ogtags" : { + "name": "GitHub", + "title": "Build software better, together", + "desc": "description...", + "type": "", + "url": "https://github.com", + "img": "https://github.githubassets.com/images/modules/open_graph/github-logo.png" + }, + + + "videoParser":{ + "id": "jYCGSuNDy4M", + "mediaType": "video", + "provider": "youtube" + }, + + + "messageFilter":{ + "msg":"****" + } + +} + diff --git a/src/sample.json b/src/sample.json deleted file mode 100644 index f93db0f..0000000 --- a/src/sample.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "data":{ - "ogSiteName":"Twitch", - "twitterSite":"@twitch", - "ogTitle":"Twitch", - "ogDescription":"Twitch is the world's leading video platform and community for gamers.", - "ogUrl":"https://www.twitch.tv/", - "ogType":"website", - "ogImage":{ - "url":"//www-cdn.jtvnw.net/images/twitch_logo3.jpg", - "width":null, - "height":null, - "type":null - } - }, - "success":true, - "requestUrl":"http://twitch.tv" -} diff --git a/srcs.md b/srcs.md index 30ba801..baa6d48 100644 --- a/srcs.md +++ b/srcs.md @@ -1,3 +1,12 @@ # https://www.npmjs.com/package/object-hash # https://www.npmjs.com/package/mysql -# https://www.npmjs.com/package/js-video-url-parser \ No newline at end of file +# https://www.npmjs.com/package/js-video-url-parser +# https://www.npmjs.com/package/metafetch +# https://www.npmjs.com/package/open-graph-scraper +# https://www.npmjs.com/package/bad-words +# https://www.npmjs.com/package/qrcode-svg +# https://www.npmjs.com/package/express +# https://www.npmjs.com/package/atob +# https://www.npmjs.com/package/btoa +# https://www.npmjs.com/package/cors +# https://www.npmjs.com/package/nano-memoize \ No newline at end of file