@trivia-api/fetch
Advanced tools
Comparing version 1.0.15 to 1.0.16
{ | ||
"name": "@trivia-api/fetch", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "Functions to fetch data from The Trivia API.", | ||
"keywords": [ | ||
"trivia", | ||
"quiz", | ||
"api", | ||
"fetch", | ||
"client", | ||
"http" | ||
], | ||
"main": "dist/index.js", | ||
@@ -10,3 +18,7 @@ "scripts": { | ||
}, | ||
"author": "Will Fry", | ||
"author": { | ||
"name": "Will Fry", | ||
"url": "https://willfry.co.uk", | ||
"email": "will.r.fry@gmail.com" | ||
}, | ||
"license": "ISC", | ||
@@ -32,5 +44,6 @@ "devDependencies": { | ||
"type": "git", | ||
"url": "git+https://gitlab.com/BillyBobFry/node-trivia-api.git" | ||
"url": "git+https://gitlab.com/BillyBobFry/node-trivia-api.git", | ||
"directory": "packages/fetch" | ||
}, | ||
"homepage": "https://the-trivia-api.com" | ||
} |
@@ -1,2 +0,2 @@ | ||
# Trivia API Models | ||
# Trivia API Fetch Client | ||
@@ -9,6 +9,8 @@ Functions to fetch data from [The Trivia API](https://the-trivia-api.com). | ||
## Functions | ||
## Usage | ||
### getQuestions | ||
### Functions | ||
#### getQuestions | ||
```js | ||
@@ -22,3 +24,3 @@ import { getQuestions } from "@trivia-api/fetch"; | ||
### searchQuestions | ||
#### searchQuestions | ||
@@ -34,3 +36,3 @@ ```js | ||
### getMetadata | ||
#### getMetadata | ||
@@ -41,4 +43,14 @@ ```js | ||
getMetadata().then((metadata) => { | ||
// metadata is an object representing the number of questions in the API | ||
// metadata is an object representing the number of questions in the API, broken down by category and state | ||
}); | ||
``` | ||
#### getTags | ||
```js | ||
import { getTags } from "@trivia-api/fetch"; | ||
getTags().then((tags) => { | ||
// tags is an array of all the tags used by questions in the API | ||
}); | ||
``` |
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
20754
53
4