library rajaongkir
Alternative Rajaongkir API using Guzzle
gufy/rajaongkir
Alternative Rajaongkir API using Guzzle
- Wednesday, September 7, 2016
- by mgufron
- Repository
- 1 Watchers
- 0 Stars
- 40 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
Rajaongkir PHP API
Another alternative of rajaongkir PHP API. It is using GuzzleHttp as its underlying CURL request, (*1)
Installation
Run this on your composer composer require gufy/rajaongkir, (*2)
Usage
<?php
use Gufy\Rajaongkir\Rajaongkir;
use Gufy\Rajaongkir\Province;
use Gufy\Rajaongkir\City;
use Gufy\Rajaongkir\Cost;
use Gufy\Rajaongkir\Waybill;
// initialize api. first argument will be your api key, and the second one is your package
Rajaongkir::init('your-api-key', 'starter');
// get all provinces
$provinces = Province::all();
// get cities
$cities = City::all();
// get cities based on province id
$cities = City::all($province_id);
// get cost
$cost = Cost::get(['city'=>$origin_city_id], ['city'=>$destination_city], $weight, 'jne');
// get waybill
$cost = Waybill::find('jne', 'your-waybill');
dev-master
9999999-dev
Alternative Rajaongkir API using Guzzle
Sources
Download
MIT
The Requires
The Development Requires
by
Mochamad Gufron
v1.0.0
1.0.0.0
Alternative Rajaongkir API using Guzzle
Sources
Download
MIT
The Requires
The Development Requires
by
Mochamad Gufron