animality
Advanced tools
Comparing version 2.0.1 to 2.0.2
{ | ||
"name": "animality", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "A simple API wrapper that generates images & facts of any animal", | ||
"main": "dist/index.js", | ||
"typings": "dist/index.d.ts", | ||
"devDependencies": { | ||
"@types/node": "^18.0.5", | ||
"typescript": "^4.7.4" | ||
"main": "index.js", | ||
"dependencies": { | ||
"node-fetch": "^3.3.2" | ||
}, | ||
"devDependencies": {}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
@@ -26,6 +28,3 @@ "type": "git", | ||
}, | ||
"homepage": "https://animality.xyz", | ||
"dependencies": { | ||
"undici": "^5.7.0" | ||
} | ||
"homepage": "https://animality.xyz" | ||
} |
# animality-js | ||
A simple API wrapper that generates images & facts of any animal | ||
A simple package that generates images & facts of any animal using the Animality API. | ||
# Installation | ||
```bash | ||
$ npm install animality | ||
``` | ||
The Node.js wrapper for this API is available for use in [Node Package Manager](https://www.npmjs.com/package/animality). It's use is pretty straight-forward. | ||
# Usage | ||
These are the 17 animal strings that can be used to send a request to the API: | ||
* `cat` | ||
* `dog` | ||
* `bird` | ||
* `panda` | ||
* `redpanda` | ||
* `koala` | ||
* `fox` | ||
* `whale` | ||
* `dolphin` | ||
* `kangaroo` | ||
* `bunny` | ||
* `lion` | ||
* `bear` | ||
* `frog` | ||
* `duck` | ||
* `penguin` | ||
* `axolotl` | ||
# Example | ||
```js | ||
const {Animality} = require('animality'); | ||
const animal = 'cat'; | ||
Animality.getAsync(animal, 'API_KEY').then(console.log); | ||
``` | ||
This outputs the following object in the terminal: | ||
```json | ||
{ | ||
"name": "cat", | ||
"image": "An image URL here", | ||
"fact": "A fact here" | ||
} | ||
``` | ||
Other than that, this package also allows you to request multiple animals at the same time. | ||
```js | ||
const {Animality} = require('animality'); | ||
const animals = ['cat', 'dog', 'panda']; | ||
Animality.getAsync(animals, 'API_KEY').then(console.log); | ||
``` | ||
This outputs the following array of objects in the terminal: | ||
```json | ||
[ | ||
{ | ||
"name": "cat", | ||
"image": "An image URL here", | ||
"fact": "A fact here" | ||
}, | ||
{ | ||
"name": "dog", | ||
"image": "An image URL here", | ||
"fact": "A fact here" | ||
}, | ||
{ | ||
"name": "panda", | ||
"image": "An image URL here", | ||
"fact": "A fact here" | ||
} | ||
] | ||
``` | ||
# [Documentation](https://animality.xyz/packages#node-js) |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
0
4129
5
71
1
5
4
+ Addednode-fetch@^3.3.2
+ Addeddata-uri-to-buffer@4.0.1(transitive)
+ Addedfetch-blob@3.2.0(transitive)
+ Addedformdata-polyfill@4.0.10(transitive)
+ Addednode-domexception@1.0.0(transitive)
+ Addednode-fetch@3.3.2(transitive)
+ Addedweb-streams-polyfill@3.3.3(transitive)
- Removedundici@^5.7.0
- Removed@fastify/busboy@2.1.1(transitive)
- Removedundici@5.28.4(transitive)