Java Get File Application Latest Upgrade Information
This method is used to obtain the latest upgrade strategy for file applications.
Request Parameter List
| Parameter Name | Type | Description |
|---|---|---|
| request | FileUpgradeRequest | Set specific interface request parameters, please refer to File Application Get Upgrade Strategy |
Return Value List
| Return Value Name | Type | Description |
|---|---|---|
| result | FileUpgradeResponse | Interface return value, specific interface return parameters, please refer to File Application Get Upgrade Strategy |
Unit Test Code Location
Example Code
You can use the following code to obtain the latest upgrade strategy.
java
package com.toolsetlink.upgradelink.api; // Package name must match the class under test
import com.toolsetlink.upgradelink.api.models.FileUpgradeRequest;
import com.toolsetlink.upgradelink.api.models.FileUpgradeResponse;
import com.toolsetlink.upgradelink.api.models.UrlUpgradeRequest;
import com.toolsetlink.upgradelink.api.models.UrlUpgradeResponse;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class ClientTest { // Class name = Tested class name + Test
private final String accessKey = "mui2W50H1j-OC4xD6PgQag";
private final String accessSecret = "PEbdHFGC0uO_Pch7XWBQTMsFRxKPQAM2565eP8LJ3gc";
private Client client;
@BeforeEach
void setUp() throws Exception {
Config config = new Config();
config.setAccessKey(accessKey);
config.setAccessSecret(accessSecret);
client = new Client(config);
}
@Test
public void testGetFileUpgrade() throws Exception {
// Create Client object
Client client = new Client(accessKeyId, accessKeySecret);
FileUpgradeRequest request = new FileUpgradeRequest();
request.setFileKey("LOYlLXNy7wV3ySuh0XgtSg");
request.setVersionCode(1);
request.setAppointVersionCode(0);
request.setDevKey("");
request.setDevModelKey("");
try {
FileUpgradeResponse info = client.FileUpgrade(request);
System.out.println(info.code);
System.out.println(info.msg);
System.out.println(info.data);
} catch (Exception e) {
System.out.println("Exception e1:" + e);
}
System.out.println("testGetFileUpgrade end");
}
}