api

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2020 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// com.kantv.common.utils.Utils
	InterfaceVerion = "106"

	// com.kantv.ui.config.SignConfig
	AppID = "kantvea2663ea5d5evje09j"

	// com.kantv.common.BuildConfig
	ApplicationID = "com.kantv.common"
	Host1         = "www.suramic.com"
	Host2         = "skyollie.com"

	// com.kantv.common.api.Api
	UserAgent = "suramic app1.0"
)

Consts from KanTV apk.

Variables

This section is empty.

Functions

func SendRequest

func SendRequest(request Request) (map[string]interface{}, error)

SendRequest sends the request to the API server. TODO: should automatically use fallback domains.

Types

type GetCountryRequest

type GetCountryRequest struct {
}

GetCountryRequest store the request object for getting countries.

type GetVideoInfoRequest

type GetVideoInfoRequest struct {
	// contains filtered or unexported fields
}

GetVideoInfoRequest stores the request object for getting video detailed info.

type Login

type Login struct {
	Request
	// contains filtered or unexported fields
}

TODO: considering change the name of this file to account.go

type Request

type Request struct {
	// contains filtered or unexported fields
}

Request should the 'generic' type for all network requests.

func NewGetCountryRequest

func NewGetCountryRequest() Request

NewGetCountryRequest creates the new request object.

func NewGetVideoInfoRequest

func NewGetVideoInfoRequest(tvid string, partid string) Request

NewGetVideoInfoRequest creates the new request object.

type RequestType

type RequestType string

RequestType is expected to be an enum type for HTTP request types.

const (
	POST RequestType = "POST"
	GET  RequestType = "GET"
)

Here defines the possible request types.

type Sign

type Sign struct {
	// contains filtered or unexported fields
}

Sign contains the shared fields for every network request.

func NewSign

func NewSign() Sign

NewSign makes a new sign object. Reference: com.kantv.ui.config.SignConfig.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL