0

我对此进行了广泛的搜索,还查看了非官方的 Vine API。下面是我在端点文件中看到的代码:

    def post(videoUrl, thumbnailUrl, description, entities,  optionals = {} )
    forsquareVenueId = optionals["forsquareVenueId"] || optionals[:forsquareVenueId]; venueName = optionals["venueName"] || optionals[:venueName]; channelId = optionals["channelId"] || optionals[:channelId]

    url = (API_URL + "posts") % []
    params = {  "forsquareVenueId" => forsquareVenueId ,  "venueName" => venueName ,  "channelId" => channelId ,  "videoUrl" => videoUrl ,  "thumbnailUrl" => thumbnailUrl ,  "description" => description ,  "entities" => entities  }.reject { |k, v| v.nil? }
    api_call "post", url, params, nil
  end

据我了解,似乎我需要先创建一个帖子,然后使用带有视频数据和缩略图数据的 HTTP Put 方法对其进行更新。但我不清楚如何在 JSON 中填充各种字段,例如“实体”。在这方面需要一些帮助。

4

0 回答 0