aboutyou-sdk 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/aboutyou-sdk.rb +63 -46
- data/lib/aboutyou-sdk/Client.rb +7 -0
- data/lib/aboutyou-sdk/Constants.rb +70 -35
- data/lib/aboutyou-sdk/Criteria/ProductFields.rb +77 -30
- data/lib/aboutyou-sdk/Criteria/ProductSearchCriteria.rb +442 -409
- data/lib/aboutyou-sdk/Factory/DefaultModelFactory.rb +485 -337
- data/lib/aboutyou-sdk/Model/CategoryManager/DefaultCategoryManager.rb +1 -1
- data/lib/aboutyou-sdk/Query.rb +11 -0
- metadata +2 -2
@@ -65,7 +65,7 @@ module AboutYou
|
|
65
65
|
self.parentChildIds = jsonObject["parent_child"]
|
66
66
|
|
67
67
|
jsonObject["ids"].each do |id, jsonCategory|
|
68
|
-
@categories[id] = factory.createCategory(jsonCategory
|
68
|
+
@categories[id] = factory.createCategory(jsonCategory);
|
69
69
|
end
|
70
70
|
self.cacheCategories();
|
71
71
|
|
data/lib/aboutyou-sdk/Query.rb
CHANGED
@@ -8,16 +8,27 @@ module AboutYou
|
|
8
8
|
# Author:: Collins GmbH & Co KG
|
9
9
|
###
|
10
10
|
class Query
|
11
|
+
# QueryBuilder is a helper class containing most of the logix behind
|
12
|
+
# building the api-request
|
11
13
|
include AboutYou::SDK::QueryBuilder
|
12
14
|
|
15
|
+
# used for checking whether a query contains a category-request or not
|
13
16
|
QUERY_TREE = 'category_tree'
|
17
|
+
# used for checking whether a query contains a facets-request or not
|
14
18
|
QUERY_FACETS = 'facets'
|
15
19
|
|
20
|
+
# The Api-Client which performs the Api-Calls
|
16
21
|
attr_accessor :client
|
22
|
+
# the query built by the app itself
|
17
23
|
attr_accessor :query
|
24
|
+
# a Hash containing the mapping for
|
25
|
+
# api_call_name => method_name_in_model_factory
|
18
26
|
attr_accessor :mapping
|
27
|
+
# the model factory which builds the models from the api-response
|
19
28
|
attr_accessor :factory
|
29
|
+
# a helper-query used for fetching categories and/or facets if needed
|
20
30
|
attr_accessor :ghostQuery
|
31
|
+
# the actual query send to the api containing query and ghost-query
|
21
32
|
attr_accessor :allQuery
|
22
33
|
|
23
34
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aboutyou-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ferenc Beutel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|