Project

etrackings

0.0
No commit activity in last 3 years
No release in over 3 years
For ETrackings API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 13.0
~> 3.0
~> 3.8
 Project Readme

eTrackings API for Ruby

Gem Downloads Gem-version

Introduction

The ETrackings API for Ruby makes it easy to develop using ETrackings API

Documentation

See the official API documentation for more information

Installation

Add this line to your application's Gemfile:

gem 'etrackings'

And then execute:

bundle install

Or install it yourself as:

gem install etrackings

Synopsis

Usage:

# example.rb

class Example
  def client
    @client ||= Etrackings::Client.new do |config|
      config.api_key = ENV["etrackings_api_key"]
      config.key_secret = ENV["etrackings_key_secret"]
      config.language = ENV["etrackings_language"] || 'TH'
    end
  end

  def track_by_courier(courier = "dhl-express", tracking_no = "THBCA12652305942")
    # courier ให้ใส่ชื่อขนส่งที่ระบบรองรับ
    client.track(courier, tracking_no)
    # ดูเพิ่มเติม https://apps.etrackings.com/docs/trackings
  end

  def track_kerry_express(tracking_no = "THBCA12652305942")
    # สามารถ เรียกชื่อขนส่งได้เลย
    client.kerry_express(tracking_no)
    # ดูเพิ่มเติม https://apps.etrackings.com/docs/trackings
  end
end