npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

shako

v1.0.2

Published

Install from npmjs ```bash npm install --save shako ``` Install latest beta versions ```bash npm install --save Notekunn/shako ``` ## Super simple to use Example:

Downloads

1

Readme

SHAKO - SIMPLE FACEBOOK OFFICAL API HELPER

Install

Install from npmjs

   npm install --save shako

Install latest beta versions

   npm install --save Notekunn/shako

Super simple to use

Example:

const shako = require('shako');
(async () => {
    const api = await shako({ access_token : "YOUR_TOKEN" });
    const result = await api.user.getID('zuck')
    console.log(result);
})().catch((e) => console.log('ERROR: ' + e));

Table of contents

Request also offers convenience methods like request.defaults and request.post, and there are lots of usage examples and several debugging techniques.


Login

You can login by token

const shako = require('shako');
(async () => {
    const api = await shako({ access_token: "YOUR_TOKEN" });
    const result = await api.user.getID('zuck')
    console.log(result);
})().catch((e) => console.log('ERROR: ' + e));

Or appState

const shako = require('shako');
const appState = require('../config/appstate.json');
(async () => {
    const api = await shako({ appState });
    const result = await api.user.getID('zuck')
    console.log(result);
})().catch((e) => console.log('ERROR: ' + e));

back to top


Group Api

Api to contact with group (return a Promise). Example:

const shako = require('shako');
const appState = require('../config/appstate.json');
(async () => {
    const api = await shako({ appState });
    const result = await api.group.joinGroup('10000');
})().catch((e) => console.log('ERROR: ' + e));

Add(Remove) Member

Api to add or remove member from group.

  //Add member
  api.group.addMember(ID_GROUP, ID_MEMBER);
  //remove member
  api.group.removeMember(ID_GROUP, ID_MEMBER);

Join Groups

Api to join a group.


  api.group.joinGroup(ID_GROUP);

Reply Question

Api to reply question of group.


  api.group.replyQuestion(ID_GROUP, function(question){
     //Do something with variable `question`
     return somthing || question;
  });

Open(Close) Comment

Api to open and close comment of a post.


  //open comment
  api.group.openComment(ID_POST);
  //close comment
  api.group.closeComment(ID_POST);

Block(Unblock) Member

Api to block or unblock member from group.

  //Add block
  api.group.blockMember(ID_GROUP, ID_MEMBER);
  //remove unblock
  api.group.unblockMember(ID_GROUP, ID_MEMBER);

back to top

USER API

Api to work with user. Example:

const shako = require('shako');
const appState = require('../config/appstate.json');
(async () => {
    const api = await shako({ appState });
    const result = await api.user.getID('zuck');
})().catch((e) => console.log('ERROR: ' + e));

Get ID

Api to get ID from username.


  api.user.getID(USER_NAME);

Get Token

Api to get Token.


  api.user.getToken();

Get ID

Api to post a bio.


  api.user.postBio(CONTENT, PUBLIC/*(true, false)*/);

back to top


PAGE API

Api to work with page. Example:

const shako = require('shako');
const appState = require('../config/appstate.json');
(async () => {
    const api = await shako({ appState });
    const result = await api.page.createPage({name: 'zuck'});
})().catch((e) => console.log('ERROR: ' + e));

Create Page

Api to create A new Page.


  api.page.createPage({ name: 'PAGE_NAME', super_category, category});

List id category in here

back to top


CUSTOM API

You can custom your api

GET

 api.get(URL, QUERY_OBJECT);

POST

 api.post(URL, FORM_POST, QUERY_OBJECT);

POST FORMDATA

 api.postFormData(URL, FORM_POST, QUERY_OBJECT);