nimbu-api 0.1.5 → 0.2.beta

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 60ac5c0fb8647ab0d1adeff2c79ed404477eb120
4
- data.tar.gz: 52e1bf099662388ee7610b3c87adca7bc83c292e
3
+ metadata.gz: efabf74795669664bbb5d20ccc7dd0ab62b4ef6a
4
+ data.tar.gz: 3070923e34f4cf81454169ef5944396fa004a713
5
5
  SHA512:
6
- metadata.gz: 6e88a8dbcf1e3facaf0056602d4c6e5e6e0cebd8126799bd3b6a1bc7701b087b2c95aa906278345c4aea1c2e2beb3c0a5f8a95bc9af779be94c7a467ab8e32df
7
- data.tar.gz: e7b9cccacea618e296dce221fb7a6c50e3103cb6d830eb8d87a10fdb9745988bf7630defb4c879a209550587a987c9eb3ac84cfe719f8d5af74b209c47596974
6
+ metadata.gz: 8382675ac82a9a3013bb59438b3f28d58999f4f4cf8675af425b6bfe158b6f62c20751a12db954fbf3df60788d64c94097dfebcd1793c7b4b67916527ed3ca1d
7
+ data.tar.gz: 297c3a2eb1887f42e13daf616c593928595e49d0df5f522ae44e1ed4654e65231e34f6ef82ba61b3ce61f23de81d2aae05478a29d60ecd497e7316325b79bb0b
data/lib/nimbu-api.rb CHANGED
@@ -26,6 +26,8 @@ require 'nimbu-api/endpoints/themes/snippets'
26
26
  require 'nimbu-api/endpoints/themes/assets'
27
27
  require 'nimbu-api/endpoints/channels'
28
28
  require 'nimbu-api/endpoints/channels/entries'
29
+ require 'nimbu-api/endpoints/products'
30
+ require 'nimbu-api/endpoints/collections'
29
31
  require 'nimbu-api/endpoints/videos'
30
32
 
31
33
  module Nimbu
@@ -30,6 +30,14 @@ module Nimbu
30
30
  Nimbu::Builder.new('Simulator', current_options.merge(options), &block)
31
31
  end
32
32
 
33
+ def products(options={}, &block)
34
+ Nimbu::Builder.new('Products', current_options.merge(options), &block)
35
+ end
36
+
37
+ def collections(options={}, &block)
38
+ Nimbu::Builder.new('Collections', current_options.merge(options), &block)
39
+ end
40
+
33
41
  def authenticate(options={}, &block)
34
42
  Nimbu::Builder.new('Login', current_options.merge(options), &block).response
35
43
  end
@@ -45,6 +45,6 @@ module Nimbu
45
45
  alias :remove :delete
46
46
 
47
47
 
48
- end # Authorizations
48
+ end # Channel::Entries
49
49
  end # Endpoints
50
50
  end # Nimbu
@@ -0,0 +1,44 @@
1
+ # encoding: utf-8
2
+
3
+ module Nimbu
4
+ module Endpoints
5
+ class Collections < Endpoint
6
+ def list(*args)
7
+ arguments(args)
8
+
9
+ response = get_request("/collections", arguments.params)
10
+ return response unless block_given?
11
+ response.each { |el| yield el }
12
+ end
13
+ alias :all :list
14
+
15
+ def get(*args)
16
+ arguments(args, :required => :collection_id)
17
+
18
+ get_request("/collections/#{collection_id}", arguments.params)
19
+ end
20
+ alias :find :get
21
+
22
+ def create(*args)
23
+ arguments(args)
24
+
25
+ post_request("/collections/#{collection_id}", arguments.params)
26
+ end
27
+
28
+ def update(*args)
29
+ arguments(args, :required => :collection_id)
30
+
31
+ patch_request("/collections/#{collection_id}", arguments.params)
32
+ end
33
+ alias :edit :update
34
+
35
+ def delete(*args)
36
+ arguments(args, :required => :collection_id)
37
+
38
+ delete_request("/collections/#{collection_id}", arguments.params)
39
+ end
40
+ alias :remove :delete
41
+
42
+ end # Products
43
+ end # Endpoints
44
+ end # Nimbu
@@ -0,0 +1,44 @@
1
+ # encoding: utf-8
2
+
3
+ module Nimbu
4
+ module Endpoints
5
+ class Products < Endpoint
6
+ def list(*args)
7
+ arguments(args)
8
+
9
+ response = get_request("/products", arguments.params)
10
+ return response unless block_given?
11
+ response.each { |el| yield el }
12
+ end
13
+ alias :all :list
14
+
15
+ def get(*args)
16
+ arguments(args, :required => :product_id)
17
+
18
+ get_request("/products/#{product_id}", arguments.params)
19
+ end
20
+ alias :find :get
21
+
22
+ def create(*args)
23
+ arguments(args)
24
+
25
+ post_request("/products/#{product_id}", arguments.params)
26
+ end
27
+
28
+ def update(*args)
29
+ arguments(args, :required => :product_id)
30
+
31
+ patch_request("/products/#{product_id}", arguments.params)
32
+ end
33
+ alias :edit :update
34
+
35
+ def delete(*args)
36
+ arguments(args, :required => :product_id)
37
+
38
+ delete_request("/products/#{product_id}", arguments.params)
39
+ end
40
+ alias :remove :delete
41
+
42
+ end # Products
43
+ end # Endpoints
44
+ end # Nimbu
@@ -1,5 +1,5 @@
1
1
  module Nimbu
2
2
  module API
3
- VERSION = "0.1.5"
3
+ VERSION = "0.2.beta"
4
4
  end
5
5
  end
data/nimbu-api.gemspec CHANGED
@@ -28,5 +28,4 @@ Gem::Specification.new do |gem|
28
28
  gem.add_development_dependency 'pry'
29
29
  gem.add_development_dependency 'pry-remote'
30
30
  gem.add_development_dependency 'pry-stack_explorer'
31
- gem.add_development_dependency 'pry-debugger'
32
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nimbu-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.2.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Dedene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-25 00:00:00.000000000 Z
11
+ date: 2013-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -164,20 +164,6 @@ dependencies:
164
164
  - - '>='
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: pry-debugger
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - '>='
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - '>='
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
167
  description: Nimbu is the easiest way to build a beautiful multi-lingual online store!
182
168
  See http://nimbu.io for more information.
183
169
  email:
@@ -201,7 +187,9 @@ files:
201
187
  - lib/nimbu-api/endpoints/authorizations.rb
202
188
  - lib/nimbu-api/endpoints/channels.rb
203
189
  - lib/nimbu-api/endpoints/channels/entries.rb
190
+ - lib/nimbu-api/endpoints/collections.rb
204
191
  - lib/nimbu-api/endpoints/login.rb
192
+ - lib/nimbu-api/endpoints/products.rb
205
193
  - lib/nimbu-api/endpoints/simulator.rb
206
194
  - lib/nimbu-api/endpoints/sites.rb
207
195
  - lib/nimbu-api/endpoints/themes.rb
@@ -277,9 +265,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
277
265
  version: '0'
278
266
  required_rubygems_version: !ruby/object:Gem::Requirement
279
267
  requirements:
280
- - - '>='
268
+ - - '>'
281
269
  - !ruby/object:Gem::Version
282
- version: '0'
270
+ version: 1.3.1
283
271
  requirements: []
284
272
  rubyforge_project:
285
273
  rubygems_version: 2.0.3