zencoder-fetcher 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,6 +21,7 @@ Options:
21
21
  * --count, -c <i>: Number of notifications to retrieve per page. (Default: 50)
22
22
  * --page, -p <i>: The page to load. (Default: 1)
23
23
  * --since, -m <i>: Load notifications starting since n minutes ago.
24
+ * --api_version, -v: The API version to use. (Default: v1)
24
25
 
25
26
  == Copyright
26
27
 
@@ -23,7 +23,7 @@ EOS
23
23
  opt :page, "The page to load.", :short => 'p', :type => Integer, :default => 1
24
24
  opt :since, "Load notifications starting since _n_ minutes ago.", :short => 'm', :type => Integer, :default => nil
25
25
  opt :endpoint, "Zencoder endpoint to use. Defaults to https://app.zencoder.com/.", :short => 'e', :type => String
26
- opt :api_version, "API version to use.", :short => 'v', :type => String, :default => 'v1'
26
+ opt :api_version, "API version to use.", :short => 'v', :type => String, :default => 'v2'
27
27
  end
28
28
 
29
29
 
@@ -9,7 +9,7 @@ rescue
9
9
  end
10
10
 
11
11
  module ZencoderFetcher
12
- FETCHER_VERSION = [0,2,7] unless defined?(FETCHER_VERSION)
12
+ FETCHER_VERSION = [0,2,8] unless defined?(FETCHER_VERSION)
13
13
 
14
14
  def self.version
15
15
  FETCHER_VERSION.join(".")
@@ -28,7 +28,7 @@ module ZencoderFetcher
28
28
  local_url = options[:url] || "http://localhost:3000/"
29
29
  auth = local_url.match(/^https?:\/\/([^\/]+):([^\/]+)@/) ? {:username=>$1, :password=>$2} : {}
30
30
 
31
- response = HTTParty.get("https://#{options[:endpoint] || 'app'}.zencoder.com/api/#{options[:api_version] || 'v1'}/notifications.json?#{query}",
31
+ response = HTTParty.get("https://#{options[:endpoint] || 'app'}.zencoder.com/api/#{options[:api_version] || 'v2'}/notifications.json?#{query}",
32
32
  :headers => { "HTTP_X_FETCHER_VERSION" => version })
33
33
 
34
34
  if response["errors"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zencoder-fetcher
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 7
10
- version: 0.2.7
9
+ - 8
10
+ version: 0.2.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Warren
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-10-12 00:00:00 Z
19
+ date: 2012-03-28 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: trollop