@extends('layouts.app') @section('site_title', formatTitle([__('Stats'), __('Developers'), config('settings.title')])) @section('head_content') @endsection @section('content')
{{ __('API endpoint') }}
{!! str_replace(':id', '{link_id}', route('api.stats.show', ['id' => ':id'])) !!}
{{ __('Request example') }}
curl --location --request GET '{!! str_replace([':id', '%3Aname', '%3Afrom', '%3Ato'], ['{link_id}', '{name}', '{from}', '{to}'], route('api.stats.show', ['id' => ':id', 'name' => ':name', 'from' => ':from', 'to' => ':to'])) !!}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
{{ __('Parameters') }}
@include('developers.partials.parameters-list', ['parameters' => [ [ 'name' => 'name', 'type' => 1, 'format' => 'string', 'description' => __('Name') . '. ' . __('Possible values are: :values.', ['values' => ''.implode(', ', config('stats.types')).''])
], [
'name' => 'from',
'type' => 1,
'format' => 'string',
'description' => __('Starting date in :format format.', ['format' => 'Y-m-d'])
], [
'name' => 'to',
'type' => 1,
'format' => 'string',
'description' => __('Ending date in :format format.', ['format' => 'Y-m-d'])
], [
'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' => 'value', 'name' => '' . __('Value') . ''])
])
])
], [
'name' => 'sort_by',
'type' => 0,
'format' => 'string',
'description' => __('Sort by') . '. ' . __('Possible values are: :values.', [
'values' => implode(', ', [
__(':value for :name', ['value' => 'count', 'name' => '' . __('Count') . '']),
__(':value for :name', ['value' => 'value', 'name' => '' . __('Value') . '']),
])
]) .' ' . __('Defaults to: :value.', ['value' => 'count'])
], [
'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') . ''])
]
]])