Download the PHP package emild/api3-lib without Composer
On this page you can find all versions of the php package emild/api3-lib. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package api3-lib
API v.3.0 client
Table of Contents
- Installation
- Usage
- Error handling
- Methods
- Domains
- createDomainRegistration
- createDomainTransfer
- domainDetails
- domainGenAuthCode
- domainList
- editDomain
- searchDomain
- updateDomainDNS
- updateDomainRenew
- DNS
- checkDnsZone
- dnsAddRecord
- dnsDeleteRecord
- dnsGetRecords
- dnsUpdateRecord
- publishDnsSec
- unpublishDnsSec
- Economy
- priceList
- Miscellaneous
- createLabel
- deleteLabel
- getLabels
- updateLabel
- Request
- requestCancellation
- requestDetails
- requestList
- requestUpdate
- Contacts
- contactList
- createContact
- updateContact
- Domains
Installation
You need composer to install this library.
Usage
If you want to use non-default another base URL for api, you could pass it as second parameter:
Error handling
There are some types of exceptions, that you are able to catch:
NameISP\API3\Exception\BaseException
If you want to catch all exception types from this library, you should use this exception class:
This should be enought for a basic application. But if you need more control you could also catch these exceptions:
NameISP\API3\Exception\ApiException
When API returns non-succesful response. You are able to get API error code and message from that exception:
NameISP\API3\Exception\AuthFailedException
This exception throws when authorization was failed with your API token.
NameISP\API3\Exception\NetworkException
Any network exception. If you need more details, you could get original Guzzle exception by using $e->getPrevious();
Methods
If some argument is null by default, it's optional, others are required.
If you want to unset boolean flag, you should pass false
(e.g. $setAutoRenew
argument in the editDomain
method)
Almost all methods return an array as result. Some returns string. The checkDnsZone method returns boolean.
Domains
createDomainRegistration
Example
createDomainTransfer
Example
domainDetails
Example
domainGenAuthCode
Example
domainList
Example
editDomain
Example:
searchDomain
Example
updateDomainDNS
Example
updateDomainRenew
Example
DNS
checkDnsZone
Example:
dnsAddRecord
Example
dnsDeleteRecord
Example:
dnsGetRecords
Example
dnsUpdateRecord
Example:
publishDnsSec
Example:
unpublishDnsSec
Example:
Economy
priceList
Example
Miscellaneous
createLabel
Example
deleteLabel
Example:
getLabels
Example
updateLabel
Example:
Request
requestCancellation
Example
requestDetails
Example
requestList
Example
requestUpdate
TODO: example
Contacts
contactList
Example
createContact
Example
updateContact
Example: