1.0.3 • Published 2 years ago

suzumi-api v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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;
});
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago