cloudmersive-barcode-api-client 1.2.9

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.
@@ -0,0 +1,9 @@
1
+ # CloudmersiveBarcodeApiClient::ProductMatch
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **ean** | **String** | | [optional]
7
+ **title** | **String** | | [optional]
8
+
9
+
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
@@ -0,0 +1,43 @@
1
+ =begin
2
+ #barcodeapi
3
+
4
+ #Barcode APIs let you generate barcode images, and recognize values from images of barcodes.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'cloudmersive-barcode-api-client/api_client'
15
+ require 'cloudmersive-barcode-api-client/api_error'
16
+ require 'cloudmersive-barcode-api-client/version'
17
+ require 'cloudmersive-barcode-api-client/configuration'
18
+
19
+ # Models
20
+ require 'cloudmersive-barcode-api-client/models/barcode_lookup_response'
21
+ require 'cloudmersive-barcode-api-client/models/product_match'
22
+
23
+ # APIs
24
+ require 'cloudmersive-barcode-api-client/api/barcode_lookup_api'
25
+ require 'cloudmersive-barcode-api-client/api/generate_barcode_api'
26
+
27
+ module CloudmersiveBarcodeApiClient
28
+ class << self
29
+ # Customize default settings for the SDK using block.
30
+ # CloudmersiveBarcodeApiClient.configure do |config|
31
+ # config.username = "xxx"
32
+ # config.password = "xxx"
33
+ # end
34
+ # If no block given, return the default Configuration object.
35
+ def configure
36
+ if block_given?
37
+ yield(Configuration.default)
38
+ else
39
+ Configuration.default
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,78 @@
1
+ =begin
2
+ #barcodeapi
3
+
4
+ #Barcode APIs let you generate barcode images, and recognize values from images of barcodes.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module CloudmersiveBarcodeApiClient
16
+ class BarcodeLookupApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Lookup a barcode value and return product data
24
+ #
25
+ # @param value Barcode value
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [BarcodeLookupResponse]
28
+ def barcode_lookup_ean_lookup(value, opts = {})
29
+ data, _status_code, _headers = barcode_lookup_ean_lookup_with_http_info(value, opts)
30
+ return data
31
+ end
32
+
33
+ # Lookup a barcode value and return product data
34
+ #
35
+ # @param value Barcode value
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(BarcodeLookupResponse, Fixnum, Hash)>] BarcodeLookupResponse data, response status code and response headers
38
+ def barcode_lookup_ean_lookup_with_http_info(value, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: BarcodeLookupApi.barcode_lookup_ean_lookup ..."
41
+ end
42
+ # verify the required parameter 'value' is set
43
+ if @api_client.config.client_side_validation && value.nil?
44
+ fail ArgumentError, "Missing the required parameter 'value' when calling BarcodeLookupApi.barcode_lookup_ean_lookup"
45
+ end
46
+ # resource path
47
+ local_var_path = "/barcode/lookup/ean"
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = @api_client.object_to_http_body(value)
64
+ auth_names = ['Apikey']
65
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => 'BarcodeLookupResponse')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: BarcodeLookupApi#barcode_lookup_ean_lookup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,298 @@
1
+ =begin
2
+ #barcodeapi
3
+
4
+ #Barcode APIs let you generate barcode images, and recognize values from images of barcodes.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module CloudmersiveBarcodeApiClient
16
+ class GenerateBarcodeApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Validates and generate a EAN-13 barcode as a PNG file, a type of 1D barcode
24
+ #
25
+ # @param value Barcode value to generate from
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [File]
28
+ def generate_barcode_ean13(value, opts = {})
29
+ data, _status_code, _headers = generate_barcode_ean13_with_http_info(value, opts)
30
+ return data
31
+ end
32
+
33
+ # Validates and generate a EAN-13 barcode as a PNG file, a type of 1D barcode
34
+ #
35
+ # @param value Barcode value to generate from
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
38
+ def generate_barcode_ean13_with_http_info(value, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: GenerateBarcodeApi.generate_barcode_ean13 ..."
41
+ end
42
+ # verify the required parameter 'value' is set
43
+ if @api_client.config.client_side_validation && value.nil?
44
+ fail ArgumentError, "Missing the required parameter 'value' when calling GenerateBarcodeApi.generate_barcode_ean13"
45
+ end
46
+ # resource path
47
+ local_var_path = "/barcode/generate/ean-13"
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['image/png'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = @api_client.object_to_http_body(value)
64
+ auth_names = ['Apikey']
65
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => 'File')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: GenerateBarcodeApi#generate_barcode_ean13\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+
78
+ # Validates and generate a EAN-8 barcode as a PNG file, a type of 1D barcode
79
+ #
80
+ # @param value Barcode value to generate from
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [File]
83
+ def generate_barcode_ean8(value, opts = {})
84
+ data, _status_code, _headers = generate_barcode_ean8_with_http_info(value, opts)
85
+ return data
86
+ end
87
+
88
+ # Validates and generate a EAN-8 barcode as a PNG file, a type of 1D barcode
89
+ #
90
+ # @param value Barcode value to generate from
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
93
+ def generate_barcode_ean8_with_http_info(value, opts = {})
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug "Calling API: GenerateBarcodeApi.generate_barcode_ean8 ..."
96
+ end
97
+ # verify the required parameter 'value' is set
98
+ if @api_client.config.client_side_validation && value.nil?
99
+ fail ArgumentError, "Missing the required parameter 'value' when calling GenerateBarcodeApi.generate_barcode_ean8"
100
+ end
101
+ # resource path
102
+ local_var_path = "/barcode/generate/ean-8"
103
+
104
+ # query parameters
105
+ query_params = {}
106
+
107
+ # header parameters
108
+ header_params = {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = @api_client.select_header_accept(['image/png'])
111
+ # HTTP header 'Content-Type'
112
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
113
+
114
+ # form parameters
115
+ form_params = {}
116
+
117
+ # http body (model)
118
+ post_body = @api_client.object_to_http_body(value)
119
+ auth_names = ['Apikey']
120
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
121
+ :header_params => header_params,
122
+ :query_params => query_params,
123
+ :form_params => form_params,
124
+ :body => post_body,
125
+ :auth_names => auth_names,
126
+ :return_type => 'File')
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug "API called: GenerateBarcodeApi#generate_barcode_ean8\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
129
+ end
130
+ return data, status_code, headers
131
+ end
132
+
133
+ # Generate a QR code barcode as a PNG file, a type of 2D barcode which can encode free-form text information
134
+ #
135
+ # @param value QR code text to convert into the QR code barcode
136
+ # @param [Hash] opts the optional parameters
137
+ # @return [File]
138
+ def generate_barcode_qr_code(value, opts = {})
139
+ data, _status_code, _headers = generate_barcode_qr_code_with_http_info(value, opts)
140
+ return data
141
+ end
142
+
143
+ # Generate a QR code barcode as a PNG file, a type of 2D barcode which can encode free-form text information
144
+ #
145
+ # @param value QR code text to convert into the QR code barcode
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
148
+ def generate_barcode_qr_code_with_http_info(value, opts = {})
149
+ if @api_client.config.debugging
150
+ @api_client.config.logger.debug "Calling API: GenerateBarcodeApi.generate_barcode_qr_code ..."
151
+ end
152
+ # verify the required parameter 'value' is set
153
+ if @api_client.config.client_side_validation && value.nil?
154
+ fail ArgumentError, "Missing the required parameter 'value' when calling GenerateBarcodeApi.generate_barcode_qr_code"
155
+ end
156
+ # resource path
157
+ local_var_path = "/barcode/generate/qrcode"
158
+
159
+ # query parameters
160
+ query_params = {}
161
+
162
+ # header parameters
163
+ header_params = {}
164
+ # HTTP header 'Accept' (if needed)
165
+ header_params['Accept'] = @api_client.select_header_accept(['image/png'])
166
+ # HTTP header 'Content-Type'
167
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
168
+
169
+ # form parameters
170
+ form_params = {}
171
+
172
+ # http body (model)
173
+ post_body = @api_client.object_to_http_body(value)
174
+ auth_names = ['Apikey']
175
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
176
+ :header_params => header_params,
177
+ :query_params => query_params,
178
+ :form_params => form_params,
179
+ :body => post_body,
180
+ :auth_names => auth_names,
181
+ :return_type => 'File')
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug "API called: GenerateBarcodeApi#generate_barcode_qr_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
184
+ end
185
+ return data, status_code, headers
186
+ end
187
+
188
+ # Validate and generate a UPC-A barcode as a PNG file, a type of 1D barcode
189
+ #
190
+ # @param value UPC-A barcode value to generate from
191
+ # @param [Hash] opts the optional parameters
192
+ # @return [File]
193
+ def generate_barcode_upca(value, opts = {})
194
+ data, _status_code, _headers = generate_barcode_upca_with_http_info(value, opts)
195
+ return data
196
+ end
197
+
198
+ # Validate and generate a UPC-A barcode as a PNG file, a type of 1D barcode
199
+ #
200
+ # @param value UPC-A barcode value to generate from
201
+ # @param [Hash] opts the optional parameters
202
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
203
+ def generate_barcode_upca_with_http_info(value, opts = {})
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug "Calling API: GenerateBarcodeApi.generate_barcode_upca ..."
206
+ end
207
+ # verify the required parameter 'value' is set
208
+ if @api_client.config.client_side_validation && value.nil?
209
+ fail ArgumentError, "Missing the required parameter 'value' when calling GenerateBarcodeApi.generate_barcode_upca"
210
+ end
211
+ # resource path
212
+ local_var_path = "/barcode/generate/upc-a"
213
+
214
+ # query parameters
215
+ query_params = {}
216
+
217
+ # header parameters
218
+ header_params = {}
219
+ # HTTP header 'Accept' (if needed)
220
+ header_params['Accept'] = @api_client.select_header_accept(['image/png'])
221
+ # HTTP header 'Content-Type'
222
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
223
+
224
+ # form parameters
225
+ form_params = {}
226
+
227
+ # http body (model)
228
+ post_body = @api_client.object_to_http_body(value)
229
+ auth_names = ['Apikey']
230
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
231
+ :header_params => header_params,
232
+ :query_params => query_params,
233
+ :form_params => form_params,
234
+ :body => post_body,
235
+ :auth_names => auth_names,
236
+ :return_type => 'File')
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug "API called: GenerateBarcodeApi#generate_barcode_upca\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
239
+ end
240
+ return data, status_code, headers
241
+ end
242
+
243
+ # Validates and generate a UPC-E barcode as a PNG file, a type of 1D barcode
244
+ #
245
+ # @param value UPC-E barcode value to generate from
246
+ # @param [Hash] opts the optional parameters
247
+ # @return [File]
248
+ def generate_barcode_upce(value, opts = {})
249
+ data, _status_code, _headers = generate_barcode_upce_with_http_info(value, opts)
250
+ return data
251
+ end
252
+
253
+ # Validates and generate a UPC-E barcode as a PNG file, a type of 1D barcode
254
+ #
255
+ # @param value UPC-E barcode value to generate from
256
+ # @param [Hash] opts the optional parameters
257
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
258
+ def generate_barcode_upce_with_http_info(value, opts = {})
259
+ if @api_client.config.debugging
260
+ @api_client.config.logger.debug "Calling API: GenerateBarcodeApi.generate_barcode_upce ..."
261
+ end
262
+ # verify the required parameter 'value' is set
263
+ if @api_client.config.client_side_validation && value.nil?
264
+ fail ArgumentError, "Missing the required parameter 'value' when calling GenerateBarcodeApi.generate_barcode_upce"
265
+ end
266
+ # resource path
267
+ local_var_path = "/barcode/generate/upc-e"
268
+
269
+ # query parameters
270
+ query_params = {}
271
+
272
+ # header parameters
273
+ header_params = {}
274
+ # HTTP header 'Accept' (if needed)
275
+ header_params['Accept'] = @api_client.select_header_accept(['image/png'])
276
+ # HTTP header 'Content-Type'
277
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
278
+
279
+ # form parameters
280
+ form_params = {}
281
+
282
+ # http body (model)
283
+ post_body = @api_client.object_to_http_body(value)
284
+ auth_names = ['Apikey']
285
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
286
+ :header_params => header_params,
287
+ :query_params => query_params,
288
+ :form_params => form_params,
289
+ :body => post_body,
290
+ :auth_names => auth_names,
291
+ :return_type => 'File')
292
+ if @api_client.config.debugging
293
+ @api_client.config.logger.debug "API called: GenerateBarcodeApi#generate_barcode_upce\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
294
+ end
295
+ return data, status_code, headers
296
+ end
297
+ end
298
+ end