appetize

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppItem

type AppItem struct {
	PublicKey   string    `json:publicKey`
	PrivateKey  string    `json:privateKey`
	Created     time.Time `json:created`
	Updated     time.Time `json:updated`
	Platform    string    `json:platform`
	VersionCode int       `json:versionCode`
	Email       string    `json:email`

	// optional...
	LaunchUrl string `json:launchUrl`
	Timeout   int    `json:timeout`
	Disabled  bool   `json:disabled`
	Note      string `json:note`
}

create/upload と list/show/update とで共通する部分をここに定義

type Client

type Client struct {
	ApiToken string
}

func (*Client) CreateApp

func (client *Client) CreateApp(options CreateOptions) (*CreateResponse, error)

ref: https://appetize.io/docs#creating-apps

func (*Client) DeleteApp

func (client *Client) DeleteApp(options DeleteOptions) (*DeleteResponse, error)

ref: https://appetize.io/docs#deleting-apps

func (*Client) HandleHttpRequest

func (client *Client) HandleHttpRequest(req *http.Request) (*http.Response, error)

func (*Client) ListApps

func (client *Client) ListApps(options ListOptions) (*ListResponse, error)

ref: https://appetize.io/docs#listing-apps

func (*Client) NewApiRequest

func (client *Client) NewApiRequest(method string, endpoint string, body io.Reader) (*http.Request, error)

func (*Client) ShowApp

func (client *Client) ShowApp(options ShowOptions) (*ShowResponse, error)

ref: https://appetize.io/docs#listing-apps

func (*Client) UpdateApp

func (client *Client) UpdateApp(options UpdateOptions) (*UpdateResponse, error)

ref: https://appetize.io/docs#updating-apps

func (Client) Upload

func (client Client) Upload(options UploadOptions) (*UploadResponse, error)

ref: https://appetize.io/docs#direct-uploads

type CreateOptions

type CreateOptions struct {
	Url       string
	Platform  string
	LaunchUrl optional.String
	Disabled  optional.Bool
	Timeout   optional.Int
	Note      optional.String
}

type CreateResponse

type CreateResponse struct {
	*CreatedAppItem
}

func (*CreateResponse) ViewUrl

func (createResponse *CreateResponse) ViewUrl() string

type CreatedAppItem

type CreatedAppItem struct {
	*AppItem

	PublicUrl string `json:publicURL`
	AppUrl    string `json:appURL`
	ManageUrl string `json:manageURL`
}

create/upload のレスポンス

type DeleteOptions

type DeleteOptions struct {
	PublicKey string
}

type DeleteResponse

type DeleteResponse struct {
	Body string
}

type DetailedAppItem

type DetailedAppItem struct {
	*AppItem

	AppVersionCode string `json:appVersionCode`
	AppVersionName string `json:appVersionName`
	Bundle         string `json:bundle`
	IconUrl        string `json:iconUrl`
	Name           string `json:name`
}

list/show/update のレスポンス

type ListOptions

type ListOptions struct {
}

type ListResponse

type ListResponse struct {
	Data []DetailedAppItem `json:data`
}

type ShowOptions

type ShowOptions struct {
	PublicKey string
}

type ShowResponse

type ShowResponse struct {
	*DetailedAppItem
}

func (*ShowResponse) ViewUrl

func (showResponse *ShowResponse) ViewUrl() string

type UpdateForm

type UpdateForm struct {
	LaunchUrl optional.String
	Disabled  optional.Bool
	Timeout   optional.Int
	Note      optional.String
}

type UpdateOptions

type UpdateOptions struct {
	PublicKey  string
	UpdateForm UpdateForm
}

type UpdateResponse

type UpdateResponse struct {
	*DetailedAppItem
}

func (*UpdateResponse) ViewUrl

func (updateResponse *UpdateResponse) ViewUrl() string

type UploadOptions

type UploadOptions struct {
	AbsFilePath string
	Platform    string //for create
	PublicKey   string //for update
}

type UploadResponse

type UploadResponse struct {
	*CreatedAppItem
}

Jump to

Keyboard shortcuts

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