api

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAccount added in v0.5.0

func CreateAccount(account string) string

CreateAccount associates an account name with a user ID and returns a message string

func Get

func Get(path string) ([]byte, error)

Get calls the API at the relative path, and returns the data retrieved or an error

func GetAccount added in v0.5.0

func GetAccount() string

GetAccount retrieves the user account name

func GetProfile added in v0.5.0

func GetProfile() map[string]interface{}

GetProfile retrieves the user profile

func Post

func Post(path string, payload []byte) ([]byte, error)

Post calls the API at the relative path with the payload, and returns the data retrieved or an error

func StoreProfile added in v0.5.0

func StoreProfile(profile map[string]interface{}) string

StoreProfile stores the user's profile and returns a message string

func ValidateAccount added in v0.5.0

func ValidateAccount(account string) bool

ValidateAccount validates an account name and returns whether it is valid or not

Types

This section is empty.

Jump to

Keyboard shortcuts

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