欢迎使用全新的 WEEX API 文档。需要查看旧版本?切换到旧版文档
WEEX

获取文章列表

HTTP request 分页获取 Web3 内容列表。列表接口不返回文章正文。

  • GET /api/v3/content/articles/list

权重(IP): 1

请求头

请求头<span style={{whiteSpace: 'nowrap'}}>是否必须描述
locale否内容语言,默认 en_US。可选值:ar_AR、az_AZ、de_DE、en_US、es_419、es_AR、es_ES、fa_IR、fr_FR、in_ID、it_IT、ja_JP、pl_PL、pt_BR、pt_PT、ru_RU、uk_UK、vi_VN、zh_CN、zh_TW。

请求参数

参数名类型<span style={{whiteSpace: 'nowrap'}}>是否必须适用板块描述
sectionString是全部一次仅支持一个值:wiki、news、learn、questions。
categoryString否wiki、news分类过滤,最长 64 个字符;用于 news 时与 categoryFilter 互斥。
categoryFilterString否news排除指定分类,最长 64 个字符;与 category 互斥。
tagNameString否全部按关联标签名称过滤。
titleString否wiki、news、questions标题模糊搜索,最长 200 个字符。
prioritySortBoolean否news是否按优先级排序,默认 false。
levelString否learnBeginner、Intermediate、Advanced;与 excludeLevel 互斥。
excludeLevelString否learn排除一个学习等级;与 level 互斥。
excludeDocumentIdString否questions排除指定 documentId,通常用于相关推荐查询。
excludeContentKeyString否questions排除 contentKey。
withCountBoolean否全部是否返回 total 和 pages,默认 false。
pageInteger否全部页码,从 1 开始,默认 1。
pageSizeInteger否全部每页数量,默认 25,最大 200。
populateThumbnailBoolean否wiki、news、learn是否返回 thumbnail,默认 false;questions 会忽略该参数。
populateTagListsBoolean否全部是否返回 tagLists,默认 false。
populateCoinsBoolean否全部是否返回 coinsMaps,默认 false。

请求示例

PowerShellCode
curl "https://api-spot.weex.com/api/v3/content/articles/list?section=news&categoryFilter=events&prioritySort=true&page=1&pageSize=10&withCount=true&populateThumbnail=true&populateTagLists=true&populateCoins=true" \ -H "ACCESS-KEY:*******" \ -H "ACCESS-SIGN:*******" \ -H "ACCESS-PASSPHRASE:*****" \ -H "ACCESS-TIMESTAMP:1659076670000" \ -H "locale: zh_CN" \ -H "Content-Type: application/json"

返回参数

字段名类型描述
totalLong总记录数,withCount=false 时为 null。
pageInteger当前页码。
pageSizeInteger每页数量。
pagesInteger总页数,withCount=false 时为 null。
hasNextPageBoolean是否存在下一页。
itemsArticleListItem[]文章列表。

ArticleListItem

字段名类型适用板块描述
idLong全部内容 ID。
documentIdString全部文档 ID。
v4IdString全部兼容旧版本数据的 ID。
sectionString全部wiki、news、learn、questions。
titleString全部当前语言标题。
summaryStringwiki、news、questions内容摘要,learn 为 null。
contentKeyString全部内容标识。
enabledBooleanwiki、news、questions是否启用,learn 为 null。
enabledDateLongwiki、news、questions启用时间,UTC 毫秒时间戳;learn 为 null。
categoryStringwiki、news内容分类。
imgCategoryStringwikiWiki 图片分类。
linkStringnews外部来源链接。
sourceSiteStringnews来源站点。
outerPicStringnews外部来源图片。
originalSourceUrlStringnews原始来源 URL。
priorityIntegernews新闻优先级。
dateLonglearn学院内容日期,UTC 毫秒时间戳。
levelStringlearnBeginner、Intermediate、Advanced。
outerIdString全部外部内容 ID。
outerLocaleIdLongwiki、learn、questions外部语言 ID,news 为 null。
sourceLangStringwiki、learn、questions来源语言,news 为 null。
titleEnString全部英文标题。
translationBooleanwiki、learn、questions翻译标识,news 为 null。
translationStatusStringwiki、learn、questions翻译状态,news 为 null。
thumbnailObjectwiki、news、learn板块不支持、未请求或无缩略图时为 null。
tagListsArray全部未请求时为 null;请求后没有标签时为空数组。
coinsMapsArray全部未请求时为 null;请求后没有币种时为空数组。
publishedAtLong全部发布时间,UTC 毫秒时间戳。
createdAtLong全部创建时间,UTC 毫秒时间戳。
updatedAtLong全部更新时间,UTC 毫秒时间戳。

返回示例

JSONCode
{ "total": 8102, "page": 1, "pageSize": 10, "pages": 811, "hasNextPage": true, "items": [ { "id": 1811667, "documentId": "nixq62735vbptclw9y0xti6f", "v4Id": null, "section": "news", "title": "市场新闻标题", "summary": "市场新闻摘要。", "contentKey": null, "enabled": true, "enabledDate": 1781062934160, "category": "news-flash", "imgCategory": null, "link": "https://example.com/article", "sourceSite": "rootData", "outerPic": null, "originalSourceUrl": "https://example.com/article", "priority": null, "date": null, "level": null, "outerId": "rootData_2270427", "outerLocaleId": null, "sourceLang": null, "titleEn": "Market news title", "translation": null, "translationStatus": null, "thumbnail": null, "tagLists": [], "coinsMaps": [], "publishedAt": 1781062922400, "createdAt": 1781062922391, "updatedAt": 1781062935084 } ] }