dawanda-dawanda_client 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. data/lib/dawanda/category.rb +25 -0
  2. metadata +3 -2
@@ -0,0 +1,25 @@
1
+ module Dawanda
2
+
3
+ # = User
4
+ #
5
+ # Represents a single Dawanda category - has the following attributes:
6
+ #
7
+ # [id] The unique identifier for this category
8
+ # [parent_id] This category's parent id
9
+ # [name] This category's name
10
+ # [product_count] The amount of products in this category
11
+ #
12
+ class Category
13
+
14
+ include Dawanda::Model
15
+
16
+ finder :one, '/categories/:category_id'
17
+
18
+ attributes :id, :parent_id, :name, :product_count
19
+
20
+ def products
21
+ Product.find_all_by_category_id(id)
22
+ end
23
+
24
+ end
25
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dawanda-dawanda_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Christoph B\xC3\xBCnte"
@@ -40,6 +40,7 @@ files:
40
40
  - lib/dawanda/response.rb
41
41
  - lib/dawanda/shop.rb
42
42
  - lib/dawanda/user.rb
43
+ - lib/dawanda/category.rb
43
44
  - lib/dawanda.rb
44
45
  - test/fixtures
45
46
  - test/fixtures/getShopDetails.json
@@ -48,7 +49,7 @@ files:
48
49
  - test/unit/dawanda
49
50
  - test/unit/dawanda/shop_test.rb
50
51
  has_rdoc: true
51
- homepage: http://sneaq.net
52
+ homepage: http://dawanda.com
52
53
  licenses:
53
54
  post_install_message:
54
55
  rdoc_options: