sevennet-api 0.0.1 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: feec2c6c92b4918ac8868c0fc2dcb091e9e4059f
4
- data.tar.gz: 45af5f721d89164fa394017b1373afec3125af15
3
+ metadata.gz: 16c70b05ee92b98d076c68fbd6e40f2962c1c845
4
+ data.tar.gz: 83135371d3f1f2d74ad46df70c046c59e20de27c
5
5
  SHA512:
6
- metadata.gz: b2e9b4ac974db660e07fcd66a40897279f829515b488617a66654c4bee025b874e7b6a3158f6197aec175d84f2891599da3f0a4bbe593f0a04ae5cf7b11de653
7
- data.tar.gz: cb1c5348382a40e89b295e80db76a30eefce1727c14e561eb57241c9b1b29e9fc79fa27631e490cd7c621fd70150edba9022f87913d988bca3359e58b5f38a1b
6
+ metadata.gz: 753493706edb51440706b07c6b9d11ccc02f686b672f732ca96d27a17ad89eef14f7d10606beb5b0883d782c07c2f7dc6e81a7adc6280fa7925b04d636b05b5a
7
+ data.tar.gz: dba8b9dc35f25c7d2fef4f364eb499758c3ee4cf83b43edacbbb79ae29fa59de8600bddf5106ddbd83843cec059f21e0474f42d342bafa65e045a330bb03fc87
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Sevennet::Api
2
-
3
- Generic 7netshopping Ruby API using Nokogiri. Uses Response and Element wrapper classes for easy access to the REST API XML output.
2
+ [![Gem Version](https://badge.fury.io/rb/sevennet-api.png)](http://badge.fury.io/rb/sevennet-api)
3
+ Ruby 7netshopping API using Nokogiri. Uses Response and Element wrapper classes for easy access to the REST API XML output.
4
4
 
5
5
  ## Installation
6
6
 
@@ -20,6 +20,7 @@ Or install it yourself as:
20
20
 
21
21
  require 'sevennet/api'
22
22
 
23
+
23
24
  Sevennet::Api.configure do |options|
24
25
  options[:ApiUserId] = 'your api user id'
25
26
  options[:APISecretKey] = 'your api secret key'
@@ -29,7 +30,7 @@ Or install it yourself as:
29
30
  res = Sevennet::Api.get_shopping_category('') # root category
30
31
  res = Sevennet::Api.get_shopping_category('books') # books category
31
32
  res.categories.each do |category|
32
- children = category.get('ChildCategory')
33
+ children = category.get_elements('ChildCategory')
33
34
  children.each do |child|
34
35
  code = child.get('CategoryCode')
35
36
  ...
@@ -64,7 +65,8 @@ Or install it yourself as:
64
65
  res = Sevennet::Api.get_spc_category('') # root category
65
66
  res = Sevennet::Api.get_spc_category('home') # home category
66
67
  res.categories.each do |category|
67
- children = category.get('ChildCategory')
68
+ children = category.get_elements('ChildCategory')
69
+ next if children.nil?
68
70
  children.each do |child|
69
71
  code = child.get('CategoryCode')
70
72
  ...
@@ -123,7 +123,7 @@ module Sevennet
123
123
  opts = self.options.merge(opts) if self.options
124
124
 
125
125
  # Include other required options
126
- opts[:Timestamp] = Time.now.strftime('%Y-%m-%dT%XZ')
126
+ opts[:Timestamp] = Time.now.utc.strftime('%Y-%m-%dT%XZ')
127
127
 
128
128
  request_url = prepare_url(opts)
129
129
 
@@ -1,5 +1,5 @@
1
1
  module Sevennet
2
2
  class Api
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Sevennet::Api::VERSION
9
9
  spec.authors = ["shoprev"]
10
10
  spec.email = ["admin@shoprev.net"]
11
- spec.description = %q{Generic Ruby 7netshopping API}
12
- spec.summary = %q{Generic Ruby 7netshopping API}
11
+ spec.description = %q{Ruby 7netshopping API using Nokogiri.}
12
+ spec.summary = %q{Ruby 7netshopping API using Nokogiri.}
13
13
  spec.homepage = "https://github.com/shoprev/sevennet-api"
14
14
  spec.license = "MIT"
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sevennet-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - shoprev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-02 00:00:00.000000000 Z
11
+ date: 2013-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,7 +80,7 @@ dependencies:
80
80
  - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- description: Generic Ruby 7netshopping API
83
+ description: Ruby 7netshopping API using Nokogiri.
84
84
  email:
85
85
  - admin@shoprev.net
86
86
  executables: []
@@ -120,7 +120,7 @@ rubyforge_project:
120
120
  rubygems_version: 2.0.3
121
121
  signing_key:
122
122
  specification_version: 4
123
- summary: Generic Ruby 7netshopping API
123
+ summary: Ruby 7netshopping API using Nokogiri.
124
124
  test_files:
125
125
  - spec/sevennet/api_spec.rb
126
126
  - spec/spec_helper.rb