vericite_api 1.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8a43e7c3b9c07e4231c9fd8292b8ff418fdb0992
4
+ data.tar.gz: 6f2daa12241e183f9f453a18227e60d6efea3654
5
+ SHA512:
6
+ metadata.gz: 9fb6e34effff758abc25abc2f84e0362aaf3c9866d6b4dccba8d4a79aec9e4af1d735dd2f15afcd8223a308079f58e27cbd0f59d6ae43cfe9241155b6187e2dd
7
+ data.tar.gz: 1846efd259b5fed6a6b0e7851ba5473c58084c10cddb6b7af279bbcb9a2312c1c108e64d214c3fffaa452538eb30ad2df7132dfcdade64a968112684605babe3
data/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # vericite_api_ruby
2
+ VeriCite API Ruby GEM
@@ -0,0 +1,361 @@
1
+ =begin
2
+ VeriCiteV1
3
+ =end
4
+
5
+ require "uri"
6
+
7
+ module VeriCiteClient
8
+ class DefaultApi
9
+ attr_accessor :api_client
10
+
11
+ def initialize(api_client = ApiClient.default)
12
+ @api_client = api_client
13
+ end
14
+
15
+ #
16
+ # Create/update assignment
17
+ # @param context_id Context ID
18
+ # @param assignment_id ID of assignment
19
+ # @param consumer the consumer
20
+ # @param consumer_secret the consumer secret
21
+ # @param assignment_data
22
+ # @param [Hash] opts the optional parameters
23
+ # @return [Array<ExternalContentUploadInfo>]
24
+ def assignments_context_id_assignment_id_post(context_id, assignment_id, consumer, consumer_secret, assignment_data, opts = {})
25
+ data, status_code, headers = assignments_context_id_assignment_id_post_with_http_info(context_id, assignment_id, consumer, consumer_secret, assignment_data, opts)
26
+ return data, status_code, headers
27
+ end
28
+
29
+ #
30
+ # Create/update assignment
31
+ # @param context_id Context ID
32
+ # @param assignment_id ID of assignment
33
+ # @param consumer the consumer
34
+ # @param consumer_secret the consumer secret
35
+ # @param assignment_data
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(Array<ExternalContentUploadInfo>, Fixnum, Hash)>] Array<ExternalContentUploadInfo> data, response status code and response headers
38
+ def assignments_context_id_assignment_id_post_with_http_info(context_id, assignment_id, consumer, consumer_secret, assignment_data, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: DefaultApi#assignments_context_id_assignment_id_post ..."
41
+ end
42
+
43
+ # verify the required parameter 'context_id' is set
44
+ fail "Missing the required parameter 'context_id' when calling assignments_context_id_assignment_id_post" if context_id.nil?
45
+
46
+ # verify the required parameter 'assignment_id' is set
47
+ fail "Missing the required parameter 'assignment_id' when calling assignments_context_id_assignment_id_post" if assignment_id.nil?
48
+
49
+ # verify the required parameter 'consumer' is set
50
+ fail "Missing the required parameter 'consumer' when calling assignments_context_id_assignment_id_post" if consumer.nil?
51
+
52
+ # verify the required parameter 'consumer_secret' is set
53
+ fail "Missing the required parameter 'consumer_secret' when calling assignments_context_id_assignment_id_post" if consumer_secret.nil?
54
+
55
+ # verify the required parameter 'assignment_data' is set
56
+ fail "Missing the required parameter 'assignment_data' when calling assignments_context_id_assignment_id_post" if assignment_data.nil?
57
+
58
+ # resource path
59
+ local_var_path = "/assignments/{contextID}/{assignmentID}".sub('{format}','json').sub('{' + 'contextID' + '}', context_id.to_s).sub('{' + 'assignmentID' + '}', assignment_id.to_s)
60
+
61
+ # query parameters
62
+ query_params = {}
63
+
64
+ # header parameters
65
+ header_params = {}
66
+
67
+ # HTTP header 'Accept' (if needed)
68
+ _header_accept = []
69
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
70
+
71
+ # HTTP header 'Content-Type'
72
+ _header_content_type = []
73
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
74
+ header_params[:'consumer'] = consumer
75
+ header_params[:'consumerSecret'] = consumer_secret
76
+
77
+ # form parameters
78
+ form_params = {}
79
+
80
+ # http body (model)
81
+ post_body = @api_client.object_to_http_body(assignment_data)
82
+
83
+ auth_names = []
84
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
85
+ :header_params => header_params,
86
+ :query_params => query_params,
87
+ :form_params => form_params,
88
+ :body => post_body,
89
+ :auth_names => auth_names,
90
+ :return_type => 'Array<ExternalContentUploadInfo>')
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug "API called: DefaultApi#assignments_context_id_assignment_id_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
+ end
94
+ return data, status_code, headers
95
+ end
96
+
97
+ #
98
+ # Retrieves scores for the reports
99
+ # @param context_id Context ID
100
+ # @param consumer the consumer
101
+ # @param consumer_secret the consumer secret
102
+ # @param [Hash] opts the optional parameters
103
+ # @option opts [String] :assignment_id ID of assignment
104
+ # @option opts [String] :user_id ID of user
105
+ # @option opts [String] :external_content_id external content id
106
+ # @return [Array<ReportScoreReponse>]
107
+ def reports_scores_context_id_get(context_id, consumer, consumer_secret, opts = {})
108
+ data, status_code, headers = reports_scores_context_id_get_with_http_info(context_id, consumer, consumer_secret, opts)
109
+ return data, status_code, headers
110
+ end
111
+
112
+ #
113
+ # Retrieves scores for the reports
114
+ # @param context_id Context ID
115
+ # @param consumer the consumer
116
+ # @param consumer_secret the consumer secret
117
+ # @param [Hash] opts the optional parameters
118
+ # @option opts [String] :assignment_id ID of assignment
119
+ # @option opts [String] :user_id ID of user
120
+ # @option opts [String] :external_content_id external content id
121
+ # @return [Array<(Array<ReportScoreReponse>, Fixnum, Hash)>] Array<ReportScoreReponse> data, response status code and response headers
122
+ def reports_scores_context_id_get_with_http_info(context_id, consumer, consumer_secret, opts = {})
123
+ if @api_client.config.debugging
124
+ @api_client.config.logger.debug "Calling API: DefaultApi#reports_scores_context_id_get ..."
125
+ end
126
+
127
+ # verify the required parameter 'context_id' is set
128
+ fail "Missing the required parameter 'context_id' when calling reports_scores_context_id_get" if context_id.nil?
129
+
130
+ # verify the required parameter 'consumer' is set
131
+ fail "Missing the required parameter 'consumer' when calling reports_scores_context_id_get" if consumer.nil?
132
+
133
+ # verify the required parameter 'consumer_secret' is set
134
+ fail "Missing the required parameter 'consumer_secret' when calling reports_scores_context_id_get" if consumer_secret.nil?
135
+
136
+ # resource path
137
+ local_var_path = "/reports/scores/{contextID}".sub('{format}','json').sub('{' + 'contextID' + '}', context_id.to_s)
138
+
139
+ # query parameters
140
+ query_params = {}
141
+ query_params[:'assignmentID'] = opts[:'assignment_id'] if opts[:'assignment_id']
142
+ query_params[:'userID'] = opts[:'user_id'] if opts[:'user_id']
143
+ query_params[:'externalContentID'] = opts[:'external_content_id'] if opts[:'external_content_id']
144
+
145
+ # header parameters
146
+ header_params = {}
147
+
148
+ # HTTP header 'Accept' (if needed)
149
+ _header_accept = []
150
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
151
+
152
+ # HTTP header 'Content-Type'
153
+ _header_content_type = []
154
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
155
+ header_params[:'consumer'] = consumer
156
+ header_params[:'consumerSecret'] = consumer_secret
157
+
158
+ # form parameters
159
+ form_params = {}
160
+
161
+ # http body (model)
162
+ post_body = nil
163
+
164
+ auth_names = []
165
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
166
+ :header_params => header_params,
167
+ :query_params => query_params,
168
+ :form_params => form_params,
169
+ :body => post_body,
170
+ :auth_names => auth_names,
171
+ :return_type => 'Array<ReportScoreReponse>')
172
+ if @api_client.config.debugging
173
+ @api_client.config.logger.debug "API called: DefaultApi#reports_scores_context_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
174
+ end
175
+ return data, status_code, headers
176
+ end
177
+
178
+ #
179
+ # Request a file submission
180
+ # @param context_id Context ID
181
+ # @param assignment_id ID of assignment
182
+ # @param user_id ID of user
183
+ # @param consumer the consumer
184
+ # @param consumer_secret the consumer secret
185
+ # @param report_meta_data
186
+ # @param [Hash] opts the optional parameters
187
+ # @return [Array<ExternalContentUploadInfo>]
188
+ def reports_submit_request_context_id_assignment_id_user_id_post(context_id, assignment_id, user_id, consumer, consumer_secret, report_meta_data, opts = {})
189
+ data, status_code, headers = reports_submit_request_context_id_assignment_id_user_id_post_with_http_info(context_id, assignment_id, user_id, consumer, consumer_secret, report_meta_data, opts)
190
+ return data, status_code, headers
191
+ end
192
+
193
+ #
194
+ # Request a file submission
195
+ # @param context_id Context ID
196
+ # @param assignment_id ID of assignment
197
+ # @param user_id ID of user
198
+ # @param consumer the consumer
199
+ # @param consumer_secret the consumer secret
200
+ # @param report_meta_data
201
+ # @param [Hash] opts the optional parameters
202
+ # @return [Array<(Array<ExternalContentUploadInfo>, Fixnum, Hash)>] Array<ExternalContentUploadInfo> data, response status code and response headers
203
+ def reports_submit_request_context_id_assignment_id_user_id_post_with_http_info(context_id, assignment_id, user_id, consumer, consumer_secret, report_meta_data, opts = {})
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug "Calling API: DefaultApi#reports_submit_request_context_id_assignment_id_user_id_post ..."
206
+ end
207
+
208
+ # verify the required parameter 'context_id' is set
209
+ fail "Missing the required parameter 'context_id' when calling reports_submit_request_context_id_assignment_id_user_id_post" if context_id.nil?
210
+
211
+ # verify the required parameter 'assignment_id' is set
212
+ fail "Missing the required parameter 'assignment_id' when calling reports_submit_request_context_id_assignment_id_user_id_post" if assignment_id.nil?
213
+
214
+ # verify the required parameter 'user_id' is set
215
+ fail "Missing the required parameter 'user_id' when calling reports_submit_request_context_id_assignment_id_user_id_post" if user_id.nil?
216
+
217
+ # verify the required parameter 'consumer' is set
218
+ fail "Missing the required parameter 'consumer' when calling reports_submit_request_context_id_assignment_id_user_id_post" if consumer.nil?
219
+
220
+ # verify the required parameter 'consumer_secret' is set
221
+ fail "Missing the required parameter 'consumer_secret' when calling reports_submit_request_context_id_assignment_id_user_id_post" if consumer_secret.nil?
222
+
223
+ # verify the required parameter 'report_meta_data' is set
224
+ fail "Missing the required parameter 'report_meta_data' when calling reports_submit_request_context_id_assignment_id_user_id_post" if report_meta_data.nil?
225
+
226
+ # resource path
227
+ local_var_path = "/reports/submit/request/{contextID}/{assignmentID}/{userID}".sub('{format}','json').sub('{' + 'contextID' + '}', context_id.to_s).sub('{' + 'assignmentID' + '}', assignment_id.to_s).sub('{' + 'userID' + '}', user_id.to_s)
228
+
229
+ # query parameters
230
+ query_params = {}
231
+
232
+ # header parameters
233
+ header_params = {}
234
+
235
+ # HTTP header 'Accept' (if needed)
236
+ _header_accept = []
237
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
238
+
239
+ # HTTP header 'Content-Type'
240
+ _header_content_type = []
241
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
242
+ header_params[:'consumer'] = consumer
243
+ header_params[:'consumerSecret'] = consumer_secret
244
+
245
+ # form parameters
246
+ form_params = {}
247
+
248
+ # http body (model)
249
+ post_body = @api_client.object_to_http_body(report_meta_data)
250
+
251
+ auth_names = []
252
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
253
+ :header_params => header_params,
254
+ :query_params => query_params,
255
+ :form_params => form_params,
256
+ :body => post_body,
257
+ :auth_names => auth_names,
258
+ :return_type => 'Array<ExternalContentUploadInfo>')
259
+ if @api_client.config.debugging
260
+ @api_client.config.logger.debug "API called: DefaultApi#reports_submit_request_context_id_assignment_id_user_id_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
261
+ end
262
+ return data, status_code, headers
263
+ end
264
+
265
+ #
266
+ # Retrieves URLS for the reports
267
+ # @param context_id Context ID
268
+ # @param assignment_id_filter ID of assignment to filter results on
269
+ # @param consumer the consumer
270
+ # @param consumer_secret the consumer secret
271
+ # @param token_user ID of user who will view the report
272
+ # @param token_user_role role of user who will view the report
273
+ # @param [Hash] opts the optional parameters
274
+ # @option opts [String] :user_id_filter ID of user to filter results on
275
+ # @option opts [String] :external_content_id_filter external content id to filter results on
276
+ # @return [Array<ReportURLLinkReponse>]
277
+ def reports_urls_context_id_get(context_id, assignment_id_filter, consumer, consumer_secret, token_user, token_user_role, opts = {})
278
+ data, status_code, headers = reports_urls_context_id_get_with_http_info(context_id, assignment_id_filter, consumer, consumer_secret, token_user, token_user_role, opts)
279
+ return data, status_code, headers
280
+ end
281
+
282
+ #
283
+ # Retrieves URLS for the reports
284
+ # @param context_id Context ID
285
+ # @param assignment_id_filter ID of assignment to filter results on
286
+ # @param consumer the consumer
287
+ # @param consumer_secret the consumer secret
288
+ # @param token_user ID of user who will view the report
289
+ # @param token_user_role role of user who will view the report
290
+ # @param [Hash] opts the optional parameters
291
+ # @option opts [String] :user_id_filter ID of user to filter results on
292
+ # @option opts [String] :external_content_id_filter external content id to filter results on
293
+ # @return [Array<(Array<ReportURLLinkReponse>, Fixnum, Hash)>] Array<ReportURLLinkReponse> data, response status code and response headers
294
+ def reports_urls_context_id_get_with_http_info(context_id, assignment_id_filter, consumer, consumer_secret, token_user, token_user_role, opts = {})
295
+ if @api_client.config.debugging
296
+ @api_client.config.logger.debug "Calling API: DefaultApi#reports_urls_context_id_get ..."
297
+ end
298
+
299
+ # verify the required parameter 'context_id' is set
300
+ fail "Missing the required parameter 'context_id' when calling reports_urls_context_id_get" if context_id.nil?
301
+
302
+ # verify the required parameter 'assignment_id_filter' is set
303
+ fail "Missing the required parameter 'assignment_id_filter' when calling reports_urls_context_id_get" if assignment_id_filter.nil?
304
+
305
+ # verify the required parameter 'consumer' is set
306
+ fail "Missing the required parameter 'consumer' when calling reports_urls_context_id_get" if consumer.nil?
307
+
308
+ # verify the required parameter 'consumer_secret' is set
309
+ fail "Missing the required parameter 'consumer_secret' when calling reports_urls_context_id_get" if consumer_secret.nil?
310
+
311
+ # verify the required parameter 'token_user' is set
312
+ fail "Missing the required parameter 'token_user' when calling reports_urls_context_id_get" if token_user.nil?
313
+
314
+ # verify the required parameter 'token_user_role' is set
315
+ fail "Missing the required parameter 'token_user_role' when calling reports_urls_context_id_get" if token_user_role.nil?
316
+
317
+ # resource path
318
+ local_var_path = "/reports/urls/{contextID}".sub('{format}','json').sub('{' + 'contextID' + '}', context_id.to_s)
319
+
320
+ # query parameters
321
+ query_params = {}
322
+ query_params[:'assignmentIDFilter'] = assignment_id_filter
323
+ query_params[:'tokenUser'] = token_user
324
+ query_params[:'tokenUserRole'] = token_user_role
325
+ query_params[:'userIDFilter'] = opts[:'user_id_filter'] if opts[:'user_id_filter']
326
+ query_params[:'externalContentIDFilter'] = opts[:'external_content_id_filter'] if opts[:'external_content_id_filter']
327
+
328
+ # header parameters
329
+ header_params = {}
330
+
331
+ # HTTP header 'Accept' (if needed)
332
+ _header_accept = []
333
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
334
+
335
+ # HTTP header 'Content-Type'
336
+ _header_content_type = []
337
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
338
+ header_params[:'consumer'] = consumer
339
+ header_params[:'consumerSecret'] = consumer_secret
340
+
341
+ # form parameters
342
+ form_params = {}
343
+
344
+ # http body (model)
345
+ post_body = nil
346
+
347
+ auth_names = []
348
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
349
+ :header_params => header_params,
350
+ :query_params => query_params,
351
+ :form_params => form_params,
352
+ :body => post_body,
353
+ :auth_names => auth_names,
354
+ :return_type => 'Array<ReportURLLinkReponse>')
355
+ if @api_client.config.debugging
356
+ @api_client.config.logger.debug "API called: DefaultApi#reports_urls_context_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
357
+ end
358
+ return data, status_code, headers
359
+ end
360
+ end
361
+ end