package
Version:
v0.0.0-...-f5986cb
Opens a new window with list of versions in this module.
Published: May 21, 2020
License: GPL-3.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package vk provides base VK API functionality such as auth.
type API struct {
Token string
}
API is a VK API wrapper.
FromCode returns "API" wrapper if code is correct, error otherwise.
FromToken returns "API" wrapper with provided token.
Call is calling provided VK API "method" with provided body urlencoded params.
It uses access token and API version from wrapper object.
User returns access_token user information.
UserID returns user id from access token response
if API was retrieved using "FromCode", -1 otherwise.
Settings is a VK app and API settings.
type User struct {
ID int `json:"id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Photo string `json:"photo_400_orig"`
}
User is a wrapper for VK API user object.
FullName returns full VK user name.
type UserResponse struct {
Response *[]User `json:"response"`
Error *string `json:"error"`
}
UserResponse is a wrapper for "users.get" method response
of an VK API.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.