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

version: 1.0.1 #39

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

*

## [1.0.1] - 2023-11-09

### Added

* `getTrackingUrl` for tracking API - [#36](https://github.com/ripe-tech/ups-api-js/issues/36)

## [1.0.0] - 2023-11-09

### Changed
Expand Down
11 changes: 11 additions & 0 deletions js/tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,15 @@ export const TrackingAPI = superclass =>
const response = await this.get(url, options);
return response;
}

/**
* Gets the tracking URL given a tracking number.
*
* @param {String} trackingNumber The tracking number of the shipment/waybill.
* @returns {String} The tracking URL.
* @see https://www.ups.com/upsdeveloperkit?loc=en_US
*/
getTrackingUrl(trackingNumber) {
return `https://www.ups.com/track?InquiryNumber1=${trackingNumber}`;
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ups-api",
"version": "1.0.0",
"version": "1.0.1",
"description": "The RIPE UPS API client",
"keywords": [
"api",
Expand Down