dsposito / argo
A shipping utility.
Installs: 117 394
Dependents: 0
Suggesters: 0
Security: 0
Stars: 24
Watchers: 8
Forks: 12
Open Issues: 7
Requires
- php: >=7.0
Requires (Dev)
- phpunit/phpunit: ^5.7
- satooshi/php-coveralls: ^1.0
- squizlabs/php_codesniffer: ^2.8
This package is not auto-updated.
Last update: 2024-11-13 04:25:27 UTC
README
Overview
Argo is a useful utility for shipping-related tasks. In particular, it deduces the shipping carrier, provider and other information based on a provided package tracking number.
In Greek mythology, Argo (in Greek, meaning 'swift') was the ship on which Jason and the Argonauts sailed from Iolcos to retrieve the Golden Fleece. Argo was said to have been planned with the help of Athena - constructed with magical pieces of timber from the sacred forest of Dodona.
Installation
Run the following composer command to add the package to your project:
composer require dsposito/argo
Alternatively, add "dsposito/argo": "^2.0"
to your composer.json file.
Usage
Simply provide a tracking number when initializing a new package instance.
$package = Argo\Package::instance('420 90401 9405 5108 9841 6000 5592 67');
print_r($package);
Example output:
Argo\Package Object
(
[tracking_code_original] => 420 90401 9405 5108 9841 6000 5592 67
[tracking_code] => 9405510898416000559267
[carrier] => Argo\Carrier Object
(
[code] => usps
[name] => USPS
)
[provider] => Argo\Provider Object
(
[code] => endicia
[name] => Endicia
)
)
Tests
To run the test suite, run the following commands from the root directory:
composer install
vendor/bin/phpunit