Skip to content

robertfausk/kurzlink-api-client

Repository files navigation

KurzlinkApiClient

Latest Stable Version Latest Unstable Version Total Downloads Build Status Scrutinizer Quality Score Code Coverage Software License PHP7 Compatible Open Issues Closed Issues Contributors Contributors

Very simple api client written in PHP for url shortener kurzelinks.de which supports ogy.de, t1p.de, 0cn.de, kurzelinks.de and also own domains.

Install

composer require --dev robertfausk/kurzlink-api-client

Usage Example

<?php

use Robertfausk\KurzlinkApiClient\KurzlinkClient;

$apiKey = 'your secret api key';
$kurzlinkAddress = 't1p.de';
$useSandbox = true;
$client = KurzlinkClient::create($apiKey, $kurzlinkAddress, $useSandbox);
$urlToShorten = 'https://google.de/';
$requestParams = [  // feel free to use every param from api doc
    'requesturl' => '',
];
$shortUrl = $client->request($urlToShorten, $requestParams);

How to upgrade?

Have a look at CHANGELOG for detailed information.

How to contribute?

Copy phpunit.xml.dist and insert your api key to be able to run the integration tests.

Start docker-compose with php web driver

docker-compose up php7.2

Run phpunit tests

docker-compose exec php7.2 vendor/bin/phpunit

Credits

Created by Robert Freigang robertfausk.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published