账号媒体
GET accounts/:account_id/account_media¶
检索与当前账号关联的部分或所有账号媒体详细信息。
资源 URL¶
https://ads-api.twitter.com/10/accounts/:account_id/account_media
参数¶
名称 | 说明 |
---|---|
account_id 必需 |
所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。 类型:string 示例: |
account_media_ids 可选 |
通过指定以逗号分隔的标识符列表,将响应范围限定至所需的账号媒体。最多可提供 200 个 ID。 类型:string 示例: |
count 可选 |
指定每个不同请求尝试检索的记录数量。 类型:int 默认值: 200 最小值、最大值: 1 、1000 |
creative_types 可选 |
将响应范围限制于与指定素材类型匹配的账号媒体。可以通过逗号分隔的枚举值指定一种以上的素材类型。 类型:enum 可能值: |
cursor 可选 |
指定光标以获取下一页结果。参阅分页了解更多信息。 类型:string 示例: |
sort_by 可选 |
根据支持的属性,按升序或降序排序。参阅排序了解更多信息。 类型:string 示例: |
with_deleted 可选 |
在请求中包含已删除的结果。 类型:boolean 默认值: false 可能值: true 、false |
with_total_count 可选 |
包含 注意:不包含此参数和 注意:包含 类型:boolean 默认值: false 可能值: true 、false |
请求示例¶
GET https://ads-api.twitter.com/10/accounts/18ce54d4x5t/account_media?account_media_ids=3wpx
响应示例¶
{
"request": {
"params": {
"account_media_ids": [
"3wpx"
],
"account_id": "18ce54d4x5t"
}
},
"next_cursor": null,
"data": [
{
"video_id": "13_771791717175468032",
"media_url": null,
"creative_type": "PREROLL",
"id": "3wpx",
"created_at": "2016-09-02T19:27:52Z",
"updated_at": "2016-09-02T19:27:52Z",
"deleted": false
}
]
}
GET accounts/:account_id/account_media/:account_media_id¶
检索与当前账号关联的特定账号媒体对象。
资源 URL¶
https://ads-api.twitter.com/10/accounts/:account_id/account_media/:account_media_id
参数¶
名称 | 说明 |
---|---|
account_id 必需 |
所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。 类型:string 示例: |
account_media_id 必需 |
请求中对正在操作的账号媒体的引用。 类型:string 示例: |
with_deleted 可选 |
在请求中包含已删除的结果。 类型:boolean 默认值: false 可能值: true 、false |
请求示例¶
GET https://ads-api.twitter.com/10/accounts/18ce54d4x5t/account_media/2pnfd
响应示例¶
{
"request": {
"params": {
"account_media_id": "2pnfd",
"account_id": "18ce54d4x5t"
}
},
"data": {
"video_id": null,
"media_url": "https://pbs.twimg.com/ad_img/890749735862026242/Up07zMym?format=jpg&name=orig",
"creative_type": "INTERSTITIAL_LANDSCAPE_TABLET",
"id": "2pnfd",
"created_at": "2017-07-28T01:44:41Z",
"updated_at": "2017-07-28T01:44:41Z",
"deleted": false
}
}
DELETE accounts/:account_id/account_media/:account_media_id¶
删除属于当前账号的指定账号媒体对象。
资源 URL¶
https://ads-api.twitter.com/10/accounts/:account_id/account_media/:account_media_id
参数¶
名称 | 说明 |
---|---|
account_id 必需 |
所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。 类型:string 示例: |
account_media_id 必需 |
请求中对正在操作的账号媒体的引用。 类型:string 示例: |
请求示例¶
DELETE https://ads-api.twitter.com/10/accounts/18ce54d4x5t/account_media/2pnfd
响应示例¶
{
"data": {
"video_id": null,
"media_url": "https://pbs.twimg.com/ad_img/890749735862026242/Up07zMym?format=jpg&name=orig",
"creative_type": "INTERSTITIAL_LANDSCAPE_TABLET",
"id": "2pnfd",
"created_at": "2017-07-28T01:44:41Z",
"updated_at": "2017-08-25T17:16:26Z",
"deleted": true
},
"request": {
"params": {
"account_id": "18ce54d4x5t",
"account_media_id": "2pnfd"
}
}
}