### GET /update/apk/{fileName:.+} Source: https://github.com/xuexiangjys/xupdateservice/blob/master/README.md Downloads the latest version of the APK file. ```APIDOC ## GET /update/apk/{fileName:.+} ### Description Downloads an APK file by its filename. ### Method GET ### Endpoint /update/apk/{fileName:.+} ### Parameters #### Path Parameters - **fileName** (string) - Required - The name of the file to download ### Response #### Success Response (200) - **Body** (file) - File stream ``` -------------------------------- ### Run Packaged JAR Source: https://github.com/xuexiangjys/xupdateservice/blob/master/README.md Execute the packaged application using the Java runtime. ```bash java -jar build/libs/xxxxx.jar ``` -------------------------------- ### Clone XUpdateService Repository Source: https://github.com/xuexiangjys/xupdateservice/blob/master/README.md Use this command to clone the project source code to your local machine. ```bash git clone https://github.com/xuexiangjys/XUpdateService.git ``` -------------------------------- ### Add Version Information API Source: https://github.com/xuexiangjys/xupdateservice/blob/master/README.md Request parameters and response format for adding version information with an associated file. ```text file=[文件] appVersionInfo= { "updateStatus":2, "modifyContent":"1、优化api接口。 2、添加使用demo演示。 3、新增自定义更新服务API接口。 4、优化更新提示界面。", "appKey":"test", "versionName":"1.0.3", "versionCode":4 } ``` ```json { "Code":0, "Msg":"", "Data":true } ``` -------------------------------- ### POST /update/addVersionInfo Source: https://github.com/xuexiangjys/xupdateservice/blob/master/README.md Registers new APK version information in the system. ```APIDOC ## POST /update/addVersionInfo ### Description Registers the version information for an APK. ### Method POST ### Endpoint /update/addVersionInfo ### Request Body - **updateStatus** (integer) - Required - **modifyContent** (string) - Required - **appKey** (string) - Required - **versionName** (string) - Required - **versionCode** (integer) - Required ### Response #### Success Response (200) - **Code** (integer) - Status code - **Msg** (string) - Message - **Data** (object) - Registered version details ``` -------------------------------- ### POST /update/addAppVersion Source: https://github.com/xuexiangjys/xupdateservice/blob/master/README.md Adds a new application version including the APK file and metadata. ```APIDOC ## POST /update/addAppVersion ### Description Adds application version information along with the APK file. ### Method POST ### Endpoint /update/addAppVersion ### Parameters - **file** (file) - Required - The APK file - **appVersionInfo** (json) - Required - Version metadata ### Response #### Success Response (200) - **Code** (integer) - Status code - **Msg** (string) - Message - **Data** (boolean) - Success status ``` -------------------------------- ### Upload APK API Source: https://github.com/xuexiangjys/xupdateservice/blob/master/README.md Request parameters and response format for uploading an APK file. ```text file=[文件] versionId=12 ``` ```json { "Code":0, "Msg":"", "Data":true } ``` -------------------------------- ### POST /update/checkVersion Source: https://github.com/xuexiangjys/xupdateservice/blob/master/README.md Checks if a newer version of the application is available. ```APIDOC ## POST /update/checkVersion ### Description Checks for application updates based on the current version code and app key. ### Method POST ### Endpoint /update/checkVersion ### Parameters - **versionCode** (integer) - Required - **appKey** (string) - Required ### Response #### Success Response (200) - **Code** (integer) - Status code - **Msg** (string) - Message - **Data** (object) - Update information ``` -------------------------------- ### Check Version API Source: https://github.com/xuexiangjys/xupdateservice/blob/master/README.md Request parameters and response format for checking for application updates. ```text versionCode=1, appKey=com.xuexiang.xupdatedemo ``` ```json { "Msg":"", "Code":0, "Data":{ "apkMd5":"E4B79A36EFB9F17DF7E3BB161F9BCFD8", "versionId":11, "updateStatus":1, "downloadUrl":"xupdate_demo_1.0.2.apk", "modifyContent":"1、优化api接口。 2、添加使用demo演示。 3、新增自定义更新服务API接口。 4、优化更新提示界面。", "appKey":"com.xuexiang.xupdatedemo", "apkSize":1649, "uploadTime":"2018-07-30 09:47:25", "versionName":"1.23.4", "versionCode":34 } } ``` -------------------------------- ### Register APK Version Info API Source: https://github.com/xuexiangjys/xupdateservice/blob/master/README.md Request and response format for registering new APK version information. ```json { "updateStatus":2, "modifyContent":"1、优化api接口。 2、添加使用demo演示。 3、新增自定义更新服务API接口。 4、优化更新提示界面。", "appKey":"test", "versionName":"1.0.3", "versionCode":4 } ``` ```json { "Msg":"", "Code":0, "Data":{ "versionId":12, "updateStatus":2, "modifyContent":"1、优化api接口。 2、添加使用demo演示。 3、新增自定义更新服务API接口。 4、优化更新提示界面。", "appKey":"test", "versionName":"1.0.3", "versionCode":4 } } ``` -------------------------------- ### POST /update/uploadApk Source: https://github.com/xuexiangjys/xupdateservice/blob/master/README.md Uploads an APK file associated with a specific version ID. ```APIDOC ## POST /update/uploadApk ### Description Uploads an APK file using multipart/form-data. ### Method POST ### Endpoint /update/uploadApk ### Parameters - **file** (file) - Required - The APK file - **versionId** (integer) - Required - The ID of the version ### Response #### Success Response (200) - **Code** (integer) - Status code - **Msg** (string) - Message - **Data** (boolean) - Success status ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.