printify-sdk-js
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,6 +0,6 @@ | ||
# Printify SDK Documentation | ||
# Printify SDK Documentation (Node.js) | ||
## Introduction | ||
The Printify SDK for Node.js. A basic JavaScript wrapper for the Printify REST API (v1). Guidelines and source endpoints can be found here: | ||
The Printify SDK for Node.js. A basic TypeScript wrapper for the Printify REST API (v1). Guidelines and source endpoints can be found here: | ||
[developers.printify.com](https://developers.printify.com/). | ||
@@ -15,15 +15,15 @@ | ||
```js | ||
const Printify = require('printify-sdk-js'); | ||
// import Printify from 'printify-sdk-js'; | ||
import Printify from 'printify-sdk-js'; | ||
// const Printify = require('printify-sdk-js'); // CommonJS | ||
const printify = new Printify({ | ||
shopId: '16326523', // global query by shop_id | ||
accessToken: API_TOKEN, | ||
shopId: '123456', // global query by shop_id | ||
accessToken: process.env.API_TOKEN, | ||
}); | ||
(async () => { | ||
const result = await printify.orders.submit({ | ||
/* order details */ | ||
}); | ||
console.log(result.id); | ||
const data = {/* ... */}; | ||
const result = await printify.orders.submit(data); | ||
console.log(result); // { "id": "5a96f649b2439217d070f507" } | ||
})(); | ||
@@ -30,0 +30,0 @@ ``` |
{ | ||
"name": "printify-sdk-js", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Printify SDK for JavaScript. Client for Node.js", | ||
@@ -10,3 +10,3 @@ "author": "Spencer Lepine <spencer.sayhello@gmail.com>", | ||
"type": "git", | ||
"url": "git+https://github.com/spencerlepine/printify-sdk-js.git" | ||
"url": "https://github.com/spencerlepine/printify-sdk-js.git" | ||
}, | ||
@@ -20,2 +20,3 @@ "bugs": { | ||
"javascript", | ||
"typescript", | ||
"nodejs", | ||
@@ -22,0 +23,0 @@ "api", |
@@ -1,2 +0,2 @@ | ||
# Printify SDK for JavaScript (Node.js) | ||
# Printify SDK for TypeScript (Node.js) | ||
@@ -6,3 +6,3 @@   | ||
The Printify SDK for Node.js. A basic JavaScript wrapper for the Printify REST API (v1). Guidelines and source endpoints can be found here: | ||
Printify SDK for Node.js. A basic TypeScript wrapper for the Printify REST API (v1). Guidelines and source endpoints can be found here: | ||
[developers.printify.com](https://developers.printify.com). | ||
@@ -27,15 +27,15 @@ | ||
```js | ||
const Printify = require('printify-sdk-js'); | ||
// import Printify from 'printify-sdk-js'; | ||
import Printify from 'printify-sdk-js'; | ||
// const Printify = require('printify-sdk-js'); // CommonJS | ||
const printify = new Printify({ | ||
shopId: '16326523', // global query by shop_id | ||
accessToken: API_TOKEN, | ||
shopId: '123456', // global query by shop_id | ||
accessToken: process.env.API_TOKEN, | ||
}); | ||
(async () => { | ||
const result = await printify.orders.submit({ | ||
/* order details */ | ||
}); | ||
console.log(result.id); | ||
const data = {/* ... */}; | ||
const result = await printify.orders.submit(data); | ||
console.log(result); // { "id": "5a96f649b2439217d070f507" } | ||
})(); | ||
@@ -42,0 +42,0 @@ ``` |
96759