zendesk_api 3.0.0.rc1 → 3.0.1

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
  SHA256:
3
- metadata.gz: 977b0aeb907c2fffa97d204a72b7ac9a7a3978dc6567b00df98942a0586c65d4
4
- data.tar.gz: 53f40027af8e9e2a97c2f262a4f5571ee628c9b426d6b1775d7f5016e193fe87
3
+ metadata.gz: a1d55a2716fcbc1751d58a23796282e5b5689ac4fe193bdf0e5abc800605c200
4
+ data.tar.gz: fae9a5e9c62eb4ef7cfd61e01af12b5fd3fbcca709271f2bf00552863a22972c
5
5
  SHA512:
6
- metadata.gz: 1964753f364599c18fc2100ec15e7bf6fde8de914f05cda8ce8c2c3e0a768492f2215f974c29e460e61ffe5194173b73d64f2455f3fefb711cf5f9700f3ba708
7
- data.tar.gz: ed5ee66aee830f9b98ea12543829fdd3dbcd47fc2f4a4d4d9d20a023bd9359d8fe4ea0fbf1301879da07fb2560dbaa4af0ee389df91475ac3625966d5142fd29
6
+ metadata.gz: d70b174c454944498d191d962036890c654ae25ed8c6e5a310aaecbc7364b21b203246052b311702fc564ee3be4c00b92f3f6b57ca29367bcb79039bef16cac2
7
+ data.tar.gz: 702de99c18e0f256f4871a8fa31a588de67d7da46402c8a14f77d97cd1c1f90fdbead7481bdcb26d2e5c6e0176c5e2c739c954b6162808b1b6ff38edc6028864
@@ -356,10 +356,15 @@ module ZendeskAPI
356
356
  Helpers.present?(@options["page"]) && !cbp_request?
357
357
  end
358
358
 
359
+ def should_try_cbp?(path_query_link)
360
+ not_supported_endpoints = %w[show_many]
361
+ not_supported_endpoints.none? { |endpoint| path_query_link.end_with?(endpoint) }
362
+ end
363
+
359
364
  def get_resources(path_query_link)
360
365
  if intentional_obp_request?
361
366
  warn "Offset Based Pagination will be deprecated soon"
362
- elsif @next_page.nil?
367
+ elsif @next_page.nil? && should_try_cbp?(path_query_link)
363
368
  @options_per_page_was = @options.delete("per_page")
364
369
  # Default to CBP by using the page param as a map
365
370
  @options.page = { size: (@options_per_page_was || DEFAULT_PAGE_SIZE) }
@@ -1,3 +1,3 @@
1
1
  module ZendeskAPI
2
- VERSION = "3.0.0.rc1"
2
+ VERSION = "3.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zendesk_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.rc1
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Davidovitz
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-06-14 00:00:00.000000000 Z
12
+ date: 2023-07-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -152,9 +152,9 @@ licenses:
152
152
  - Apache-2.0
153
153
  metadata:
154
154
  bug_tracker_uri: https://github.com/zendesk/zendesk_api_client_rb/issues
155
- changelog_uri: https://github.com/zendesk/zendesk_api_client_rb/blob/v3.0.0.rc1/CHANGELOG.md
156
- documentation_uri: https://www.rubydoc.info/gems/zendesk_api/3.0.0.rc1
157
- source_code_uri: https://github.com/zendesk/zendesk_api_client_rb/tree/v3.0.0.rc1
155
+ changelog_uri: https://github.com/zendesk/zendesk_api_client_rb/blob/v3.0.1/CHANGELOG.md
156
+ documentation_uri: https://www.rubydoc.info/gems/zendesk_api/3.0.1
157
+ source_code_uri: https://github.com/zendesk/zendesk_api_client_rb/tree/v3.0.1
158
158
  wiki_uri: https://github.com/zendesk/zendesk_api_client_rb/wiki
159
159
  post_install_message:
160
160
  rdoc_options: []