Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/loockeeer/vdm-wrapper
A wrapper for retrieving infos from VDM (french)
https://github.com/loockeeer/vdm-wrapper
Last synced: 12 days ago
JSON representation
A wrapper for retrieving infos from VDM (french)
- Host: GitHub
- URL: https://github.com/loockeeer/vdm-wrapper
- Owner: loockeeer
- Created: 2020-04-22T15:45:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-22T15:58:57.000Z (over 4 years ago)
- Last Synced: 2024-10-11T03:21:51.617Z (about 1 month ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VDM Wrapper
VDM Wrapper able you to retrieve data from VDM, spicy or classic.
## Install
Install it with npm : npm i vdm-wrapper
Or with yarn : yarn add vdm-wrapper
## Exemples
```js
const vdm = require('vdm-wrapper')await vdm.fetchPage(50, true) // Retrieve data from page 50, only spicy
await vdm.fetchPages(50, false) // Retrieve the first 50 pages, spicy and classic
await vdm.fetchAllPages(false) // Retrive all the pages spicy and classic
(async ()=>{
for await (const page of vdm.fetchAllPagesGenerator()) { // Retrieve all the pages with a generator, spicy and classic
console.log(page)
}
})()```
## Documentation
```js
class Client {
static async fetchPage(page_number, spicy=false) // Data from one page
static async fetchPages(count, spicy=false) // Data from x pages
static async fetchAllPages(spicy=false) // Data from all pages
static async *fetchAllPagesGenerator(spicy=false) // Data from all pages but with a generator
}
```