zanox 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.textile +4 -2
- data/lib/zanox.rb +6 -1
- data/zanox.gemspec +2 -2
- metadata +3 -3
data/README.textile
CHANGED
|
@@ -26,11 +26,13 @@ h2. Examples
|
|
|
26
26
|
puts product.id + " : " + product.name
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
# request
|
|
30
|
-
Zanox::Product.find('
|
|
29
|
+
# request a product by its zupid
|
|
30
|
+
Zanox::Product.find('b84145a6c81a455c99a90194db15aed3').each do |product|
|
|
31
31
|
puts product.id + " : " + product.name
|
|
32
32
|
end
|
|
33
33
|
</code></pre>
|
|
34
34
|
|
|
35
|
+
For more code snippets look at the files in the examples dir.
|
|
36
|
+
|
|
35
37
|
|
|
36
38
|
|
data/lib/zanox.rb
CHANGED
|
@@ -34,7 +34,7 @@ module Zanox
|
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def self.get_timestamp
|
|
37
|
-
Time.new.gmtime.strftime("%Y-%m-%dT%H:%M:%S.000Z")
|
|
37
|
+
Time.new.gmtime.strftime("%Y-%m-%dT%H:%M:%S.000Z").to_s
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def self.create_signature(secret_key, string2sign)
|
|
@@ -66,6 +66,11 @@ module Zanox
|
|
|
66
66
|
items = []
|
|
67
67
|
class_name = self.name.split('::').last
|
|
68
68
|
api_method = 'get'+self.pluralize
|
|
69
|
+
|
|
70
|
+
if(class_name=='Program' && options.has_key?(:adspaceId))
|
|
71
|
+
api_method = "getProgramsByAdspace"
|
|
72
|
+
end
|
|
73
|
+
|
|
69
74
|
unless Zanox::API.secret_key.nil?
|
|
70
75
|
timestamp = Zanox::API.get_timestamp
|
|
71
76
|
nonce = Zanox::API.generate_nonce
|
data/zanox.gemspec
CHANGED
|
@@ -7,10 +7,10 @@ require 'rake'
|
|
|
7
7
|
spec = Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
|
9
9
|
s.name = %q{zanox}
|
|
10
|
-
s.version = "0.2.
|
|
10
|
+
s.version = "0.2.2"
|
|
11
11
|
s.authors = ["Krispin Schulz"]
|
|
12
12
|
s.homepage = %q{http://kr1sp1n.com/}
|
|
13
|
-
s.date = %q{2010-05-
|
|
13
|
+
s.date = %q{2010-05-12}
|
|
14
14
|
s.email = %q{krispinone@googlemail.com}
|
|
15
15
|
s.summary = %q{One gem to rule the zanox web services.}
|
|
16
16
|
s.description = %q{The easy way to the zanox web services.}
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 2
|
|
8
|
-
-
|
|
9
|
-
version: 0.2.
|
|
8
|
+
- 2
|
|
9
|
+
version: 0.2.2
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Krispin Schulz
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2010-05-
|
|
17
|
+
date: 2010-05-12 00:00:00 +02:00
|
|
18
18
|
default_executable:
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|