Skip to content

Commit

Permalink
Versions of sdk updated (#105)
Browse files Browse the repository at this point in the history
Teplates fixed
  • Loading branch information
ivankamkin committed May 28, 2024
1 parent 796c5cf commit cde3cd4
Show file tree
Hide file tree
Showing 22 changed files with 57 additions and 50 deletions.
19 changes: 11 additions & 8 deletions codegen/Templates/android/apiException.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import androidx.core.content.ContextCompat
import com.aspose.barcode.cloud.ApiClient
import com.aspose.barcode.cloud.ApiException
import com.aspose.barcode.cloud.api.BarcodeApi
import com.aspose.barcode.cloud.model.CodeLocation
import com.aspose.barcode.cloud.model.EncodeBarcodeType
import com.aspose.barcode.cloud.model.PresetType
import com.aspose.barcode.cloud.requests.GetBarcodeGenerateRequest
import com.aspose.barcode.cloud.requests.PostBarcodeRecognizeFromUrlOrContentRequest
import com.aspose.barcode.cloud.requests.ScanBarcodeRequest
import com.google.android.material.snackbar.Snackbar
import java.io.File
import java.io.FileOutputStream
Expand Down Expand Up @@ -172,8 +172,8 @@ class MainActivity : AppCompatActivity() {
if (resultCode == RESULT_OK) {
val bmpImage = data?.extras?.get("data") as Bitmap
recognizeBarcode(bmpImage)
}
}
}

