Download the PHP package vdhicts/rebrandly-api-client without Composer
On this page you can find all versions of the php package vdhicts/rebrandly-api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vdhicts/rebrandly-api-client
More information about vdhicts/rebrandly-api-client
Files in vdhicts/rebrandly-api-client
Package rebrandly-api-client
Short Description API client for the API of Rebrandly
License MIT
Informations about the package rebrandly-api-client
Rebrandly API client
Easily use the API of the url shortener Rebrandly.
Requirements
This packages requires PHP 7.4 or higher.
Installation
This package can be used in any PHP project or with any framework.
You can install the package via composer:
Usage
This package tries to offer you a complete implementation of the Rebrandly API. Some endpoints are restricted to certain plans Rebrandly offer (like scripts and tags).
Quick usage
All endpoints can be retrieved from the Rebrandly
class. This class needs the Client
.
For example, to retrieve all links:
Options
Some endpoints of the Rebrandly API offer some filtering. Those filters can be set in the Options
class. For example,
to order your links by clicks:
Models
This client will always return the related models. When creating a new resource, the object is provided to the create
method. For example, to create a link:
To create a link for you custom domain, you need to specify the domain in the Link
model:
Exceptions
When something goes wrong, the client will throw a RebrandlyException
. If you want to catch exceptions from this
package, that's the one you should catch. Error responses from the API also result in the RebrandlyException
.
Laravel
For Laravel users, I would suggest adding the api key to your .env
file:
REBRANDLY_API_KEY="your-key"
And create a config file for Rebrandly or add this to your project's config file. Then initialize the client with the config value:
Tests
Unit tests are available in the tests
folder. Run via phpunit:
vendor\bin\phpunit
By default a coverage report will be generated in the build/coverage
folder.
Contribution
Any contribution is welcome, but it should meet the PSR-2 standard and please create one pull request per feature. In exchange you will be credited as contributor on this page.
Security
If you discover any security related issues in this or other packages of Vdhicts, please email [email protected] instead of using the issue tracker.
License
This package is open-source software licensed under the MIT license.
Support
This package isn't an official package from Rebrandly, so they probably won't offer support for it. If you encounter a problem with this client, please open an issue on GitHub.
About vdhicts
Vdhicts is the name of my personal company. Vdhicts develops and implements IT solutions for businesses and educational institutions.
All versions of rebrandly-api-client with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^7.0
nesbot/carbon Version ^2.31