Gimenz / sid-api

s.id url shortener Un-Official Api Wrapper | https://s.id

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🍚 sid-api

s.id url shortener Un-Official Api Wrapper

simple unofficial api wrapper for s.id

πŸ‘¨β€πŸ³ Install

npm i github:Gimenz/sid-api

πŸ“” Example

Do Note! that the token are required for most all requests.

const { SID } = require('sid-api')

// optional, you can auto get token like this 
const s = new SID('yout email', 'your password');

(async () => {
    try {
        // to use most all features, you will needed token, get token easily with getToken() function
		// register account here https://home.s.id/id/auth/register
        const token = await s.getToken('yout email', 'your password');
        console.log(token);

        // short some long url
        const shortened = await s.short('https://open.spotify.com/show/7gsV94xCLfVuwxBpcc2rbc');
        console.log(shortened);

        // fecth url shortened list, if have many shortened, you can fetch it by page
        const shortlist = await s.fetchLinks();
        console.log(shortlist);
    } catch (error) {
        console.log(error);
    }
})();

🌳 Dependency

πŸ₯š Credits

πŸ§—β€β™€οΈ Contribution(s) are welcome!

About

s.id url shortener Un-Official Api Wrapper | https://s.id


Languages

Language:JavaScript 69.4%Language:TypeScript 30.6%