Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
/ cowsay.js Public archive

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

License

Notifications You must be signed in to change notification settings

Cyanic76/cowsay.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ 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.