quiz_api_client 2.7.0 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.vscode/settings.json +3 -0
- data/lib/quiz_api_client/services/quiz_entries_service.rb +12 -0
- data/lib/quiz_api_client/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61e96c9fd212a0861aa5c4a0230707b3c977c74e805d64eb8010bc2d3db7e924
|
4
|
+
data.tar.gz: 37aab14279eaea2993fc533d2b62a3635649e3834de7f5fde11d4ce6f5d06d32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f3281f80e17c445fbb5751ef211d71e517fb8884dfd108c6a4916c8ed8d034821a00e0d22415b88b4d0c3482c486eb845b29b876de38b303d2f7041c00a0393
|
7
|
+
data.tar.gz: 5b954d3485faf8aadac643726e38980c9ec6098ca057acfda0926a3f6b7dea8290bc8997c51f67f8e3cd4efade711d327a84cd2dc0390bfd406a1a72c2d66719
|
@@ -10,6 +10,12 @@ module QuizApiClient::Services
|
|
10
10
|
get_from_quiz_api(params: params, token: token, all: all)
|
11
11
|
end
|
12
12
|
|
13
|
+
def destroy(params:, token: nil)
|
14
|
+
raise 'Quiz Id Required' unless params && params[:quiz_id]
|
15
|
+
raise 'Item Id Required' unless params && params[:id]
|
16
|
+
delete_from_quiz_api(params, token)
|
17
|
+
end
|
18
|
+
|
13
19
|
private
|
14
20
|
|
15
21
|
def post_to_quiz_api(params:, token:)
|
@@ -25,5 +31,11 @@ module QuizApiClient::Services
|
|
25
31
|
all: all
|
26
32
|
)
|
27
33
|
end
|
34
|
+
|
35
|
+
def delete_from_quiz_api(params, token)
|
36
|
+
client(token: token).delete(
|
37
|
+
"/api/quizzes/#{params[:quiz_id]}/quiz_entries/#{params[:id]}"
|
38
|
+
)
|
39
|
+
end
|
28
40
|
end
|
29
41
|
end
|
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: 2.
|
4
|
+
version: 2.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Wang
|
@@ -19,7 +19,7 @@ authors:
|
|
19
19
|
autorequire:
|
20
20
|
bindir: exe
|
21
21
|
cert_chain: []
|
22
|
-
date:
|
22
|
+
date: 2019-01-29 00:00:00.000000000 Z
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|
25
25
|
name: httparty
|
@@ -204,6 +204,7 @@ files:
|
|
204
204
|
- ".gitignore"
|
205
205
|
- ".rspec"
|
206
206
|
- ".rubocop.yml"
|
207
|
+
- ".vscode/settings.json"
|
207
208
|
- Dockerfile
|
208
209
|
- Dockerfile.contracts
|
209
210
|
- Gemfile
|