{"analyzedAt":"2022-06-26T18:59:20.420Z","collected":{"metadata":{"name":"shipwire","scope":"unscoped","version":"1.0.3","description":"Node library to communicate with the Shipwire API","keywords":["shipwire","shipping","rate","orders","tracking","inventory"],"date":"2016-12-12T19:02:27.379Z","author":{"name":"Daniel Hritzkiv","email":"daniel.hritzkiv@gmail.com","url":"http://danielhritzkiv.com/","username":"dhritzkiv"},"publisher":{"username":"dhritzkiv","email":"daniel.hritzkiv@gmail.com"},"maintainers":[{"username":"dhritzkiv","email":"daniel.hritzkiv@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/dhritzkiv/node-shipwire.git"},"links":{"npm":"https://www.npmjs.com/package/shipwire","homepage":"https://github.com/dhritzkiv/node-shipwire#readme","repository":"https://github.com/dhritzkiv/node-shipwire","bugs":"https://github.com/dhritzkiv/node-shipwire/issues"},"license":"MIT","dependencies":{"xml2js":"^0.4.17"},"devDependencies":{"eslint":"^3.12.0","mocha":"^3.2.0","precommit-hook":"^3.0.0"},"releases":[{"from":"2022-05-27T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2022-03-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2021-12-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2021-06-26T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2020-06-26T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0}],"hasTestScript":true,"hasSelectiveFiles":true,"readme":"shipwire\n=============\n\nNode.js library to communicate with the Shipwire API\n\n### Note: this library is no longer in development as Shipwire's XML API (V2) has been superseded by their recently released REST API (V3). This library will not be compatible with API V3.\n\n## Features\n\n### Current\n\n- [Order Tracking and Status](#track)\n- [Inventory](#inventory)\n- [Rate Quotes](#rate-request)\n- Conversion of XML responses to JSON (using [xml2js](https://github.com/Leonidas-from-XIV/node-xml2js))\n\n\n## Install\n\n\tnpm install --save shipwire\n\n## Usage\n\n\tvar Shipwire = require('shipwire');\n\tvar shipwire = new Shipwire(USERNAME, PASSWORD);\n\n\tshipwire.trackAll(function(err, orders) {\n\t\t//array of orders;\n\t})\n\n## Methods\n\n### Shipwire\n\n\tnew Shipwire(username, password, options)\n\nSets your credentials and connection settings, and returns a `shipwire` object to use for your requests.\n\n**username** - String *(required)*.\nYour Shipwire account username, typically an email.\n\n**password** - String *(required)*.\nYour Shipwire account password.\n\n**options** - Object *(optional)*\n\n- `sandbox` - Boolean. Whether to use the sandboxed environment, or production environment. Default: `false`\n- `test` - Boolean. Whether to use Shipwire's Test server (which returns properly formatted sample responses), or the Production server, which returns responses based on the data in your account. Default: `false`\n\n### Track\n\n#### trackAll\n\n\tshipwire.trackAll(options, callback)\n\n**options** - Object *(optional)*\n\n- `raw` - Boolean. Whether to return the raw XML response. Otherwise returns JSON. Default: `false`\n- `bookmark` - Number. `1` returns all orders, `2` returns orders since the last bookmark, `3` return all orders since bookmark, and resets the bookmark to the current time. Default: `1`\n\n**callback** - Function *(required)*\n\n- err - Object. Returns error object if applicable, otherwise null.\n- orders - Array. Returns an array of orders.\n\n\n#### trackByOrderNumber\n\n\tshipwire.trackByOrderNumber(orderNumber, options, callback)\n\n**orderNumber** - String *(required)*\n\nThe order number to use. This is generally an id submitted along with an order to Shipwire.\n\n**options** - Object *(optional)*\n\n- `raw` - Boolean. Whether to return the raw XML response. Otherwise returns JSON. Default: `false`\n\n**callback** - Function *(required)*\n\n- err - Object. Returns error object if applicable, otherwise null.\n- orders - Object. Returns an array of tracking statuses for the order.\n\n\n#### trackById\n\n\tshipwire.trackById(id, options, callback)\n\n**id** - String *(required)*\n\nThe Shipwire ID to use. This is an id generated by Shipwire.\n\n**options** - Object *(optional)*\n\n- `raw` - Boolean. Whether to return the raw XML response. Otherwise returns JSON. Default: `false`\n\n**callback** - Function *(required)*\n\n- err - Object. Returns error object if applicable, otherwise null.\n- orders - Object. Returns an array of tracking statuses for the order.\n\n\n### Inventory\n\n#### inventoryStatus\n\n\tshipwire.inventoryStatus(options, callback)\n\n**options** - Object *(optional)*\n\n- `warehouse` - String. Which warehouse should be search, otherwise all are searched. Valid options are `\"TOR\"`, `\"CHI\"`, `\"LAX\"`, `\"PHL\"`, `\"VAN\"`, `\"UK\"`, `\"HKG\"`\n- `warehouseCountry` - String. Which set of warehouses should be searched. Valid options are `\"CA\"`, `\"US\"`, `\"GB\"`, `\"HK\"`\n- `productCodes` - Array or String. Can be an array of product SKUs to search. Can also be a single SKU as a string.\n- `includeEmpty` - Boolean. If true, all products, even which have never had inventory, will be returned. Default: `false`\n- `raw` - Boolean. Whether to return the raw XML response. Otherwise returns JSON. Default: `false`\n\n**callback** - Function *(required)*\n\n- err - Object. Returns error object if applicable, otherwise null.\n- products - Array. Returns an array of products.\n\n\n### Rate Request\n\n#### rateRequest\n\n\tshipwire.rateRequest(orders, options, callback)\n\n**orders** - Array or Object *(required)*\n\nCan be a single order object or an array of order objects. An order object is formatted like so:\n\n\t{\n\t\tid: \"12578\",//a custom id for the order. String\n\t\tproducts: [//an array of products; can also be a single object\n\t\t\t{\n\t\t\t\tcode: \"sun-0001\",//SKU code for the product\n\t\t\t\tquantity: 2//quantity of items. Number, optional, default: 1\n\t\t\t}\n\t\t],\n\t\tshippingAddress: {\n\t\t\tfullName: \"Bob Loblaw.\",//individual or company name. String, optional.\n\t\t\tcompany: \"Bob Loblaw's Law Blog\",//up to 25 characters. String, optional.\n\t\t\taddress1: \"151 Sterling Road\",//address line 1. String.\n\t\t\taddress2: \"#2\",//address line 2. String, optional.\n\t\t\tcity: \"Toronto\",//city. String.\n\t\t\tprovince: \"ON\",//\"state\", \"province\", \"region\" are interchangeable. If state or prov, use 2-letter code, otherwise, full name. String.\n\t\t\tcountry: \"CA\",//2-letter ISO code. String, optional.\n\t\t\tpostalCode: \"M6R 2B2\", //\"zip\", and \"postal code\" are interchangeable. String.\n\t\t\tcommercial: true,//Is it a business address? Boolean, optional, default: false.\n\t\t\tPOBox: \"\"//Is it a POBox?null by default. Boolean or null, optional, default: null.\n\t\t},\n\t\twarehouse: \"00\"//optimal warehouse. Possible values are: \"TOR\", \"LAX\", \"VAN\", \"PHL\", \"CHI\", \"REN, \"UK\", \"HKG\", and \"00\". String, optional, default: \"00\".\n\t}\n\n**options** - Object *(optional)*\n\n- `raw` - Boolean. Whether to return the raw XML response. Otherwise, returns JSON. Default: `false`\n\n**callback** - Function *(required)*\n\n- err - Object. Returns error object if applicable, otherwise null.\n- orders - Array or Object. Returns orders with shipping quotes as well as the original order attached. If an array was passed as the `orders` argument, an array will be returned. Otherwise, a single object will be returned.\n\n\n## Tests\n\nRun `npm test` to run the tests with [mocha.](https://github.com/visionmedia/mocha)\nTests will also run automatically before `git commit`\n\n## Issues and Feature Requests\n\nIf you have issues to report, or issues to request, use the issue tracker in Github.\n\n## Contributing\n\nCurrently, the library isn't very feature rich or mature. If you'd like to offer improvements:\n\n1. Fork it\n2. Create your feature branch `git checkout -b feature-name`\n3. Commit your changes `git commit -am 'Add feature'` \\*\n4. Push the branch `git push origin feature-name`\n5. Create a pull request\n\n\\* Prior to a commit, linting and testing will be performed automatically using [precommit-hook](https://github.com/nlf/precommit-hook)\n\n\n## Contact\n\nHave a question? I'm on twitter: [@dhritzkiv](https://twitter.com/dhritzkiv)\n\n\n## License\n\n[MIT](License)"},"npm":{"downloads":[{"from":"2022-06-25T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":1},{"from":"2022-06-19T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":15},{"from":"2022-05-27T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":26},{"from":"2022-03-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":163},{"from":"2021-12-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":232},{"from":"2021-06-26T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":439}],"starsCount":0},"github":{"starsCount":2,"forksCount":0,"subscribersCount":1,"issues":{"count":1,"openCount":1,"distribution":{"3600":0,"10800":0,"32400":0,"97200":0,"291600":0,"874800":0,"2624400":0,"7873200":0,"23619600":0,"70858800":0,"212576400":1},"isDisabled":false},"contributors":[{"username":"dhritzkiv","commitsCount":71}],"commits":[{"from":"2022-06-19T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2022-05-27T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2022-03-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2021-12-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2021-06-26T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0}]},"source":{"files":{"readmeSize":6564,"testsSize":15697,"hasNpmIgnore":true,"hasChangelog":true},"linters":["eslint"]}},"evaluation":{"quality":{"carefulness":0.9999999999999999,"tests":0.6,"health":1,"branding":0},"popularity":{"communityInterest":4,"downloadsCount":54.333333333333336,"downloadsAcceleration":-0.06248097412480974,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":0.9,"issuesDistribution":0.9}},"score":{"final":0.6155271092793412,"detail":{"quality":0.8464094502755721,"popularity":0.0332742351756732,"maintenance":0.9998808339576686}}}