API 端點
https://ysd.lol/api/v1/links
請求範例
curl --location --request GET 'https://ysd.lol/api/v1/links' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameters
search
search_by
title, 別名 的 alias, 網址 的 url。 預設為:title。
status
0, 啟用 的 1, 已過期 的 2, 已停用 的 3。 預設為:0。
space_id
domain_id
pixel_id
sort_by
id, 點擊 的 clicks, 標題 的 title, 別名 的 alias, 網址 的 url。 預設為:id。
sort
desc, 遞增 的 asc。 預設為:desc。
per_page
10, 25, 50, 100。 預設為:10。
API 端點
https://ysd.lol/api/v1/links/{id}
請求範例
curl --location --request GET 'https://ysd.lol/api/v1/links/{id}' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer {api_key}'
API 端點
https://ysd.lol/api/v1/links
請求範例
curl --location --request POST 'https://ysd.lol/api/v1/links' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Bearer {api_key}' \ --data-urlencode 'url={url}' \ --data-urlencode 'domain={id}'
Parameters
url
domain_id
alias
space_id
pixel_ids[]
redirect_password
sensitive_content
0, 是 的 1。 預設為:0。
privacy
0, 私密 的 1, 密碼 的 2。 預設為:0。
password
privacy 欄位設為 2 時有效。
active_period_start_at
Y-m-dTH:i:s 格式的有效期間開始日期。
active_period_end_at
Y-m-dTH:i:s 格式的有效期間結束日期。
clicks_limit
expiration_url
targets_type
continents, Countries 的 countries, Operating systems 的 operating_systems, Browsers 的 browsers, Languages 的 languages, Devices 的 devices, Rotations 的 rotations。
targets[index][key]
對於 targets_type=country,值必須為 ISO 3166-1 alpha-2 格式。
對於 targets_type=operating_systems,可能的值為:iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS。
對於 targets_type=browsers,可能的值為:Chrome, Chromium, Firefox, Firefox Mobile, Edge, Internet Explorer, Mobile Internet Explorer, Vivaldi, Brave, Safari, Opera, Opera Mini, Opera Mobile, Opera Touch, Yandex Browser, UC Browser, Samsung Internet, QQ Browser, BlackBerry Browser, Maxtho。
對於 targets_type=devices,可能的值為:Desktop, Mobile, Tablet, Watch, Television。
對於 targets_type=languages,值必須為 ISO 639-1 alpha-2 格式。
對於 targets_type=continents,可能的值為:Africa 的 AF, Antarctica 的 AN, Asia 的 AS, Europe 的 EU, North America 的 NA, Oceania 的 OC, South America 的 SA。
targets[index][value]
API 端點
https://ysd.lol/api/v1/links/{id}
請求範例
curl --location --request PUT 'https://ysd.lol/api/v1/links/{id}' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Bearer {api_key}'
Parameters
url
alias
space_id
pixel_ids[]
redirect_password
sensitive_content
0, 是 的 1。
privacy
0, 私密 的 1, 密碼 的 2。
password
privacy 欄位設為 2 時有效。
active_period_start_at
Y-m-dTH:i:s 格式的有效期間開始日期。
active_period_end_at
Y-m-dTH:i:s 格式的有效期間結束日期。
clicks_limit
expiration_url
targets_type
continents, Countries 的 countries, Operating systems 的 operating_systems, Browsers 的 browsers, Languages 的 languages, Devices 的 devices, Rotations 的 rotations。
targets[index][key]
對於 targets_type=country,值必須為 ISO 3166-1 alpha-2 格式。
對於 targets_type=operating_systems,可能的值為:iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS。
對於 targets_type=browsers,可能的值為:Chrome, Chromium, Firefox, Firefox Mobile, Edge, Internet Explorer, Mobile Internet Explorer, Vivaldi, Brave, Safari, Opera, Opera Mini, Opera Mobile, Opera Touch, Yandex Browser, UC Browser, Samsung Internet, QQ Browser, BlackBerry Browser, Maxtho。
對於 targets_type=devices,可能的值為:Desktop, Mobile, Tablet, Watch, Television。
對於 targets_type=languages,值必須為 ISO 639-1 alpha-2 格式。
對於 targets_type=continents,可能的值為:Africa 的 AF, Antarctica 的 AN, Asia 的 AS, Europe 的 EU, North America 的 NA, Oceania 的 OC, South America 的 SA。
targets[index][value]
API 端點
https://ysd.lol/api/v1/links/{id}
請求範例
curl --location --request DELETE 'https://ysd.lol/api/v1/links/{id}' \ --header 'Authorization: Bearer {api_key}'