fintech-systems / domainscoza-api
Laravel wrapper for the Domains.co.za API
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.5
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.5
- pestphp/pest: ^2.6
- pestphp/pest-plugin-laravel: ^2.0
- phpunit/phpunit: ^10.0
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-10-08 23:26:36 UTC
README
Domains.co.za has an eloquent API. This is a wrapper to make it testable using Laravel's HTTP client and mocking.
Domains.co.za API reference: https://docs.domains.co.za
Authentication
https://docs.domains.co.za/#authentication-2
DOMAINSCOZA_USERNAME
DOMAINSCOZA_PASSWORD
Auth URLs
Live URL : https://api.domains.co.za/api
Development URL : https://lapi-dev.domains.co.za/api
Note: Contact support to get a dev environment setup
API Version : 5.0.19
Login
POST https://api.domains.co.za/api/login
You will receive a bearer token to be used in the Authorization header for all subsequent requests.
Sample API calls
List
https://docs.domains.co.za/#list
Installation
You can install the package via composer:
composer require fintech-systems/domainscoza-api
You can publish the config file with:
php artisan vendor:publish --tag="domainscoza-config"
This is the contents of the published config file:
return [ 'username' => env('DOMAINSCOZA_USERNAME'), 'password' => env('DOMAINSCOZA_PASSWORD'), ];
Optionally, you can publish the views using
php artisan vendor:publish --tag="domainscoza-api-views"
Usage
$domainsCoza = new FintechSystems\DomainsCoza(); echo $domainsCoza->echoPhrase('Hello, FintechSystems!');
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.