Project

trackplus

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Developed for easy integration with TrackPlus
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 2.14.1
~> 2.3.2
 Project Readme

Code Climate Build Status

trackplus-ruby

Dead-simple Ruby API client for Trackplus. No extra runtime dependencies.

Uses v1 API provided by Trackplus.

Installation

Add this line to your application's Gemfile:

gem 'trackplus', git: 'https://github.com/ammit/trackplus-ruby'

And then execute:

$ bundle

Usage

Gem covers all traclings & available couriers api

Example

client = Trackplus::Client.new(api_key: 'api_key')

# get supported couriers
client.couriers

# get tracking
client.tracking(courier: 'airwings', tracking_no: '202315836553')


# Possible errors (each one inherits from Trackplus::Errors::TrackplusError)
Trackplus::Errors::InvalidConfiguration # missing api_key / subdomain
Trackplus::Errors::NotAuthorized   # wrong api key
Trackplus::Errors::InvalidResponse # something went wrong during the request?
Trackplus::Errors::NotFound        # 404 from Trackplus
Trackplus::Errors::RequestToLong   # When the requested result takes to long to calculate, try limiting your query

Contributing

  1. Fork it ( https://github.com/ammit/trackplus-ruby/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request