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.
Files changed (3) hide show
  1. data/lib/phtwitvid.rb +7 -1
  2. data/phtwitvid.gemspec +1 -1
  3. 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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{phtwitvid}
3
- s.version = "0.1.1"
3
+ s.version = "0.1.2"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["pH (Pedro Henrique Cavallieri Franceschi)"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pedrofranceschi-phtwitvid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - pH (Pedro Henrique Cavallieri Franceschi)