使用api v3将视频上传到youtube时无法设置标题

时间:2016-11-03 01:37:18

标签: youtube-api youtube-data-api

我正在使用curl / postman测试过。 可以将视频发布到youtube服务器,但片段数据总是被忽略,令人沮丧,提前谢谢。

卷曲

$ curl -X POST --proxy 127.0.0.1:8118 \
-H "Authorization: token_here" \
-H "Content-Type: multipart/form-data" \
-F "''={'snippet':{'title' : 'TITLE_TEXT', 'description': 'DESCRIPTION_TEXT'}}" \
-F "''=@file_to_upload" \
https://www.googleapis.com/upload/youtube/v3/videos\?part\=snippet

回复

{
    "kind": "youtube#video",
    "etag": "\"sZ5p5Mo8dPpfIzLYQBF8QIQJym0/csORsfSKaIS5MEMheYZalF19JVo\"",  "id": "7EjBVtJSlSw",
    "snippet": {
        "publishedAt": "2016-11-02T16:19:02.000Z",
        "channelId": "UC4n-MgxCL1zk7Cb3wayjRTA",
        "title": "unknown",
        "description": "",                                                                                                    "thumbnails": {
            "default": {                                                                                                              "url": "https://i.ytimg.com/vi/7EjBVtJSlSw/default.jpg",
                "width": 120,                                                                                                         "height": 90
            },                                                                                                                    "medium": {
                "url": "https://i.ytimg.com/vi/7EjBVtJSlSw/mqdefault.jpg",
                "width": 320,
                "height": 180
            },
            "high": {
                "url": "https://i.ytimg.com/vi/7EjBVtJSlSw/hqdefault.jpg",
                "width": 480,
                "height": 360
            }
        },
        "channelTitle": "Chengyuan Luo",
        "categoryId": "22",
        "liveBroadcastContent": "none",
        "localized": { "title": "unknown",    "description": ""   }
    }
}

0 个答案:

没有答案