@extends('layouts.app') @section('site_title', formatTitle([__('Links'), __('Developers'), config('settings.title')])) @section('head_content') @endsection @section('content')
{{ __('API endpoint') }}
{{ route('api.links.index') }}
{{ __('Request example') }}
curl --location --request GET '{{ route('api.links.index') }}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
{{ __('Parameters') }}
@include('developers.partials.parameters-list', ['parameters' => [ [ 'name' => 'search', 'type' => 0, 'format' => 'string', 'description' => __('Search query') . '.' ], [ 'name' => 'search_by', 'type' => 0, 'format' => 'string', 'description' => __('Search by') . '. ' . __('Possible values are: :values.', [ 'values' => implode(', ', [ __(':value for :name', ['value' => 'title', 'name' => '' . __('Title') . '']),
__(':value for :name', ['value' => 'alias', 'name' => '' . __('Alias') . '']),
__(':value for :name', ['value' => 'url', 'name' => '' . __('URL') . ''])
])
]) .' ' . __('Defaults to: :value.', ['value' => 'title'])
], [
'name' => 'status',
'type' => 0,
'format' => 'integer',
'description' => __('Status') . '. ' . __('Possible values are: :values.', [
'values' => implode(', ', [
__(':value for :name', ['value' => '0', 'name' => '' . __('All') . '']),
__(':value for :name', ['value' => '1', 'name' => '' . __('Active') . '']),
__(':value for :name', ['value' => '2', 'name' => '' . __('Expired') . '']),
__(':value for :name', ['value' => '3', 'name' => '' . __('Disabled') . ''])
])
]) .' ' . __('Defaults to: :value.', ['value' => '0'])
], [
'name' => 'space_id',
'type' => 0,
'format' => 'integer',
'description' => __('Space ID') . '.'
], [
'name' => 'domain_id',
'type' => 0,
'format' => 'integer',
'description' => __('Domain ID') . '.'
], [
'name' => 'pixel_id',
'type' => 0,
'format' => 'integer',
'description' => __('Pixel ID') . '.'
], [
'name' => 'sort_by',
'type' => 0,
'format' => 'string',
'description' => __('Sort by') . '. ' . __('Possible values are: :values.', [
'values' => implode(', ', [
__(':value for :name', ['value' => 'id', 'name' => '' . __('Date created') . '']),
__(':value for :name', ['value' => 'clicks', 'name' => '' . __('Clicks') . '']),
__(':value for :name', ['value' => 'title', 'name' => '' . __('Title') . '']),
__(':value for :name', ['value' => 'alias', 'name' => '' . __('Alias') . '']),
__(':value for :name', ['value' => 'url', 'name' => '' . __('URL') . ''])
])
]) .' ' . __('Defaults to: :value.', ['value' => 'id'])
], [
'name' => 'sort',
'type' => 0,
'format' => 'string',
'description' => __('Sort') . '. ' . __('Possible values are: :values.', [
'values' => implode(', ', [
__(':value for :name', ['value' => 'desc', 'name' => '' . __('Descending') . '']),
__(':value for :name', ['value' => 'asc', 'name' => '' . __('Ascending') . ''])
])
]) .' ' . __('Defaults to: :value.', ['value' => 'desc'])
], [
'name' => 'per_page',
'type' => 0,
'format' => 'integer',
'description' => __('Results per page') . '. '. __('Possible values are: :values.', [
'values' => '' . implode(', ', [10, 25, 50, 100]) . ''
]) .' ' . __('Defaults to: :value.', ['value' => '' . config('settings.paginate') . ''])
]
]])
{{ __('API endpoint') }}
{!! str_replace(':id', '{id}', route('api.links.show', ['id' => ':id'])) !!}
{{ __('Request example') }}
curl --location --request GET '{!! str_replace(':id', '{id}', route('api.links.show', ['id' => ':id'])) !!}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
{{ __('API endpoint') }}
{{ route('api.links.store') }}
{{ __('Request example') }}
curl --location --request POST '{{ route('api.links.store') }}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}' \
--data-urlencode 'domain={id}'
{{ __('Parameters') }}
@include('developers.partials.parameters-list', ['parameters' => [ [ 'name' => 'url', 'type' => 1, 'format' => 'string', 'description' => __('Destination URL') . '.' ], [ 'name' => 'domain_id', 'type' => 1, 'format' => 'integer', 'description' => __('Domain ID') . '.' ], [ 'name' => 'alias', 'type' => 0, 'format' => 'string', 'description' => __('Alias') . '.' ], [ 'name' => 'space_id', 'type' => 0, 'format' => 'integer', 'description' => __('Space ID') . '.' ], [ 'name' => 'pixel_ids[]', 'type' => 0, 'format' => 'array', 'description' => __('Pixel IDs') . '.' ], [ 'name' => 'redirect_password', 'type' => 0, 'format' => 'string', 'description' => __('Redirect password') . '.' ], [ 'name' => 'sensitive_content', 'type' => 0, 'format' => 'integer', 'description' => __('Sensitive content') . '. ' . __('Possible values are: :values.', [ 'values' => implode(', ', [ __(':value for :name', ['value' => '0', 'name' => '' . __('No') . '']),
__(':value for :name', ['value' => '1', 'name' => '' . __('Yes') . ''])
])
]) . ' ' . __('Defaults to: :value.', ['value' => '0'])
],
[
'name' => 'privacy',
'type' => 0,
'format' => 'integer',
'description' => __('Stats privacy') . '. ' . __('Possible values are: :values.', [
'values' => implode(', ', [
__(':value for :name', ['value' => '0', 'name' => '' . __('Public') . '']),
__(':value for :name', ['value' => '1', 'name' => '' . __('Private') . '']),
__(':value for :name', ['value' => '2', 'name' => '' . __('Password') . ''])
])
]) . ' ' . __('Defaults to: :value.', ['value' => '0'])
],
[
'name' => 'password',
'type' => 0,
'format' => 'string',
'description' => __('Stats password') . '. ' . __('Only works with :field field set to :value.', ['field' => 'privacy', 'value' => '2'])
],
[
'name' => 'active_period_start_at',
'type' => 0,
'format' => 'string',
'description' => __('Active period starting date in :format format.', ['format' => 'Y-m-dTH:i:s'])
],
[
'name' => 'active_period_end_at',
'type' => 0,
'format' => 'string',
'description' => __('Active period ending date in :format format.', ['format' => 'Y-m-dTH:i:s'])
],
[
'name' => 'clicks_limit',
'type' => 0,
'format' => 'integer',
'description' => __('Clicks limit') . '.'
],
[
'name' => 'expiration_url',
'type' => 0,
'format' => 'string',
'description' => __('Expiration URL') . '.'
],
[
'name' => 'targets_type',
'type' => 0,
'format' => 'string',
'description' => __('Targeting') . '. ' . __('Possible values are: :values.', [
'values' => implode(', ', array_map(function ($value, $name) { return __(':value for :name', ['value' => '' . $value . '', 'name' => '' . $name . '']); }, array_keys(config('targets')), config('targets')))])
],
[
'name' => 'targets[index][key]',
'type' => 0,
'format' => 'string',
'description' =>
'' . __('For :field, the value must be in :format format.', ['field' => 'targets_type=country', 'format' => 'ISO 3166-1 alpha-2']) . '
' . __('For :field, the possible values are: :values.', ['field' => 'targets_type=operating_systems', 'values' => ''.implode(', ', config('operating_systems'))]) . '
' . __('For :field, the possible values are: :values.', ['field' => 'targets_type=browsers', 'values' => ''.implode(', ', config('browsers'))]) . '
' . __('For :field, the possible values are: :values.', ['field' => 'targets_type=devices', 'values' => ''.implode(', ', config('devices'))]) . '
' . __('For :field, the value must be in :format format.', ['field' => 'targets_type=languages', 'format' => 'ISO 639-1 alpha-2']) . '
' . __('For :field, the possible values are: :values.', ['field' => 'targets_type=continents', 'values' => implode(', ', array_map(function ($value, $name) { return __(':value for :name', ['value' => '' . $value . '', 'name' => '' . $name . '']); }, array_keys(config('continents')), config('continents')))]) . '
{{ __('API endpoint') }}
{!! str_replace(':id', '{id}', route('api.links.update', ['id' => ':id'])) !!}
{{ __('Request example') }}
curl --location --request PUT '{!! str_replace(':id', '{id}', route('api.links.update', ['id' => ':id'])) !!}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'
{{ __('Parameters') }}
@include('developers.partials.parameters-list', ['parameters' => [ [ 'name' => 'url', 'type' => 0, 'format' => 'string', 'description' => __('Destination URL') . '.' ], [ 'name' => 'alias', 'type' => 0, 'format' => 'string', 'description' => __('Alias') . '.' ], [ 'name' => 'space_id', 'type' => 0, 'format' => 'integer', 'description' => __('Space ID') . '.' ], [ 'name' => 'pixel_ids[]', 'type' => 0, 'format' => 'array', 'description' => __('Pixel IDs') . '.' ], [ 'name' => 'redirect_password', 'type' => 0, 'format' => 'string', 'description' => __('Redirect password') . '.' ], [ 'name' => 'sensitive_content', 'type' => 0, 'format' => 'integer', 'description' => __('Sensitive content') . '. ' . __('Possible values are: :values.', [ 'values' => implode(', ', [ __(':value for :name', ['value' => '0', 'name' => '' . __('No') . '']),
__(':value for :name', ['value' => '1', 'name' => '' . __('Yes') . ''])
])
])
],
[
'name' => 'privacy',
'type' => 0,
'format' => 'integer',
'description' => __('Stats privacy') . '. ' . __('Possible values are: :values.', [
'values' => implode(', ', [
__(':value for :name', ['value' => '0', 'name' => '' . __('Public') . '']),
__(':value for :name', ['value' => '1', 'name' => '' . __('Private') . '']),
__(':value for :name', ['value' => '2', 'name' => '' . __('Password') . ''])
])
])
],
[
'name' => 'password',
'type' => 0,
'format' => 'string',
'description' => __('Stats password') . '. ' . __('Only works with :field field set to :value.', ['field' => 'privacy', 'value' => '2'])
],
[
'name' => 'active_period_start_at',
'type' => 0,
'format' => 'string',
'description' => __('Active period starting date in :format format.', ['format' => 'Y-m-dTH:i:s'])
],
[
'name' => 'active_period_end_at',
'type' => 0,
'format' => 'string',
'description' => __('Active period ending date in :format format.', ['format' => 'Y-m-dTH:i:s'])
],
[
'name' => 'clicks_limit',
'type' => 0,
'format' => 'integer',
'description' => __('Clicks limit') . '.'
],
[
'name' => 'expiration_url',
'type' => 0,
'format' => 'string',
'description' => __('Expiration URL') . '.'
],
[
'name' => 'targets_type',
'type' => 0,
'format' => 'string',
'description' => __('Targeting') . '. ' . __('Possible values are: :values.', [
'values' => implode(', ', array_map(function ($value, $name) { return __(':value for :name', ['value' => '' . $value . '', 'name' => '' . $name . '']); }, array_keys(config('targets')), config('targets')))])
],
[
'name' => 'targets[index][key]',
'type' => 0,
'format' => 'string',
'description' =>
'' . __('For :field, the value must be in :format format.', ['field' => 'targets_type=country', 'format' => 'ISO 3166-1 alpha-2']) . '
' . __('For :field, the possible values are: :values.', ['field' => 'targets_type=operating_systems', 'values' => ''.implode(', ', config('operating_systems'))]) . '
' . __('For :field, the possible values are: :values.', ['field' => 'targets_type=browsers', 'values' => ''.implode(', ', config('browsers'))]) . '
' . __('For :field, the possible values are: :values.', ['field' => 'targets_type=devices', 'values' => ''.implode(', ', config('devices'))]) . '
' . __('For :field, the value must be in :format format.', ['field' => 'targets_type=languages', 'format' => 'ISO 639-1 alpha-2']) . '
' . __('For :field, the possible values are: :values.', ['field' => 'targets_type=continents', 'values' => implode(', ', array_map(function ($value, $name) { return __(':value for :name', ['value' => '' . $value . '', 'name' => '' . $name . '']); }, array_keys(config('continents')), config('continents')))]) . '
{{ __('API endpoint') }}
{!! str_replace(':id', '{id}', route('api.links.destroy', ['id' => ':id'])) !!}
{{ __('Request example') }}
curl --location --request DELETE '{!! str_replace(':id', '{id}', route('api.links.destroy', ['id' => ':id'])) !!}' \
--header 'Authorization: Bearer {api_key}'