tagalys 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tagalys.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e778249ab70ff53c06e63175e29b74ede0952593c86292fb3817504bdbea944
|
4
|
+
data.tar.gz: a7467a7d501556d32c9595bede53174f90df61a06147def5677d63370d607c96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd8b095e76532bd4b158b25a336b84116a96bcab72c74696e599bba5ed49e09a6ff0965c8474c3a427eed74a643cfa10b2ebc8d7dfdf83f685e031075255dd53
|
7
|
+
data.tar.gz: dbb717eb48f0dd52d389c565c3771d8e552f97758d8febf878570f6c2e18158a44b39b422f4bb025df9e8477940bb25f24fc5de5aa46e43d5ed470ee52755297
|
data/lib/tagalys.rb
CHANGED
@@ -19,12 +19,13 @@ module Tagalys
|
|
19
19
|
yield(configuration)
|
20
20
|
end
|
21
21
|
|
22
|
-
def search(query=nil, filters=nil, page=1, per_page=30)
|
22
|
+
def search(query=nil, filters=nil, sort=nil, page=1, per_page=30)
|
23
23
|
return { status: "Either query or filter should be present" } if query == nil && filters == nil
|
24
24
|
# return { status: "Filter should be a hash" } if filters && filters.class != Hash
|
25
25
|
request_body = {
|
26
26
|
identification: identification,
|
27
27
|
q: query.strip.length > 0 ? query : nil,
|
28
|
+
sort: sort,
|
28
29
|
qf: filters,
|
29
30
|
page: page,
|
30
31
|
per_page: per_page,
|
@@ -39,9 +40,10 @@ module Tagalys
|
|
39
40
|
search_response = request_tagalys('/search', request_body)
|
40
41
|
end
|
41
42
|
|
42
|
-
def get_page_details(page_name, page=1, per_page=30)
|
43
|
+
def get_page_details(page_name, sort=nil, page=1, per_page=30)
|
43
44
|
request_body = {
|
44
45
|
identification: identification,
|
46
|
+
sort: sort,
|
45
47
|
request: [
|
46
48
|
"total",
|
47
49
|
"results",
|