Skip to content

Go Get URL Application Latest Upgrade Information

This method is used to obtain the latest upgrade strategy for URL applications.

Method Definition

go
func (client *Client) UrlUpgrade(request *UrlUpgradeRequest) (_result *UrlUpgradeResponse, _err error)

Request Parameter List

Parameter NameTypeDescription
request*UrlUpgradeRequestSet specific interface request parameters, please refer to URL Application Get Upgrade Strategy

Return Value List

Return Value NameTypeDescription
result*UrlUpgradeResponseInterface return value, valid when err is nil, specific interface return parameters, please refer to URL Application Get Upgrade Strategy
errerrorRequest status, when the request fails, err is not nil

Example Code Location

Example Code

You can use the following code to obtain the latest upgrade strategy.

go
package test

import (
	"fmt"
	"testing"

	"github.com/toolsetlink/upgradelink-api-go/client"
)

// Get URL application upgrade content
func TestGetUrlUpgrade(t *testing.T) {

	var config = client.Config{}
	config.SetAccessKey("mui2W50H1j-OC4xD6PgQag")
	config.SetAccessSecret("PEbdHFGC0uO_Pch7XWBQTMsFRxKPQAM2565eP8LJ3gc")

	Client, err := client.NewClient(&config)
	if err != nil {
		return
	}

	urlKey := "uJ47NPeT7qjLa1gL3sVHqw"
	versionCode := 1
	appointVersionCode := 0
	devModelKey := ""
	devKey := ""

	// Interface call
	request := &client.UrlUpgradeRequest{
		UrlKey:             &urlKey,
		VersionCode:        &versionCode,
		AppointVersionCode: &appointVersionCode,
		DevModelKey:        &devModelKey,
		DevKey:             &devKey,
	}
	Info, err := Client.UrlUpgrade(request)
	if err != nil {
		fmt.Println("err: ", err)
	} else {
		fmt.Println("info: ", Info)
	}

}

toolsetlink@163.com