All URIs are relative to https://urlr.me/api/v1, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
createLink() | POST /links/create | Create a link |
getLink() | GET /links/{link_id} | Get a link |
createLink($createLinkRequest): \URLR\Model\GetLink200Response
Create a link
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = URLR\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new URLR\Api\LinksApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$createLinkRequest = new \URLR\Model\CreateLinkRequest(); // \URLR\Model\CreateLinkRequest | Info of the link to create
try {
$result = $apiInstance->createLink($createLinkRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LinksApi->createLink: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
createLinkRequest | \URLR\Model\CreateLinkRequest | Info of the link to create | [optional] |
\URLR\Model\GetLink200Response
- Content-Type:
application/json
- Accept:
application/json
,application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getLink($linkId): \URLR\Model\GetLink200Response
Get a link
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = URLR\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new URLR\Api\LinksApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$linkId = ffefc6c4-d970-4373-a867-2a69c8be2c89; // string | Link API ID
try {
$result = $apiInstance->getLink($linkId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LinksApi->getLink: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
linkId | string | Link API ID |
\URLR\Model\GetLink200Response
- Content-Type: Not defined
- Accept:
application/json
,application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]