Cyanic76 / cowsay.js

A simple cowsay API built on node.js with express.

Home Page:https://cowsay.api.cyanic.tk/example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

⚠️ Moved to Codeberg.

Cowsay

An API dedicated to make a cow repeat whatever you want to.

License

UptimeRobot

Use the API

A demo version of the API is hosted at cowsay.api.cyanic.tk.

Use it by GETting the following URL : https://cowsay.api.cyanic.tk/:text. This will return a JSON object such as:

{
    message: "Example"
    cow: "  _______\n< Example >\n  -------\n         \\   ^__^ \n          \\  (oo)\\_______\n             (__)\\       )\\/\\\n                 ||----w |\n                 ||     ||\n    "
}

Be aware that GETting the https://cowsay.api.cyanic.tk/ URL will return an HTTP 404 error. That is because you must specify a text in the URL.

Example code with NodeJS/superagent

await superagent.get("https://cowsay.api.cyanic.tk/Example").then((res, err) => {
	if(err){ /* Handle the error here */ };
	let body = JSON.parse(res.text);
})

by Cyanic76 - released under MIT.

About

A simple cowsay API built on node.js with express.

https://cowsay.api.cyanic.tk/example

License:MIT License


Languages

Language:JavaScript 100.0%