Have ideas to improve npm?Join in the discussion! »

socialbladeTypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Social Blade API in TypeScript

npm Discord


API Information

Our API allows you to take the power of the Social Blade website and intergrate it directly into your internal systems.

You gain access to the same public statistical information that is on the website along with our toplists, rankings, and more as we keep expanding it's features!

Install

npm install --save socialblade

Important: Library does not force any fetch polyfills, If you don't already have a fetch polyfill we recommend using isomorphic-unfetch like the tests use.

Usage

Import the library into your project and construct a new client which will be used to access the API.

TypeScript

import SocialBlade, { YouTubeUser } from 'socialblade';
 
const client: SocialBlade = new SocialBlade(SOCIALBLADE_CLIENT_ID, SOCIALBLADE_ACCESS_TOKEN);
 
// Get a YouTube User
const sbUser: YouTubeUser = await client.youtube.user('socialblade');

ES6+

const SocialBlade = require("socialblade");
 
const client = new SocialBlade(SOCIALBLADE_CLIENT_ID, SOCIALBLADE_ACCESS_TOKEN);
 
// Get a YouTube User
client.youtube.user('socialblade').then(console.log);
Code Examples

Troubleshooting

If you find an issue with this library feel free to open an issue here on GitHub, or submit a PR and others! 😀
If it's an issue when the API open a support ticket.

Install

npm i socialblade

DownloadsWeekly Downloads

15

Version

1.0.0

License

BSD 3-Clause

Unpacked Size

42.8 kB

Total Files

110

Last publish

Collaborators

  • avatar
  • avatar
  • avatar