Java Get URL Application Latest Upgrade Information
This method is used to obtain the latest upgrade strategy for URL applications.
Request Parameter List
| Parameter Name | Type | Description |
|---|---|---|
| request | UrlUpgradeRequest | Set specific interface request parameters, please refer to URL Application Get Upgrade Strategy |
Return Value List
| Return Value Name | Type | Description |
|---|---|---|
| result | UrlUpgradeResponse | Interface return value, specific interface return parameters, please refer to URL 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;
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 {
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 testGetUrlUpgrade() throws Exception {
// Create Client object
Client client = new Client(accessKeyId, accessKeySecret);
UrlUpgradeRequest request = new UrlUpgradeRequest();
request.setUrlKey("uJ47NPeT7qjLa1gL3sVHqw");
request.setVersionCode(1);
request.setAppointVersionCode(0);
request.setDevKey("");
request.setDevModelKey("");
try {
UrlUpgradeResponse info = client.getUrlUpgrade(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("testGetUrlUpgrade end");
}
}