協會的一個已發布活動,附即時餘量
GET
/v1/events/{slug}
const url = 'https://api.vimine.network/v1/events/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.vimine.network/v1/events/example \ --header 'Authorization: Bearer <token>'授權方式
章節「授權方式」參數
章節「參數」路徑參數
章節「路徑參數」slug
必填
string
查詢參數
章節「查詢參數」locale
讀取協會文案所用的語言(it、en)。預設依次為:會員自己的語言(使用會員權杖時)、Accept-Language、協會的語言。協會為其啟用的某種語言撰寫了譯文時,每段文字使用該譯文,否則使用其義大利語文字:回應中的 locale 說明標題實際傳回的是哪種語言,locales 說明存在哪些語言版本。不支援的值會被忽略
string
回應
章節「回應」200
章節「200」活動
媒體類型application/json
object
id
string 格式: uuid
slug
string
locale
title 實際傳回的語言。如果不是您請求的語言,說明協會沒有譯文:您拿到的是其義大利語文字,而不是機器翻譯
string
locales
此活動有標題的語言——始終包括協會自身的語言,以及其啟用並撰寫了標題的語言
Array<string>
title
string
summary
string
description_md
Markdown;請自行呈現
string
starts_at
string 格式: date-time
ends_at
string 格式: date-time
timezone
string
status
string
visibility
string
location
object
name
string
address
string
lat
number
lng
number
cover_url
string
gallery
Array<object>
object
url
string
alt
string
order
integer
links
Array<object>
object
label
string
url
string
registration
object
opens_at
string 格式: date-time
closes_at
string 格式: date-time
capacity
integer
remaining
integer
cancellation_hours
integer
registration_types
Array<object>
object
uid
string 格式: uuid
cod
string
name
string
description
string
amount
0 = 免費
number
currency
string
quantity
integer
remaining
剩餘名額(絕不透露名額由誰持有)
integer
max_per_user
integer
requires_active_membership
boolean
open
boolean
reason
string
opens_at
string 格式: date-time
closes_at
string 格式: date-time
published_at
string 格式: date-time
cancelled_at
string 格式: date-time
cancel_reason
string
範例
{ "status": "published", "visibility": "members_only", "registration_types": [ { "reason": "sold_out" } ]}400
章節「400」請求無效
媒體類型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
範例自動產生
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}401
章節「401」缺少憑證或憑證無效
媒體類型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
範例自動產生
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}403
章節「403」不允許此操作
媒體類型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
範例自動產生
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}404
章節「404」找不到
媒體類型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
範例自動產生
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}429
章節「429」超出速率限制
媒體類型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
範例自動產生
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}500
章節「500」內部錯誤
媒體類型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
範例自動產生
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}