Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

s3mant/Suzumi-Api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published