pedrofranceschi-phtwitvid 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/phtwitvid.rb +7 -1
- data/phtwitvid.gemspec +1 -1
- metadata +1 -1
data/lib/phtwitvid.rb
CHANGED
@@ -21,7 +21,7 @@ class PHTwitVid
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
def upload(token, message, video_path, post)
|
24
|
+
def upload(token, message, video_path, post)
|
25
25
|
f = File.new(video_path, File::RDWR)
|
26
26
|
agent = WWW::Mechanize.new
|
27
27
|
response = agent.post(
|
@@ -62,5 +62,11 @@ class PHTwitVid
|
|
62
62
|
xml = XmlSimple.xml_in(response.body, { 'KeyAttr' => 'name' })
|
63
63
|
return {'playlist_url' => xml['playlist_url'].to_s, 'playlist_id' => xml['playlist_id'].to_s}
|
64
64
|
end
|
65
|
+
|
66
|
+
def get_uploaded_videos(token)
|
67
|
+
params = { :query => {:token => token}}
|
68
|
+
response = HTTParty.post("#{$api_url}/getVideos", params)
|
69
|
+
return response.body
|
70
|
+
end
|
65
71
|
|
66
72
|
end
|
data/phtwitvid.gemspec
CHANGED