@profplum700/etsy-v3-api-client 2.3.9 → 2.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/browser.esm.js +10 -1
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +1 -1
- package/dist/browser.umd.js.map +1 -1
- package/dist/index.cjs +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +10 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/node.cjs +10 -1
- package/dist/node.cjs.map +1 -1
- package/dist/node.esm.js +10 -1
- package/dist/node.esm.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -57,6 +57,7 @@ const tokens = await authHelper.getAccessToken();
|
|
|
57
57
|
// Create API client
|
|
58
58
|
const client = new EtsyClient({
|
|
59
59
|
keystring: 'your-api-key',
|
|
60
|
+
sharedSecret: 'your-shared-secret', // Required for new API key format
|
|
60
61
|
accessToken: tokens.access_token,
|
|
61
62
|
refreshToken: tokens.refresh_token,
|
|
62
63
|
expiresAt: tokens.expires_at
|
|
@@ -161,10 +162,11 @@ import { EtsyClient } from '@profplum700/etsy-v3-api-client';
|
|
|
161
162
|
|
|
162
163
|
const client = new EtsyClient({
|
|
163
164
|
keystring: 'your-api-key',
|
|
165
|
+
sharedSecret: 'your-shared-secret', // Get this from Your Apps page on Etsy
|
|
164
166
|
accessToken: 'user-access-token',
|
|
165
167
|
refreshToken: 'user-refresh-token',
|
|
166
168
|
expiresAt: new Date('2024-12-31T23:59:59Z'),
|
|
167
|
-
|
|
169
|
+
|
|
168
170
|
// Optional configuration
|
|
169
171
|
rateLimiting: {
|
|
170
172
|
enabled: true,
|
|
@@ -379,11 +381,12 @@ The package provides optimized builds for different environments:
|
|
|
379
381
|
```typescript
|
|
380
382
|
interface EtsyClientConfig {
|
|
381
383
|
keystring: string; // Required: Your API key
|
|
384
|
+
sharedSecret?: string; // Your shared secret (from Your Apps page)
|
|
382
385
|
accessToken?: string; // User's access token
|
|
383
386
|
refreshToken?: string; // User's refresh token
|
|
384
387
|
expiresAt?: Date; // Token expiration date
|
|
385
388
|
refreshSave?: (token, refresh, expires) => void; // Token save callback
|
|
386
|
-
|
|
389
|
+
|
|
387
390
|
rateLimiting?: {
|
|
388
391
|
enabled?: boolean; // Enable rate limiting
|
|
389
392
|
maxRequestsPerSecond?: number; // Requests per second limit
|