scp-api.js
v2.0.0
Published
Scrapper for SCP-wiki info.
Downloads
97
Maintainers
Readme
To install use:
npm i scp-api.js
There is two ways to fetch data.
You can use the method fetchSCP
without creating an API instance first,
or you can create and API instance and use getSCP
to take adventage of local cache data.
Here you have the two examples:
import { API, fetchSCP } from './src';
console.log('---- Direct Method: ----')
const scp3007 = await fetchSCP('3007')
console.log({ scp3007 })
console.log('---- Cache Method: ----')
const api = new API();
const first = await api.getSCP('3007');
const second = await api.getSCP('982');
console.log('results: ', {
first,
second,
})
console.log('cache: ', api.raw)
Disclaimer
This project is fully made for educational purposes