tagalys 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tagalys.rb +7 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0b4ff8746597b263339feed0e71875bb18f02ed4f8d5470ea461fd7366da408
4
- data.tar.gz: 917910b102af0a0ca5d933cafdec485dd9818e56e73fae02d6e595a363d99e09
3
+ metadata.gz: c2e72df51daa269cd33b10d8fa008201c3a16080be3af3b416bcc0a8f7cd2600
4
+ data.tar.gz: 5164f8d5e0570a38471e7249ecc0ec223d2b8933aebcc6be4ec5986e4114f189
5
5
  SHA512:
6
- metadata.gz: afb00242c50026baa2df8dd8967769a60c2b9b954d32e64ded4be6de8e274e9abb7997750bdb7033225f2b5d2a525f93fa9cb02e8576f3711320d30e681a7831
7
- data.tar.gz: e24553620a736ee5136ee9b031cb87d99098e172c4c4ddd5dacf14cc1462e31c8c8b62cc2d5a6d0da04ffabbe863e03510f50f09d3d5f33c5dc7f403786ca00a
6
+ metadata.gz: 79db5d9ce01f147f80a7e89777dcde9bfd126834573afa0a432a74c443270b27d89c54699fda406ed3c4775fbbc8c8b1cbcba01d2fa165d7e48f0176c1d7df70
7
+ data.tar.gz: 233f2a30a3135367643959ce43251dfdaf45e3b516a42b210a72953af0bb28c4d4243af3cc75baa72224f1f117a8be0e4bf90252bacd946b361ad5d719b3f418
data/lib/tagalys.rb CHANGED
@@ -19,13 +19,15 @@ module Tagalys
19
19
  yield(configuration)
20
20
  end
21
21
 
22
- def search(query=nil, filters=nil)
22
+ def search(query=nil, filters=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
28
  qf: filters,
29
+ page: page,
30
+ per_page: per_page,
29
31
  request: [
30
32
  "total",
31
33
  "results",
@@ -51,10 +53,12 @@ module Tagalys
51
53
  search_response = request_tagalys('/mpages/' + page_name, request_body)
52
54
  end
53
55
 
54
- def get_page_list
56
+ def get_page_list(page=1, per_page=30)
55
57
  request_body = {
56
58
  identification: identification,
57
- request: ["url_component", "variables"]
59
+ request: ["url_component", "variables"],
60
+ page: page,
61
+ per_page: per_page
58
62
  }.compact
59
63
  search_response = request_tagalys('/mpages/', request_body)
60
64
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tagalys
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
  - Anbazhagan Palani