Skip to content
/ shipindo Public

Library that scrapes rates from various Indonesian shipping carriers web 1.0 sites.

Notifications You must be signed in to change notification settings

wynst/shipindo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shipindo

Description

Library that scrapes rates from various Indonesian shipping carriers web 1.0 sites. API is similar in those of ActiveShipping.

Supported Shipping Carriers

Installation

gem install shipindo

Usage

  # use them all
  require 'shipindo'

  Shipindo.find_rates(
      :origin       => "MEDAN",
      :destination  => "TANGERANG",
      :weight       => 2)

  => {
            :origin => "MEDAN",
       :destination => "TANGERANG",
            :weight => 2,
           :carrier => "jne",
       :origin_code => "TUVTMTAwMDBK",
  :destination_code => "VEdSMTAwMDBK",
              :from => "MEDAN",
                :to => "TANGERANG",
          :response => {
            :rates => [
          [0] {
              :service_name => "SS",
              :service_type => "Dokumen/Paket",
                      :rate => 330000.0
          },
          [1] {
              :service_name => "YES",
              :service_type => "Dokumen/Paket",
                      :rate => 39000.0
          },
          [2] {
              :service_name => "REG",
              :service_type => "Dokumen/Paket",
                      :rate => 32000.0
          },
          [3] {
              :service_name => "OKE",
              :service_type => "Dokumen/Paket",
                      :rate => 30000.0
          }
      ],
           :origin => "MEDAN",
      :destination => "TANGERANG",
           :weight => "2"
  }
}

  # or only a single carrier
  require 'shipindo/carriers/jne'

  jne = Shipindo::Carrier::Jne.new
  jne.find_rates(
    :origin      => "JAKARTA",
    :destination => "MEDAN",
    :weight      => 2)

See MIT-LICENSE for details.

About

Library that scrapes rates from various Indonesian shipping carriers web 1.0 sites.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages