协会的一场已发布活动,附实时余量
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" } ]}