Skip to content

Commit

Permalink
add features
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenny committed Jul 8, 2019
1 parent 3679ba5 commit 37ae173
Showing 1 changed file with 34 additions and 18 deletions.
52 changes: 34 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Bloodhound
# **Bloodhound**

[![Build Status](https://travis-ci.org/mediocre/bloodhound.svg?branch=master)](https://travis-ci.org/mediocre/bloodhound)
[![Coverage Status](https://coveralls.io/repos/github/mediocre/bloodhound/badge.svg)](https://coveralls.io/github/mediocre/bloodhound)

Bloodhound is a node module that allows you to retrieve data from shipping carriers such as FedEx and USPS, and displays the data in a common format. If available, Bloodhound will use tracking APIs to generate the data, alternatively it will use web-scraping methods.
Bloodhound is a single-source node module that allows you to retrieve data from shipping carriers such as FedEx and USPS, and displays the data in a common format. If available, Bloodhound will use tracking APIs to generate the data, alternatively it will use web-scraping methods. It goes above and beyond to parse dates by returning all dates in a uniform format, so that the hassle of interpreting multiple carriers' dates and times is removed.

## Install
## **Installation**
```
npm install @mediocre/bloodhound
```
Expand All @@ -14,8 +14,17 @@ npm install @mediocre/bloodhound
yarn add @mediocre/bloodhound
```

## Basic Usage
Bloodhound primarily needs two items from you, a tracking number and your carrier credentials.
## **Features**
**Dates and Time Zones** Bloodhound contains a date parser that handles every carrier's individual date format and returns a uniform format.

**Statuses** Retrieves every status update of that package and displays it in a uniform format that contains where a particular update occurred (Address), when that update occurred (Date) and a description of said update (Description).

**Carrier Guessing** Uses regular expressions to make a guess of which carrier it belongs to.

## **Basic Usage**
### **Tracking**

**Track Method** Takes a tracking number and retrieves every status update, then returns a uniform event array with uniform dates and time zones. This method primarily needs two items from you, a tracking number and your carrier credentials.

```javascript
const Bloodhound = require('@mediocre/bloodhound')
Expand All @@ -30,21 +39,30 @@ const bloodhound = new Bloodhound({
}
});

bloodhound.track(trackingNumber, carrier, callback) {
bloodhound.track(trackingNumber, carrier, callback)
//returns array of events of trackingNumber

//callback
```
### **Carrier Guessing**
**guessCarrier Method** Takes a tracking number and makes a guess of which carrier it belongs to. This method only needs a tracking number provided.
```javascript
bloodhound.guessCarrier('61299998620341515252')

}
//returns FedEx
```

## Carriers Currently Supported
## **Carriers Currently Supported**
- FedEx
- USPS
- UPS

- Pitney-Bowes (Newgistics)

- UPS (coming soon)

- USPS



## Examples for Running Tests
## **Examples for Running Tests**
Each field requires you to provide your own credentials.

FedEx
Expand All @@ -59,19 +77,19 @@ PITNEY_BOWES_API_KEY=developerAPIKey PITNEY_BOWES_API_SECRET=developerAPISecret

UPS
```
USPS_USERID=123DOE123 UPS_USERNAME=jdoe321 UPS_PASSWORD=Trackmaster22 UPS_ACCESS_KEY=SECRETACCESSKEY
UPS_USERNAME=jdoe321 UPS_PASSWORD=Trackmaster22 UPS_ACCESS_KEY=SECRETACCESSKEY npm test
```

USPS
```
USPS_USERID=123DOE123 UPS_USERNAME=jdoe321 UPS_PASSWORD=Trackmaster22 UPS_ACCESS_KEY=SECRETACCESSKEY npm test
USPS_USERID=123DOE123 npm test
```





## Contributing
## **Contributing**
Please refer to each project's style and contribution guidelines for submitting patches and additions. In general, we follow the "fork-and-pull" Git workflow.

1. Fork the repo on GitHub
Expand All @@ -80,6 +98,4 @@ Please refer to each project's style and contribution guidelines for submitting
4. Push your work back up to your fork
5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

## License
NOTE: Be sure to merge the latest from "upstream" before making a pull request!

0 comments on commit 37ae173

Please sign in to comment.