suzumi-api
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

NPM version NPM downloads

npm installnfo

Description

Official npm module for Suzumi Api

Installation

npm i suzumi-api

Utilisation

Connetion :

const suzuClient = require("suzumi-api");
const suzuApi = new suzuClient();

Check All Endpoint :

suzuApi.endpoint().then(data => {
    console.log(data);
}).catch(err => {
    throw err;
});

Returns

[
  {
    description: 'Search videos on Youtube',
    link: '/api/json/youtube?query=never%20gonna%20give%20you%20up',
    args: [ [Object] ],
    name: 'youtube',
    route: 'youtube',
    category: '/json',
    errMsg: null,
    auth: false,
    premium: false
  },
  {
    description: 'Search accounts on Twitter',
    link: '/api/json/twitter?username=narendramodi',
    errMsg: 'Cannot find account',
    args: [ [Object] ],
    name: 'twitter',
    route: 'twitter',
    category: '/json',
    auth: false,
    premium: false
  },
  {
    description: 'Search accounts on Twitch',
    link: '/api/json/twitch?channel=pokimane',
    args: [ [Object] ],
    name: 'twitch',
    route: 'twitch',
    category: '/json',
    errMsg: null,
    auth: false,
    premium: false
  },
   /* and you'll see much more...*/
  ]

Endpoint Image :

suzuApi.image("endpoint", {
  "image": "url"
}).then(data => {
    console.log(data);
}).catch(err => {
    throw err;
});

Returns

<Buffer ... >

Endpoint Json :

suzuApi.json("shitpost", /*options*/ ).then(data => {
	console.log(data);
}).catch(err => {
	throw err;
});

Returns

{
 "subreddit": "https://reddit.com/r/shitposting/comments/txk5la/must_be_for_charity/",
 "title": "must be for charity 😃",
 "image": "https://i.redd.it/zqjep3wyawr81.jpg",
 "upvotes": 58,
 "comments": 1
}

Endpoint Get Example:

suzuApi.get("category", "endpoint", /*options*/).then(image => {
    console.log(image);
}).catch(err => {
    throw err;
});

Readme

Keywords

Package Sidebar

Install

npm i suzumi-api

Weekly Downloads

2

Version

1.0.3

License

ISC

Unpacked Size

13.5 kB

Total Files

6

Last publish

Collaborators

  • bad-boy-codes