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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c62d6c7422e6e7955a1d2ff49b5129adfae616cd48e20586226f8793361cf5d6
4
- data.tar.gz: 3109b9e79d25dad954ff33ce31be7a6fab7cb78b10ad11865267ff55e52efd11
3
+ metadata.gz: 61e96c9fd212a0861aa5c4a0230707b3c977c74e805d64eb8010bc2d3db7e924
4
+ data.tar.gz: 37aab14279eaea2993fc533d2b62a3635649e3834de7f5fde11d4ce6f5d06d32
5
5
  SHA512:
6
- metadata.gz: e8d52fbd491cae973d46862f1ea33efc844c12eacf6308c7a5eff9d711a65a9a09769f0f19eec2844696789862ce68bb0859a2ae5cb8b04dbc56401593539407
7
- data.tar.gz: 8c989448eab56f161e2a4dfacf6d68f12f7ad4244410e43478374f5cff60942b397312d4b11527e4a6546cc42c8632c93d43575e92db6f6788bd31bec0b451b8
6
+ metadata.gz: 9f3281f80e17c445fbb5751ef211d71e517fb8884dfd108c6a4916c8ed8d034821a00e0d22415b88b4d0c3482c486eb845b29b876de38b303d2f7041c00a0393
7
+ data.tar.gz: 5b954d3485faf8aadac643726e38980c9ec6098ca057acfda0926a3f6b7dea8290bc8997c51f67f8e3cd4efade711d327a84cd2dc0390bfd406a1a72c2d66719
@@ -0,0 +1,3 @@
1
+ {
2
+ "files.trimTrailingWhitespace": true
3
+ }
@@ -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
@@ -1,3 +1,3 @@
1
1
  module QuizApiClient
2
- VERSION = '2.7.0'.freeze
2
+ VERSION = '2.8.0'.freeze
3
3
  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.7.0
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: 2018-10-15 00:00:00.000000000 Z
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