Skip to content

saharak-manoo/etracking-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

eTracking for ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages