New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pixela-node

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pixela-node - npm Package Compare versions

Comparing version
0.0.2
to
0.0.3
+2
-2
lib/index.d.ts

@@ -18,4 +18,4 @@ interface Graph {

getGraph(graphId: string): import("axios").AxiosPromise<any>;
incrementPixcel(graphId: string): import("axios").AxiosPromise<any>;
decrementPixcel(graphId: string): import("axios").AxiosPromise<any>;
incrementPixel(graphId: string): import("axios").AxiosPromise<any>;
decrementPixel(graphId: string): import("axios").AxiosPromise<any>;
createPixel(graphId: string, pixel: {

@@ -22,0 +22,0 @@ quantity: string;

@@ -53,3 +53,3 @@ "use strict";

getGraphUrl(graphId) {
return `/users/${this.username}/graphs/${graphId}`;
return `https://pixe.la/v1/users/${this.username}/graphs/${graphId}`;
}

@@ -60,7 +60,7 @@

method: 'get',
url: this.getGraphUrl(graphId)
url: `/users/${this.username}/graphs/${graphId}`
});
}
incrementPixcel(graphId) {
incrementPixel(graphId) {
return this.client.request({

@@ -72,3 +72,3 @@ method: 'put',

decrementPixcel(graphId) {
decrementPixel(graphId) {
return this.client.request({

@@ -75,0 +75,0 @@ method: 'put',

{
"name": "pixela-node",
"description": "Pixela API Client for nodejs",
"version": "0.0.2",
"version": "0.0.3",
"main": "./lib/index.js",

@@ -18,9 +18,8 @@ "types": "./lib/index.d.ts",

"run:sample": "babel-node src/sample.ts --extensions .ts",
"build": "tsc --emitDeclarationOnly && babel src/index.ts --out-dir lib/ --extensions .ts",
"build": "rm -rf lib/ && tsc --emitDeclarationOnly && babel src/index.ts --out-dir lib/ --extensions .ts",
"prepublish": "npm run build"
},
"dependencies": {
"axios": "^0.18.0",
"pixela-node": "^0.0.1"
"axios": "^0.18.0"
}
}
# pixela-node
Pixela API Client for nodejs
Pixela API Client for Node.js

@@ -20,1 +20,33 @@ [![npm version](https://badge.fury.io/js/pixela-node.svg)](https://badge.fury.io/js/pixela-node)

```
## Usage
```js
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'))
```

@@ -67,5 +67,4 @@ {

"node_modules",
"src/sample.ts",
"src/sample-async.ts"
"src/sample.ts"
]
}