pixela-node

Pixela API Client for nodejs

Usage no npm install needed!

<script type="module">
  import pixelaNode from 'https://cdn.skypack.dev/pixela-node';
</script>

README

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'))