{"_id":"@agnostack/bigcommerce-request","_rev":"1-02992ade6c32d81b7a5f570ab6ae3300","name":"@agnostack/bigcommerce-request","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@agnostack/bigcommerce-request","version":"1.0.0","author":{"name":"Rob Bowers","email":"rob@uniquelyparticular.com","url":"https://uniquelyparticular.com"},"owner":"agnoStack","description":"Please contact agnoStack via info@agnostack.com for any questions","homepage":"https://github.com/agnostack/bigcommerce-request#readme","repository":{"type":"git","url":"git+https://github.com/agnostack/bigcommerce-request.git"},"keywords":["bigcommerce","ecommerce","api","node","typescript","javascript","agnostack","particular","particular."],"license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","scripts":{"build":"yarn clean && tsc -d","clean":"rimraf dist","clean-install":"yarn clean; yarn install --force","test":"jest --passWithNoTests","semantic-release":"semantic-release"},"husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"dependencies":{"cross-fetch":"3.0.4"},"devDependencies":{"@types/fetch-mock":"7.3.2","@types/jest":"24.0.25","chai":"4.2.0","fetch-everywhere":"1.0.5","fetch-mock":"7.7.3","husky":"2.7.0","jest":"24.9.0","prettier":"1.19.1","pretty-quick":"1.11.1","rimraf":"2.7.1","semantic-release":"15.14.0","ts-jest":"24.3.0","typescript":"3.7.4"},"publishConfig":{"access":"public"},"gitHead":"45f8ae8354d634ba6ed52b935df277dce5c9bbff","bugs":{"url":"https://github.com/agnostack/bigcommerce-request/issues"},"_id":"@agnostack/bigcommerce-request@1.0.0","_nodeVersion":"10.16.3","_npmVersion":"6.13.4","dist":{"integrity":"sha512-OsYzGoLH4zSliSxZSgMYXbDkhbhFzvoXGlM37ifJgQT9Ckz6nAp+tJuKwro+mgO2Lb7M6nj4ovyaUSG03RYInA==","shasum":"752b6d6d328fac92b4769a29cbcc2b14d392c881","tarball":"https://registry.npmjs.org/@agnostack/bigcommerce-request/-/bigcommerce-request-1.0.0.tgz","fileCount":18,"unpackedSize":17502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFP8sCRA9TVsSAnZWagAApI4P/132DjjJMDjWp5iTAU2b\nGShiPP2piXerkYlt5ersSJ36yXMcjx5OE1RVZC9aFAnnLSsMu8h1MVvdkYZ9\nplm+L/+xpeQqQgdEw6BNU8RLIapyX7RlcIEuDagLdYjLFwQrIXcKvrNZWNya\nWwVFWr74PJLkmolxw3ic2Rjl2E/Da2iycC2rgIrUIhAoNhadI+vOcOhWgWB7\n7AqebNL/IORa410y3kE6bdtM6XHEpsGbTHSJfDA0Vo08cd/V3x3nKi4uCDZF\nEac+IhBaWosYkIKxn4aoK7IK9s918JN85UTiB+oiNghBxHR+sKyQ9T0cjdWN\nfcL2Vv5OHHCrZolEFfqqI0qa3O/Kf9roCJxbahQt3KZuAhIFQDgFGRSBDcxh\nSITALEQiFvVosFaZDXiARSSbqi0wlIEoNM97h6vw1bq0tHvrRS0O7shnpOlM\nm6hgEwx9O/AnRIWWKquNMndBax1If+4lwXEiZc46W8SEVZJAxTUQgpvqG4Nm\nXJKr1JgEnfIbn9njV4t08jfcC8wUdGMfAXMuXqBWItFsS8gctmlhptKKH7Q1\nn1NNbx/+0OCQqXoyc75D2xLbQmi+dLLEW+MLhBvTuQO8LDYzPfe7rwFkfK39\nwlKDGPOTXgEECVMSd5A64GxPoEO0uq3RnUA7LGdoJfwCS6FxhRUFVQi9SBe3\nJ5sL\r\n=EHwU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFr9l7YJAq1FXsoLLS2J3jNO9PGLkcdR23FQsbnMEpFVAiEAl8nmYiGiArcwBZWGyvWj2ePsEfY7J0prz1pRZT8OBE4="}]},"maintainers":[{"name":"agrohs","email":"adam@uniquelyparticular.com"}],"_npmUser":{"name":"agrohs","email":"adam@uniquelyparticular.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bigcommerce-request_1.0.0_1578434348030_0.44955455559904123"},"_hasShrinkwrap":false}},"time":{"created":"2020-01-07T21:59:07.833Z","1.0.0":"2020-01-07T21:59:08.450Z","modified":"2022-04-04T12:00:13.817Z"},"maintainers":[{"name":"agrohs","email":"adam@uniquelyparticular.com"}],"description":"Please contact agnoStack via info@agnostack.com for any questions","homepage":"https://github.com/agnostack/bigcommerce-request#readme","keywords":["bigcommerce","ecommerce","api","node","typescript","javascript","agnostack","particular","particular."],"repository":{"type":"git","url":"git+https://github.com/agnostack/bigcommerce-request.git"},"author":{"name":"Rob Bowers","email":"rob@uniquelyparticular.com","url":"https://uniquelyparticular.com"},"bugs":{"url":"https://github.com/agnostack/bigcommerce-request/issues"},"license":"MIT","readme":"# @agnostack/bigcommerce-request\n\n> 🎮 Minimal [BigCommerce](https://www.bigcommerce.com/) API request library for Node\n\n## Installation\n\n```bash\nyarn add @agnostack/bigcommerce-request # npm install @agnostack/bigcommerce-request\n```\n\n## Quickstart (OAuth)\n\n```js\nconst { createClient } = require('@agnostack/bigcommerce-request');\n// import { createClient } from '@agnostack/bigcommerce-request'\n\nconst bigcommerce = new createClient({\n  store_id: '...', // BigCommerce Store Name.\n  client_id: '...', // BigCommercie Client Name.\n  access_token: '...', // BigCommerce OAuth token.\n});\n\nbigcommerce\n  .get('v3/catalog/products')\n  .then(console.log)\n  .catch(console.error);\n\nbigcommerce\n  .post('v3/customers', {\n    first_name: 'Jane'\n    last_name: 'Doe',\n    email: 'johndoe@email.com'\n  })\n  .then(console.log)\n  .catch(console.error);\n\nbigcommerce\n  .put('v3/customers', {\n    id: 1,\n    company: 'Company Name',\n    first_name: 'Jane'\n    last_name: 'Doe',\n    email: 'johndoe@email.com',\n    phone: '123456788900'\n  })\n  .then(console.log)\n  .catch(console.error);\n```\n\n## Kitchen sink\n\n```js\nconst bigcommerce = new createClient({\n  store_id: '...',\n  client_id: '...',\n  access_token: '...',\n  headers: {\n    // ...\n  }\n});\n```\n\n## Custom headers per request\n\nThe API provides you the ability to send various request headers that change the way data is stored or retrieved.\n\nBy default this library will encode all data as JSON, however you can customise this by setting your own `Content-Type` header as an additional argument to `get`, `patch`, `post`, `put` and `delete`.\n\n**Note**: If you add the `Content-Type` custom header to `patch`, `post`, `put` or `delete` you will need to encode `data` yourself.\n\n```js\nconst bigcommerce = new createClient({\n  store_id: '...',\n  client_id: '...',\n  access_token: '...'\n});\n\nconst headers = {\n  'X-My-Header': 'custom'\n};\n\nbigcommerce\n  .get('v3/catalog/products', headers)\n  .then(console.log)\n  .catch(console.error);\n```\n\n_Contact [Adam Grohs](https://www.linkedin.com/in/adamgrohs/) @ [agnoStack](https://agnostack.com/) for any questions._\n","readmeFilename":"README.md"}