Skip to content

Commit

Permalink
added npm links to srcs and json response samples
Browse files Browse the repository at this point in the history
  • Loading branch information
Matheus Cesar C. - Matsukii committed Oct 3, 2019
1 parent d029e0e commit 0964761
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 19 deletions.
100 changes: 100 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:<br>
u: url<br>
response:<br>

* 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]<br>
parameters:<br>
u: data<br>
d: dark/light [true/false] (if true generates a lighet qr)<br>
w: width<br>
c: HEX color *without the #* _default colors: for dark themes=#CCCCCC and light=#222222_<br>
bg: background color in HEX *without the #* _default is transparent_
*if any param was send, a message will be showed*

response:<br>
* SVG document


## Video URL parser
http://opentk-apis.herokuapp.com/apis/vidurl?u=[URL]
params:<br>
u: video url

response:<br>
* json

## Bad-word message filter
https://open-toolkit-api-tolls.herokuapp.com/apis/filter?msg=[message_to_filter]
params:<br>
msg: message

response:<br>
* json


# responses

## og tags response sample:<br>
```
{
"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:<br>
```
{
"id": "jYCGSuNDy4M",
"mediaType": "video",
"provider": "youtube"
}
```
## bad-word filter:<br>
```
{
"msg":"****"
}
```


# Modules credits

[qrcode-svg by papnkukn](https://github.com/papnkukn/qrcode-svg)<br>
[bad-words by web-mech](https://github.com/web-mech/badwords)<br>
[jsVideoUrlParser by Zod-](https://github.com/Zod-/jsVideoUrlParser)<br>
[openGraphScraper by jshemas](https://github.com/jshemas/openGraphScraper)<br>
[metafetch by brahma-dev](https://github.com/brahma-dev/metafetch)<br>
24 changes: 24 additions & 0 deletions sample.json
Original file line number Diff line number Diff line change
@@ -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":"****"
}

}

18 changes: 0 additions & 18 deletions src/sample.json

This file was deleted.

11 changes: 10 additions & 1 deletion srcs.md
Original file line number Diff line number Diff line change
@@ -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
# 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

0 comments on commit 0964761

Please sign in to comment.