pixela-node
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

pixela-node

Pixela API Client for Node.js

npm version

Installation

via npm

$ npm install --save pixela-node

via yarn

$ yarn add pixela-node

Usage

import Client from 'pixela-node'
const client = new Client()
 
client.username = 'your_username'
client.token = 'your_token'
 
// Create Graph
client
  .createGraph({
    id: 'kintore',
    name: 'kintore',
    unit: 'commit',
    type: 'int',
    color: 'shibafu'
  })
  .then(res => console.log(res.data))
  .catch(e => console.log(e.response.data))
 
// Get Graphs
client.getGraphs().then(res => console.log(res.data))
 
// Increment Pixel
client.incrementPixcel('kintore').then(res => {
  console.log(res.data)
})
 
console.log(client.getGraphUrl('kintore'))

Readme

Keywords

none

Package Sidebar

Install

npm i pixela-node

Weekly Downloads

2

Version

0.0.4

License

MIT

Unpacked Size

63.7 kB

Total Files

9

Last publish

Collaborators

  • mottox2