Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aftership

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aftership - npm Package Compare versions

Comparing version 4.1.1 to 4.1.3

4

CHANGES.md
Changes
=========
4.1.2 - 2015-02-05
add support for: `tracking_destination_country`
4.1.1 - 2015-01-23

@@ -5,0 +9,0 @@

15

main.js

@@ -104,8 +104,11 @@ /**

* @param path {string} - path The HTTP path to append to the AfterShip default.
* @param data {Object} - data Body for POST requests.
* @param post_body {Object} - post data body for POST requests.
* @param callback {function(Object, Object=)} - callback
* @private
*/
function _call(method, path, data, callback) {
function _call(method, path, post_body, callback) {
console.log('---------------------------');
console.log(path);
// Make sure path starts with a slash

@@ -116,5 +119,4 @@ if (path.substr(0, 1) !== '/') {

data = JSON.stringify(data);
post_body = JSON.stringify(post_body);
// console.log(data);

@@ -129,3 +131,3 @@ var request_option = {

timeout: TIMEOUT,
body: data
body: post_body
};

@@ -277,3 +279,3 @@

_call('GET', '/trackings', options, function(err, body) {
_call('GET', '/trackings' + '?' + _serialize(options), {}, function(err, body) {
if (err) {

@@ -493,2 +495,3 @@ callback(err, null);

tracking_key: required_fields.tracking_key,
tracking_destination_country: required_fields.tracking_destination_country,
detect_mode: detect_mode

@@ -495,0 +498,0 @@ }

{
"name": "aftership",
"description": "AfterShip NodeJS API Wrapper",
"version": "4.1.1",
"version": "4.1.3",
"homepage": "https://github.com/AfterShip/aftership-nodejs",

@@ -6,0 +6,0 @@ "repository": {

@@ -32,3 +32,3 @@ Install

```
var Aftership = require('aftership')('API KEY');
var Aftership = require('aftership')('API_KEY');

@@ -55,3 +55,3 @@ ```

```
Aftership.couriers(function(err, result) {
Aftership.getCouriers(function(err, result) {
console.log('Support courier count: ' + result.total);

@@ -122,6 +122,6 @@ console.log('Couriers: ' + result.couriers);

Example:
Example get all trackings with courier: ups
```
Aftership.trackings({}, [], function(err, results) {
Aftership.getTrackings({slug: 'ups'}, function(err, results) {
if (err) {

@@ -128,0 +128,0 @@ console.log(err);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc