pixela-node
Advanced tools
+2
-2
@@ -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; |
+4
-4
@@ -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', |
+3
-4
| { | ||
| "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" | ||
| } | ||
| } |
+33
-1
| # pixela-node | ||
| Pixela API Client for nodejs | ||
| Pixela API Client for Node.js | ||
@@ -20,1 +20,33 @@ [](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')) | ||
| ``` |
+1
-2
@@ -67,5 +67,4 @@ { | ||
| "node_modules", | ||
| "src/sample.ts", | ||
| "src/sample-async.ts" | ||
| "src/sample.ts" | ||
| ] | ||
| } |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
61429
0.94%1
-50%52
160%159
-0.62%- Removed
- Removed