Project

shipindo

0.0
No commit activity in last 3 years
No release in over 3 years
Library that scrapes rates from various Indonesian shipping carriers web 1.0 sites.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

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.