else -> {
showErrorMessage("No file selected")
Expand All @@ -195,12 +195,11 @@ class MainActivity : AppCompatActivity() {
smallerBmp.compress(Bitmap.CompressFormat.PNG, 100, output)
}

val recognizeRequest = PostBarcodeRecognizeFromUrlOrContentRequest()
recognizeRequest.preset = PresetType.HIGHPERFORMANCE.value
recognizeRequest.image = tmpFile
val apiRequest = ScanBarcodeRequest(tmpFile);

Thread {
try {
val recognized = api.postBarcodeRecognizeFromUrlOrContent(recognizeRequest)
val recognized = api.scanBarcode(apiRequest)
runOnUiThread {
stopRecognizeAnimation()
Expand Down Expand Up @@ -253,6 +252,7 @@ class MainActivity : AppCompatActivity() {
barcodeRequest.imageHeight = barcodeImgView.measuredHeight.toDouble()
barcodeRequest.imageWidth = barcodeImgView.measuredWidth.toDouble()
barcodeRequest.format = "png"
Thread {
try {
val generated: File? = api.getBarcodeGenerate(barcodeRequest)
Expand Down Expand Up @@ -293,7 +293,10 @@ class MainActivity : AppCompatActivity() {
getContentIntent.type = "image/*"
getContentIntent.addCategory(Intent.CATEGORY_OPENABLE)
try {
startActivityForResult(Intent.createChooser(getContentIntent, "Select an Image to Recognize"), ACTION_GET_CONTENT_CALLBACK_CODE)
startActivityForResult(
Intent.createChooser(getContentIntent, "Select an Image to Recognize"),
ACTION_GET_CONTENT_CALLBACK_CODE
)
} catch (ex: java.lang.Exception) {
showErrorMessage("Unable to start file selector")
}
Expand Down
4 changes: 2 additions & 2 deletions codegen/Templates/android/build.mustache
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.2.0' apply false
id 'com.android.library' version '8.2.0' apply false
id 'com.android.application' version '8.3.2' apply false
id 'com.android.library' version '8.3.2' apply false
id 'org.jetbrains.kotlin.android' version '1.7.21' apply false
}
ext.kotlin_version = '1.7.21'
27 changes: 15 additions & 12 deletions codegen/Templates/nodejs/package.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@
"dist"
],
"engines": {
"node": ">=12"
"node": ">=16"
},
"scripts": {
"test": "tsdx test",
"cover": "tsdx test --collect-coverage",
"test": "dts test",
"cover": "dts test --coverage",
"lint": "tsc --strict",
"format": "tsdx lint src test --fix",
"prepare": "tsdx build --target=node",
"format": "dts lint src test --fix",
"prepare": "dts build --target node",
"check-updates": "ncu -u --enginesNode"
},
"prettier": {
Expand All @@ -147,13 +147,16 @@
"tabWidth": 4
},
"devDependencies": {
"@types/uuid": "^8.3.4",
"npm-check-updates": "^12.5.12",
"ts-jest": "^26.5.6",
"tsdx": "^0.14.1",
"tslib": "^2.5.0",
"typescript": "^4.9.5",
"uuid": "^8.3.2"
"@types/uuid": "^9.0.8",
"dts-cli": "^2.0.5",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"npm-check-updates": "^16.14.20",
"prettier": "^3.2.5",
"ts-jest": "^29.1.3",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"uuid": "^9.0.1"
},
"bugs": {
"url": "https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-node/issues"
Expand Down
2 changes: 1 addition & 1 deletion codegen/Templates/python/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This repository contains Aspose.BarCode Cloud SDK for Python source code. This S

Supported Python versions:

- Python 3.5+
- Python 3.6+

To use these SDKs, you will need Client Id and Client Secret which can be looked up at [Aspose Cloud Dashboard](https://dashboard.aspose.cloud/applications) (free registration in Aspose Cloud is required for this).

Expand Down
2 changes: 1 addition & 1 deletion codegen/Templates/python/api_client.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class ApiClient(object):
if data is None:
return None

if type(klass) == str:
if isinstance(klass, str):
if klass.startswith("list["):
sub_kls = re.match(r"list\[(.*)]", klass).group(1)
return [self.__deserialize(sub_data, sub_kls)
Expand Down
1 change: 0 additions & 1 deletion codegen/Templates/python/setup.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ setup(
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
Expand Down
14 changes: 8 additions & 6 deletions codegen/Templates/python/tox.mustache
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
; Use tox version 3.x
; Run particular env:
; python -m tox -e 3.6
[tox]
envlist = 2.7, 3.5, 3.12
envlist = 2.7, 3.6, 3.12

[testenv]
passenv = TEST_CONFIGURATION_ACCESS_TOKEN
skip_install=True
whitelist_externals = docker
echo
commands_pre=
docker run --name test-py{envname} -ti -d -v {toxinidir}:/submodules/python -e TEST_CONFIGURATION_ACCESS_TOKEN python:{envname}-buster
docker exec --workdir /submodules/python test-py{envname} python -m pip install -r requirements.txt -r lint-requirements.txt -r test-requirements.txt
docker run --name test-py{envname} -ti -d -v {toxinidir}:/src -e TEST_CONFIGURATION_ACCESS_TOKEN python:{envname}
docker exec --workdir /src test-py{envname} python -m pip install -r requirements.txt -r lint-requirements.txt -r test-requirements.txt
commands=
docker exec -t --workdir /src test-py{envname} python -m pytest --cov=aspose_barcode_cloud tests/
docker exec -t --workdir /src test-py{envname} python -Werror example.py
commands_post=
docker stop test-py{envname}
docker rm test-py{envname}
commands=
docker exec -t --workdir /submodules/python test-py{envname} python -Werror -m pytest --cov=aspose_barcode_cloud tests/
docker exec -t --workdir /submodules/python test-py{envname} python -Werror example.py
2 changes: 1 addition & 1 deletion codegen/config-android.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"androidSdkVersion": "33",
"apiPackage": "com.aspose.barcode.cloud.demo_app",
"artifactId": "Android Application for Barcode Processing in the Cloud via REST API",
"artifactVersion": "24.4.0",
"artifactVersion": "24.5.0",
"groupId": "com.aspose",
"invokerPackage": "com.aspose.barcode.cloud.demo_app",
"modelPackage": "com.aspose.barcode.cloud.demo_app.model"
Expand Down
8 changes: 4 additions & 4 deletions codegen/config-dart.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"allowUnicodeIdentifiers": true,
"browserClient": false,
"pubDescription": "This SDK allows you to work with Aspose.BarCode for Cloud REST APIs in your Dart or Flutter applications quickly and easily",
"pubName": "aspose_barcode_cloud",
"pubVersion": "1.24.4",
"useEnumExtension": true,
"allowUnicodeIdentifiers": true
}
"pubVersion": "1.24.5",
"useEnumExtension": true
}
2 changes: 1 addition & 1 deletion codegen/config-go.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"packageName": "barcode",
"packageVersion": "1.2404.0"
"packageVersion": "1.2405.0"
}
2 changes: 1 addition & 1 deletion codegen/config-java.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"artifactDescription": "Aspose.BarCode Cloud SDK for Java",
"artifactId": "aspose-barcode-cloud",
"artifactUrl": "https://www.aspose.cloud",
"artifactVersion": "24.4.0",
"artifactVersion": "24.5.0",
"developerEmail": "[email protected]",
"developerName": "Denis Averin",
"developerOrganization": "Aspose",
Expand Down
2 changes: 1 addition & 1 deletion codegen/config-php.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"artifactVersion": "24.4.0",
"artifactVersion": "24.5.0",
"invokerPackage": "Aspose\\BarCode"
}
2 changes: 1 addition & 1 deletion codegen/config-python.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packageName": "aspose_barcode_cloud",
"packageUrl": "https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-python",
"packageVersion": "24.4.0",
"packageVersion": "24.5.0",
"projectName": "aspose-barcode-cloud"
}
4 changes: 2 additions & 2 deletions codegen/config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"artifactVersion": "23.7.0",
"npmName": "aspose-barcode-cloud-node",
"npmVersion": "24.4.0",
"npmVersion": "24.5.0",
"packageName": "Aspose.BarCode.Cloud.Sdk",
"packageVersion": "24.4.0",
"packageVersion": "24.5.0",
"supportsES6": true
}
2 changes: 1 addition & 1 deletion submodules/android
2 changes: 1 addition & 1 deletion submodules/dart
2 changes: 1 addition & 1 deletion submodules/go
Submodule go updated 5 files
+2 −2 README.md
+1 −1 barcode/client.go
+1 −1 barcode/configuration.go
+1 −4 go.mod
+4 −1,545 go.sum
2 changes: 1 addition & 1 deletion submodules/java
2 changes: 1 addition & 1 deletion submodules/node
Submodule node updated 4 files
+1 −1 README.md
+2 −2 package-lock.json
+1 −1 package.json
+4 −4 src/api.ts
2 changes: 1 addition & 1 deletion submodules/php

0 comments on commit cde3cd4

Please sign in to comment.