C

CannicideAPI

Lightning-quick API services

How to use JSON/text APIs

Using JSON/text APIs from a webpage is as simple as:


                fetch("https://cannicideapi.glitch.me/someapiurl")
                .then(res => res.text()) //or res.json() for JSON
                .then(body => {
                    //Content is contained in body variable
                    console.log(body);
                });
            
If you are using a JSON/text API from a NodeJS environment, the usage is the same, but you will need to import the npm module 'node-fetch' like so: require("node-fetch");

How to use image/video/audio APIs

Most image/video/audio APIs directly return their respective image/video/audio content. Therefore, these APIs can be used directly where you need them. Here is an example using our Minecraft avatar API:

         <img src="https://cannicideapi.glitch.me/mc/avatar/Cannicide" />

Notch
Cannicide
Dinnerbone
Jeb_

How to use libraries and script APIs

Libraries must be imported into your project, which will look different depending on your javascript environment. In regular JS found on webpages, web-compatible libraries can be imported like so:

         <script src="https://cannicideapi.glitch.me/lib/somelibraryurl"></script>
That snippet should be included either at the top of your webpage in the HEAD tags, or at the bottom of your webpage beneath your BODY tags, depending on which location the library requires (see the library's documentation for the location).

In NodeJS, node-compatible library modules can be imported like so:
                         require("./locallibrarylocation")
Using NodeJS library modules requires downloading those libraries first, or downloading a library package that includes the needed libraries. After downloading the library, import it by replacing the arguments of the require statement above with the library's file location on your system. Do not include the '.js' extension in the file location.

Minecraft Avatar

Fetches a 2D image of a Minecraft user's head

API Details

API: https://cannicideapi.glitch.me/mc/avatar/:username
Returns: Image (PNG)
Variables: Minecraft Username (:username)

How to use the APIs

Any parts of the API links provided that begin with a colon (i.e. :text) should be replaced by your own values.
For example, for Minecraft Head: https://cannicideapi.glitch.me/mc/head/This+is+some+text

:username was replaced with "This is some text"
Note that any spaces in any part of the link should be replaced by plus signs, otherwise the API link will not work.

Cannicide
Notch

Minecraft Head (Render)

Fetches a 3D image of a Minecraft user's head

API Details

API: https://cannicideapi.glitch.me/mc/head/:username
Returns: Image (PNG)
Variables: Minecraft Username (:username)

How to use the APIs

Any parts of the API links provided that begin with a colon (i.e. :text) should be replaced by your own values.
For example, for Minecraft Head: https://cannicideapi.glitch.me/mc/head/This+is+some+text

:username was replaced with "This is some text"
Note that any spaces in any part of the link should be replaced by plus signs, otherwise the API link will not work.

Cannicide
Notch

Minecraft Body (Render)

Fetches a 3D image of a Minecraft user's body/skin

API Details

API: https://cannicideapi.glitch.me/mc/body/:username
Returns: Image (PNG)
Variables: Minecraft Username (:username)

How to use the APIs

Any parts of the API links provided that begin with a colon (i.e. :text) should be replaced by your own values.
For example, for Minecraft Head: https://cannicideapi.glitch.me/mc/head/This+is+some+text

:username was replaced with "This is some text"
Note that any spaces in any part of the link should be replaced by plus signs, otherwise the API link will not work.

Cannicide
Notch

Wikipedia Text (Full Article)

Fetches the full text of a Wikipedia article.

API Details

API: https://cannicideapi.glitch.me/wikipedia/:keywords/text
Returns: Raw Text
Variables: Keywords/Article Title (:keywords)

How to use the APIs

Any parts of the API links provided that begin with a colon (i.e. :text) should be replaced by your own values.
For example, for Minecraft Head: https://cannicideapi.glitch.me/mc/head/This+is+some+text

:username was replaced with "This is some text"
Note that any spaces in any part of the link should be replaced by plus signs, otherwise the API link will not work.

Wikipedia Intro

Fetches the first 3 sentences of a Wikipedia article (brief description of topic).

API Details

API: https://cannicideapi.glitch.me/wikipedia/:keywords/intro
Returns: Raw Text
Variables: Keywords/Article Title (:keywords)

How to use the APIs

Any parts of the API links provided that begin with a colon (i.e. :text) should be replaced by your own values.
For example, for Minecraft Head: https://cannicideapi.glitch.me/mc/head/This+is+some+text

:username was replaced with "This is some text"
Note that any spaces in any part of the link should be replaced by plus signs, otherwise the API link will not work.

Wikipedia Categories

Fetches the full list of categories of a Wikipedia article.

API Details

API: https://cannicideapi.glitch.me/wikipedia/:keywords/categories
Returns: Array (JSON)
Variables: Keywords/Article Title (:keywords)

How to use the APIs

Any parts of the API links provided that begin with a colon (i.e. :text) should be replaced by your own values.
For example, for Minecraft Head: https://cannicideapi.glitch.me/mc/head/This+is+some+text

:username was replaced with "This is some text"
Note that any spaces in any part of the link should be replaced by plus signs, otherwise the API link will not work.

Youtube Audio (By ID)

Fetches the full audio of a Youtube video using its video ID.

API Details

API: https://cannicideapi.glitch.me/yt/:id
Returns: Audio (MPEG)
Variables: Video ID (:id)

How to use the APIs

Any parts of the API links provided that begin with a colon (i.e. :text) should be replaced by your own values.
For example, for Minecraft Head: https://cannicideapi.glitch.me/mc/head/This+is+some+text

:username was replaced with "This is some text"
Note that any spaces in any part of the link should be replaced by plus signs, otherwise the API link will not work.

Youtube Audio (By Keyword Search)

Fetches the full audio of a Youtube video using keywords/name, powered by my Evergreen Music API.

API Details

API: https://cannicideapi.glitch.me/yt/name/:keywords
Returns: Audio (MPEG)
Variables: Keywords/Video Title (:keywords)
Powered By: Evergreen Music

How to use the APIs

Any parts of the API links provided that begin with a colon (i.e. :text) should be replaced by your own values.
For example, for Minecraft Head: https://cannicideapi.glitch.me/mc/head/This+is+some+text

:username was replaced with "This is some text"
Note that any spaces in any part of the link should be replaced by plus signs, otherwise the API link will not work.

(Lang) Translate Context

Uses examples and context to translate a phrase and show the meaning of the translation.

Status: Currently Down

This API has been experiencing performance issues, and will therefore be down for an indeterminate amount of time.

API Details

API: https://cannicideapi.glitch.me/lang/context/?q=:phrase&from=:from_lang&to=:target_lang
Returns: Text (HTML)
Variables: Translatable Phrase (:phrase), Starting Language (:from_lang), Language to Translate To (:target_lang)
If unspecified, the Starting Language will default to English. The other two variables must be specified.

How to use the APIs

Any parts of the API links provided that begin with a colon (i.e. :text) should be replaced by your own values.
For example, for Minecraft Head: https://cannicideapi.glitch.me/mc/head/This+is+some+text

:username was replaced with "This is some text"
Note that any spaces in any part of the link should be replaced by plus signs, otherwise the API link will not work.

(Lang) Spellcheck

Spellchecks phrases in English and French. Shows you why parts of the phrase are wrong, word-by-word.

Status: Currently Down

This API has been experiencing performance issues, and will therefore be down for an indeterminate amount of time.

API Details

API: https://cannicideapi.glitch.me/lang/spellcheck?q=:phrase&lang=:language
Returns: Text (HTML)
Variables: Phrase (:phrase), Language of the Phrase (:language)
If unspecified, the Language will default to English.

How to use the APIs

Any parts of the API links provided that begin with a colon (i.e. :text) should be replaced by your own values.
For example, for Minecraft Head: https://cannicideapi.glitch.me/mc/head/This+is+some+text

:username was replaced with "This is some text"
Note that any spaces in any part of the link should be replaced by plus signs, otherwise the API link will not work.

(Lang) Synonyms

Fetches as many synonyms of a word as possible in the given language.

Status: Currently Down

This API has been experiencing performance issues, and will therefore be down for an indeterminate amount of time.

API Details

API: https://cannicideapi.glitch.me/lang/synonyms?q=:phrase&lang=:language&format=:format
Returns: Text (HTML)
Variables: Phrase (:phrase), Language of the Phrase (:language), Display Format (:format)

API: https://cannicideapi.glitch.me/lang/synonyms/raw?q=:phrase&lang=:language
Returns: Text (Plain)
Variables: Phrase (:phrase), Language of the Phrase (:language)

The Display Format can be one of three options: "bullets", "numbers", or "commas" (default).

How to use the APIs

Any parts of the API links provided that begin with a colon (i.e. :text) should be replaced by your own values.
For example, for Minecraft Head: https://cannicideapi.glitch.me/mc/head/This+is+some+text

:username was replaced with "This is some text"
Note that any spaces in any part of the link should be replaced by plus signs, otherwise the API link will not work.

(Lang) Definitions

Fetches the definition of a word or phrase as seen in the Google Dictionary.

API Details

API: https://cannicideapi.glitch.me/lang/define?q=:phrase
Returns: Text (Plain)
Variables: Phrase (:phrase)
Note: Because this API depends on scraping a google webpage, it may not work well in the future.

How to use the APIs

Any parts of the API links provided that begin with a colon (i.e. :text) should be replaced by your own values.
For example, for Minecraft Head: https://cannicideapi.glitch.me/mc/head/This+is+some+text

:username was replaced with "This is some text"
Note that any spaces in any part of the link should be replaced by plus signs, otherwise the API link will not work.

Sibyll

Cannicide's AI personal assistant. (Sibyll is far from finished, and her knowledgebase is incomplete).

Status: Partially Down

Though the Sibyll API continues to function properly, the TTS feature has been causing performance issues and will therefore be down for an indeterminate amount of time.
SibyllAI is also unable to utilize the synonyms feature at this time, due to concurrent issues with our Synonyms API.

API Details

API: https://cannicideapi.glitch.me/sibyll/:message?tts=:tts
Returns: Text (Plain) OR Audio (MPEG) if :tts is true
Variables: Message (:message), Text to Speech (:tts)

Sibyll currently features some greetings, choice management, a few references, and access to several features of CannicideAPI (including wikipedia, synonyms, and definitions). If :tts is not specified or is set to false, text will be returned as opposed to audio.

Talk with Sibyll

Sibyll: Hello!

How to use the APIs

Any parts of the API links provided that begin with a colon (i.e. :text) should be replaced by your own values.
For example, for Minecraft Head: https://cannicideapi.glitch.me/mc/head/This+is+some+text

:username was replaced with "This is some text"
Note that any spaces in any part of the link should be replaced by plus signs, otherwise the API link will not work.