quiz_api_client 4.8.0 → 4.8.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7106b8bf0d1cc91d986ed54ea8b81d597813b2885d62dbde152aa4a6c55e0f42
|
4
|
+
data.tar.gz: 2bcb83542296f0f8aaf4e861e726bc7e82162b79207c8be6aaf16e0be70e95fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16fb4f39928faeb5b0d5ead2511bee4c1720b6d29aecd898afe1d6406196b8aa28c3e8375d022c279318eee7bca38ee6b20dbda5ce89153bda46185187023502
|
7
|
+
data.tar.gz: 3387a506254fd75537e1925419f0cc4a793accb5946a281e7539f5cf0dd5af5ded63c1ad03c7579c71abbdf7508f7e070974598e6db161b2d30f20025136b5f1
|
@@ -23,7 +23,8 @@ module QuizApiClient::Services
|
|
23
23
|
def list(params:, token: nil, all: false)
|
24
24
|
raise 'Quiz Id Required' unless params && params[:id]
|
25
25
|
|
26
|
-
|
26
|
+
pagination_params = { page: params.delete(:page), per_page: params.delete(:per_page) }
|
27
|
+
get_from_quiz_api(params: params, token: token, pagination_params: pagination_params, all: all)
|
27
28
|
end
|
28
29
|
|
29
30
|
def destroy(params:, token: nil)
|
@@ -55,9 +56,10 @@ module QuizApiClient::Services
|
|
55
56
|
)
|
56
57
|
end
|
57
58
|
|
58
|
-
def get_from_quiz_api(params:, token:, all:)
|
59
|
+
def get_from_quiz_api(params:, token:, pagination_params:, all:)
|
59
60
|
client(token: token).get(
|
60
61
|
"/api/quizzes/#{params[:id]}/quiz_entries",
|
62
|
+
query: pagination_params,
|
61
63
|
all: all
|
62
64
|
)
|
63
65
|
end
|
@@ -6,7 +6,7 @@ describe QuizApiClient::Services::QuizEntriesService do
|
|
6
6
|
describe '#list' do
|
7
7
|
let(:params) { { id: 1 } }
|
8
8
|
let(:stubbed_response) { { 'id' => 1, 'entry' => { 'id' => 1 } } }
|
9
|
-
let(:expected_url) { "https://#{host}/api/quizzes/#{params[:id]}/quiz_entries" }
|
9
|
+
let(:expected_url) { "https://#{host}/api/quizzes/#{params[:id]}/quiz_entries?page=&per_page=" }
|
10
10
|
let(:status_code) { 200 }
|
11
11
|
|
12
12
|
before do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quiz_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.8.
|
4
|
+
version: 4.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Slaughter
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: exe
|
17
17
|
cert_chain: []
|
18
|
-
date: 2023-
|
18
|
+
date: 2023-03-06 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: httparty
|