vkclient

package
v0.0.0-...-a797a20 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Request

func Request(methodName string, parameters map[string]string, user *AuthResponse) ([]byte, error)

Types

type AuthResponse

type AuthResponse struct {
	UserID           int    `json:"user_id"`
	ExpiresIn        int    `json:"expires_in"`
	AccessToken      string `json:"access_token"`
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description"`
}

func Auth

func Auth(login string, password string) (*AuthResponse, error)

type ResoinseData

type ResoinseData struct {
	Count int        `json:"count"`
	Items []UserItem `json:"items"`
}

type User

type User struct {
	ID           int    `json:"id"`
	FirstName    string `json:"first_name"`
	LastName     string `json:"last_name"`
	IsClosed     bool   `json:"is_closed"`
	AccessClosed bool   `json:"can_access_closed"`
	Online       int    `json:"online"`
}

func GetUserInfo

func GetUserInfo(userID int, user *AuthResponse) (*User, error)

type UserInfoResponse

type UserInfoResponse struct {
	Response []User `json:"response"`
}

type UserItem

type UserItem struct {
	ID         int    `json:"id"`
	FirstName  string `json:"first_name"`
	LastName   string `json:"last_name"`
	ScreenName string `json:"screen_name"`
}

func UserByName

func UserByName(name string, user *AuthResponse) (*UserItem, error)

type UserSearchRequest

type UserSearchRequest struct {
	Response ResoinseData `json:"response"`
}

type UserStatisticRow

type UserStatisticRow struct {
	ID          int    `json:"id"`
	Path        string `json:"path"`
	FirstName   string `json:"first_name"`
	LastName    string `json:"last_name"`
	Isonline    bool   `json:"isonline"`
	LastRequest string `json:"last_request"`
}

Jump to

Keyboard shortcuts

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