fintech-systems/domainscoza-api

Laravel wrapper for the Domains.co.za API

v0.2.0 2023-05-23 05:44 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.