Skip to content

Commit

Permalink
docs: add example code
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerlepine committed Aug 12, 2024
1 parent 8e9ea24 commit 8f9e0b0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions examples/javascript/getCountries.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// npm install printful-sdk-js-v2 && node getCountries.js

const { PrintfulClient } = require('printful-sdk-js-v2');

const printful = new PrintfulClient({
TOKEN: '<PRINTFUL_API_TOKEN>',
});

(async () => {
const response = await printful.countriesV2.getCountries();
const countries = response.data;
console.log(countries);
})();
5 changes: 5 additions & 0 deletions examples/typescript/getCountries.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// getCountries.ts

// import { PrintfulClient, Country } from 'printful-sdk-js-v2';

// TODO

0 comments on commit 8f9e0b0

Please sign in to comment.