Skip to content

iFraan/scp-api.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scp-api.js

CodeFactor NPM-Version NPM-Downloads Github Stars Issues

This a wrapper/scrapper of the SCP Fandom site.

There is no API key required.

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published