Post video to Vine on iOS

224 views Asked by At

I have searched this extensively and also looked at unofficial Vine API. Below is the code I see in endpoints file :

    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

From what I have understood, it seems I need to first create a post, then update it using HTTP Put method with video data and thumbnail data. But I am not clear how to populate various fields such as 'entities' in JSON. Need some help on this.

0

There are 0 answers