Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for Printful API v2 #5

Open
ianwatts22 opened this issue Apr 5, 2024 · 2 comments
Open

support for Printful API v2 #5

ianwatts22 opened this issue Apr 5, 2024 · 2 comments

Comments

@ianwatts22
Copy link

First off, thank you for creating this API! I'm implementing Printful into my product and saw the API v2 is in Beta, wondering if there's any plans to support it? Will sponsor if so!

@spencerlepine
Copy link

Hi @ianwatts22, I started working on a new package for Printful API v2.0.0-beta (includes TypeScript support)

Lmk if this helps, happy to take feedback and contributions!

Package

// example.js
// $ node example.js

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

const apiKey = '<PRINTFUL_API_TOKEN>';

const countriesApi = new CountriesV2Api({ accessToken: apiKey });

(async () => {
  try {
    const response = await countriesApi.getCountries();
    const countries = response.body.data;
    console.log('List of countries:', countries);
  } catch (error) {
    console.error('Error fetching countries:', error);
  }
})();

Related links

@spencerlepine
Copy link

@PABlond @Wizzel1 fyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants