Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/socialblade/socialblade-js
Library for Social Blade's Official API in JavaScript (TypeScript)
https://github.com/socialblade/socialblade-js
socialblade twitch twitter youtube
Last synced: 7 days ago
JSON representation
Library for Social Blade's Official API in JavaScript (TypeScript)
- Host: GitHub
- URL: https://github.com/socialblade/socialblade-js
- Owner: SocialBlade
- License: bsd-3-clause
- Created: 2020-10-06T23:23:06.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-06T22:11:55.000Z (over 1 year ago)
- Last Synced: 2024-12-19T21:14:49.109Z (7 days ago)
- Topics: socialblade, twitch, twitter, youtube
- Language: TypeScript
- Homepage: https://socialblade.com/api
- Size: 110 KB
- Stars: 41
- Watchers: 5
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Social Blade API in TypeScript [](https://socialblade.com/b)
[![npm](https://img.shields.io/npm/v/socialblade.svg)](https://www.npmjs.com/package/socialblade)
![Discord](https://img.shields.io/discord/125022847562285056?color=7289DA&label=Discord)---
### API Information
Our API allows you to take the power of the Social Blade website and integrate 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 its features!
[](https://socialblade.com/business-api)## Install
```bash
# with npm
npm install --save socialblade# with yarn
yarn add socialblade
```> **Important**: We do not force any fetch polyfills, If you're using an older version of node non-lts (v18) you may need a fetch polyfill.
## Usage
Import the library into your project and construct a new client which will be used to access the API.#### TypeScript
```ts
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+
```js
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](examples)
## Troubleshooting
If you find an issue with this library, feel free to open an issue here on GitHub, or submit a PR! 😀
If it's an issue with the API, open a [support ticket](https://support.socialblade.com).