Skip to content

Commit

Permalink
Merge fe4ff47 into aa909b3
Browse files Browse the repository at this point in the history
  • Loading branch information
himberjack committed Aug 17, 2016
2 parents aa909b3 + fe4ff47 commit b419810
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/twitter/rest/tweets.rb
Expand Up @@ -321,6 +321,10 @@ def unretweet(*args)
end.compact
end

def upload_status(media_id)
Twitter::REST::Request.new(self, :get, "https://upload.twitter.com/1.1/media/upload.json?command=STATUS&media_id=#{media_id}").perform
end

private

# Uploads images and videos. Videos require multiple requests and uploads in chunks of 5 Megabytes.
Expand All @@ -334,6 +338,7 @@ def upload(media) # rubocop:disable MethodLength, AbcSize
init = Twitter::REST::Request.new(self, :post, 'https://upload.twitter.com/1.1/media/upload.json',
command: 'INIT',
media_type: 'video/mp4',
media_category: 'tweet_video',
total_bytes: media.size).perform

until media.eof?
Expand Down

0 comments on commit b419810

Please sign in to comment.