vkapi

package module
v0.0.0-...-5fc550e Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: MIT Imports: 16 Imported by: 0

README

vkapi GoDoc Go Report Card

Golang-пакет для работы с API VK. Версия протокола 101.

Получение токена

Варианты получения токена описаны на странице.

Для получение пользовательского токена через Implicit flow можно воспользоваться утилитой в папке cmd. Она принимает id (идентификатор приложения) и scope (настройки доступа). Например:

go run main.go -id=1234567 -scope=photos,wall,groups

После запуска надо открыть страницу http://localhost:3000/token, которая направит на сайт VK для подтверждения доступа. В случае согласия токен будет доступен в адресной строке.

Самый простой способ получить токен сообщества — создать его в настройках: Управление > Работа с API > Создать ключ.

Правила

  • Если параметр принимает значение 0 или 1, то используется тип bool
  • Для числовых идентификаторов используется тип int
  • Для списка идентификаторов используется тип []int
  • Если параметр ожидает JSON-строку, то ему передается соответствующая структура, которая будет сериализована автоматически
  • Если метод возвращает 1 в случае успеха, то используется тип bool

Иногда параметры могут изменять формат выдачи, в этих случаях возвращается тип interface{}, который перед использованием потребуется привести к нужному типу. Возможные варианты описаны в комментариях к методам.

Пример

// создаем клиент для работы с API, передаем пользовательский токен
vk := vkapi.NewClient("token")

// создаем новый альбом
createParams := vkapi.PhotosCreateAlbumParams{
  Title: "New album",
}
album, _ := vk.PhotosCreateAlbum(createParams)

// получаем адрес для загрузки в новый альбом
getUploadURLParams := vkapi.PhotosGetUploadServerParams{
  AlbumID: album.ID,
}
upload, _ := vk.PhotosGetUploadServer(getUploadURLParams)

// загружаем фото по полученному адресу
u, _ := vkapi.UploadAlbumFromFile(upload.UploadURL, "photo.jpg")

// сохраняем загруженное фото
saveParams := vkapi.PhotosSaveParams{
  Server:     u.Server,
  AlbumID:    u.AID,
  PhotosList: u.PhotosList,
  Hash:       u.Hash,
}
photo, _ := vk.PhotosSave(saveParams)

// постим фото на стену
postParams := vkapi.WallPostParams{
  Attachments: vkapi.MakeAttachment("photo", photo[0].OwnerID, photo[0].ID),
}
vk.WallPost(postParams)

Реализованные методы

Группа методов Готово / Всего
account 0 / 19
appWidgets 0 / 8
apps 0 / 8
auth 0 / 2
board 0 / 13
database 12 / 12
docs 0 / 11
fave 0 / 23
friends 18 / 18
gifts 0 / 1
groups 45 / 45
leadForms 0 / 7
likes 0 / 4
market 0 / 24
messages 38 / 38
newsfeed 0 / 15
notes 0 / 10
notifications 0 / 3
pages 0 / 8
photos 46 / 46
polls 0 / 9
prettyCards 0 / 6
search 1 / 1
stats 0 / 3
status 2 / 2
storage 0 / 3
stories 0 / 14
streaming 0 / 5
users 0 / 6
utils 0 / 7
video 0 / 24
wall 23 / 23
widgets 0 / 2

Использование остальных методов

Вызвать метод, который пока не реализован можно с помощью функции Request. Она принимает название метода, структуру с параметрами и ссылку на структуру, которая будет заполнена ответом метода.

Documentation

Index

Constants

View Source
const (
	// ColorPrimary синяя кнопка, обозначает основное действие
	ColorPrimary = "primary"
	// ColorSecondary обычная белая кнопка
	ColorSecondary = "secondary"
	// ColorNegative опасное действие, или отрицательное действие (отклонить, удалить и т.д.)
	ColorNegative = "negative"
	// ColorPositive согласиться, подтвердить
	ColorPositive = "positive"
)
View Source
const (
	// ActionText текстовая кнопка
	ActionText = "text"
	// ActionLocation отправляет местоположение в диалог с ботом/беседу; занимает всю ширину клавиатуры
	ActionLocation = "location"
	// ActionVKPay открывает окно оплаты VK Pay с предопределёнными параметрами. Кнопка называется “Оплатить через VK pay”, VK pay отображается как логотип; занимает всю ширину клавиатуры
	ActionVKPay = "vkpay"
	// ActionVKApps лткрывает указанное приложение VK Apps; занимает всю ширину клавиатуры
	ActionVKApps = "open_app"
)

Variables

This section is empty.

Functions

func MakeAttachment

func MakeAttachment(t string, id, oid int) string

MakeAttachment аттачмент.

Types

type API

type API struct {
	Token  string
	Client *resty.Client
}

API структура клиента.

func NewClient

func NewClient(token string) *API

NewClient новый клиент с русским языком.

func NewClientInit

func NewClientInit(token, lang string, timeout int) *API

NewClientInit новый клиент.

func NewClientWithLang

func NewClientWithLang(token, lang string) *API

NewClientWithLang новый клиент с выбранным языком.

func (*API) DatabaseGetChairs

func (api *API) DatabaseGetChairs(p DatabaseGetChairsParams) (*DatabaseGetChairsResp, error)

DatabaseGetChairs возвращает список кафедр университета по указанному факультету.

func (*API) DatabaseGetCities

func (api *API) DatabaseGetCities(p DatabaseGetCitiesParams) (*DatabaseGetCitiesResp, error)

DatabaseGetCities возвращает список городов.

func (*API) DatabaseGetCitiesByID

func (api *API) DatabaseGetCitiesByID(p DatabaseGetCitiesByIDParams) (*DatabaseGetCitiesByIDResp, error)

DatabaseGetCitiesByID возвращает информацию о городах и регионах по их идентификаторам. Идентификаторы (id) могут быть получены с помощью методов users.get, places.getbyid, places.search, places.getcheckins.

func (*API) DatabaseGetCountries

func (api *API) DatabaseGetCountries(p DatabaseGetCountriesParams) (*DatabaseGetCountriesResp, error)

DatabaseGetCountries возвращает список стран.

func (*API) DatabaseGetCountriesByID

func (api *API) DatabaseGetCountriesByID(p DatabaseGetCountriesByIDParams) (*DatabaseGetCountriesByIDResp, error)

DatabaseGetCountriesByID возвращает информацию о странах по их идентификаторам. Идентификаторы (id) могут быть получены с помощью методов users.get, places.getbyid, places.search, places.getcheckins.

func (*API) DatabaseGetFaculties

func (api *API) DatabaseGetFaculties(p DatabaseGetFacultiesParams) (*DatabaseGetFacultiesResp, error)

DatabaseGetFaculties возвращает список факультетов.

func (*API) DatabaseGetMetroStations

func (api *API) DatabaseGetMetroStations(p DatabaseGetMetroStationsParams) (*DatabaseGetMetroStationsResp, error)

DatabaseGetMetroStations возвращает список станций метро.

func (*API) DatabaseGetMetroStationsByID

func (api *API) DatabaseGetMetroStationsByID(p DatabaseGetMetroStationsByIDParams) (*DatabaseGetMetroStationsByIDResp, error)

DatabaseGetMetroStationsByID возвращает информацию об одной или нескольких станциях метро по их идентификаторам.

func (*API) DatabaseGetRegions

func (api *API) DatabaseGetRegions(p DatabaseGetRegionsParams) (*DatabaseGetRegionsResp, error)

DatabaseGetRegions возвращает список регионов.

func (*API) DatabaseGetSchoolClasses

func (api *API) DatabaseGetSchoolClasses(p DatabaseGetSchoolClassesParams) (map[int]string, error)

DatabaseGetSchoolClasses возвращает список классов, характерных для школ определенной страны.

func (*API) DatabaseGetSchools

func (api *API) DatabaseGetSchools(p DatabaseGetSchoolsParams) (*DatabaseGetSchoolsResp, error)

DatabaseGetSchools возвращает список школ.

func (*API) DatabaseGetUniversities

func (api *API) DatabaseGetUniversities(p DatabaseGetUniversitiesParams) (*DatabaseGetUniversitiesResp, error)

DatabaseGetUniversities возвращает список высших учебных заведений.

func (*API) FriendsAdd

func (api *API) FriendsAdd(p FriendsAddParams) (int, error)

FriendsAdd одобряет или создает заявку на добавление в друзья. Если идентификатор выбранного пользователя присутствует в списке заявок на добавление в друзья, полученном методом friends.getrequests, то одобряет заявку на добавление и добавляет выбранного пользователя в друзья к текущему пользователю. В противном случае создает заявку на добавление в друзья текущего пользователя к выбранному пользователю.

func (*API) FriendsAddList

func (api *API) FriendsAddList(p FriendsAddListParams) (*FriendsAddListResp, error)

FriendsAddList создает новый список друзей у текущего пользователя.

func (*API) FriendsAreFriends

func (api *API) FriendsAreFriends(p FriendsAreFriendsParams) (*FriendsAreFriendsResp, error)

FriendsAreFriends возвращает информацию о том, добавлен ли текущий пользователь в друзья у указанных пользователей. Также возвращает информацию о наличии исходящей или входящей заявки в друзья (подписки).

func (*API) FriendsDelete

func (api *API) FriendsDelete(p FriendsDeleteParams) (*FriendsDeleteResp, error)

FriendsDelete удаляет пользователя из списка друзей или отклоняет заявку в друзья. Если идентификатор выбранного пользователя присутствует в списке заявок на добавление в друзья, полученном методом friends.getrequests, то отклоняет заявку на добавление в друзья к текущему пользователю. В противном случае удаляет выбранного пользователя из списка друзей текущего пользователя, который может быть получен методом friends.get.

func (*API) FriendsDeleteAllRequests

func (api *API) FriendsDeleteAllRequests() (bool, error)

FriendsDeleteAllRequests отмечает все входящие заявки на добавление в друзья как просмотренные.

func (*API) FriendsDeleteList

func (api *API) FriendsDeleteList(p FriendsDeleteListParams) (bool, error)

FriendsDeleteList удаляет существующий список друзей текущего пользователя.

func (*API) FriendsEdit

func (api *API) FriendsEdit(p FriendsEditParams) (bool, error)

FriendsEdit редактирует списки друзей для выбранного друга.

func (*API) FriendsEditList

func (api *API) FriendsEditList(p FriendsEditListParams) (bool, error)

FriendsEditList редактирует существующий список друзей текущего пользователя.

func (*API) FriendsGet

func (api *API) FriendsGet(p FriendsGetParams) (interface{}, error)

FriendsGet возвращает список идентификаторов друзей пользователя или расширенную информацию о друзьях пользователя (при использовании параметра fields). Если вы используете социальный граф пользователя вконтакте в своем приложении, обратите внимание на п. 4.4. правил платформы. https://vk.com/dev/rules Возвращает *FriendsGetUsersResp, если задан параметр Fields или *FriendsGetIDSResp в остальных случаях.

func (*API) FriendsGetAppUsers

func (api *API) FriendsGetAppUsers() ([]int, error)

FriendsGetAppUsers возвращает список идентификаторов друзей текущего пользователя, которые установили данное приложение.

func (*API) FriendsGetByPhones

func (api *API) FriendsGetByPhones(p FriendsGetByPhonesParams) ([]User, error)

FriendsGetByPhones возвращает список друзей пользователя, у которых завалидированные или указанные в профиле телефонные номера входят в заданный список. Использование данного метода возможно только если у текущего пользователя завалидирован номер мобильного телефона. Для проверки этого условия можно использовать метод users.get c параметрами user_ids=api_user и fields=has_mobile, где api_user равен идентификатору текущего пользователя. Для доступа к этому методу приложение должно быть доверенным.

func (*API) FriendsGetLists

func (api *API) FriendsGetLists(p FriendsGetListsParams) (*FriendsGetListsResp, error)

FriendsGetLists возвращает список меток друзей пользователя.

func (*API) FriendsGetMutual

func (api *API) FriendsGetMutual(p FriendsGetMutualParams) ([]int, error)

FriendsGetMutual возвращает список идентификаторов общих друзей между парой пользователей.

func (*API) FriendsGetOnline

func (api *API) FriendsGetOnline(p FriendsGetOnlineParams) (interface{}, error)

FriendsGetOnline возвращает список идентификаторов друзей пользователя, находящихся на сайте. Возвращает []int, если OnlineMobile=false или *FriendsGetOnlineResp, если OnlineMobile=true.

func (*API) FriendsGetRecent

func (api *API) FriendsGetRecent(p FriendsGetRecentParams) ([]int, error)

FriendsGetRecent возвращает список идентификаторов недавно добавленных друзей текущего пользователя.

func (*API) FriendsGetRequests

func (api *API) FriendsGetRequests(p FriendsGetRequestsParams) (*FriendsGetRequestsResp, error)

FriendsGetRequests возвращает информацию о полученных или отправленных заявках на добавление в друзья для текущего пользователя.

func (*API) FriendsGetSuggestions

func (api *API) FriendsGetSuggestions(p FriendsGetSuggestionsParams) (*FriendsGetSuggestionsResp, error)

FriendsGetSuggestions возвращает список профилей пользователей, которые могут быть друзьями текущего пользователя.

func (*API) FriendsSearch

func (api *API) FriendsSearch(p FriendsSearchParams) (*FriendsSearchResp, error)

FriendsSearch позволяет искать по списку друзей пользователей. Для расширенного поиска по списку друзей можно использовать метод users.search с параметром from_list=friends.

func (*API) GroupsAddAddress

func (api *API) GroupsAddAddress(p GroupsAddAddressParams) (*Address, error)

GroupsAddAddress позволяет добавить адрес в сообщество. Список адресов может быть получен методом groups.getaddresses. Для того, чтобы воспользоваться этим методом, вы должны быть администратором сообщества.

func (*API) GroupsAddCallbackServer

func (api *API) GroupsAddCallbackServer(p GroupsAddCallbackServerParams) (*GroupsAddCallbackServerResp, error)

GroupsAddCallbackServer добавляет сервер для callback api в сообщество.

func (api *API) GroupsAddLink(p GroupsAddLinkParams) (*GroupsAddLinkResp, error)

GroupsAddLink позволяет добавлять ссылки в сообщество. Список ссылок может быть получен методом groups.getbyid с параметром fields=links. Для того, чтобы воспользоваться этим методом, вы должны быть администратором группы.

func (*API) GroupsApproveRequest

func (api *API) GroupsApproveRequest(p GroupsApproveRequestParams) (bool, error)

GroupsApproveRequest позволяет одобрить заявку в группу от пользователя. Для того, чтобы воспользоваться этим методом вы должны быть администратором группы.

func (*API) GroupsBan

func (api *API) GroupsBan(p GroupsBanParams) (bool, error)

GroupsBan добавляет пользователя или группу в черный список сообщества.

func (*API) GroupsCreate

func (api *API) GroupsCreate(p GroupsCreateParams) (*Group, error)

GroupsCreate создает новое сообщество.

func (*API) GroupsDeleteAddress

func (api *API) GroupsDeleteAddress(p GroupsDeleteAddressParams) (bool, error)

GroupsDeleteAddress удаляет адрес сообщества.

func (*API) GroupsDeleteCallbackServer

func (api *API) GroupsDeleteCallbackServer(p GroupsDeleteCallbackServerParams) (bool, error)

GroupsDeleteCallbackServer удаляет сервер для callback api из сообщества.

func (api *API) GroupsDeleteLink(p GroupsDeleteLinkParams) (bool, error)

GroupsDeleteLink позволяет удалить ссылки из сообщества. Список ссылок может быть получен методом groups.getbyid, с параметром fields=links. Для того, чтобы воспользоваться этим методом вы должны быть администратором группы.

func (*API) GroupsDisableOnline

func (api *API) GroupsDisableOnline(p GroupsDisableOnlineParams) (bool, error)

GroupsDisableOnline выключает статус "онлайн" в сообществе.

func (*API) GroupsEdit

func (api *API) GroupsEdit(p GroupsEditParams) (bool, error)

GroupsEdit редактирует сообщество. для того, чтобы воспользоваться этим методом, вы должны быть администратором сообщества. Значения настроек можно получить методом groups.getsettings.

func (*API) GroupsEditAddress

func (api *API) GroupsEditAddress(p GroupsEditAddressParams) (*Address, error)

GroupsEditAddress позволяет отредактировать адрес в сообществе. Список адресов может быть получен методом groups.getaddresses. Для того, чтобы воспользоваться этим методом, вы должны быть администратором сообщества.

func (*API) GroupsEditCallbackServer

func (api *API) GroupsEditCallbackServer(p GroupsEditCallbackServerParams) (bool, error)

GroupsEditCallbackServer редактирует данные сервера для callback api в сообществе.

func (api *API) GroupsEditLink(p GroupsEditLinkParams) (bool, error)

GroupsEditLink позволяет редактировать ссылки в сообществе.

func (*API) GroupsEditManager

func (api *API) GroupsEditManager(p GroupsEditManagerParams) (bool, error)

GroupsEditManager позволяет назначить/разжаловать руководителя в сообществе или изменить уровень его полномочий. Для того, чтобы воспользоваться этим методом, вы должны быть администратором группы.

func (*API) GroupsEnableOnline

func (api *API) GroupsEnableOnline(p GroupsEnableOnlineParams) (bool, error)

GroupsEnableOnline включает статус "онлайн" в сообществе.

func (*API) GroupsGet

func (api *API) GroupsGet(p GroupsGetParams) (interface{}, error)

GroupsGet возвращает список сообществ указанного пользователя. Возвращает *GroupsGetIDSResp, если Extended=false или *GroupsGetGroupsResp, если Extended=true.

func (*API) GroupsGetAddresses

func (api *API) GroupsGetAddresses(p GroupsGetAddressesParams) (*GroupsGetAddressesResp, error)

GroupsGetAddresses возвращает список адресов сообщества.

func (*API) GroupsGetBanned

func (api *API) GroupsGetBanned(p GroupsGetBannedParams) (*GroupsGetBannedResp, error)

GroupsGetBanned возвращает список забаненных пользователей и сообществ в сообществе.

func (*API) GroupsGetByID

func (api *API) GroupsGetByID(p GroupsGetByIDParams) ([]Group, error)

GroupsGetByID возвращает информацию о заданном сообществе или о нескольких сообществах.

func (*API) GroupsGetCallbackConfirmationCode

func (api *API) GroupsGetCallbackConfirmationCode(p GroupsGetCallbackConfirmationCodeParams) (string, error)

GroupsGetCallbackConfirmationCode позволяет получить строку, необходимую для подтверждения адреса сервера в callback api. Для добавления или редактирования сервера используйте соответственно методы groups.addcallbackserver и groups.editcallbackserver.

func (*API) GroupsGetCallbackServers

func (api *API) GroupsGetCallbackServers(p GroupsGetCallbackServersParams) (*GroupsGetCallbackServersResp, error)

GroupsGetCallbackServers получает информацию о серверах для callback api в сообществе.

func (*API) GroupsGetCallbackSettings

func (api *API) GroupsGetCallbackSettings(p GroupsGetCallbackSettingsParams) (*GroupsGetCallbackSettingsResp, error)

GroupsGetCallbackSettings позволяет получить настройки уведомлений callback api для сообщества.

func (*API) GroupsGetCatalog

func (api *API) GroupsGetCatalog(p GroupsGetCatalogParams) (*GroupsGetCatalogResp, error)

GroupsGetCatalog возвращает список сообществ выбранной категории каталога.

func (*API) GroupsGetCatalogInfo

func (api *API) GroupsGetCatalogInfo(p GroupsGetCatalogInfoParams) (*GroupsGetCatalogInfoResp, error)

GroupsGetCatalogInfo возвращает список категорий для каталога сообществ.

func (*API) GroupsGetInvitedUsers

func (api *API) GroupsGetInvitedUsers(p GroupsGetInvitedUsersParams) (*GroupsGetInvitedUsersResp, error)

GroupsGetInvitedUsers возвращает список пользователей, которые были приглашены в группу.

func (*API) GroupsGetInvites

func (api *API) GroupsGetInvites(p GroupsGetInvitesParams) (*GroupsGetInvitesResp, error)

GroupsGetInvites данный метод возвращает список приглашений в сообщества и встречи текущего пользователя.

func (*API) GroupsGetLongPollServer

func (api *API) GroupsGetLongPollServer(p GroupsGetLongPollServerParams) (*GroupsGetLongPollServerResp, error)

GroupsGetLongPollServer возвращает данные для подключения к bots longpoll api.

func (*API) GroupsGetLongPollSettings

func (api *API) GroupsGetLongPollSettings(p GroupsGetLongPollSettingsParams) (*GroupsGetLongPollSettingsResp, error)

GroupsGetLongPollSettings получает настройки bots longpoll api для сообщества.

func (*API) GroupsGetMembers

func (api *API) GroupsGetMembers(p GroupsGetMembersParams) (interface{}, error)

GroupsGetMembers возвращает список участников сообщества. Возвращает *GroupsGetMembersRolesResp, если Filter=managers или *GroupsGetMembersIDSResp в остальных случаях.

func (*API) GroupsGetOnlineStatus

func (api *API) GroupsGetOnlineStatus(p GroupsGetOnlineStatusParams) (*GroupsGetOnlineStatusResp, error)

GroupsGetOnlineStatus получает информацию о статусе "онлайн" в сообществе.

func (*API) GroupsGetRequests

func (api *API) GroupsGetRequests(p GroupsGetRequestsParams) (interface{}, error)

GroupsGetRequests возвращает список заявок на вступление в сообщество. Чтобы использовать этот метод, вы должны быть руководителем сообщества. Возвращает *GroupsGetRequestsUsersResp, если задан параметр Fields или *GroupsGetRequestsIDSResp в остальных случаях.

func (*API) GroupsGetSettings

func (api *API) GroupsGetSettings(p GroupsGetSettingsParams) (*GroupsGetSettingsResp, error)

GroupsGetSettings позволяет получать данные, необходимые для отображения страницы редактирования данных сообщества. Чтобы использовать этот метод, вы должны быть администратором сообщества.

func (*API) GroupsGetTokenPermissions

func (api *API) GroupsGetTokenPermissions() (*GroupsGetTokenPermissionsResp, error)

GroupsGetTokenPermissions возвращает настройки прав для ключа доступа сообщества.

func (*API) GroupsInvite

func (api *API) GroupsInvite(p GroupsInviteParams) (bool, error)

GroupsInvite позволяет приглашать друзей в группу.

func (*API) GroupsIsMember

func (api *API) GroupsIsMember(p GroupsIsMemberParams) (*GroupsIsMemberResp, error)

GroupsIsMember возвращает информацию о том, является ли пользователь участником сообщества.

func (*API) GroupsJoin

func (api *API) GroupsJoin(p GroupsJoinParams) (bool, error)

GroupsJoin данный метод позволяет вступить в группу, публичную страницу, а также подтвердить участие во встрече.

func (*API) GroupsLeave

func (api *API) GroupsLeave(p GroupsLeaveParams) (bool, error)

GroupsLeave позволяет покинуть сообщество или отклонить приглашение в сообщество.

func (*API) GroupsRemoveUser

func (api *API) GroupsRemoveUser(p GroupsRemoveUserParams) (bool, error)

GroupsRemoveUser позволяет исключить пользователя из группы или отклонить заявку на вступление. Для того, чтобы воспользоваться этим методом, вы должны быть администратором группы.

func (api *API) GroupsReorderLink(p GroupsReorderLinkParams) (bool, error)

GroupsReorderLink позволяет менять местоположение ссылки в списке. Список ссылок может быть получен методом groups.getbyid, с параметром fields=links. Для того, чтобы воспользоваться этим методом вы должны быть администратором группы.

func (*API) GroupsSearch

func (api *API) GroupsSearch(p GroupsSearchParams) (*GroupsSearchResp, error)

GroupsSearch осуществляет поиск сообществ по заданной подстроке.

func (*API) GroupsSetCallbackSettings

func (api *API) GroupsSetCallbackSettings(p GroupsSetCallbackSettingsParams) (bool, error)

GroupsSetCallbackSettings позволяет задать настройки уведомлений о событиях в callback api.

func (*API) GroupsSetLongPollSettings

func (api *API) GroupsSetLongPollSettings(p GroupsSetLongPollSettingsParams) (bool, error)

GroupsSetLongPollSettings задаёт настройки для bots long poll api в сообществе.

func (*API) GroupsSetSettings

func (api *API) GroupsSetSettings(p GroupsSetSettingsParams) (bool, error)

GroupsSetSettings устанавливает настройки сообщества для того, чтобы воспользоваться этим методом, вы должны быть администратором сообщества.

func (*API) GroupsUnban

func (api *API) GroupsUnban(p GroupsUnbanParams) (bool, error)

GroupsUnban убирает пользователя или группу из черного списка сообщества.

func (*API) MessagesAddChatUser

func (api *API) MessagesAddChatUser(p MessagesAddChatUserParams) (bool, error)

MessagesAddChatUser добавляет в мультидиалог нового пользователя. чтобы пользователю вернуться в беседу, которую он сам покинул, достаточно отправить сообщение в неё (если есть свободные места), либо вызвать этот метод, передав свой идентификатор в параметре user_id.

func (*API) MessagesAllowMessagesFromGroup

func (api *API) MessagesAllowMessagesFromGroup(p MessagesAllowMessagesFromGroupParams) (bool, error)

MessagesAllowMessagesFromGroup позволяет разрешить отправку сообщений от сообщества текущему пользователю.

func (*API) MessagesCreateChat

func (api *API) MessagesCreateChat(p MessagesCreateChatParams) (int, error)

MessagesCreateChat создаёт беседу с несколькими участниками.

func (*API) MessagesDelete

func (api *API) MessagesDelete(p MessagesDeleteParams) (map[string]bool, error)

MessagesDelete удаляет сообщение.

func (*API) MessagesDeleteChatPhoto

func (api *API) MessagesDeleteChatPhoto(p MessagesDeleteChatPhotoParams) (*MessagesDeleteChatPhotoResp, error)

MessagesDeleteChatPhoto позволяет удалить фотографию мультидиалога.

func (*API) MessagesDeleteConversation

func (api *API) MessagesDeleteConversation(p MessagesDeleteConversationParams) (*MessagesDeleteConversationResp, error)

MessagesDeleteConversation удаляет беседу.

func (*API) MessagesDenyMessagesFromGroup

func (api *API) MessagesDenyMessagesFromGroup(p MessagesDenyMessagesFromGroupParams) (bool, error)

MessagesDenyMessagesFromGroup позволяет запретить отправку сообщений от сообщества текущему пользователю.

func (*API) MessagesEdit

func (api *API) MessagesEdit(p MessagesEditParams) (bool, error)

MessagesEdit редактирует сообщение.

func (*API) MessagesEditChat

func (api *API) MessagesEditChat(p MessagesEditChatParams) (bool, error)

MessagesEditChat изменяет название беседы.

func (*API) MessagesGetByConversationMessageID

func (api *API) MessagesGetByConversationMessageID(p MessagesGetByConversationMessageIDParams) (*MessagesGetByConversationMessageIDResp, error)

MessagesGetByConversationMessageID возвращает сообщения по их идентификаторам в рамках беседы или диалога.

func (*API) MessagesGetByID

func (api *API) MessagesGetByID(p MessagesGetByIDParams) (*MessagesGetByIDResp, error)

MessagesGetByID возвращает сообщения по их идентификаторам.

func (*API) MessagesGetChat

func (api *API) MessagesGetChat(p MessagesGetChatParams) ([]Chat, error)

MessagesGetChat возвращает информацию о беседе.

func (*API) MessagesGetChatPreview

func (api *API) MessagesGetChatPreview(p MessagesGetChatPreviewParams) (*MessagesGetChatPreviewResp, error)

MessagesGetChatPreview получает данные для превью чата с приглашением по ссылке.

func (*API) MessagesGetConversationMembers

func (api *API) MessagesGetConversationMembers(p MessagesGetConversationMembersParams) (*MessagesGetConversationMembersResp, error)

MessagesGetConversationMembers позволяет получить список участников беседы.

func (*API) MessagesGetConversations

func (api *API) MessagesGetConversations(p MessagesGetConversationsParams) (*MessagesGetConversationsResp, error)

MessagesGetConversations возвращает список бесед пользователя.

func (*API) MessagesGetConversationsByID

func (api *API) MessagesGetConversationsByID(p MessagesGetConversationsByIDParams) (*MessagesGetConversationsByIDResp, error)

MessagesGetConversationsByID позволяет получить беседу по её идентификатору.

func (*API) MessagesGetHistory

func (api *API) MessagesGetHistory(p MessagesGetHistoryParams) (*MessagesGetHistoryResp, error)

MessagesGetHistory возвращает историю сообщений для указанного диалога.

func (*API) MessagesGetHistoryAttachments

func (api *API) MessagesGetHistoryAttachments(p MessagesGetHistoryAttachmentsParams) (*MessagesGetHistoryAttachmentsResp, error)

MessagesGetHistoryAttachments возвращает материалы диалога или беседы.

func (*API) MessagesGetImportantMessages

func (api *API) MessagesGetImportantMessages(p MessagesGetImportantMessagesParams) (*MessagesGetImportantMessagesResp, error)

MessagesGetImportantMessages возвращает список важных сообщений пользователя.

func (api *API) MessagesGetInviteLink(p MessagesGetInviteLinkParams) (*MessagesGetInviteLinkResp, error)

MessagesGetInviteLink получает ссылку для приглашения пользователя в беседу. Только создатель беседы имеет доступ к ссылке на беседу.

func (*API) MessagesGetLastActivity

func (api *API) MessagesGetLastActivity(p MessagesGetLastActivityParams) (*MessagesGetLastActivityResp, error)

MessagesGetLastActivity возвращает текущий статус и дату последней активности указанного пользователя.

func (*API) MessagesGetLongPollHistory

func (api *API) MessagesGetLongPollHistory(p MessagesGetLongPollHistoryParams) (*MessagesGetLongPollHistoryResp, error)

MessagesGetLongPollHistory возвращает обновления в личных сообщениях пользователя. Для ускорения работы с личными сообщениями может быть полезно кешировать уже загруженные ранее сообщения на мобильном устройстве / пк пользователя, чтобы не получать их повторно при каждом обращении. Этот метод помогает осуществить синхронизацию локальной копии списка сообщений с актуальной версией.

func (*API) MessagesGetLongPollServer

func (api *API) MessagesGetLongPollServer(p MessagesGetLongPollServerParams) (*MessagesGetLongPollServerResp, error)

MessagesGetLongPollServer возвращает данные, необходимые для подключения к long poll серверу. Long poll позволит вам моментально узнавать о приходе новых сообщений и других событиях.

func (*API) MessagesIsMessagesFromGroupAllowed

func (api *API) MessagesIsMessagesFromGroupAllowed(p MessagesIsMessagesFromGroupAllowedParams) (*MessagesIsMessagesFromGroupAllowedResp, error)

MessagesIsMessagesFromGroupAllowed возвращает информацию о том, разрешена ли отправка сообщений от сообщества пользователю.

func (api *API) MessagesJoinChatByInviteLink(p MessagesJoinChatByInviteLinkParams) (*MessagesJoinChatByInviteLinkResp, error)

MessagesJoinChatByInviteLink позволяет присоединиться к чату по ссылке-приглашению.

func (*API) MessagesMarkAsAnsweredConversation

func (api *API) MessagesMarkAsAnsweredConversation(p MessagesMarkAsAnsweredConversationParams) (bool, error)

MessagesMarkAsAnsweredConversation помечает беседу как отвеченную либо снимает отметку.

func (*API) MessagesMarkAsImportant

func (api *API) MessagesMarkAsImportant(p MessagesMarkAsImportantParams) ([]int, error)

MessagesMarkAsImportant помечает сообщения как важные либо снимает отметку.

func (*API) MessagesMarkAsImportantConversation

func (api *API) MessagesMarkAsImportantConversation(p MessagesMarkAsImportantConversationParams) (bool, error)

MessagesMarkAsImportantConversation помечает беседу как важную либо снимает отметку.

func (*API) MessagesMarkAsRead

func (api *API) MessagesMarkAsRead(p MessagesMarkAsReadParams) (bool, error)

MessagesMarkAsRead помечает сообщения как прочитанные.

func (*API) MessagesPin

func (api *API) MessagesPin(p MessagesPinParams) (*PinnedMessage, error)

MessagesPin закрепляет сообщение.

func (*API) MessagesRemoveChatUser

func (api *API) MessagesRemoveChatUser(p MessagesRemoveChatUserParams) (bool, error)

MessagesRemoveChatUser исключает из мультидиалога пользователя, если текущий пользователь или сообщество является администратором беседы либо текущий пользователь пригласил исключаемого пользователя. Также может быть использован для выхода текущего пользователя из беседы, в которой он состоит. чтобы пользователю вернуться в беседу, достаточно отправить сообщение в неё (если есть свободные места).

func (*API) MessagesRestore

func (api *API) MessagesRestore(p MessagesRestoreParams) (bool, error)

MessagesRestore восстанавливает удаленное сообщение.

func (*API) MessagesSearch

func (api *API) MessagesSearch(p MessagesSearchParams) (*MessagesSearchResp, error)

MessagesSearch возвращает список найденных личных сообщений текущего пользователя по введенной строке поиска.

func (*API) MessagesSearchConversations

func (api *API) MessagesSearchConversations(p MessagesSearchConversationsParams) (*MessagesSearchConversationsResp, error)

MessagesSearchConversations позволяет искать диалоги.

func (*API) MessagesSend

func (api *API) MessagesSend(p MessagesSendParams) (interface{}, error)

MessagesSend отправляет сообщение. Если RandomID не задано, ему автоматически присваивается случайное значение. Возвращает идентификатор отправленного сообщения, если передан UserID или *MessagesSendResp, если передан UserIDS.

func (*API) MessagesSetActivity

func (api *API) MessagesSetActivity(p MessagesSetActivityParams) (bool, error)

MessagesSetActivity изменяет статус набора текста пользователем в диалоге.

func (*API) MessagesSetChatPhoto

func (api *API) MessagesSetChatPhoto(p MessagesSetChatPhotoParams) (*MessagesSetChatPhotoResp, error)

MessagesSetChatPhoto позволяет установить фотографию мультидиалога, загруженную с помощью метода photos.getchatuploadserver.

func (*API) MessagesUnpin

func (api *API) MessagesUnpin(p MessagesUnpinParams) (bool, error)

MessagesUnpin открепляет сообщение.

func (*API) PhotosConfirmTag

func (api *API) PhotosConfirmTag(p PhotosConfirmTagParams) (bool, error)

PhotosConfirmTag подтверждает отметку на фотографии.

func (*API) PhotosCopy

func (api *API) PhotosCopy(p PhotosCopyParams) (int, error)

PhotosCopy позволяет скопировать фотографию в альбом "сохраненные фотографии".

func (*API) PhotosCreateAlbum

func (api *API) PhotosCreateAlbum(p PhotosCreateAlbumParams) (*PhotosCreateAlbumResp, error)

PhotosCreateAlbum создает пустой альбом для фотографий.

func (*API) PhotosCreateComment

func (api *API) PhotosCreateComment(p PhotosCreateCommentParams) (int, error)

PhotosCreateComment создает новый комментарий к фотографии.

func (*API) PhotosDelete

func (api *API) PhotosDelete(p PhotosDeleteParams) (bool, error)

PhotosDelete удаление фотографии.

func (*API) PhotosDeleteAlbum

func (api *API) PhotosDeleteAlbum(p PhotosDeleteAlbumParams) (bool, error)

PhotosDeleteAlbum удаляет указанный альбом для фотографий у текущего пользователя.

func (*API) PhotosDeleteComment

func (api *API) PhotosDeleteComment(p PhotosDeleteCommentParams) (bool, error)

PhotosDeleteComment удаляет комментарий к фотографии.

func (*API) PhotosEdit

func (api *API) PhotosEdit(p PhotosEditParams) (bool, error)

PhotosEdit редактирует описание или геометку у фотографии.

func (*API) PhotosEditAlbum

func (api *API) PhotosEditAlbum(p PhotosEditAlbumParams) (bool, error)

PhotosEditAlbum редактирует данные альбома для фотографий.

func (*API) PhotosEditComment

func (api *API) PhotosEditComment(p PhotosEditCommentParams) (bool, error)

PhotosEditComment изменяет текст комментария к фотографии. Обратите внимание, что редактирование комментария доступно только в течение суток после его создания.

func (*API) PhotosGet

func (api *API) PhotosGet(p PhotosGetParams) (*PhotosGetResp, error)

PhotosGet возвращает список фотографий в альбоме.

func (*API) PhotosGetAlbums

func (api *API) PhotosGetAlbums(p PhotosGetAlbumsParams) (*PhotosGetAlbumsResp, error)

PhotosGetAlbums возвращает список фотоальбомов пользователя или сообщества.

func (*API) PhotosGetAlbumsCount

func (api *API) PhotosGetAlbumsCount(p PhotosGetAlbumsCountParams) (int, error)

PhotosGetAlbumsCount возвращает количество доступных альбомов пользователя или сообщества.

func (*API) PhotosGetAll

func (api *API) PhotosGetAll(p PhotosGetAllParams) (*PhotosGetAllResp, error)

PhotosGetAll возвращает все фотографии пользователя или сообщества в антихронологическом порядке.

func (*API) PhotosGetAllComments

func (api *API) PhotosGetAllComments(p PhotosGetAllCommentsParams) (*PhotosGetAllCommentsResp, error)

PhotosGetAllComments возвращает отсортированный в антихронологическом порядке список всех комментариев к конкретному альбому или ко всем альбомам пользователя.

func (*API) PhotosGetByID

func (api *API) PhotosGetByID(p PhotosGetByIDParams) ([]Photo, error)

PhotosGetByID возвращает информацию о фотографиях по их идентификаторам.

func (*API) PhotosGetChatUploadServer

func (api *API) PhotosGetChatUploadServer(p PhotosGetChatUploadServerParams) (*PhotosGetChatUploadServerResp, error)

PhotosGetChatUploadServer позволяет получить адрес для загрузки обложки чата.

func (*API) PhotosGetComments

func (api *API) PhotosGetComments(p PhotosGetCommentsParams) (*PhotosGetCommentsResp, error)

PhotosGetComments возвращает список комментариев к фотографии.

func (*API) PhotosGetMarketAlbumUploadServer

func (api *API) PhotosGetMarketAlbumUploadServer(p PhotosGetMarketAlbumUploadServerParams) (*PhotosGetMarketAlbumUploadServerResp, error)

PhotosGetMarketAlbumUploadServer возвращает адрес сервера для загрузки фотографии подборки товаров в сообществе. После успешной загрузки вы можете сохранить фотографию, воспользовавшись методом photos.savemarketalbumphoto.

func (*API) PhotosGetMarketUploadServer

func (api *API) PhotosGetMarketUploadServer(p PhotosGetMarketUploadServerParams) (*PhotosGetMarketUploadServerResp, error)

PhotosGetMarketUploadServer возвращает адрес сервера для загрузки фотографии товара. После успешной загрузки вы можете сохранить фотографию, воспользовавшись методом photos.savemarketphoto.

func (*API) PhotosGetMessagesUploadServer

func (api *API) PhotosGetMessagesUploadServer(p PhotosGetMessagesUploadServerParams) (*PhotosGetMessagesUploadServerResp, error)

PhotosGetMessagesUploadServer возвращает адрес сервера для загрузки фотографии в личное сообщение. После успешной загрузки вы можете сохранить фотографию, воспользовавшись методом photos.savemessagesphoto.

func (*API) PhotosGetNewTags

func (api *API) PhotosGetNewTags(p PhotosGetNewTagsParams) (*PhotosGetNewTagsResp, error)

PhotosGetNewTags возвращает список фотографий, на которых есть непросмотренные отметки.

func (*API) PhotosGetOwnerCoverPhotoUploadServer

func (api *API) PhotosGetOwnerCoverPhotoUploadServer(p PhotosGetOwnerCoverPhotoUploadServerParams) (*PhotosGetOwnerCoverPhotoUploadServerResp, error)

PhotosGetOwnerCoverPhotoUploadServer получает адрес для загрузки обложки сообщества.

func (*API) PhotosGetOwnerPhotoUploadServer

func (api *API) PhotosGetOwnerPhotoUploadServer(p PhotosGetOwnerPhotoUploadServerParams) (*PhotosGetOwnerPhotoUploadServerResp, error)

PhotosGetOwnerPhotoUploadServer возвращает адрес сервера для загрузки главной фотографии на страницу пользователя или сообщества. После удачной загрузки вы можете воспользоваться методом photos.saveownerphoto.

func (*API) PhotosGetTags

func (api *API) PhotosGetTags(p PhotosGetTagsParams) (*PhotosGetTagsResp, error)

PhotosGetTags возвращает список отметок на фотографии.

func (*API) PhotosGetUploadServer

func (api *API) PhotosGetUploadServer(p PhotosGetUploadServerParams) (*PhotosGetUploadServerResp, error)

PhotosGetUploadServer возвращает адрес сервера для загрузки фотографий. После успешной загрузки фотография может быть сохранена с помощью метода photos.save.

func (*API) PhotosGetUserPhotos

func (api *API) PhotosGetUserPhotos(p PhotosGetUserPhotosParams) (*PhotosGetUserPhotosResp, error)

PhotosGetUserPhotos возвращает список фотографий, на которых отмечен пользователь.

func (*API) PhotosGetWallUploadServer

func (api *API) PhotosGetWallUploadServer(p PhotosGetWallUploadServerParams) (*PhotosGetWallUploadServerResp, error)

PhotosGetWallUploadServer возвращает адрес сервера для загрузки фотографии на стену пользователя или сообщества. После успешной загрузки вы можете сохранить фотографию, воспользовавшись методом photos.savewallphoto.

func (*API) PhotosMakeCover

func (api *API) PhotosMakeCover(p PhotosMakeCoverParams) (bool, error)

PhotosMakeCover делает фотографию обложкой альбома.

func (*API) PhotosMove

func (api *API) PhotosMove(p PhotosMoveParams) (bool, error)

PhotosMove переносит фотографию из одного альбома в другой.

func (*API) PhotosPutTag

func (api *API) PhotosPutTag(p PhotosPutTagParams) (int, error)

PhotosPutTag добавляет отметку на фотографию.

func (*API) PhotosRemoveTag

func (api *API) PhotosRemoveTag(p PhotosRemoveTagParams) (bool, error)

PhotosRemoveTag удаляет отметку с фотографии.

func (*API) PhotosReorderAlbums

func (api *API) PhotosReorderAlbums(p PhotosReorderAlbumsParams) (bool, error)

PhotosReorderAlbums меняет порядок альбома в списке альбомов пользователя.

func (*API) PhotosReorderPhotos

func (api *API) PhotosReorderPhotos(p PhotosReorderPhotosParams) (bool, error)

PhotosReorderPhotos меняет порядок фотографии в списке фотографий альбома пользователя.

func (*API) PhotosReport

func (api *API) PhotosReport(p PhotosReportParams) (bool, error)

PhotosReport позволяет пожаловаться на фотографию.

func (*API) PhotosReportComment

func (api *API) PhotosReportComment(p PhotosReportCommentParams) (bool, error)

PhotosReportComment позволяет пожаловаться на комментарий к фотографии.

func (*API) PhotosRestore

func (api *API) PhotosRestore(p PhotosRestoreParams) (bool, error)

PhotosRestore восстанавливает удаленную фотографию.

func (*API) PhotosRestoreComment

func (api *API) PhotosRestoreComment(p PhotosRestoreCommentParams) (bool, error)

PhotosRestoreComment восстанавливает удаленный комментарий к фотографии.

func (*API) PhotosSave

func (api *API) PhotosSave(p PhotosSaveParams) ([]Photo, error)

PhotosSave сохраняет фотографии после успешной загрузки.

func (*API) PhotosSaveMarketAlbumPhoto

func (api *API) PhotosSaveMarketAlbumPhoto(p PhotosSaveMarketAlbumPhotoParams) ([]Photo, error)

PhotosSaveMarketAlbumPhoto сохраняет фотографии после успешной загрузки на URI, полученный методом photos.getmarketalbumuploadserver.

func (*API) PhotosSaveMarketPhoto

func (api *API) PhotosSaveMarketPhoto(p PhotosSaveMarketPhotoParams) ([]Photo, error)

PhotosSaveMarketPhoto сохраняет фотографии после успешной загрузки на URI, полученный методом photos.getmarketuploadserver.

func (*API) PhotosSaveMessagesPhoto

func (api *API) PhotosSaveMessagesPhoto(p PhotosSaveMessagesPhotoParams) (*PhotosSaveMessagesPhotoResp, error)

PhotosSaveMessagesPhoto сохраняет фотографию после успешной загрузки на URI, полученный методом photos.getmessagesuploadserver.

func (*API) PhotosSaveOwnerCoverPhoto

func (api *API) PhotosSaveOwnerCoverPhoto(p PhotosSaveOwnerCoverPhotoParams) (*PhotosSaveOwnerCoverPhotoResp, error)

PhotosSaveOwnerCoverPhoto сохраняет изображение для обложки сообщества после успешной загрузки.

func (*API) PhotosSaveOwnerPhoto

func (api *API) PhotosSaveOwnerPhoto(p PhotosSaveOwnerPhotoParams) (*PhotosSaveOwnerPhotoResp, error)

PhotosSaveOwnerPhoto позволяет сохранить главную фотографию пользователя или сообщества. Адрес для загрузки фотографии вы можете получить с помощью метода photos.getownerphotouploadserver.

func (*API) PhotosSaveWallPhoto

func (api *API) PhotosSaveWallPhoto(p PhotosSaveWallPhotoParams) ([]Photo, error)

PhotosSaveWallPhoto сохраняет фотографии после успешной загрузки на URI, полученный методом photos.getwalluploadserver.

func (*API) PhotosSearch

func (api *API) PhotosSearch(p PhotosSearchParams) (*PhotosSearchResp, error)

PhotosSearch осуществляет поиск изображений по местоположению или описанию.

func (*API) Request

func (api *API) Request(method string, p, holder interface{}) (interface{}, error)

Request запрос к методам VK.

func (*API) SearchGetHints

func (api *API) SearchGetHints(p SearchGetHintsParams) (*SearchGetHintsResp, error)

SearchGetHints метод позволяет получить результаты быстрого поиска по произвольной подстроке.

func (*API) StatusGet

func (api *API) StatusGet(p StatusGetParams) (*StatusGetResp, error)

StatusGet получает текст статуса пользователя или сообщества.

func (*API) StatusSet

func (api *API) StatusSet(p StatusSetParams) (bool, error)

StatusSet устанавливает новый статус текущему пользователю или сообществу.

func (*API) WallCloseComments

func (api *API) WallCloseComments(p WallCloseCommentsParams) (bool, error)

WallCloseComments выключает комментирование записи.

func (*API) WallCreateComment

func (api *API) WallCreateComment(p WallCreateCommentParams) (*WallCreateCommentResp, error)

WallCreateComment добавляет комментарий к записи на стене.

func (*API) WallDelete

func (api *API) WallDelete(p WallDeleteParams) (bool, error)

WallDelete удаляет запись со стены.

func (*API) WallDeleteComment

func (api *API) WallDeleteComment(p WallDeleteCommentParams) (bool, error)

WallDeleteComment удаляет комментарий к записи на стене.

func (*API) WallEdit

func (api *API) WallEdit(p WallEditParams) (*WallEditResp, error)

WallEdit редактирует запись на стене.

func (*API) WallEditAdsStealth

func (api *API) WallEditAdsStealth(p WallEditAdsStealthParams) (bool, error)

WallEditAdsStealth позволяет отредактировать скрытую запись. Создание скрытых записей возможно только в сообществах от имени группы, публичной страницы или мероприятия; пользователь должен обладать правами администратора или редактора.

func (*API) WallEditComment

func (api *API) WallEditComment(p WallEditCommentParams) (bool, error)

WallEditComment редактирует комментарий на стене.

func (*API) WallGet

func (api *API) WallGet(p WallGetParams) (*WallGetResp, error)

WallGet возвращает список записей со стены пользователя или сообщества. Обратите внимание, для этого метода действуют специальные ограничения на число запросов. https://vk.com/dev/data_limits

func (*API) WallGetByID

func (api *API) WallGetByID(p WallGetByIDParams) (interface{}, error)

WallGetByID возвращает список записей со стен пользователей или сообществ по их идентификаторам. Возвращает []Post, если Extended=false или *WallGetByIDResp, если Extended=true.

func (*API) WallGetComment

func (api *API) WallGetComment(p WallGetCommentParams) (*WallGetCommentResp, error)

WallGetComment получает информацию о комментарии на стене.

func (*API) WallGetComments

func (api *API) WallGetComments(p WallGetCommentsParams) (*WallGetCommentsResp, error)

WallGetComments возвращает список комментариев к записи на стене.

func (*API) WallGetReposts

func (api *API) WallGetReposts(p WallGetRepostsParams) (*WallGetRepostsResp, error)

WallGetReposts позволяет получать список репостов заданной записи. Обратите внимание, получить список репостов можно только для записи, созданной текущим пользователем, или в сообществе, где текущий пользователь является администратором.

func (*API) WallOpenComments

func (api *API) WallOpenComments(p WallOpenCommentsParams) (bool, error)

WallOpenComments включает комментирование записи работает только с конкретными записями, комментирование которых было выключено с помощью wall.closecomments

func (*API) WallPin

func (api *API) WallPin(p WallPinParams) (bool, error)

WallPin закрепляет запись на стене (запись будет отображаться выше остальных).

func (*API) WallPost

func (api *API) WallPost(p WallPostParams) (*WallPostResp, error)

WallPost позволяет создать запись на стене, предложить запись на стене публичной страницы, опубликовать существующую отложенную запись. Чтобы создать предложенную запись, необходимо передать в owner_id идентификатор публичной страницы, в которой текущий пользователь не является руководителем. Для публикации предложенных и отложенных записей используйте параметр post_id, значение для которого можно получить методом wall.get с filter=suggests и postponed соответственно.

func (*API) WallPostAdsStealth

func (api *API) WallPostAdsStealth(p WallPostAdsStealthParams) (int, error)

WallPostAdsStealth позволяет создать скрытую запись, которая не попадает на стену сообщества и в дальнейшем может быть использована для создания рекламного объявления типа "запись в сообществе". Cоздание скрытых записей возможно только в сообществах от имени группы, публичной страницы или мероприятия; пользователь должен обладать правами администратора или редактора. Обратите внимание — в сутки можно создать не более 100 скрытых записей.

func (*API) WallReportComment

func (api *API) WallReportComment(p WallReportCommentParams) (bool, error)

WallReportComment позволяет пожаловаться на комментарий к записи.

func (*API) WallReportPost

func (api *API) WallReportPost(p WallReportPostParams) (bool, error)

WallReportPost позволяет пожаловаться на запись.

func (*API) WallRepost

func (api *API) WallRepost(p WallRepostParams) (*WallRepostResp, error)

WallRepost копирует объект на стену пользователя или сообщества.

func (*API) WallRestore

func (api *API) WallRestore(p WallRestoreParams) (bool, error)

WallRestore восстанавливает удаленную запись на стене пользователя или сообщества.

func (*API) WallRestoreComment

func (api *API) WallRestoreComment(p WallRestoreCommentParams) (bool, error)

WallRestoreComment восстанавливает удаленный комментарий к записи на стене.

func (*API) WallSearch

func (api *API) WallSearch(p WallSearchParams) (*WallSearchResp, error)

WallSearch позволяет искать записи на стене в соответствии с заданными критериями. Обратите внимание, для этого метода действуют специальные ограничения на число запросов. https://vk.com/dev/data_limits

func (*API) WallUnpin

func (api *API) WallUnpin(p WallUnpinParams) (bool, error)

WallUnpin отменяет закрепление записи на стене.

type Action

type Action struct {
	Type    string `json:"type"`
	Label   string `json:"label,omitempty"`
	Payload string `json:"payload,omitempty"`
	Hash    string `json:"hash,omitempty"`
	AppID   string `json:"app_id,omitempty"`
	OwnerID string `json:"owner_id,omitempty"`
}

Action структура действия кнопки клавиатуры бота.

type Address

type Address struct {
	ID                int        `json:"id"`
	CountryID         int        `json:"country_id"`
	CityID            int        `json:"city_id"`
	Title             string     `json:"title"`
	Address           string     `json:"address"`
	AdditionalAddress string     `json:"additional_address"`
	Latitude          float32    `json:"latitude"`
	Longitude         float32    `json:"longitude"`
	MetroStationID    int        `json:"metro_station_id"`
	Phone             string     `json:"phone"`
	WorkInfoStatus    string     `json:"work_info_status"`
	Timetable         *Timetable `json:"timetable"`
	TimeOffset        int        `json:"time_offset"`
}

Address описывает адрес в сообществе.

type Album

type Album struct {
	ID          int    `json:"id"`
	Thumb       *Photo `json:"thumb"`
	OwnerID     int    `json:"owner_id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Created     int64  `json:"created"`
	Updated     int64  `json:"updated"`
	Size        int    `json:"size"`
}

Album описывает альбом с фотографиями.

type App

type App struct {
	ID                    int    `json:"id"`
	Title                 string `json:"title"`
	Icon278               string `json:"icon_278"`
	Icon139               string `json:"icon_139"`
	Icon150               string `json:"icon_150"`
	Icon75                string `json:"icon_75"`
	Banner560             string `json:"banner_560"`
	Banner1120            string `json:"banner_1120"`
	Type                  string `json:"type"`
	Section               string `json:"section"`
	AuthorURL             string `json:"author_url"`
	AuthorID              int    `json:"author_id"`
	AuthorGroup           int    `json:"author_group"`
	MembersCount          int    `json:"members_count"`
	PublishedDate         int64  `json:"published_date"`
	CatalogPosition       int    `json:"catalog_position"`
	International         int    `json:"international"`
	LeaderboardType       int    `json:"leaderboard_type"`
	GenreID               int    `json:"genre_id"`
	Genre                 string `json:"genre"`
	PlatformID            string `json:"platform_id"`
	IsInCatalog           int    `json:"is_in_catalog"`
	Friends               []int  `json:"friends"`
	Installed             int    `json:"installed"`
	IsHTML5App            int    `json:"is_html5_app"`
	ScreenOrientation     int    `json:"screen_orientation"`
	MobileControlsType    int    `json:"mobile_controls_type"`
	MobileViewSupportType int    `json:"mobile_view_support_type"`

	Description string  `json:"description"`
	ScreenName  string  `json:"screen_name"`
	Icon16      string  `json:"icon_16"`
	Screenshots []Photo `json:"screenshots"`
	PushEnabled int     `json:"push_enabled"`
}

App описывает приложение.

type Attachment

type Attachment struct {
	Type        string       `json:"type"`
	Photo       *Photo       `json:"photo"`
	Video       *Video       `json:"video"`
	Audio       *Audio       `json:"audio"`
	Doc         *Doc         `json:"doc"`
	Link        *Link        `json:"link"`
	Note        *Note        `json:"note"`
	Poll        *Poll        `json:"poll"`
	Page        *Page        `json:"page"`
	Market      *MarketItem  `json:"market"`
	MarketAlbum *MarketAlbum `json:"market_album"`
	Wall        *Post        `json:"wall"`
	WallReply   *Comment     `json:"wall_reply"`
	Sticker     *Sticker     `json:"sticker"`
	Gift        *Gift        `json:"gift"`
	Album       *Album       `json:"album"`
	PrettyCard  *PrettyCard  `json:"pretty_card"`
	Event       *Event       `json:"event"`
}

Attachment .

type Audio

type Audio struct {
	ID       int    `json:"id"`
	OwnerID  int    `json:"owner_id"`
	Artist   string `json:"artist"`
	Title    string `json:"title"`
	Duration int    `json:"duration"`
	URL      string `json:"url"`
	LyricsID int    `json:"lyrics_id"`
	AlbumID  int    `json:"album_id"`
	GenreID  int    `json:"genre_id"`
	Date     int64  `json:"date"`
	NoSearch int    `json:"no_search"`
	IsHq     int    `json:"is_hq"`
}

Audio описывает аудиозапись.

type BusinessHours

type BusinessHours struct {
	OpenTime       int `json:"open_time,omitempty"`
	CloseTime      int `json:"close_time,omitempty"`
	BreakOpenTime  int `json:"break_open_time,omitempty"`
	BreakCloseTime int `json:"break_close_time,omitempty"`
}

BusinessHours рабочее время.

type Button

type Button struct {
	Action Action `json:"action"`
	Color  string `json:"color"`
}

Button структура кнопки клавиатуры бота.

func NewTextButton

func NewTextButton(label, color string, payload ...string) Button

NewTextButton новая кнопка.

type Chat

type Chat struct {
	ID           int    `json:"id"`
	Type         string `json:"type"`
	Title        string `json:"title"`
	AdminID      int    `json:"admin_id"`
	Users        []int  `json:"users"`
	PushSettings *struct {
		Sound         int `json:"sound"`
		DisabledUntil int `json:"disabled_until"`
	} `json:"push_settings"`
	Photo50  string `json:"photo_50"`
	Photo100 string `json:"photo_100"`
	Photo200 string `json:"photo_200"`
	Left     int    `json:"left"`
	Kicked   int    `json:"kicked"`
}

Chat описывает чат.

type Comment

type Comment struct {
	ID             int          `json:"id"`
	FromID         int          `json:"from_id"`
	CanEdit        int          `json:"can_edit"`
	PostID         int          `json:"post_id"`
	OwnerID        int          `json:"owner_id"`
	Date           int64        `json:"date"`
	Text           string       `json:"text"`
	ReplyToUser    int          `json:"reply_to_user"`
	ReplyToComment int          `json:"reply_to_comment"`
	Attachments    []Attachment `json:"attachments"`
	ParentsStack   []int        `json:"parents_stack"`
	Thread         *struct {
		Count           int       `json:"count"`
		Items           []Comment `json:"items"`
		CanPost         bool      `json:"can_post"`
		ShowReplyButton bool      `json:"show_reply_button"`
		GroupsCanPost   bool      `json:"groups_can_post"`
	} `json:"thread"`
	Deleted bool `json:"deleted"`
	// поле для методов с параметром need_likes=true
	Likes *struct {
		Count     int `json:"count"`
		UserLikes int `json:"user_likes"`
		CanLike   int `json:"can_like"`
	} `json:"likes"`
	// поле для метода photos.getAllComments.
	PID int `json:"pid,omitempty"`
}

Comment описывает комментарий к записи.

type CommentBoard

type CommentBoard struct {
	ID          int          `json:"id"`
	FromID      int          `json:"from_id"`
	Date        int64        `json:"date"`
	Text        string       `json:"text"`
	Attachments []Attachment `json:"attachments"`
	Likes       *struct {
		Count     int `json:"count"`
		UserLikes int `json:"user_likes"`
		CanLike   int `json:"can_like"`
	} `json:"likes"`
}

CommentBoard описывает комментарий из обсуждения в сообществе.

type Conversation

type Conversation struct {
	Peer *struct {
		ID      int    `json:"id"`
		Type    string `json:"type"`
		LocalID int    `json:"local_id"`
	} `json:"peer"`
	InRead       int  `json:"in_read"`
	OutRead      int  `json:"out_read"`
	UnreadCount  int  `json:"unread_count"`
	Important    bool `json:"important"`
	Unanswered   bool `json:"unanswered"`
	PushSettings *struct {
		DisabledUntil   int64 `json:"disabled_until"`
		DisabledForever bool  `json:"disabled_forever"`
		NoSound         bool  `json:"no_sound"`
	} `json:"push_settings"`
	CanWrite *struct {
		Allowed bool `json:"allowed"`
		Reason  int  `json:"reason"`
	} `json:"can_write"`
	ChatSettings *struct {
		MembersCount  int            `json:"members_count"`
		Title         string         `json:"title"`
		PinnedMessage *PinnedMessage `json:"pinned_message"`
		State         string         `json:"state"`
		Photo         *struct {
			Photo50  string `json:"photo_50"`
			Photo100 string `json:"photo_100"`
			Photo200 string `json:"photo_200"`
		} `json:"photo"`
		ActiveIDS      []int `json:"active_ids"`
		IsGroupChannel bool  `json:"is_group_channel"`
	} `json:"chat_settings"`
}

Conversation описывает беседу с пользователем, сообществом или групповой чат.

type DatabaseGetChairsParams

type DatabaseGetChairsParams struct {
	FacultyID uint
	Offset    uint
	Count     uint
}

DatabaseGetChairsParams параметры метода DatabaseGetChairs.

type DatabaseGetChairsResp

type DatabaseGetChairsResp struct {
	Count int `json:"count"`
	Items []struct {
		ID    int    `json:"id"`
		Title string `json:"title"`
	} `json:"items"`
}

DatabaseGetChairsResp структура, возвращаемая методом DatabaseGetChairs.

type DatabaseGetCitiesByIDParams

type DatabaseGetCitiesByIDParams struct {
	CityIDS []int
}

DatabaseGetCitiesByIDParams параметры метода DatabaseGetCitiesByID.

type DatabaseGetCitiesByIDResp

type DatabaseGetCitiesByIDResp []struct {
	ID    int    `json:"id"`
	Title string `json:"title"`
}

DatabaseGetCitiesByIDResp структура, возвращаемая методом DatabaseGetCitiesByID.

type DatabaseGetCitiesParams

type DatabaseGetCitiesParams struct {
	CountryID uint
	RegionID  uint
	Q         string
	NeedAll   bool
	Offset    uint
	Count     uint
}

DatabaseGetCitiesParams параметры метода DatabaseGetCities.

type DatabaseGetCitiesResp

type DatabaseGetCitiesResp struct {
	Count int `json:"count"`
	Items []struct {
		ID        int    `json:"id"`
		Title     string `json:"title"`
		Area      string `json:"area"`
		Region    string `json:"region"`
		Important int    `json:"important"`
	} `json:"items"`
}

DatabaseGetCitiesResp структура, возвращаемая методом DatabaseGetCities.

type DatabaseGetCountriesByIDParams

type DatabaseGetCountriesByIDParams struct {
	CountryIDS []int
}

DatabaseGetCountriesByIDParams параметры метода DatabaseGetCountriesByID.

type DatabaseGetCountriesByIDResp

type DatabaseGetCountriesByIDResp []struct {
	ID    int    `json:"id"`
	Title string `json:"title"`
}

DatabaseGetCountriesByIDResp структура, возвращаемая методом DatabaseGetCountriesByID.

type DatabaseGetCountriesParams

type DatabaseGetCountriesParams struct {
	NeedAll bool
	Code    string
	Offset  uint
	Count   uint
}

DatabaseGetCountriesParams параметры метода DatabaseGetCountries.

type DatabaseGetCountriesResp

type DatabaseGetCountriesResp struct {
	Count int `json:"count"`
	Items []struct {
		ID    int    `json:"id"`
		Title string `json:"title"`
	} `json:"items"`
}

DatabaseGetCountriesResp структура, возвращаемая методом DatabaseGetCountries.

type DatabaseGetFacultiesParams

type DatabaseGetFacultiesParams struct {
	UniversityID uint
	Offset       uint
	Count        uint
}

DatabaseGetFacultiesParams параметры метода DatabaseGetFaculties.

type DatabaseGetFacultiesResp

type DatabaseGetFacultiesResp struct {
	Count int `json:"count"`
	Items []struct {
		ID    int    `json:"id"`
		Title string `json:"title"`
	} `json:"items"`
}

DatabaseGetFacultiesResp структура, возвращаемая методом DatabaseGetFaculties.

type DatabaseGetMetroStationsByIDParams

type DatabaseGetMetroStationsByIDParams struct {
	StationIDS []int
}

DatabaseGetMetroStationsByIDParams параметры метода DatabaseGetMetroStationsByID.

type DatabaseGetMetroStationsByIDResp

type DatabaseGetMetroStationsByIDResp []struct {
	ID     int    `json:"id"`
	Name   string `json:"name"`
	Color  string `json:"color"`
	CityID int    `json:"city_id"`
}

DatabaseGetMetroStationsByIDResp структура, возвращаемая методом DatabaseGetMetroStationsByID.

type DatabaseGetMetroStationsParams

type DatabaseGetMetroStationsParams struct {
	CityID   uint
	Offset   uint
	Count    uint
	Extended bool
}

DatabaseGetMetroStationsParams параметры метода DatabaseGetMetroStations.

type DatabaseGetMetroStationsResp

type DatabaseGetMetroStationsResp struct {
	Count int `json:"count"`
	Items []struct {
		ID    int    `json:"id"`
		Name  string `json:"name"`
		Color string `json:"color"`
	} `json:"items"`
}

DatabaseGetMetroStationsResp структура, возвращаемая методом DatabaseGetMetroStations.

type DatabaseGetRegionsParams

type DatabaseGetRegionsParams struct {
	CountryID uint
	Q         string
	Offset    uint
	Count     uint
}

DatabaseGetRegionsParams параметры метода DatabaseGetRegions.

type DatabaseGetRegionsResp

type DatabaseGetRegionsResp struct {
	Count int `json:"count"`
	Items []struct {
		ID    int    `json:"id"`
		Title string `json:"title"`
	} `json:"items"`
}

DatabaseGetRegionsResp структура, возвращаемая методом DatabaseGetRegions.

type DatabaseGetSchoolClassesParams

type DatabaseGetSchoolClassesParams struct {
	CountryID uint
}

DatabaseGetSchoolClassesParams параметры метода DatabaseGetSchoolClasses.

type DatabaseGetSchoolsParams

type DatabaseGetSchoolsParams struct {
	Q      string
	CityID uint
	Offset uint
	Count  uint
}

DatabaseGetSchoolsParams параметры метода DatabaseGetSchools.

type DatabaseGetSchoolsResp

type DatabaseGetSchoolsResp struct {
	Count int `json:"count"`
	Items []struct {
		ID    int    `json:"id"`
		Title string `json:"title"`
	} `json:"items"`
}

DatabaseGetSchoolsResp структура, возвращаемая методом DatabaseGetSchools.

type DatabaseGetUniversitiesParams

type DatabaseGetUniversitiesParams struct {
	Q         string
	CountryID uint
	CityID    uint
	Offset    uint
	Count     uint
}

DatabaseGetUniversitiesParams параметры метода DatabaseGetUniversities.

type DatabaseGetUniversitiesResp

type DatabaseGetUniversitiesResp struct {
	Count int `json:"count"`
	Items []struct {
		ID    int    `json:"id"`
		Title string `json:"title"`
	} `json:"items"`
}

DatabaseGetUniversitiesResp структура, возвращаемая методом DatabaseGetUniversities.

type Doc

type Doc struct {
	ID      int    `json:"id"`
	OwnerID int    `json:"owner_id"`
	Title   string `json:"title"`
	Size    int    `json:"size"`
	Ext     string `json:"ext"`
	URL     string `json:"url"`
	Date    int64  `json:"date"`
	Type    int    `json:"type"`
	Preview *struct {
		Photo *struct {
			Sizes []Size `json:"sizes"`
		} `json:"photo"`
		Graffiti *struct {
			Src    string `json:"src"`
			Width  int    `json:"width"`
			Height int    `json:"height"`
		} `json:"graffiti"`
		AudioMessage *struct {
			Duration int    `json:"duration"`
			Waveform int    `json:"waveform"`
			LinkOgg  string `json:"link_ogg"`
			LinkMp3  string `json:"link_mp3"`
		} `json:"preview"`
	}
}

Doc описывает документ.

type Error

type Error struct {
	ErrorCode     int    `json:"error_code"`
	ErrorMsg      string `json:"error_msg"`
	RequestParams []struct {
		Key   string `json:"key"`
		Value string `json:"value"`
	} `json:"request_params"`
}

Error ошибка при обращении к методам VK.

type Event

type Event struct {
	ID           int    `json:"id"`
	Time         int64  `json:"time"`
	MemberStatus int    `json:"member_status"`
	IsFavorite   bool   `json:"is_favorite"`
	Address      string `json:"address"`
	Text         string `json:"text"`
	ButtonText   string `json:"button_text"`
	Friends      []int  `json:"friends"`
}

Event описывает встречу.

type FriendsAddListParams

type FriendsAddListParams struct {
	Name    string
	UserIDS []int
}

FriendsAddListParams параметры метода FriendsAddList.

type FriendsAddListResp

type FriendsAddListResp struct {
	ListID int `json:"list_id"`
}

FriendsAddListResp структура, возвращаемая методом FriendsAddList.

type FriendsAddParams

type FriendsAddParams struct {
	UserID uint
	Text   string
	Follow bool
}

FriendsAddParams параметры метода FriendsAdd.

type FriendsAreFriendsParams

type FriendsAreFriendsParams struct {
	UserIDS  []int
	NeedSign bool
}

FriendsAreFriendsParams параметры метода FriendsAreFriends.

type FriendsAreFriendsResp

type FriendsAreFriendsResp []struct {
	UserID         int    `json:"user_id"`
	FriendStatus   int    `json:"friend_status"`
	RequestMessage string `json:"request_message"`
	ReadState      int    `json:"read_state"`
	Sign           string `json:"sign"`
}

FriendsAreFriendsResp структура, возвращаемая методом FriendsAreFriends.

type FriendsDeleteListParams

type FriendsDeleteListParams struct {
	ListID uint
}

FriendsDeleteListParams параметры метода FriendsDeleteList.

type FriendsDeleteParams

type FriendsDeleteParams struct {
	UserID uint
}

FriendsDeleteParams параметры метода FriendsDelete.

type FriendsDeleteResp

type FriendsDeleteResp struct {
	Success           int `json:"success"`
	FriendDeleted     int `json:"friend_deleted"`
	OutRequestDeleted int `json:"out_request_deleted"`
	InRequestDeleted  int `json:"in_request_deleted"`
	SuggestionDeleted int `json:"suggestion_deleted"`
}

FriendsDeleteResp структура, возвращаемая методом FriendsDelete.

type FriendsEditListParams

type FriendsEditListParams struct {
	Name          string
	ListID        uint
	UserIDS       []int
	AddUserIDS    []int
	DeleteUserIDS []int
}

FriendsEditListParams параметры метода FriendsEditList.

type FriendsEditParams

type FriendsEditParams struct {
	UserID  uint
	ListIDS []int
}

FriendsEditParams параметры метода FriendsEdit.

type FriendsGetByPhonesParams

type FriendsGetByPhonesParams struct {
	Phones string
	Fields string
}

FriendsGetByPhonesParams параметры метода FriendsGetByPhones.

type FriendsGetIDSResp

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

FriendsGetIDSResp структура, возвращаемая методом FriendsGet, содержит идентификаторы друзей.

type FriendsGetListsParams

type FriendsGetListsParams struct {
	UserID       uint
	ReturnSystem bool
}

FriendsGetListsParams параметры метода FriendsGetLists.

type FriendsGetListsResp

type FriendsGetListsResp struct {
	Count int `json:"count"`
	Items []struct {
		ID   int    `json:"id"`
		Name string `json:"name"`
	} `json:"items"`
}

FriendsGetListsResp структура, возвращаемая методом FriendsGetLists.

type FriendsGetMutualParams

type FriendsGetMutualParams struct {
	SourceUID  uint
	TargetUID  uint
	TargetUIDS []int
	Order      string
	Count      uint
	Offset     uint
}

FriendsGetMutualParams параметры метода FriendsGetMutual.

type FriendsGetOnlineParams

type FriendsGetOnlineParams struct {
	UserID       uint
	ListID       uint
	OnlineMobile bool
	Order        string
	Count        uint
	Offset       uint
}

FriendsGetOnlineParams параметры метода FriendsGetOnline.

type FriendsGetOnlineResp

type FriendsGetOnlineResp struct {
	Online       []int `json:"online,omitempty"`
	OnlineMobile []int `json:"online_mobile,omitempty"`
}

FriendsGetOnlineResp структура, возвращаемая методом FriendsGetOnline.

type FriendsGetParams

type FriendsGetParams struct {
	UserID   int
	Order    string
	ListID   uint
	Count    uint
	Offset   uint
	Fields   string
	NameCase string
	Ref      string
}

FriendsGetParams параметры метода FriendsGet.

type FriendsGetRecentParams

type FriendsGetRecentParams struct {
	Count uint
}

FriendsGetRecentParams параметры метода FriendsGetRecent.

type FriendsGetRequestsParams

type FriendsGetRequestsParams struct {
	Offset     uint
	Count      uint
	Extended   bool
	NeedMutual bool
	Out        bool
	Sort       uint
	NeedViewed bool
	Suggested  bool
	Ref        string
	Fields     string
}

FriendsGetRequestsParams параметры метода FriendsGetRequests.

type FriendsGetRequestsResp

type FriendsGetRequestsResp struct {
	Count int `json:"count"`
	Items []struct {
		UserID          int    `json:"user_id"`
		FirstName       string `json:"first_name"`
		LastName        string `json:"last_name"`
		IsClosed        bool   `json:"is_closed"`
		CanAccessClosed bool   `json:"can_access_closed"`
		Mutual          *struct {
			Count int   `json:"count"`
			Users []int `json:"users"`
		} `json:"mutual"`
		TrackCode string `json:"track_code"`
	} `json:"items"`
}

FriendsGetRequestsResp структура, возвращаемая методом FriendsGetRequests.

type FriendsGetSuggestionsParams

type FriendsGetSuggestionsParams struct {
	Filter   string
	Count    uint
	Offset   uint
	Fields   string
	NameCase string
}

FriendsGetSuggestionsParams параметры метода FriendsGetSuggestions.

type FriendsGetSuggestionsResp

type FriendsGetSuggestionsResp struct {
	Count int    `json:"count"`
	Items []User `json:"items"`
}

FriendsGetSuggestionsResp структура, возвращаемая методом FriendsGetSuggestions.

type FriendsGetUsersResp

type FriendsGetUsersResp struct {
	Count int    `json:"count"`
	Items []User `json:"items"`
}

FriendsGetUsersResp структура, возвращаемая методом FriendsGet, содержит объекты-профили.

type FriendsSearchParams

type FriendsSearchParams struct {
	UserID   uint
	Q        string
	Fields   string
	NameCase string
	Offset   uint
	Count    uint
}

FriendsSearchParams параметры метода FriendsSearch.

type FriendsSearchResp

type FriendsSearchResp struct {
	Count int    `json:"count"`
	Items []User `json:"items"`
}

FriendsSearchResp структура, возвращаемая методом FriendsSearch.

type Geo

type Geo struct {
	Type        string `json:"type"`
	Coordinates *struct {
		Latitude  float32 `json:"latitude"`
		Longitude float32 `json:"longitude"`
	} `json:"coordinates"`
	Place *struct {
		ID        int     `json:"id"`
		Title     string  `json:"title"`
		Latitude  float32 `json:"latitude"`
		Longitude float32 `json:"longitude"`
		Created   int64   `json:"created"`
		Icon      string  `json:"icon"`
		Country   string  `json:"country"`
		City      string  `json:"city"`

		Type       int    `json:"type"`
		GroupID    int    `json:"group_id"`
		GroupPhoto string `json:"group_photo"`
		Checkins   int    `json:"checkins"`
		Updated    int64  `json:"updated"`
		Address    int    `json:"address"`
	} `json:"place"`
}

Geo описывает геометку.

type Gift

type Gift struct {
	ID       int    `json:"id"`
	Thumb256 string `json:"thumb_256"`
	Thumb96  string `json:"thumb_96"`
	Thumb48  string `json:"thumb_48"`
}

Gift описывает подарок.

type Group

type Group struct {
	ID           int    `json:"id"`
	Name         string `json:"name"`
	ScreenName   string `json:"screen_name"`
	IsClosed     int    `json:"is_closed"`
	Deactivated  string `json:"deactivated"`
	IsAdmin      int    `json:"is_admin"`
	AdminLevel   int    `json:"admin_level"`
	IsMember     int    `json:"is_member"`
	IsAdvertiser int    `json:"is_advertiser"`
	InvitedBy    int    `json:"invited_by"`
	Type         string `json:"type"`
	Photo50      string `json:"photo_50"`
	Photo100     string `json:"photo_100"`
	Photo200     string `json:"photo_200"`

	Activity  string `json:"activity"`
	AgeLimits int    `json:"age_limits"`
	BanInfo   *struct {
		EndDate int64  `json:"end_date"`
		Comment string `json:"comment"`
	} `json:"ban_info"`
	CanCreateTopic int `json:"can_create_topic"`
	CanMessage     int `json:"can_message"`
	CanPost        int `json:"can_post"`
	CanSeeAllPosts int `json:"can_see_all_posts"`
	CanUploadDoc   int `json:"can_upload_doc"`
	CanUploadVideo int `json:"can_upload_video"`
	City           *struct {
		ID    int    `json:"id"`
		Title string `json:"title"`
	} `json:"city"`
	Contacts *struct {
		UserID int    `json:"user_id"`
		Desc   string `json:"desc"`
		Phone  string `json:"phone"`
		Email  string `json:"email"`
	} `json:"contacts"`
	Counters *struct {
		Photos int `json:"photos"`
		Albums int `json:"albums"`
		Audios int `json:"audios"`
		Videos int `json:"videos"`
		Topics int `json:"topics"`
		Docs   int `json:"docs"`
	} `json:"counters"`
	Country *struct {
		ID    int    `json:"id"`
		Title string `json:"title"`
	} `json:"country"`
	Cover *struct {
		Enabled int `json:"enabled"`
		Images  []struct {
			URL    string `json:"url"`
			Width  int    `json:"width"`
			Height int    `json:"height"`
		} `json:"images"`
	} `json:"cover"`
	CropPhoto *struct {
		Photo *Photo `json:"photo"`
		Crop  *struct {
			X  float32 `json:"x"`
			Y  float32 `json:"y"`
			X2 float32 `json:"x2"`
			Y2 float32 `json:"y2"`
		} `json:"crop"`
		Rect *struct {
			X  float32 `json:"x"`
			Y  float32 `json:"y"`
			X2 float32 `json:"x2"`
			Y2 float32 `json:"y2"`
		} `json:"rect"`
	} `json:"crop_photo"`
	Description       string `json:"description"`
	FixedPost         int    `json:"fixed_post"`
	HasPhoto          int    `json:"has_photo"`
	IsFavorite        int    `json:"is_favorite"`
	IsHiddenFromFeed  int    `json:"is_hidden_from_feed"`
	IsMessagesBlocked int    `json:"is_messages_blocked"`
	Links             *struct {
		ID       int    `json:"id"`
		URL      string `json:"url"`
		Name     string `json:"name"`
		Desc     string `json:"desc"`
		Photo50  string `json:"photo_50"`
		Photo100 string `json:"photo_100"`
	} `json:"links"`
	MainAlbumID int `json:"main_album_id"`
	MainSection int `json:"main_section"`
	Market      *struct {
		Enabled     int `json:"enabled"`
		PriceMin    int `json:"price_min"`
		PriceMax    int `json:"price_max"`
		MainAlbumID int `json:"main_album_id"`
		ContactID   int `json:"contact_id"`
		Currency    *struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"currency"`
		CurrencyText string `json:"currency_text"`
	} `json:"market"`
	MemberStatus int `json:"member_status"`
	MembersCount int `json:"members_count"`
	Place        *struct {
		ID        int     `json:"id"`
		Title     string  `json:"title"`
		Latitude  float32 `json:"latitude"`
		Longitude float32 `json:"longitude"`
		Type      int     `json:"type"`
		Country   int     `json:"country"`
		City      int     `json:"city"`
		Address   string  `json:"address"`
	} `json:"place"`
	PublicDateLabel string      `json:"public_date_label"`
	Site            string      `json:"site"`
	StartDate       interface{} `json:"start_date"`
	FinishDate      int64       `json:"finish_date"`
	Status          string      `json:"status"`
	Trending        int         `json:"trending"`
	Verified        int         `json:"verified"`
	Wall            int         `json:"wall"`
	WikiPage        string      `json:"wiki_page"`
}

Group описывает сообщество. Набор полей может меняться в зависимости от вызванного метода и переданных в нем параметров.

type GroupsAddAddressParams

type GroupsAddAddressParams struct {
	GroupID           uint
	Title             string
	Address           string
	AdditionalAddress string
	CountryID         uint
	CityID            uint
	MetroID           uint
	Latitude          float32
	Longitude         float32
	Phone             string
	WorkInfoStatus    string
	Timetable         *Timetable
	IsMainAddress     bool
}

GroupsAddAddressParams параметры метода GroupsAddAddress.

type GroupsAddCallbackServerParams

type GroupsAddCallbackServerParams struct {
	GroupID   uint
	URL       string
	Title     string
	SecretKey string
}

GroupsAddCallbackServerParams параметры метода GroupsAddCallbackServer.

type GroupsAddCallbackServerResp

type GroupsAddCallbackServerResp struct {
	ServerID int `json:"server_id"`
}

GroupsAddCallbackServerResp структура, возвращаемая методом GroupsAddCallbackServer.

type GroupsAddLinkParams

type GroupsAddLinkParams struct {
	GroupID uint
	Link    string
	Text    string
}

GroupsAddLinkParams параметры метода GroupsAddLink.

type GroupsAddLinkResp

type GroupsAddLinkResp struct {
	ID              int    `json:"id"`
	URL             string `json:"url"`
	Name            string `json:"name"`
	EditTitle       int    `json:"edit_title"`
	Desc            string `json:"desc"`
	ImageProcessing int    `json:"image_processing"`
}

GroupsAddLinkResp структура, возвращаемая методом GroupsAddLink.

type GroupsApproveRequestParams

type GroupsApproveRequestParams struct {
	GroupID uint
	UserID  uint
}

GroupsApproveRequestParams параметры метода GroupsApproveRequest.

type GroupsBanParams

type GroupsBanParams struct {
	GroupID        uint
	OwnerID        int
	EndDate        int64
	Reason         uint
	Comment        string
	CommentVisible bool
}

GroupsBanParams параметры метода GroupsBan.

type GroupsCreateParams

type GroupsCreateParams struct {
	Title          string
	Description    string
	Type           string
	PublicCategory uint
	Subtype        uint
}

GroupsCreateParams параметры метода GroupsCreate.

type GroupsDeleteAddressParams

type GroupsDeleteAddressParams struct {
	GroupID   uint
	AddressID uint
}

GroupsDeleteAddressParams параметры метода GroupsDeleteAddress.

type GroupsDeleteCallbackServerParams

type GroupsDeleteCallbackServerParams struct {
	GroupID  uint
	ServerID uint
}

GroupsDeleteCallbackServerParams параметры метода GroupsDeleteCallbackServer.

type GroupsDeleteLinkParams

type GroupsDeleteLinkParams struct {
	GroupID uint
	LinkID  uint
}

GroupsDeleteLinkParams параметры метода GroupsDeleteLink.

type GroupsDisableOnlineParams

type GroupsDisableOnlineParams struct {
	GroupID uint
}

GroupsDisableOnlineParams параметры метода GroupsDisableOnline.

type GroupsEditAddressParams

type GroupsEditAddressParams struct {
	GroupID           uint
	AddressID         uint
	Title             string
	Address           string
	AdditionalAddress string
	CountryID         uint
	CityID            uint
	MetroID           uint
	Latitude          float32
	Longitude         float32
	Phone             string
	WorkInfoStatus    string
	Timetable         *Timetable
	IsMainAddress     bool
}

GroupsEditAddressParams параметры метода GroupsEditAddress.

type GroupsEditCallbackServerParams

type GroupsEditCallbackServerParams struct {
	GroupID   uint
	ServerID  uint
	URL       string
	Title     string
	SecretKey string
}

GroupsEditCallbackServerParams параметры метода GroupsEditCallbackServer.

type GroupsEditLinkParams

type GroupsEditLinkParams struct {
	GroupID uint
	LinkID  uint
	Text    string
}

GroupsEditLinkParams параметры метода GroupsEditLink.

type GroupsEditManagerParams

type GroupsEditManagerParams struct {
	GroupID         uint
	UserID          uint
	Role            string
	IsContact       bool
	ContactPosition string
	ContactPhone    string
	ContactEmail    string
}

GroupsEditManagerParams параметры метода GroupsEditManager.

type GroupsEditParams

type GroupsEditParams struct {
	GroupID           uint
	Title             string
	Description       string
	ScreenName        string
	Access            uint
	Website           string
	Subject           uint
	Email             string
	Phone             string
	Rss               string
	EventStartDate    uint
	EventFinishDate   uint
	EventGroupID      uint
	PublicCategory    uint
	PublicSubcategory uint
	PublicDate        string
	Wall              uint
	Topics            uint
	Photos            uint
	Video             uint
	Audio             uint
	Links             bool
	Events            bool
	Places            bool
	Contacts          bool
	Docs              uint
	Wiki              uint
	Messages          bool
	Articles          bool
	Addresses         bool
	AgeLimits         uint
	Market            bool
	MarketComments    bool
	MarketCountry     string
	MarketCity        string
	MarketCurrency    uint
	MarketContact     uint
	MarketWiki        uint
	ObsceneFilter     bool
	ObsceneStopwords  bool
	ObsceneWords      string
	MainSection       uint
	SecondarySection  uint
	Country           uint
	City              uint
}

GroupsEditParams параметры метода GroupsEdit.

type GroupsEnableOnlineParams

type GroupsEnableOnlineParams struct {
	GroupID uint
}

GroupsEnableOnlineParams параметры метода GroupsEnableOnline.

type GroupsGetAddressesParams

type GroupsGetAddressesParams struct {
	GroupID    uint
	AddressIDS []int
	Latitude   float32
	Longitude  float32
	Offset     uint
	Count      uint
	Fields     string
}

GroupsGetAddressesParams параметры метода GroupsGetAddresses.

type GroupsGetAddressesResp

type GroupsGetAddressesResp struct {
	Count int       `json:"count"`
	Items []Address `json:"items"`
}

GroupsGetAddressesResp структура, возвращаемая методом GroupsGetAddresses.

type GroupsGetBannedParams

type GroupsGetBannedParams struct {
	GroupID uint
	Offset  uint
	Count   uint
	Fields  string
	OwnerID int
}

GroupsGetBannedParams параметры метода GroupsGetBanned.

type GroupsGetBannedResp

type GroupsGetBannedResp struct {
	Count int `json:"count"`
	Items []struct {
		Type    string `json:"type"`
		Group   *Group `json:"group"`
		Profile *User  `json:"profile"`
		BanInfo *struct {
			AdminID int    `json:"admin_id"`
			Date    int64  `json:"date"`
			Reason  int    `json:"reason"`
			Comment string `json:"comment"`
			EndDate int64  `json:"end_date"`
		} `json:"ban_info"`
	} `json:"items"`
}

GroupsGetBannedResp структура, возвращаемая методом GroupsGetBanned.

type GroupsGetByIDParams

type GroupsGetByIDParams struct {
	GroupIDS string
	GroupID  string
	Fields   string
}

GroupsGetByIDParams параметры метода GroupsGetByID.

type GroupsGetCallbackConfirmationCodeParams

type GroupsGetCallbackConfirmationCodeParams struct {
	GroupID uint
}

GroupsGetCallbackConfirmationCodeParams параметры метода GroupsGetCallbackConfirmationCode.

type GroupsGetCallbackServersParams

type GroupsGetCallbackServersParams struct {
	GroupID   uint
	ServerIDS []int
}

GroupsGetCallbackServersParams параметры метода GroupsGetCallbackServers.

type GroupsGetCallbackServersResp

type GroupsGetCallbackServersResp struct {
	Count int `json:"count"`
	Items []struct {
		ID        int    `json:"id"`
		Title     string `json:"title"`
		CreatorID int    `json:"creator_id"`
		URL       string `json:"url"`
		SecretKey string `json:"secret_key"`
		Status    string `json:"status"`
	} `json:"items"`
}

GroupsGetCallbackServersResp структура, возвращаемая методом GroupsGetCallbackServers.

type GroupsGetCallbackSettingsParams

type GroupsGetCallbackSettingsParams struct {
	GroupID  uint
	ServerID uint
}

GroupsGetCallbackSettingsParams параметры метода GroupsGetCallbackSettings.

type GroupsGetCallbackSettingsResp

type GroupsGetCallbackSettingsResp struct {
	APIVersion string `json:"api_version"`
	Events     *struct {
		MessageNew           int `json:"message_new"`
		MessageReply         int `json:"message_reply"`
		MessageEdit          int `json:"message_edit"`
		MessageAllow         int `json:"message_allow"`
		MessageDeny          int `json:"message_deny"`
		MessageTypingState   int `json:"message_typing_state"`
		PhotoNew             int `json:"photo_new"`
		AudioNew             int `json:"audio_new"`
		VideoNew             int `json:"video_new"`
		WallReplyNew         int `json:"wall_reply_new"`
		WallReplyEdit        int `json:"wall_reply_edit"`
		WallReplyDelete      int `json:"wall_reply_delete"`
		WallReplyRestore     int `json:"wall_reply_restore"`
		WallPostNew          int `json:"wall_post_new"`
		WallRepost           int `json:"wall_repost"`
		BoardPostNew         int `json:"board_post_new"`
		BoardPostEdit        int `json:"board_post_edit"`
		BoardPostDelete      int `json:"board_post_delete"`
		BoardPostRestore     int `json:"board_post_restore"`
		PhotoCommentNew      int `json:"photo_comment_new"`
		PhotoCommentEdit     int `json:"photo_comment_edit"`
		PhotoCommentDelete   int `json:"photo_comment_delete"`
		PhotoCommentRestore  int `json:"photo_comment_restore"`
		VideoCommentNew      int `json:"video_comment_new"`
		VideoCommentEdit     int `json:"video_comment_edit"`
		VideoCommentDelete   int `json:"video_comment_delete"`
		VideoCommentRestore  int `json:"video_comment_restore"`
		MarketCommentNew     int `json:"market_comment_new"`
		MarketCommentEdit    int `json:"market_comment_edit"`
		MarketCommentDelete  int `json:"market_comment_delete"`
		MarketCommentRestore int `json:"market_comment_restore"`
		PollVoteNew          int `json:"poll_vote_new"`
		GroupJoin            int `json:"group_join"`
		GroupLeave           int `json:"group_leave"`
		UserBlock            int `json:"user_block"`
		UserUnblock          int `json:"user_unblock"`
		GroupChangeSettings  int `json:"group_change_settings"`
		GroupChangePhoto     int `json:"group_change_photo"`
		GroupOfficersEdit    int `json:"group_officers_edit"`
	} `json:"events"`
}

GroupsGetCallbackSettingsResp структура, возвращаемая методом GroupsGetCallbackSettings.

type GroupsGetCatalogInfoParams

type GroupsGetCatalogInfoParams struct {
	Extended      bool
	Subcategories bool
}

GroupsGetCatalogInfoParams параметры метода GroupsGetCatalogInfo.

type GroupsGetCatalogInfoResp

type GroupsGetCatalogInfoResp struct {
	Enabled    int `json:"enabled"`
	Categories []struct {
		ID            int    `json:"id"`
		Name          string `json:"name"`
		Subcategories []struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"subcategories"`
		PageCount    int `json:"page_count"`
		PagePreviews []struct {
			ID           int    `json:"id"`
			Name         string `json:"name"`
			ScreenName   string `json:"screen_name"`
			IsClosed     int    `json:"is_closed"`
			Type         string `json:"type"`
			IsAdmin      int    `json:"is_admin"`
			IsMember     int    `json:"is_member"`
			IsAdvertiser int    `json:"is_advertiser"`
			Photo50      string `json:"photo_50"`
			Photo100     string `json:"photo_100"`
			Photo200     string `json:"photo_200"`
		} `json:"page_previews"`
	} `json:"categories"`
}

GroupsGetCatalogInfoResp структура, возвращаемая методом GroupsGetCatalogInfo.

type GroupsGetCatalogParams

type GroupsGetCatalogParams struct {
	CategoryID    uint
	SubcategoryID uint
}

GroupsGetCatalogParams параметры метода GroupsGetCatalog.

type GroupsGetCatalogResp

type GroupsGetCatalogResp struct {
	Count int     `json:"count"`
	Items []Group `json:"items"`
}

GroupsGetCatalogResp структура, возвращаемая методом GroupsGetCatalog.

type GroupsGetGroupsResp

type GroupsGetGroupsResp struct {
	Count int     `json:"count"`
	Items []Group `json:"items"`
}

GroupsGetGroupsResp структура, возвращаемая методом GroupsGet, содержит объекты-сообщества.

type GroupsGetIDSResp

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

GroupsGetIDSResp структура, возвращаемая методом GroupsGet, содержит идентификаторы сообществ.

type GroupsGetInvitedUsersParams

type GroupsGetInvitedUsersParams struct {
	GroupID  uint
	Offset   uint
	Count    uint
	Fields   string
	NameCase string
}

GroupsGetInvitedUsersParams параметры метода GroupsGetInvitedUsers.

type GroupsGetInvitedUsersResp

type GroupsGetInvitedUsersResp struct {
	Count int    `json:"count"`
	Items []User `json:"items"`
}

GroupsGetInvitedUsersResp структура, возвращаемая методом GroupsGetInvitedUsers.

type GroupsGetInvitesParams

type GroupsGetInvitesParams struct {
	Offset   uint
	Count    uint
	Extended bool
}

GroupsGetInvitesParams параметры метода GroupsGetInvites.

type GroupsGetInvitesResp

type GroupsGetInvitesResp struct {
	Count    int     `json:"count"`
	Items    []Group `json:"items"`
	Profiles []struct {
		ID              int    `json:"id"`
		FirstName       string `json:"first_name"`
		LastName        string `json:"last_name"`
		IsClosed        bool   `json:"is_closed"`
		CanAccessClosed bool   `json:"can_access_closed"`
	} `json:"profiles"`
}

GroupsGetInvitesResp структура, возвращаемая методом GroupsGetInvites.

type GroupsGetLongPollServerParams

type GroupsGetLongPollServerParams struct {
	GroupID uint
}

GroupsGetLongPollServerParams параметры метода GroupsGetLongPollServer.

type GroupsGetLongPollServerResp

type GroupsGetLongPollServerResp struct {
	Key    string `json:"key"`
	Server string `json:"server"`
	Ts     string `json:"ts"`
}

GroupsGetLongPollServerResp структура, возвращаемая методом GroupsGetLongPollServer.

type GroupsGetLongPollSettingsParams

type GroupsGetLongPollSettingsParams struct {
	GroupID uint
}

GroupsGetLongPollSettingsParams параметры метода GroupsGetLongPollSettings.

type GroupsGetLongPollSettingsResp

type GroupsGetLongPollSettingsResp struct {
	IsEnabled  bool   `json:"is_enabled"`
	APIVersion string `json:"api_version"`
	Events     *struct {
		MessageNew           int `json:"message_new"`
		MessageReply         int `json:"message_reply"`
		MessageEdit          int `json:"message_edit"`
		MessageAllow         int `json:"message_allow"`
		MessageDeny          int `json:"message_deny"`
		MessageTypingState   int `json:"message_typing_state"`
		PhotoNew             int `json:"photo_new"`
		AudioNew             int `json:"audio_new"`
		VideoNew             int `json:"video_new"`
		WallReplyNew         int `json:"wall_reply_new"`
		WallReplyEdit        int `json:"wall_reply_edit"`
		WallReplyDelete      int `json:"wall_reply_delete"`
		WallReplyRestore     int `json:"wall_reply_restore"`
		WallPostNew          int `json:"wall_post_new"`
		WallRepost           int `json:"wall_repost"`
		BoardPostNew         int `json:"board_post_new"`
		BoardPostEdit        int `json:"board_post_edit"`
		BoardPostDelete      int `json:"board_post_delete"`
		BoardPostRestore     int `json:"board_post_restore"`
		PhotoCommentNew      int `json:"photo_comment_new"`
		PhotoCommentEdit     int `json:"photo_comment_edit"`
		PhotoCommentDelete   int `json:"photo_comment_delete"`
		PhotoCommentRestore  int `json:"photo_comment_restore"`
		VideoCommentNew      int `json:"video_comment_new"`
		VideoCommentEdit     int `json:"video_comment_edit"`
		VideoCommentDelete   int `json:"video_comment_delete"`
		VideoCommentRestore  int `json:"video_comment_restore"`
		MarketCommentNew     int `json:"market_comment_new"`
		MarketCommentEdit    int `json:"market_comment_edit"`
		MarketCommentDelete  int `json:"market_comment_delete"`
		MarketCommentRestore int `json:"market_comment_restore"`
		PollVoteNew          int `json:"poll_vote_new"`
		GroupJoin            int `json:"group_join"`
		GroupLeave           int `json:"group_leave"`
		UserBlock            int `json:"user_block"`
		UserUnblock          int `json:"user_unblock"`
		GroupChangeSettings  int `json:"group_change_settings"`
		GroupChangePhoto     int `json:"group_change_photo"`
		GroupOfficersEdit    int `json:"group_officers_edit"`
	} `json:"events"`
}

GroupsGetLongPollSettingsResp структура, возвращаемая методом GroupsGetLongPollSettings.

type GroupsGetMembersIDSResp

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

GroupsGetMembersIDSResp структура, возвращаемая методом GroupsGetMembers, содержит идентификаторы участников сообщества.

type GroupsGetMembersParams

type GroupsGetMembersParams struct {
	GroupID string
	Sort    string
	Offset  uint
	Count   uint
	Fields  string
	Filter  string
}

GroupsGetMembersParams параметры метода GroupsGetMembers.

type GroupsGetMembersRolesResp

type GroupsGetMembersRolesResp struct {
	Count int `json:"count"`
	Items []struct {
		ID          int      `json:"id"`
		Role        string   `json:"role"`
		Permissions []string `json:"permissions"`
	} `json:"items"`
}

GroupsGetMembersRolesResp структура, возвращаемая методом GroupsGetMembers, содержит роли руководителей сообщества.

type GroupsGetOnlineStatusParams

type GroupsGetOnlineStatusParams struct {
	GroupID uint
}

GroupsGetOnlineStatusParams параметры метода GroupsGetOnlineStatus.

type GroupsGetOnlineStatusResp

type GroupsGetOnlineStatusResp struct {
	Status  string `json:"status"`
	Minutes int    `json:"minutes"`
}

GroupsGetOnlineStatusResp структура, возвращаемая методом GroupsGetOnlineStatus.

type GroupsGetParams

type GroupsGetParams struct {
	UserID   uint
	Extended bool
	Filter   string
	Fields   string
	Offset   uint
	Count    uint
}

GroupsGetParams параметры метода GroupsGet.

type GroupsGetRequestsIDSResp

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

GroupsGetRequestsIDSResp структура, возвращаемая методом GroupsGetRequests, содержит идентификаторы пользователей.

type GroupsGetRequestsParams

type GroupsGetRequestsParams struct {
	GroupID uint
	Offset  uint
	Count   uint
	Fields  string
}

GroupsGetRequestsParams параметры метода GroupsGetRequests.

type GroupsGetRequestsUsersResp

type GroupsGetRequestsUsersResp struct {
	Count int    `json:"count"`
	Items []User `json:"items"`
}

GroupsGetRequestsUsersResp структура, возвращаемая методом GroupsGetRequests, содержит объекты-профили.

type GroupsGetSettingsParams

type GroupsGetSettingsParams struct {
	GroupID uint
}

GroupsGetSettingsParams параметры метода GroupsGetSettings.

type GroupsGetSettingsResp

type GroupsGetSettingsResp struct {
	Title              string   `json:"title"`
	Description        string   `json:"description"`
	Address            string   `json:"address"`
	Place              *Place   `json:"place"`
	Wall               int      `json:"wall"`
	Photos             int      `json:"photos"`
	Video              int      `json:"video"`
	Audio              int      `json:"audio"`
	Docs               int      `json:"docs"`
	Topics             int      `json:"topics"`
	Wiki               int      `json:"wiki"`
	Messages           int      `json:"messages"`
	ObsceneFilter      int      `json:"obscene_filter"`
	ObsceneStopwords   int      `json:"obscene_stopwords"`
	ObsceneWords       []string `json:"obscene_words"`
	PublicCategory     int      `json:"public_category"`
	PublicSubcategory  int      `json:"public_subcategory"`
	PublicCategoryList []struct {
		ID           int    `json:"id"`
		Name         string `json:"name"`
		SubtypesList []struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"subtypes_list"`
	} `json:"public_category_list"`
	Access      int `json:"access"`
	Subject     int `json:"subject"`
	SubjectList []struct {
		ID   int    `json:"id"`
		Name string `json:"name"`
	} `json:"subject_list"`
	RSS       string `json:"rss"`
	Website   string `json:"website"`
	AgeLimits int    `json:"age_limits"`
	Market    *struct {
		Enabled         int   `json:"enabled"`
		CommentsEnabled int   `json:"comments_enabled"`
		CountryIDS      []int `json:"country_ids"`
		CityIDS         []int `json:"city_ids"`
		ContactID       int   `json:"contact_id"`
		Currency        *struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"currency"`
	} `json:"market"`
}

GroupsGetSettingsResp структура, возвращаемая методом GroupsGetSettings.

type GroupsGetTokenPermissionsResp

type GroupsGetTokenPermissionsResp struct {
	Mask        int `json:"mask"`
	Permissions []struct {
		Setting int    `json:"setting"`
		Name    string `json:"name"`
	} `json:"permissions"`
}

GroupsGetTokenPermissionsResp структура, возвращаемая методом GroupsGetTokenPermissions.

type GroupsInviteParams

type GroupsInviteParams struct {
	GroupID uint
	UserID  uint
}

GroupsInviteParams параметры метода GroupsInvite.

type GroupsIsMemberParams

type GroupsIsMemberParams struct {
	GroupID  string
	UserID   uint
	UserIDS  []int
	Extended bool
}

GroupsIsMemberParams параметры метода GroupsIsMember.

type GroupsIsMemberResp

type GroupsIsMemberResp []struct {
	UserID     int `json:"user_id"`
	Member     int `json:"member"`
	Request    int `json:"request"`
	Invitation int `json:"invitation"`
	CanInvite  int `json:"can_invite"`
	CanRecall  int `json:"can_recall"`
}

GroupsIsMemberResp структура, возвращаемая методом GroupsIsMember.

type GroupsJoinParams

type GroupsJoinParams struct {
	GroupID uint
	NotSure uint
}

GroupsJoinParams параметры метода GroupsJoin.

type GroupsLeaveParams

type GroupsLeaveParams struct {
	GroupID uint
}

GroupsLeaveParams параметры метода GroupsLeave.

type GroupsRemoveUserParams

type GroupsRemoveUserParams struct {
	GroupID uint
	UserID  uint
}

GroupsRemoveUserParams параметры метода GroupsRemoveUser.

type GroupsReorderLinkParams

type GroupsReorderLinkParams struct {
	GroupID uint
	LinkID  uint
	After   uint
}

GroupsReorderLinkParams параметры метода GroupsReorderLink.

type GroupsSearchParams

type GroupsSearchParams struct {
	Q         string
	Type      string
	CountryID uint
	CityID    uint
	Future    bool
	Market    bool
	Sort      int
	Offset    uint
	Count     uint
}

GroupsSearchParams параметры метода GroupsSearch.

type GroupsSearchResp

type GroupsSearchResp struct {
	Count int     `json:"count"`
	Items []Group `json:"items"`
}

GroupsSearchResp структура, возвращаемая методом GroupsSearch.

type GroupsSetCallbackSettingsParams

type GroupsSetCallbackSettingsParams struct {
	GroupID              uint
	ServerID             uint
	APIVersion           string
	MessageNew           bool
	MessageReply         bool
	MessageAllow         bool
	MessageEdit          bool
	MessageDeny          bool
	MessageTypingState   bool
	PhotoNew             bool
	AudioNew             bool
	VideoNew             bool
	WallReplyNew         bool
	WallReplyEdit        bool
	WallReplyDelete      bool
	WallReplyRestore     bool
	WallPostNew          bool
	WallRepost           bool
	BoardPostNew         bool
	BoardPostEdit        bool
	BoardPostRestore     bool
	BoardPostDelete      bool
	PhotoCommentNew      bool
	PhotoCommentEdit     bool
	PhotoCommentDelete   bool
	PhotoCommentRestore  bool
	VideoCommentNew      bool
	VideoCommentEdit     bool
	VideoCommentDelete   bool
	VideoCommentRestore  bool
	MarketCommentNew     bool
	MarketCommentEdit    bool
	MarketCommentDelete  bool
	MarketCommentRestore bool
	PollVoteNew          bool
	GroupJoin            bool
	GroupLeave           bool
	GroupChangeSettings  bool
	GroupChangePhoto     bool
	GroupOfficersEdit    bool
	UserBlock            bool
	UserUnblock          bool
	LeadFormsNew         bool
}

GroupsSetCallbackSettingsParams параметры метода GroupsSetCallbackSettings.

type GroupsSetLongPollSettingsParams

type GroupsSetLongPollSettingsParams struct {
	GroupID              uint
	Enabled              bool
	APIVersion           string
	MessageNew           bool
	MessageReply         bool
	MessageAllow         bool
	MessageDeny          bool
	MessageEdit          bool
	MessageTypingState   bool
	PhotoNew             bool
	AudioNew             bool
	VideoNew             bool
	WallReplyNew         bool
	WallReplyEdit        bool
	WallReplyDelete      bool
	WallReplyRestore     bool
	WallPostNew          bool
	WallRepost           bool
	BoardPostNew         bool
	BoardPostEdit        bool
	BoardPostRestore     bool
	BoardPostDelete      bool
	PhotoCommentNew      bool
	PhotoCommentEdit     bool
	PhotoCommentDelete   bool
	PhotoCommentRestore  bool
	VideoCommentNew      bool
	VideoCommentEdit     bool
	VideoCommentDelete   bool
	VideoCommentRestore  bool
	MarketCommentNew     bool
	MarketCommentEdit    bool
	MarketCommentDelete  bool
	MarketCommentRestore bool
	PollVoteNew          bool
	GroupJoin            bool
	GroupLeave           bool
	GroupChangeSettings  bool
	GroupChangePhoto     bool
	GroupOfficersEdit    bool
	UserBlock            bool
	UserUnblock          bool
}

GroupsSetLongPollSettingsParams параметры метода GroupsSetLongPollSettings.

type GroupsSetSettingsParams

type GroupsSetSettingsParams struct {
	GroupID          uint
	Messages         bool
	BotsCapabilities bool
	BotsStartButton  bool
	BotsAddToChat    bool
}

GroupsSetSettingsParams параметры метода GroupsSetSettings.

type GroupsUnbanParams

type GroupsUnbanParams struct {
	GroupID uint
	OwnerID int
}

GroupsUnbanParams параметры метода GroupsUnban.

type Keyboard

type Keyboard struct {
	OneTime bool       `json:"one_time"`
	Buttons [][]Button `json:"buttons"`
}

Keyboard структура клавиатуры бота.

func NewKeyboard

func NewKeyboard(hide bool) *Keyboard

NewKeyboard новая клавиатура.

func (*Keyboard) ButtonsRow

func (k *Keyboard) ButtonsRow(b ...Button) *Keyboard

ButtonsRow ряд кнопок на клавиатуре.

type Link struct {
	URL         string `json:"url"`
	Title       string `json:"title"`
	Caption     string `json:"caption"`
	Description string `json:"description"`
	Photo       *Photo `json:"photo"`
	Product     *struct {
		Price *struct {
			Amount   int `json:"amount"`
			Currency *struct {
				ID   int    `json:"id"`
				Name string `json:"name"`
			} `json:"currency"`
			Text string `json:"text"`
		} `json:"price"`
	} `json:"product"`
	Button *struct {
		Title  string `json:"title"`
		Action *struct {
			Type string `json:"type"`
			URL  string `json:"url"`
		} `json:"action"`
	} `json:"button"`
	PreviewPage string `json:"preview_page"`
	PreviewURL  string `json:"preview_url"`
}

Link описывает прикрепленную ссылку в сообщении, комментарии или записи на стене.

type MarketAlbum

type MarketAlbum struct {
	ID          int    `json:"id"`
	OwnerID     int    `json:"owner_id"`
	Title       string `json:"title"`
	Photo       *Photo `json:"photo"`
	Count       int    `json:"count"`
	UpdatedTime int64  `json:"updated_time"`
}

MarketAlbum описывает подборку товаров.

type MarketItem

type MarketItem struct {
	ID          int    `json:"id"`
	OwnerID     int    `json:"owner_id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Price       *struct {
		Amount   int `json:"amount"`
		Currency *struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"currency"`
		Text string `json:"text"`
	} `json:"price"`
	Category *struct {
		ID      int    `json:"id"`
		Name    string `json:"name"`
		Section *struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"section"`
	} `json:"category"`
	ThumbPhoto   string `json:"thumb_photo"`
	Date         int64  `json:"date"`
	Availability int    `json:"availability"`
	IsFavorite   bool   `json:"is_favorite"`

	Photos     []Photo `json:"photos"`
	CanComment int     `json:"can_comment"`
	CanRepost  int     `json:"can_repost"`
	Likes      *struct {
		UserLikes int `json:"user_likes"`
		Count     int `json:"count"`
	} `json:"likes"`
	URL         string `json:"url"`
	ButtonTitle string `json:"button_title"`
}

MarketItem описывает товар.

type Message

type Message struct {
	ID           int          `json:"id"`
	Date         int64        `json:"date"`
	PeerID       int          `json:"peer_id"`
	FromID       int          `json:"from_id"`
	Text         string       `json:"text"`
	RandomID     int64        `json:"random_id"`
	Ref          string       `json:"ref"`
	RefSource    string       `json:"ref_source"`
	Attachments  []Attachment `json:"attachments"`
	Important    bool         `json:"important"`
	Geo          *Geo         `json:"geo"`
	Payload      string       `json:"payload"`
	FwdMessages  []Message    `json:"fwd_messages"`
	ReplyMessage *Message     `json:"reply_message"`
	Action       *struct {
		Type     string `json:"type"`
		MemberID int    `json:"member_id"`
		Text     string `json:"text"`
		Email    string `json:"email"`
		Photo    *struct {
			Photo50  string `json:"photo_50"`
			Photo100 string `json:"photo_100"`
			Photo200 string `json:"photo_200"`
		}
	} `json:"action"`

	ConversationMessageID int  `json:"conversation_message_id"`
	IsHidden              bool `json:"is_hidden"`
	Out                   int  `json:"out"`
}

Message описывает личное сообщение.

type MessagesAddChatUserParams

type MessagesAddChatUserParams struct {
	ChatID uint
	UserID uint
}

MessagesAddChatUserParams параметры метода MessagesAddChatUser.

type MessagesAllowMessagesFromGroupParams

type MessagesAllowMessagesFromGroupParams struct {
	GroupID uint
	Key     string
}

MessagesAllowMessagesFromGroupParams параметры метода MessagesAllowMessagesFromGroup.

type MessagesCreateChatParams

type MessagesCreateChatParams struct {
	UserIDS []int
	Title   string
}

MessagesCreateChatParams параметры метода MessagesCreateChat.

type MessagesCreateChatResp

type MessagesCreateChatResp struct {
	ChatID int `json:"chat_id"`
}

MessagesCreateChatResp структура, возвращаемая методом MessagesCreateChat.

type MessagesDeleteChatPhotoParams

type MessagesDeleteChatPhotoParams struct {
	ChatID  uint
	GroupID uint
}

MessagesDeleteChatPhotoParams параметры метода MessagesDeleteChatPhoto.

type MessagesDeleteChatPhotoResp

type MessagesDeleteChatPhotoResp struct {
	MessageID int   `json:"message_id"`
	Chat      *Chat `json:"chat"`
}

MessagesDeleteChatPhotoResp структура, возвращаемая методом MessagesDeleteChatPhoto.

type MessagesDeleteConversationParams

type MessagesDeleteConversationParams struct {
	UserID  string
	PeerID  int
	GroupID uint
}

MessagesDeleteConversationParams параметры метода MessagesDeleteConversation.

type MessagesDeleteConversationResp

type MessagesDeleteConversationResp struct {
	LastDeletedID int `json:"last_deleted_id"`
}

MessagesDeleteConversationResp структура, возвращаемая методом MessagesDeleteConversation.

type MessagesDeleteParams

type MessagesDeleteParams struct {
	MessageIDS   []int
	Spam         bool
	GroupID      uint
	DeleteForAll bool
}

MessagesDeleteParams параметры метода MessagesDelete.

type MessagesDenyMessagesFromGroupParams

type MessagesDenyMessagesFromGroupParams struct {
	GroupID uint
}

MessagesDenyMessagesFromGroupParams параметры метода MessagesDenyMessagesFromGroup.

type MessagesEditChatParams

type MessagesEditChatParams struct {
	ChatID uint
	Title  string
}

MessagesEditChatParams параметры метода MessagesEditChat.

type MessagesEditParams

type MessagesEditParams struct {
	PeerID              int
	Message             string
	MessageID           uint
	Lat                 float32
	Long                float32
	Attachment          string
	KeepForwardMessages bool
	KeepSnippets        bool
	GroupID             uint
	DontParseLinks      bool
}

MessagesEditParams параметры метода MessagesEdit.

type MessagesGetByConversationMessageIDParams

type MessagesGetByConversationMessageIDParams struct {
	PeerID                 int
	ConversationMessageIDS []int
	Extended               bool
	Fields                 string
	GroupID                uint
}

MessagesGetByConversationMessageIDParams параметры метода MessagesGetByConversationMessageID.

type MessagesGetByConversationMessageIDResp

type MessagesGetByConversationMessageIDResp struct {
	Count int       `json:"count"`
	Items []Message `json:"items"`
}

MessagesGetByConversationMessageIDResp структура, возвращаемая методом MessagesGetByConversationMessageID.

type MessagesGetByIDParams

type MessagesGetByIDParams struct {
	MessageIDS    []int
	PreviewLength uint
	Extended      bool
	Fields        string
	GroupID       uint
}

MessagesGetByIDParams параметры метода MessagesGetByID.

type MessagesGetByIDResp

type MessagesGetByIDResp struct {
	Count int       `json:"count"`
	Items []Message `json:"items"`
}

MessagesGetByIDResp структура, возвращаемая методом MessagesGetByID.

type MessagesGetChatParams

type MessagesGetChatParams struct {
	ChatID   uint
	ChatIDS  []int
	Fields   string
	NameCase string
}

MessagesGetChatParams параметры метода MessagesGetChat.

type MessagesGetChatPreviewParams

type MessagesGetChatPreviewParams struct {
	PeerID uint
	Link   string
	Fields string
}

MessagesGetChatPreviewParams параметры метода MessagesGetChatPreview.

type MessagesGetChatPreviewResp

type MessagesGetChatPreviewResp struct {
	Preview *struct {
		AdminID int    `json:"admin_id"`
		Members []int  `json:"members"`
		Title   string `json:"title"`
		Photo   *struct {
			Photo50  string `json:"photo_50"`
			Photo100 string `json:"photo_100"`
			Photo200 string `json:"photo_200"`
		} `json:"photo"`
		LocalID int `json:"local_id"`
	} `json:"preview"`
	Profiles []User  `json:"profiles"`
	Groups   []Group `json:"groups"`
	Emails   []struct {
		ID      int    `json:"id"`
		Address string `json:"address"`
	} `json:"emails"`
}

MessagesGetChatPreviewResp структура, возвращаемая методом MessagesGetChatPreview.

type MessagesGetConversationMembersParams

type MessagesGetConversationMembersParams struct {
	PeerID  int
	Fields  string
	GroupID uint
}

MessagesGetConversationMembersParams параметры метода MessagesGetConversationMembers.

type MessagesGetConversationMembersResp

type MessagesGetConversationMembersResp struct {
	Count int `json:"count"`
	Items []struct {
		MemberID  int   `json:"member_id"`
		InvitedBy int   `json:"invited_by"`
		JoinDate  int64 `json:"join_date"`
		IsAdmin   bool  `json:"is_admin"`
		CanKick   bool  `json:"can_kick"`
	} `json:"items"`
	Profiles []User  `json:"profiles"`
	Groups   []Group `json:"groups"`
}

MessagesGetConversationMembersResp структура, возвращаемая методом MessagesGetConversationMembers.

type MessagesGetConversationsByIDParams

type MessagesGetConversationsByIDParams struct {
	PeerIDS  []int
	Extended bool
	Fields   string
	GroupID  uint
}

MessagesGetConversationsByIDParams параметры метода MessagesGetConversationsByID.

type MessagesGetConversationsByIDResp

type MessagesGetConversationsByIDResp struct {
	Count int            `json:"count"`
	Items []Conversation `json:"items"`
}

MessagesGetConversationsByIDResp структура, возвращаемая методом MessagesGetConversationsByID.

type MessagesGetConversationsParams

type MessagesGetConversationsParams struct {
	Offset         uint
	Count          uint
	Filter         string
	Extended       bool
	StartMessageID uint
	Fields         string
	GroupID        uint
}

MessagesGetConversationsParams параметры метода MessagesGetConversations.

type MessagesGetConversationsResp

type MessagesGetConversationsResp struct {
	Count int `json:"count"`
	Items []struct {
		Conversation *Conversation `json:"conversation"`
		LastMessage  *Message      `json:"last_message"`
	} `json:"items"`
	UnreadCount int     `json:"unread_count"`
	Profiles    []User  `json:"profiles"`
	Groups      []Group `json:"groups"`
}

MessagesGetConversationsResp структура, возвращаемая методом MessagesGetConversations.

type MessagesGetHistoryAttachmentsParams

type MessagesGetHistoryAttachmentsParams struct {
	PeerID           int
	MediaType        string
	StartFrom        string
	Count            uint
	PhotoSizes       bool
	Fields           string
	GroupID          uint
	PreserveOrder    bool
	MaxForwardsLevel uint
}

MessagesGetHistoryAttachmentsParams параметры метода MessagesGetHistoryAttachments.

type MessagesGetHistoryAttachmentsResp

type MessagesGetHistoryAttachmentsResp struct {
	Items []struct {
		MessageID  int         `json:"message_id"`
		Attachment *Attachment `json:"attachment"`
	} `json:"items"`
	NextFrom string `json:"next_from"`
}

MessagesGetHistoryAttachmentsResp структура, возвращаемая методом MessagesGetHistoryAttachments.

type MessagesGetHistoryParams

type MessagesGetHistoryParams struct {
	Offset         int
	Count          uint
	UserID         int
	PeerID         int
	StartMessageID int
	Rev            bool
	Extended       bool
	Fields         string
	GroupID        uint
}

MessagesGetHistoryParams параметры метода MessagesGetHistory.

type MessagesGetHistoryResp

type MessagesGetHistoryResp struct {
	Count   int       `json:"count"`
	Unread  int       `json:"unread"`
	Skipped int       `json:"skipped"`
	Items   []Message `json:"items"`
	InRead  int       `json:"in_read"`
	OutRead int       `json:"out_read"`
}

MessagesGetHistoryResp структура, возвращаемая методом MessagesGetHistory.

type MessagesGetImportantMessagesParams

type MessagesGetImportantMessagesParams struct {
	Count          uint
	Offset         uint
	StartMessageID uint
	PreviewLength  uint
	Fields         string
	Extended       bool
	GroupID        uint
}

MessagesGetImportantMessagesParams параметры метода MessagesGetImportantMessages.

type MessagesGetImportantMessagesResp

type MessagesGetImportantMessagesResp struct {
	Messages *struct {
		Count int       `json:"count"`
		Items []Message `json:"items"`
	} `json:"messages"`
}

MessagesGetImportantMessagesResp структура, возвращаемая методом MessagesGetImportantMessages.

type MessagesGetInviteLinkParams

type MessagesGetInviteLinkParams struct {
	PeerID  uint
	Reset   bool
	GroupID uint
}

MessagesGetInviteLinkParams параметры метода MessagesGetInviteLink.

type MessagesGetInviteLinkResp

type MessagesGetInviteLinkResp struct {
	Link string `json:"link"`
}

MessagesGetInviteLinkResp структура, возвращаемая методом MessagesGetInviteLink.

type MessagesGetLastActivityParams

type MessagesGetLastActivityParams struct {
	UserID int
}

MessagesGetLastActivityParams параметры метода MessagesGetLastActivity.

type MessagesGetLastActivityResp

type MessagesGetLastActivityResp struct {
	Online int   `json:"online"`
	Time   int64 `json:"time"`
}

MessagesGetLastActivityResp структура, возвращаемая методом MessagesGetLastActivity.

type MessagesGetLongPollHistoryParams

type MessagesGetLongPollHistoryParams struct {
	Ts            uint
	Pts           uint
	PreviewLength uint
	Onlines       bool
	Fields        string
	EventsLimit   uint
	MsgsLimit     uint
	MaxMsgID      uint
	GroupID       uint
	LPVersion     uint
	LastN         uint
	Credentials   bool
}

MessagesGetLongPollHistoryParams параметры метода MessagesGetLongPollHistory.

type MessagesGetLongPollHistoryResp

type MessagesGetLongPollHistoryResp struct {
	History  [][]int `json:"history"`
	Messages *struct {
		Count int       `json:"count"`
		Items []Message `json:"items"`
	} `json:"messages"`
	Profiles []User `json:"profiles"`
	NewPts   int    `json:"new_pts"`
}

MessagesGetLongPollHistoryResp структура, возвращаемая методом MessagesGetLongPollHistory.

type MessagesGetLongPollServerParams

type MessagesGetLongPollServerParams struct {
	NeedPts   bool
	GroupID   uint
	LPVersion uint
}

MessagesGetLongPollServerParams параметры метода MessagesGetLongPollServer.

type MessagesGetLongPollServerResp

type MessagesGetLongPollServerResp struct {
	Key    string `json:"key"`
	Server string `json:"server"`
	Ts     int    `json:"ts"`
}

MessagesGetLongPollServerResp структура, возвращаемая методом MessagesGetLongPollServer.

type MessagesIsMessagesFromGroupAllowedParams

type MessagesIsMessagesFromGroupAllowedParams struct {
	GroupID uint
	UserID  uint
}

MessagesIsMessagesFromGroupAllowedParams параметры метода MessagesIsMessagesFromGroupAllowed.

type MessagesIsMessagesFromGroupAllowedResp

type MessagesIsMessagesFromGroupAllowedResp struct {
	IsAllowed int `json:"is_allowed"`
}

MessagesIsMessagesFromGroupAllowedResp структура, возвращаемая методом MessagesIsMessagesFromGroupAllowed.

type MessagesJoinChatByInviteLinkParams

type MessagesJoinChatByInviteLinkParams struct {
	Link string
}

MessagesJoinChatByInviteLinkParams параметры метода MessagesJoinChatByInviteLink.

type MessagesJoinChatByInviteLinkResp

type MessagesJoinChatByInviteLinkResp struct {
	ChatID int `json:"chat_id"`
}

MessagesJoinChatByInviteLinkResp структура, возвращаемая методом MessagesJoinChatByInviteLink.

type MessagesMarkAsAnsweredConversationParams

type MessagesMarkAsAnsweredConversationParams struct {
	PeerID   int
	Answered bool
	GroupID  uint
}

MessagesMarkAsAnsweredConversationParams параметры метода MessagesMarkAsAnsweredConversation.

type MessagesMarkAsImportantConversationParams

type MessagesMarkAsImportantConversationParams struct {
	PeerID    int
	Important bool
	GroupID   uint
}

MessagesMarkAsImportantConversationParams параметры метода MessagesMarkAsImportantConversation.

type MessagesMarkAsImportantParams

type MessagesMarkAsImportantParams struct {
	MessageIDS []int
	Important  uint
}

MessagesMarkAsImportantParams параметры метода MessagesMarkAsImportant.

type MessagesMarkAsReadParams

type MessagesMarkAsReadParams struct {
	MessageIDS     []int
	PeerID         int
	StartMessageID uint
	GroupID        uint
}

MessagesMarkAsReadParams параметры метода MessagesMarkAsRead.

type MessagesPinParams

type MessagesPinParams struct {
	PeerID    int
	MessageID uint
}

MessagesPinParams параметры метода MessagesPin.

type MessagesRemoveChatUserParams

type MessagesRemoveChatUserParams struct {
	ChatID   uint
	UserID   int
	MemberID int
}

MessagesRemoveChatUserParams параметры метода MessagesRemoveChatUser.

type MessagesRestoreParams

type MessagesRestoreParams struct {
	MessageID uint
	GroupID   uint
}

MessagesRestoreParams параметры метода MessagesRestore.

type MessagesSearchConversationsParams

type MessagesSearchConversationsParams struct {
	Q        string
	Count    uint
	Extended bool
	Fields   string
	GroupID  uint
}

MessagesSearchConversationsParams параметры метода MessagesSearchConversations.

type MessagesSearchConversationsResp

type MessagesSearchConversationsResp struct {
	Count int            `json:"count"`
	Items []Conversation `json:"items"`
}

MessagesSearchConversationsResp структура, возвращаемая методом MessagesSearchConversations.

type MessagesSearchParams

type MessagesSearchParams struct {
	Q             string
	PeerID        int
	Date          int
	PreviewLength uint
	Offset        uint
	Count         uint
	Extended      bool
	Fields        string
	GroupID       uint
}

MessagesSearchParams параметры метода MessagesSearch.

type MessagesSearchResp

type MessagesSearchResp struct {
	Count    int       `json:"count"`
	Items    []Message `json:"items"`
	Profiles []User    `json:"profiles"`
	Groups   []Group   `json:"groups"`
}

MessagesSearchResp структура, возвращаемая методом MessagesSearch.

type MessagesSendParams

type MessagesSendParams struct {
	UserID          int
	RandomID        uint64
	PeerID          int
	Domain          string
	ChatID          uint
	UserIDS         []int
	Message         string
	Lat             float32
	Long            float32
	Attachment      string
	ReplyTo         int
	ForwardMessages []int
	Forward         string
	StickerID       uint
	GroupID         uint
	Keyboard        *Keyboard
	Payload         string
	DontParseLinks  bool
	DisableMentions bool
}

MessagesSendParams параметры метода MessagesSend.

type MessagesSendResp

type MessagesSendResp []struct {
	PeerID    int `json:"peer_id"`
	MessageID int `json:"message_id"`
	Error     *struct {
		Code        int    `json:"code"`
		Description string `json:"description"`
	} `json:"error"`
}

MessagesSendResp структура, возвращаемая методом MessagesSend.

type MessagesSetActivityParams

type MessagesSetActivityParams struct {
	UserID  string
	Type    string
	PeerID  int
	GroupID uint
}

MessagesSetActivityParams параметры метода MessagesSetActivity.

type MessagesSetChatPhotoParams

type MessagesSetChatPhotoParams struct {
	File string
}

MessagesSetChatPhotoParams параметры метода MessagesSetChatPhoto.

type MessagesSetChatPhotoResp

type MessagesSetChatPhotoResp struct {
	MessageID int   `json:"message_id"`
	Chat      *Chat `json:"chat"`
}

MessagesSetChatPhotoResp структура, возвращаемая методом MessagesSetChatPhoto.

type MessagesUnpinParams

type MessagesUnpinParams struct {
	PeerID  int
	GroupID uint
}

MessagesUnpinParams параметры метода MessagesUnpin.

type Note

type Note struct {
	ID           int    `json:"id"`
	OwnerID      int    `json:"owner_id"`
	Title        string `json:"title"`
	Text         string `json:"text"`
	Date         int64  `json:"date"`
	Comments     int    `json:"comments"`
	ReadComments int    `json:"read_comments"`
	ViewURL      string `json:"view_url"`
}

Note описывает заметку.

type Page

type Page struct {
	ID                       int    `json:"id"`
	GroupID                  int    `json:"group_id"`
	CreatorID                int    `json:"creator_id"`
	Title                    string `json:"title"`
	CurrentUserCanEdit       int    `json:"current_user_can_edit"`
	CurrentUserCanEditAccess int    `json:"current_user_can_edit_access"`
	WhoCanView               int    `json:"who_can_view"`
	WhoCanEdit               int    `json:"who_can_edit"`
	Edited                   int64  `json:"edited"`
	Created                  int64  `json:"created"`
	EditorID                 int    `json:"editor_id"`
	Views                    int    `json:"views"`
	Parent                   string `json:"parent"`
	Parent2                  string `json:"parent2"`
	Source                   string `json:"source"`
	HTML                     string `json:"html"`
	ViewURL                  string `json:"view_url"`
}

Page описывает вики-страницу.

type Photo

type Photo struct {
	ID      int    `json:"id"`
	AlbumID int    `json:"album_id"`
	OwnerID int    `json:"owner_id"`
	UserID  int    `json:"user_id"`
	Text    string `json:"text"`
	Date    int64  `json:"date"`
	Sizes   []Size `json:"sizes"`
	Width   int    `json:"width"`
	Height  int    `json:"height"`

	Reposts *struct {
		Count int `json:"count"`
	} `json:"reposts"`
	Tags *struct {
		Count int `json:"count"`
	} `json:"tags"`
	Comments *struct {
		Count int `json:"count"`
	} `json:"comments"`
	CanComment int     `json:"can_comment"`
	CanRepost  int     `json:"can_repost"`
	Lat        float32 `json:"lat"`
	Long       float32 `json:"long"`
	PlacerID   int     `json:"placer_id"`
	TagCreated int64   `json:"tag_created"`
	TagID      int     `json:"tag_id"`

	// поля для методов Photos с параметром Extended=true
	Likes *struct {
		Count     int `json:"count"`
		UserLikes int `json:"user_likes"`
	}
	// поля для методов Photos с параметром skip_hidden=true,
	RealOffset int `json:"real_offset"`
	// поля для методов Photos с параметром need_hidden=true,
	Hidden int `json:"hidden"`
}

Photo описывает фотографию.

type PhotosConfirmTagParams

type PhotosConfirmTagParams struct {
	OwnerID int
	PhotoID int
	TagID   int
}

PhotosConfirmTagParams параметры метода PhotosConfirmTag.

type PhotosCopyParams

type PhotosCopyParams struct {
	OwnerID   int
	PhotoID   uint
	AccessKey string
}

PhotosCopyParams параметры метода PhotosCopy.

type PhotosCreateAlbumParams

type PhotosCreateAlbumParams struct {
	Title              string
	GroupID            int
	Description        string
	PrivacyView        string
	PrivacyComment     string
	UploadByAdminsOnly bool
	CommentsDisabled   bool
}

PhotosCreateAlbumParams параметры метода PhotosCreateAlbum.

type PhotosCreateAlbumResp

type PhotosCreateAlbumResp struct {
	ID          int    `json:"id"`
	ThumbID     int    `json:"thumb_id"`
	OwnerID     int    `json:"owner_id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Created     int64  `json:"created"`
	Updated     int64  `json:"updated"`
	Size        int    `json:"size"`
	PrivacyView *struct {
		Category string `json:"category"`
		Owners   *struct {
			Allowed  []int `json:"allowed"`
			Excluded []int `json:"excluded"`
		} `json:"owners,omitempty"`
		Lists *struct {
			Allowed  []int `json:"allowed"`
			Excluded []int `json:"excluded"`
		} `json:"lists"`
	} `json:"privacy_view"`
	PrivacyComment *struct {
		Category string `json:"category"`
		Owners   *struct {
			Allowed  []int `json:"allowed"`
			Excluded []int `json:"excluded"`
		} `json:"owners,omitempty"`
		Lists *struct {
			Allowed  []int `json:"allowed"`
			Excluded []int `json:"excluded"`
		} `json:"lists"`
	} `json:"privacy_comment"`
	UploadByAdminsOnly int `json:"upload_by_admins_only"`
	CommentsDisabled   int `json:"comments_disabled"`
	CanUpload          int `json:"can_upload"`
}

PhotosCreateAlbumResp структура, возвращаемая методом PhotosCreateAlbum.

type PhotosCreateCommentParams

type PhotosCreateCommentParams struct {
	OwnerID        int
	PhotoID        int
	Message        string
	Attachments    string
	FromGroup      bool
	ReplyToComment int
	StickerID      uint
	AccessKey      string
	GUID           string
}

PhotosCreateCommentParams параметры метода PhotosCreateComment.

type PhotosDeleteAlbumParams

type PhotosDeleteAlbumParams struct {
	AlbumID int
	GroupID int
}

PhotosDeleteAlbumParams параметры метода PhotosDeleteAlbum.

type PhotosDeleteCommentParams

type PhotosDeleteCommentParams struct {
	OwnerID   int
	CommentID int
}

PhotosDeleteCommentParams параметры метода PhotosDeleteComment.

type PhotosDeleteParams

type PhotosDeleteParams struct {
	OwnerID int
	PhotoID uint
}

PhotosDeleteParams параметры метода PhotosDelete.

type PhotosEditAlbumParams

type PhotosEditAlbumParams struct {
	AlbumID            int
	Title              string
	Description        string
	OwnerID            int
	PrivacyView        string
	PrivacyComment     string
	UploadByAdminsOnly bool
	CommentsDisabled   bool
}

PhotosEditAlbumParams параметры метода PhotosEditAlbum.

type PhotosEditCommentParams

type PhotosEditCommentParams struct {
	OwnerID     int
	CommentID   int
	Message     string
	Attachments string
}

PhotosEditCommentParams параметры метода PhotosEditComment.

type PhotosEditParams

type PhotosEditParams struct {
	OwnerID      int
	PhotoID      uint
	Caption      string
	Latitude     float32
	Longitude    float32
	PlaceStr     string
	FoursquareID string
	DeletePlace  bool
}

PhotosEditParams параметры метода PhotosEdit.

type PhotosGetAlbumsCountParams

type PhotosGetAlbumsCountParams struct {
	UserID  int
	GroupID int
}

PhotosGetAlbumsCountParams параметры метода PhotosGetAlbumsCount.

type PhotosGetAlbumsParams

type PhotosGetAlbumsParams struct {
	OwnerID    int
	AlbumIDS   []int
	Offset     uint
	Count      uint
	NeedSystem bool
	NeedCovers bool
	PhotoSizes bool
}

PhotosGetAlbumsParams параметры метода PhotosGetAlbums.

type PhotosGetAlbumsResp

type PhotosGetAlbumsResp struct {
	Count int `json:"count"`
	Items []struct {
		ID          int    `json:"id"`
		ThumbID     int    `json:"thumb_id"`
		OwnerID     int    `json:"owner_id"`
		Title       string `json:"title"`
		Description string `json:"description"`
		Created     int64  `json:"created"`
		Updated     int64  `json:"updated"`
		Size        int    `json:"size"`
		CanUpload   int    `json:"can_upload"`
		PrivacyView *struct {
			Category string `json:"category"`
			Owners   *struct {
				Allowed  []int `json:"allowed"`
				Excluded []int `json:"excluded"`
			} `json:"owners,omitempty"`
			Lists *struct {
				Allowed  []int `json:"allowed"`
				Excluded []int `json:"excluded"`
			} `json:"lists"`
		} `json:"privacy_view"`
		PrivacyComment *struct {
			Category string `json:"category"`
			Owners   *struct {
				Allowed  []int `json:"allowed"`
				Excluded []int `json:"excluded"`
			} `json:"owners,omitempty"`
			Lists *struct {
				Allowed  []int `json:"allowed"`
				Excluded []int `json:"excluded"`
			} `json:"lists"`
		} `json:"privacy_comment"`
		UploadByAdminsOnly int    `json:"upload_by_admins_only"`
		CommentsDisabled   int    `json:"comments_disabled"`
		ThumbSrc           string `json:"thumb_src"`
	} `json:"items"`
}

PhotosGetAlbumsResp структура, возвращаемая методом PhotosGetAlbums.

type PhotosGetAllCommentsParams

type PhotosGetAllCommentsParams struct {
	OwnerID   int
	AlbumID   uint
	NeedLikes bool
	Offset    uint
	Count     uint
}

PhotosGetAllCommentsParams параметры метода PhotosGetAllComments.

type PhotosGetAllCommentsResp

type PhotosGetAllCommentsResp struct {
	Count int       `json:"count"`
	Items []Comment `json:"items"`
}

PhotosGetAllCommentsResp структура, возвращаемая методом PhotosGetAllComments.

type PhotosGetAllParams

type PhotosGetAllParams struct {
	OwnerID         int
	Extended        bool
	Offset          uint
	Count           uint
	PhotoSizes      bool
	NoServiceAlbums bool
	NeedHidden      bool
	SkipHidden      bool
}

PhotosGetAllParams параметры метода PhotosGetAll.

type PhotosGetAllResp

type PhotosGetAllResp struct {
	Count int     `json:"count"`
	Items []Photo `json:"items"`
	More  int     `json:"more"`
}

PhotosGetAllResp структура, возвращаемая методом PhotosGetAll.

type PhotosGetByIDParams

type PhotosGetByIDParams struct {
	Photos     string
	Extended   bool
	PhotoSizes bool
}

PhotosGetByIDParams параметры метода PhotosGetByID.

type PhotosGetChatUploadServerParams

type PhotosGetChatUploadServerParams struct {
	ChatID    uint
	CropX     uint
	CropY     uint
	CropWidth uint
}

PhotosGetChatUploadServerParams параметры метода PhotosGetChatUploadServer.

type PhotosGetChatUploadServerResp

type PhotosGetChatUploadServerResp struct {
	UploadURL string `json:"upload_url"`
}

PhotosGetChatUploadServerResp структура, возвращаемая методом PhotosGetChatUploadServer.

type PhotosGetCommentsParams

type PhotosGetCommentsParams struct {
	OwnerID        int
	PhotoID        int
	NeedLikes      bool
	StartCommentID uint
	Offset         int
	Count          uint
	Sort           string
	AccessKey      string
	Extended       bool
	Fields         string
}

PhotosGetCommentsParams параметры метода PhotosGetComments.

type PhotosGetCommentsResp

type PhotosGetCommentsResp struct {
	Count      int       `json:"count"`
	Items      []Comment `json:"items"`
	Profiles   []User    `json:"profiles"`
	Groups     []Group   `json:"groups"`
	RealOffset int       `json:"real_offset"`
}

PhotosGetCommentsResp структура, возвращаемая методом PhotosGetComments.

type PhotosGetMarketAlbumUploadServerParams

type PhotosGetMarketAlbumUploadServerParams struct {
	GroupID uint
}

PhotosGetMarketAlbumUploadServerParams параметры метода PhotosGetMarketAlbumUploadServer.

type PhotosGetMarketAlbumUploadServerResp

type PhotosGetMarketAlbumUploadServerResp struct {
	UploadURL string `json:"upload_url"`
}

PhotosGetMarketAlbumUploadServerResp структура, возвращаемая методом PhotosGetMarketAlbumUploadServer.

type PhotosGetMarketUploadServerParams

type PhotosGetMarketUploadServerParams struct {
	GroupID   uint
	MainPhoto bool
	CropX     uint
	CropY     uint
	CropWidth uint
}

PhotosGetMarketUploadServerParams параметры метода PhotosGetMarketUploadServer.

type PhotosGetMarketUploadServerResp

type PhotosGetMarketUploadServerResp struct {
	UploadURL string `json:"upload_url"`
}

PhotosGetMarketUploadServerResp структура, возвращаемая методом PhotosGetMarketUploadServer.

type PhotosGetMessagesUploadServerParams

type PhotosGetMessagesUploadServerParams struct {
	PeerID int
}

PhotosGetMessagesUploadServerParams параметры метода PhotosGetMessagesUploadServer.

type PhotosGetMessagesUploadServerResp

type PhotosGetMessagesUploadServerResp struct {
	UploadURL string `json:"upload_url"`
	AlbumID   int    `json:"album_id"`
	GroupID   int    `json:"group_id"`
}

PhotosGetMessagesUploadServerResp структура, возвращаемая методом PhotosGetMessagesUploadServer.

type PhotosGetNewTagsParams

type PhotosGetNewTagsParams struct {
	Offset int
	Count  uint
}

PhotosGetNewTagsParams параметры метода PhotosGetNewTags.

type PhotosGetNewTagsResp

type PhotosGetNewTagsResp struct {
	Count int     `json:"count"`
	Items []Photo `json:"items"`
}

PhotosGetNewTagsResp структура, возвращаемая методом PhotosGetNewTags.

type PhotosGetOwnerCoverPhotoUploadServerParams

type PhotosGetOwnerCoverPhotoUploadServerParams struct {
	GroupID uint
	CropX   uint
	CropY   uint
	CropX2  uint
	CropY2  uint
}

PhotosGetOwnerCoverPhotoUploadServerParams параметры метода PhotosGetOwnerCoverPhotoUploadServer.

type PhotosGetOwnerCoverPhotoUploadServerResp

type PhotosGetOwnerCoverPhotoUploadServerResp struct {
	UploadURL string `json:"upload_url"`
}

PhotosGetOwnerCoverPhotoUploadServerResp структура, возвращаемая методом PhotosGetOwnerCoverPhotoUploadServer.

type PhotosGetOwnerPhotoUploadServerParams

type PhotosGetOwnerPhotoUploadServerParams struct {
	OwnerID int
}

PhotosGetOwnerPhotoUploadServerParams параметры метода PhotosGetOwnerPhotoUploadServer.

type PhotosGetOwnerPhotoUploadServerResp

type PhotosGetOwnerPhotoUploadServerResp struct {
	UploadURL string `json:"upload_url"`
}

PhotosGetOwnerPhotoUploadServerResp структура, возвращаемая методом PhotosGetOwnerPhotoUploadServer.

type PhotosGetParams

type PhotosGetParams struct {
	OwnerID    int
	AlbumID    string
	PhotoIDS   []int
	Rev        bool
	Extended   bool
	FeedType   string
	Feed       int
	PhotoSizes bool
	Offset     uint
	Count      uint
}

PhotosGetParams параметры метода PhotosGet.

type PhotosGetResp

type PhotosGetResp struct {
	Count int
	Items []Photo
}

PhotosGetResp структура, возвращаемая методом PhotosGet.

type PhotosGetTagsParams

type PhotosGetTagsParams struct {
	OwnerID   int
	PhotoID   int
	AccessKey string
}

PhotosGetTagsParams параметры метода PhotosGetTags.

type PhotosGetTagsResp

type PhotosGetTagsResp []struct {
	UserID     int     `json:"user_id"`
	ID         int     `json:"id"`
	PlacerID   int     `json:"placer_id"`
	TaggedName string  `json:"tagged_name"`
	Date       int64   `json:"date"`
	X          float32 `json:"x"`
	Y          float32 `json:"y"`
	X2         float32 `json:"x2"`
	Y2         float32 `json:"y2"`
	Viewed     int     `json:"viewed"`
}

PhotosGetTagsResp структура, возвращаемая методом PhotosGetTags.

type PhotosGetUploadServerParams

type PhotosGetUploadServerParams struct {
	AlbumID int
	GroupID int
}

PhotosGetUploadServerParams параметры метода PhotosGetUploadServer.

type PhotosGetUploadServerResp

type PhotosGetUploadServerResp struct {
	UploadURL string `json:"upload_url"`
	AlbumID   int    `json:"album_id"`
	UserID    int    `json:"user_id"`
}

PhotosGetUploadServerResp структура, возвращаемая методом PhotosGetUploadServer.

type PhotosGetUserPhotosParams

type PhotosGetUserPhotosParams struct {
	UserID   uint
	Offset   uint
	Count    uint
	Extended bool
	Sort     string
}

PhotosGetUserPhotosParams параметры метода PhotosGetUserPhotos.

type PhotosGetUserPhotosResp

type PhotosGetUserPhotosResp struct {
	Count int     `json:"count"`
	Items []Photo `json:"items"`
}

PhotosGetUserPhotosResp структура, возвращаемая методом PhotosGetUserPhotos.

type PhotosGetWallUploadServerParams

type PhotosGetWallUploadServerParams struct {
	GroupID int
}

PhotosGetWallUploadServerParams параметры метода PhotosGetWallUploadServer.

type PhotosGetWallUploadServerResp

type PhotosGetWallUploadServerResp struct {
	UploadURL string `json:"upload_url"`
	AlbumID   int    `json:"album_id"`
	UserID    int    `json:"user_id"`
}

PhotosGetWallUploadServerResp структура, возвращаемая методом PhotosGetWallUploadServer.

type PhotosMakeCoverParams

type PhotosMakeCoverParams struct {
	OwnerID int
	PhotoID int
	AlbumID int
}

PhotosMakeCoverParams параметры метода PhotosMakeCover.

type PhotosMoveParams

type PhotosMoveParams struct {
	OwnerID       int
	TargetAlbumID int
	PhotoID       int
}

PhotosMoveParams параметры метода PhotosMove.

type PhotosPutTagParams

type PhotosPutTagParams struct {
	OwnerID uint
	PhotoID uint
	UserID  int
	X       float32
	Y       float32
	X2      float32
	Y2      float32
}

PhotosPutTagParams параметры метода PhotosPutTag.

type PhotosRemoveTagParams

type PhotosRemoveTagParams struct {
	OwnerID int
	PhotoID int
	TagID   int
}

PhotosRemoveTagParams параметры метода PhotosRemoveTag.

type PhotosReorderAlbumsParams

type PhotosReorderAlbumsParams struct {
	OwnerID int
	AlbumID int
	Before  int
	After   int
}

PhotosReorderAlbumsParams параметры метода PhotosReorderAlbums.

type PhotosReorderPhotosParams

type PhotosReorderPhotosParams struct {
	OwnerID int
	PhotoID int
	Before  int
	After   int
}

PhotosReorderPhotosParams параметры метода PhotosReorderPhotos.

type PhotosReportCommentParams

type PhotosReportCommentParams struct {
	OwnerID   int
	CommentID uint
	Reason    uint
}

PhotosReportCommentParams параметры метода PhotosReportComment.

type PhotosReportParams

type PhotosReportParams struct {
	OwnerID int
	PhotoID uint
	Reason  uint
}

PhotosReportParams параметры метода PhotosReport.

type PhotosRestoreCommentParams

type PhotosRestoreCommentParams struct {
	OwnerID   int
	CommentID int
}

PhotosRestoreCommentParams параметры метода PhotosRestoreComment.

type PhotosRestoreParams

type PhotosRestoreParams struct {
	OwnerID int
	PhotoID uint
}

PhotosRestoreParams параметры метода PhotosRestore.

type PhotosSaveMarketAlbumPhotoParams

type PhotosSaveMarketAlbumPhotoParams struct {
	GroupID uint
	Photo   string
	Server  uint
	Hash    string
}

PhotosSaveMarketAlbumPhotoParams параметры метода PhotosSaveMarketAlbumPhoto.

type PhotosSaveMarketPhotoParams

type PhotosSaveMarketPhotoParams struct {
	GroupID  uint
	Photo    string
	Server   int
	Hash     string
	CropData string
	CropHash string
}

PhotosSaveMarketPhotoParams параметры метода PhotosSaveMarketPhoto.

type PhotosSaveMessagesPhotoParams

type PhotosSaveMessagesPhotoParams struct {
	Photo  string
	Server int
	Hash   string
}

PhotosSaveMessagesPhotoParams параметры метода PhotosSaveMessagesPhoto.

type PhotosSaveMessagesPhotoResp

type PhotosSaveMessagesPhotoResp []struct {
	ID       int    `json:"id"`
	PID      int    `json:"pid"`
	AID      int    `json:"aid"`
	OwnerID  int    `json:"owner_id"`
	Src      string `json:"src"`
	SrcBig   string `json:"src_big"`
	SrcSmall string `json:"src_small"`
	SrcXbig  string `json:"src_xbig"`
	SrcXxbig string `json:"src_xxbig"`
	Created  int64  `json:"created"`
}

PhotosSaveMessagesPhotoResp структура, возвращаемая методом PhotosSaveMessagesPhoto.

type PhotosSaveOwnerCoverPhotoParams

type PhotosSaveOwnerCoverPhotoParams struct {
	Hash  string
	Photo string
}

PhotosSaveOwnerCoverPhotoParams параметры метода PhotosSaveOwnerCoverPhoto.

type PhotosSaveOwnerCoverPhotoResp

type PhotosSaveOwnerCoverPhotoResp []struct {
	URL    string `json:"url"`
	Width  int    `json:"width"`
	Height int    `json:"height"`
}

PhotosSaveOwnerCoverPhotoResp структура, возвращаемая методом PhotosSaveOwnerCoverPhoto.

type PhotosSaveOwnerPhotoParams

type PhotosSaveOwnerPhotoParams struct {
	Server string
	Hash   string
	Photo  string
}

PhotosSaveOwnerPhotoParams параметры метода PhotosSaveOwnerPhoto.

type PhotosSaveOwnerPhotoResp

type PhotosSaveOwnerPhotoResp struct {
	PhotoHash     string `json:"photo_hash"`
	PhotoSrc      string `json:"photo_src"`
	PhotoSrcBig   string `json:"photo_src_big"`
	PhotoSrcSmall string `json:"photo_src_small"`
}

PhotosSaveOwnerPhotoResp структура, возвращаемая методом PhotosSaveOwnerPhoto.

type PhotosSaveParams

type PhotosSaveParams struct {
	AlbumID    int
	GroupID    int
	Server     int
	PhotosList string
	Hash       string
	Latitude   float32
	Longitude  float32
	Caption    string
}

PhotosSaveParams параметры метода PhotosSave.

type PhotosSaveWallPhotoParams

type PhotosSaveWallPhotoParams struct {
	UserID    uint
	GroupID   uint
	Photo     string
	Server    int
	Hash      string
	Latitude  float32
	Longitude float32
	Caption   string
}

PhotosSaveWallPhotoParams параметры метода PhotosSaveWallPhoto.

type PhotosSearchParams

type PhotosSearchParams struct {
	Q         string
	Lat       float32
	Long      float32
	StartTime int64
	EndTime   int64
	Sort      bool
	Offset    uint
	Count     uint
	Radius    uint
}

PhotosSearchParams параметры метода PhotosSearch.

type PhotosSearchResp

type PhotosSearchResp struct {
	Count int     `json:"count"`
	Items []Photo `json:"items"`
}

PhotosSearchResp структура, возвращаемая методом PhotosSearch.

type PinnedMessage

type PinnedMessage struct {
	ID          int         `json:"id"`
	Date        int64       `json:"date"`
	FromID      int         `json:"from_id"`
	Text        string      `json:"text"`
	Attachments string      `json:"attachments"`
	Geo         *Geo        `json:"geo"`
	FwdMessages interface{} `json:"fwd_messages"`
}

PinnedMessage описывает закреплённое сообщение в беседе.

type Place

type Place struct {
	ID        int     `json:"id"`
	Title     string  `json:"title"`
	Latitude  float32 `json:"latitude"`
	Longitude float32 `json:"longitude"`
	Created   int64   `json:"created"`
	Icon      string  `json:"icon"`
	Checkins  int     `json:"checkins"`
	Updated   int64   `json:"updated"`
	Type      int     `json:"type"`
	Country   int     `json:"country"`
	City      int     `json:"city"`
	Address   string  `json:"address"`
}

Place описывает место.

type Poll

type Poll struct {
	ID       int    `json:"id"`
	OwnerID  int    `json:"owner_id"`
	Created  int64  `json:"created"`
	Question string `json:"question"`
	Votes    int    `json:"votes"`
	Answers  []struct {
		ID    int     `json:"id"`
		Text  string  `json:"text"`
		Votes int     `json:"votes"`
		Rate  float32 `json:"rate"`
	} `json:"answers"`
	Anonymous  bool   `json:"anonymous"`
	Multiple   bool   `json:"multiple"`
	AnswerIDS  []int  `json:"answer_ids"`
	EndDate    int64  `json:"end_date"`
	Closed     bool   `json:"closed"`
	IsBoard    bool   `json:"is_board"`
	CanEdit    bool   `json:"can_edit"`
	CanVote    bool   `json:"can_vote"`
	CanReport  bool   `json:"can_report"`
	CanShare   bool   `json:"can_share"`
	AuthorID   int    `json:"author_id"`
	Photo      *Photo `json:"photo"`
	Background *struct {
		ID     int    `json:"id"`
		Type   string `json:"type"`
		Angle  int    `json:"angle"`
		Color  string `json:"color"`
		Width  int    `json:"width"`
		Height int    `json:"height"`
		Images []Size `json:"images"`
		Points []struct {
			Position float32 `json:"position"`
			Color    string  `json:"color"`
		} `json:"points"`
	} `json:"background"`
	Friends []int `json:"friends"`
}

Poll описывает опрос.

type Post

type Post struct {
	ID           int    `json:"id"`
	OwnerID      int    `json:"owner_id"`
	FromID       int    `json:"from_id"`
	CreatedBy    int    `json:"created_by"`
	Date         int64  `json:"date"`
	Text         string `json:"text"`
	ReplyOwnerID int    `json:"reply_owner_id"`
	ReplyPostID  int    `json:"reply_post_id"`
	FriendsOnly  int    `json:"friends_only"`
	Comments     *struct {
		Count         int  `json:"count"`
		CanPost       int  `json:"can_post"`
		GroupsCanPost bool `json:"groups_can_post"`
		CanClose      int  `json:"can_close"`
		CanOpen       int  `json:"can_open"`
	} `json:"comments"`
	Likes *struct {
		Count      int `json:"count"`
		UserLikes  int `json:"user_likes"`
		CanLike    int `json:"can_like"`
		CanPublish int `json:"can_publish"`
	} `json:"likes"`
	Reposts *struct {
		Count        int `json:"count"`
		UserReposted int `json:"user_reposted"`
	} `json:"reposts"`
	Views *struct {
		Count int `json:"count"`
	} `json:"views"`
	PostType   string `json:"post_type"`
	PostSource *struct {
		Type     string `json:"type"`
		Platform string `json:"platform"`
		Data     string `json:"data"`
		URL      string `json:"url"`
	} `json:"post_source"`
	Attachments []Attachment `json:"attachments"`
	Geo         *struct {
		Type        string      `json:"type"`
		Coordinates interface{} `json:"coordinates"`
	} `json:"geo"`
	SignerID    int         `json:"signer_id"`
	CopyHistory interface{} `json:"copy_history"`
	CanPin      int         `json:"can_pin"`
	IsPinned    int         `json:"is_pinned"`
	CanDelete   int         `json:"can_delete"`
	CanEdit     int         `json:"can_edit"`
	CanArchive  bool        `json:"can_archive"`
	IsArchived  bool        `json:"is_archived"`
	MarkedAsAds int         `json:"marked_as_ads"`
	IsFavorite  bool        `json:"is_favorite"`
	PostponedID int         `json:"postponed_id"`
}

Post описывает запись на стене пользователя или сообщества.

type PrettyCard

type PrettyCard struct {
	Cards []struct {
		CardID  interface{} `json:"card_id"`
		LinkURL string      `json:"link_url"`
		Title   string      `json:"title"`
		Images  []struct {
			URL    string `json:"url"`
			Width  int    `json:"width"`
			Height int    `json:"height"`
		} `json:"images"`
		Button   interface{} `json:"button"`
		Price    string      `json:"price"`
		PriceOld string      `json:"price_old"`
	} `json:"cards"`
}

PrettyCard описывает массив элементов-карточек.

type Response

type Response struct {
	Error    Error            `json:"error"`
	Response *json.RawMessage `json:"response"`
}

Response ответ от методов VK.

type SearchGetHintsParams

type SearchGetHintsParams struct {
	Q            string
	Offset       uint
	Limit        uint
	Filters      string
	Fields       string
	SearchGlobal bool
}

SearchGetHintsParams параметры метода SearchGetHints.

type SearchGetHintsResp

type SearchGetHintsResp struct {
	Count int `json:"count"`
	Items []struct {
		Type  string
		Group *struct {
			ID          int    `json:"id"`
			Name        string `json:"name"`
			ScreenName  string `json:"screen_name"`
			IsClosed    int    `json:"is_closed"`
			IsAdmin     int    `json:"is_admin"`
			IsMember    int    `json:"is_member"`
			Type        string `json:"type"`
			Photo       string `json:"photo"`
			PhotoMedium string `json:"photo_medium"`
			PhotoBig    string `json:"photo_big"`
		} `json:"group"`
		Profile *struct {
			ID        int    `json:"id"`
			FirstName string `json:"first_name"`
			LastName  string `json:"last_name"`
		} `json:"profile"`
		Section     string `json:"section"`
		Description string `json:"description"`
		Global      int    `json:"global"`
	} `json:"items"`
}

SearchGetHintsResp структура, возвращаемая методом SearchGetHints.

type Size

type Size struct {
	Type   string `json:"type"`
	Src    string `json:"src"`
	Width  int    `json:"width"`
	Height int    `json:"height"`
}

Size формат описания размеров фотографии.

type StatsFormat

type StatsFormat struct {
	PeriodFrom string `json:"period_from"`
	PeriodTo   string `json:"period_to"`
	Visitors   *struct {
		Views    int `json:"views"`
		Visitors int `json:"visitors"`
	} `json:"visitors"`
}

StatsFormat .

type StatusGetParams

type StatusGetParams struct {
	UserID  int
	GroupID uint
}

StatusGetParams параметры метода StatusGet.

type StatusGetResp

type StatusGetResp struct {
	Text  string `json:"text"`
	Audio *Audio `json:"audio"`
}

StatusGetResp структура, возвращаемая методом StatusGet.

type StatusSetParams

type StatusSetParams struct {
	Text    string
	GroupID uint
}

StatusSetParams параметры метода StatusSet.

type Sticker

type Sticker struct {
	ProductID int `json:"product_id"`
	StickerID int `json:"sticker_id"`
	Images    []struct {
		URL    string `json:"url"`
		Width  int    `json:"width"`
		Height int    `json:"height"`
	} `json:"images"`
	ImagesWithBackground []struct {
		URL    string `json:"url"`
		Width  int    `json:"width"`
		Height int    `json:"height"`
	} `json:"images_with_background"`
}

Sticker описывает стикер.

type Story

type Story struct {
	ID        int    `json:"id"`
	OwnerID   int    `json:"owner_id"`
	Date      int64  `json:"date"`
	ExpiresAt int64  `json:"expires_at"`
	IsExpired bool   `json:"is_expired"`
	IsDeleted bool   `json:"is_deleted"`
	CanSee    int    `json:"can_see"`
	Seen      int    `json:"seen"`
	Type      string `json:"type"`
	Photo     *Photo `json:"photo"`
	Video     *Video `json:"video"`
	Link      *struct {
		Text string `json:"text"`
		URL  string `json:"url"`
	} `json:"link"`
	ParentStoryOwnerID int         `json:"parent_story_owner_id"`
	ParentStoryID      int         `json:"parent_story_id"`
	ParentStory        interface{} `json:"parent_story"`
	Replies            *struct {
		Count int `json:"count"`
		New   int `json:"new"`
	} `json:"replies"`
	CanReply   int    `json:"can_reply"`
	CanShare   int    `json:"can_share"`
	CanComment int    `json:"can_comment"`
	Views      int    `json:"views"`
	AccessKey  string `json:"access_key"`
}

Story описывает историю.

type Timetable

type Timetable struct {
	Mon *BusinessHours `json:"mon,omitempty"`
	Tue *BusinessHours `json:"tue,omitempty"`
	Wed *BusinessHours `json:"wed,omitempty"`
	Thu *BusinessHours `json:"thu,omitempty"`
	Fri *BusinessHours `json:"fri,omitempty"`
	Sat *BusinessHours `json:"sat,omitempty"`
	Sun *BusinessHours `json:"sun,omitempty"`
}

Timetable расписание.

type Topic

type Topic struct {
	ID           int    `json:"id"`
	Title        string `json:"title"`
	Created      int64  `json:"created"`
	CreatedBy    int    `json:"created_by"`
	Updated      int64  `json:"updated"`
	UpdatedBy    int    `json:"updated_by"`
	IsClosed     int    `json:"is_closed"`
	IsFixed      int    `json:"is_fixed"`
	Comments     int    `json:"comments"`
	FirstComment string `json:"first_comment"`
	LastComment  string `json:"last_comment"`
}

Topic описывает обсуждение в сообществе.

type UploadAlbumResp

type UploadAlbumResp struct {
	Server     int    `json:"server"`
	PhotosList string `json:"photos_list"`
	Hash       string `json:"hash"`
	AID        int    `json:"aid"`
}

UploadAlbumResp фото в альбоме.

func UploadAlbum

func UploadAlbum(uploadURL, filename string, reader io.Reader) (*UploadAlbumResp, error)

UploadAlbum загрузка фото в альбом из io.Reader.

func UploadAlbumFromFile

func UploadAlbumFromFile(uploadURL, path string) (*UploadAlbumResp, error)

UploadAlbumFromFile загрузка фото в альбом из файла.

type UploadAudioResp

type UploadAudioResp struct {
	Redirect string `json:"redirect"`
	Server   int    `json:"server"`
	Audio    string `json:"audio"`
}

UploadAudioResp аудиозапись.

func UploadAudio

func UploadAudio(uploadURL, filename string, reader io.Reader) (*UploadAudioResp, error)

UploadAudio загрузка аудиозаписи из io.Reader.

func UploadAudioFromFile

func UploadAudioFromFile(uploadURL, path string) (*UploadAudioResp, error)

UploadAudioFromFile загрузка аудиозаписи из файла.

type UploadAvatarResp

type UploadAvatarResp struct {
	Server      int    `json:"server"`
	Photo       string `json:"photo"`
	Mid         int    `json:"mid"`
	Hash        string `json:"hash"`
	MessageCode int    `json:"message_code"`
	ProfileAID  int    `json:"profile_aid"`
}

UploadAvatarResp главное фото пользователя или сообщества.

func UploadAvatar

func UploadAvatar(uploadURL, filename string, reader io.Reader) (*UploadAvatarResp, error)

UploadAvatar загрузка главного фото пользователя или сообщества из io.Reader.

func UploadAvatarFromFile

func UploadAvatarFromFile(uploadURL, path string) (*UploadAvatarResp, error)

UploadAvatarFromFile загрузка главного фото пользователя или сообщества из файла.

type UploadChatCoverResp

type UploadChatCoverResp struct {
	Response int `json:"response"`
}

UploadChatCoverResp главное фото для чата.

func UploadChatCover

func UploadChatCover(uploadURL, filename string, reader io.Reader) (*UploadChatCoverResp, error)

UploadChatCover загрузка главного фото для чата из io.Reader.

func UploadChatCoverFromFile

func UploadChatCoverFromFile(uploadURL, path string) (*UploadChatCoverResp, error)

UploadChatCoverFromFile загрузка главного фото для чата из файла.

type UploadDocResp

type UploadDocResp struct {
	File string `json:"file,omitempty"`
}

UploadDocResp документ.

func UploadDoc

func UploadDoc(uploadURL, filename string, reader io.Reader) (*UploadDocResp, error)

UploadDoc загрузка документа из io.Reader.

func UploadDocFromFile

func UploadDocFromFile(uploadURL, path string) (*UploadDocResp, error)

UploadDocFromFile загрузка документа из файла.

type UploadGroupCoverResp

type UploadGroupCoverResp struct {
	Photo string `json:"photo"`
	Hash  string `json:"hash"`
}

UploadGroupCoverResp обложка сообщества.

func UploadGroupCover

func UploadGroupCover(uploadURL, filename string, reader io.Reader) (*UploadGroupCoverResp, error)

UploadGroupCover загрузка обложки сообщества из io.Reader.

func UploadGroupCoverFromFile

func UploadGroupCoverFromFile(uploadURL, path string) (*UploadGroupCoverResp, error)

UploadGroupCoverFromFile загрузка обложки сообщества из файла.

type UploadMessageResp

type UploadMessageResp struct {
	Server int    `json:"server"`
	Photo  string `json:"photo"`
	Hash   string `json:"hash"`
}

UploadMessageResp фото в сообщении.

func UploadMessage

func UploadMessage(uploadURL, filename string, reader io.Reader) (*UploadMessageResp, error)

UploadMessage загрузка фото в сообщение из io.Reader.

func UploadMessageFromFile

func UploadMessageFromFile(uploadURL, path string) (*UploadMessageResp, error)

UploadMessageFromFile загрузка фото в сообщение из файла.

type UploadProductResp

type UploadProductResp struct {
	Server   int    `json:"server"`
	Photo    string `json:"photo"`
	Hash     string `json:"hash"`
	CropData string `json:"crop_data"`
	CropHash string `json:"crop_hash"`
}

UploadProductResp фото товара.

func UploadProduct

func UploadProduct(uploadURL, filename string, reader io.Reader) (*UploadProductResp, error)

UploadProduct загрузка фото товара из io.Reader.

func UploadProductFromFile

func UploadProductFromFile(uploadURL, path string) (*UploadProductResp, error)

UploadProductFromFile загрузка фото товара из файла.

type UploadProductSetResp

type UploadProductSetResp struct {
	Server int    `json:"server"`
	Photo  string `json:"photo"`
	GID    int    `json:"gid"`
	Hash   string `json:"hash"`
}

UploadProductSetResp фотоподборка товаров.

func UploadProductSet

func UploadProductSet(uploadURL, filename string, reader io.Reader) (*UploadProductSetResp, error)

UploadProductSet загрузка фотоподборки товаров из io.Reader.

func UploadProductSetFromFile

func UploadProductSetFromFile(uploadURL, path string) (*UploadProductSetResp, error)

UploadProductSetFromFile загрузка фотоподборки товаров из файла.

type UploadVideoResp

type UploadVideoResp struct {
	Size    int `json:"size,omitempty"`
	VideoID int `json:"video_id,omitempty"`
}

UploadVideoResp видеозапись.

func UploadVideo

func UploadVideo(uploadURL, filename string, reader io.Reader) (*UploadVideoResp, error)

UploadVideo загрузка видеозаписи из io.Reader.

func UploadVideoFromFile

func UploadVideoFromFile(uploadURL, path string) (*UploadVideoResp, error)

UploadVideoFromFile загрузка видеозаписи из файла.

type UploadWallResp

type UploadWallResp struct {
	Server int    `json:"server"`
	Photo  string `json:"photo"`
	Hash   string `json:"hash"`
}

UploadWallResp фото на стене.

func UploadWall

func UploadWall(uploadURL, filename string, reader io.Reader) (*UploadWallResp, error)

UploadWall загрузка фото на стену из io.Reader.

func UploadWallFromFile

func UploadWallFromFile(uploadURL, path string) (*UploadWallResp, error)

UploadWallFromFile загрузка фото на стену из файла.

type User

type User struct {
	ID              int    `json:"id"`
	FirstName       string `json:"first_name"`
	LastName        string `json:"last_name"`
	Deactivated     string `json:"deactivated"`
	IsClosed        bool   `json:"is_closed"`
	CanAccessClosed bool   `json:"can_access_closed"`

	About                  string `json:"about"`
	Activities             string `json:"activities"`
	Bdate                  string `json:"bdate"`
	Blacklisted            int    `json:"blacklisted"`
	BlacklistedByMe        int    `json:"blacklisted_by_me"`
	Books                  string `json:"books"`
	CanPost                int    `json:"can_post"`
	CanSeeAllPosts         int    `json:"can_see_all_posts"`
	CanSeeAudio            int    `json:"can_see_audio"`
	CanSendFriendRequest   int    `json:"can_send_friend_request"`
	CanWritePrivateMessage int    `json:"can_write_private_message"`
	Career                 *struct {
		GroupID   int    `json:"group_id"`
		Company   string `json:"company"`
		CountryID int    `json:"country_id"`
		CityID    int    `json:"city_id"`
		CityName  string `json:"city_name"`
		From      int    `json:"from"`
		Until     int    `json:"until"`
		Position  string `json:"position"`
	} `json:"career"`
	City *struct {
		ID    int    `json:"id"`
		Title string `json:"title"`
	} `json:"city"`
	CommonCount int         `json:"common_count"`
	Connections interface{} `json:"connections"`
	Contacts    *struct {
		MobilePhone string `json:"mobile_phone"`
		HomePhone   string `json:"home_phone"`
	} `json:"contacts"`
	Counters *struct {
		Albums        int `json:"albums"`
		Videos        int `json:"videos"`
		Audios        int `json:"audios"`
		Photos        int `json:"photos"`
		Notes         int `json:"notes"`
		Friends       int `json:"friends"`
		Groups        int `json:"groups"`
		OnlineFriends int `json:"online_friends"`
		MutualFriends int `json:"mutual_friends"`
		UserVideos    int `json:"user_videos"`
		Followers     int `json:"followers"`
		Pages         int `json:"pages"`
	} `json:"counters"`
	Country *struct {
		ID    int    `json:"id"`
		Title string `json:"title"`
	} `json:"country"`
	CropPhoto *struct {
		Photo *Photo `json:"photo"`
		Crop  *struct {
			X  float32 `json:"x"`
			Y  float32 `json:"y"`
			X2 float32 `json:"x2"`
			Y2 float32 `json:"y2"`
		} `json:"crop"`
		Rect *struct {
			X  float32 `json:"x"`
			Y  float32 `json:"y"`
			X2 float32 `json:"x2"`
			Y2 float32 `json:"y2"`
		} `json:"rect"`
	} `json:"crop_photo"`
	Domain    string `json:"domain"`
	Education *struct {
		University     int    `json:"university"`
		UniversityName string `json:"university_name"`
		Faculty        int    `json:"faculty"`
		FacultyName    string `json:"faculty_name"`
		Graduation     int    `json:"graduation"`
	} `json:"education"`
	Exports          interface{} `json:"exports"`
	FirstNameNom     string      `json:"first_name_nom"`
	FirstNameGen     string      `json:"first_name_gen"`
	FirstNameDat     string      `json:"first_name_dat"`
	FirstNameAcc     string      `json:"first_name_acc"`
	FirstNameIns     string      `json:"first_name_ins"`
	FirstNameAbl     string      `json:"first_name_abl"`
	FollowersCount   int         `json:"followers_count"`
	FriendStatus     int         `json:"friend_status"`
	Games            string      `json:"games"`
	HasMobile        int         `json:"has_mobile"`
	HasPhoto         int         `json:"has_photo"`
	HomeTown         string      `json:"home_town"`
	Interests        string      `json:"interests"`
	IsFavorite       int         `json:"is_favorite"`
	IsFriend         int         `json:"is_friend"`
	IsHiddenFromFeed int         `json:"is_hidden_from_feed"`
	LastNameNom      string      `json:"last_name_nom"`
	LastNameGen      string      `json:"last_name_gen"`
	LastNameDat      string      `json:"last_name_dat"`
	LastNameAcc      string      `json:"last_name_acc"`
	LastNameIns      string      `json:"last_name_ins"`
	LastNameAbl      string      `json:"last_name_abl"`
	LastSeen         *struct {
		Time     int64 `json:"time"`
		Platform int   `json:"platform"`
	} `json:"last_seen"`
	Lists      string `json:"lists"`
	MaidenName string `json:"maiden_name"`
	Military   *struct {
		Unit      string `json:"unit"`
		UnitID    int    `json:"unit_id"`
		CountryID int    `json:"country_id"`
		From      int    `json:"from"`
		Until     int    `json:"until"`
	} `json:"military"`
	Movies     string `json:"movies"`
	Music      string `json:"music"`
	Nickname   string `json:"nickname"`
	Occupation *struct {
		Type string `json:"type"`
		ID   int    `json:"id"`
		Name string `json:"name"`
	} `json:"occupation"`
	Online   int `json:"online"`
	Personal *struct {
		Political  int         `json:"political"`
		Langs      interface{} `json:"langs"`
		Religion   string      `json:"religion"`
		InspiredBy string      `json:"inspired_by"`
		PeopleMain int         `json:"people_main"`
		LifeMain   int         `json:"life_main"`
		Smoking    int         `json:"smoking"`
		Alcohol    int         `json:"alcohol"`
	} `json:"personal"`
	Photo50      string `json:"photo_50"`
	Photo100     string `json:"photo_100"`
	Photo200Orig string `json:"photo_200_orig"`
	Photo200     string `json:"photo_200"`
	Photo400Orig string `json:"photo_400_orig"`
	PhotoID      string `json:"photo_id"`
	PhotoMax     string `json:"photo_max"`
	PhotoMaxOrig string `json:"photo_max_orig"`
	Quotes       string `json:"quotes"`
	Relatives    []struct {
		ID   int    `json:"id"`
		Name string `json:"name"`
		Type string `json:"type"`
	} `json:"relatives"`
	Relation int `json:"relation"`
	Schools  []struct {
		ID            int    `json:"id"`
		Country       int    `json:"country"`
		City          int    `json:"city"`
		Name          string `json:"name"`
		YearFrom      int    `json:"year_from"`
		YearTo        int    `json:"year_to"`
		YearGraduated int    `json:"year_graduated"`
		Class         string `json:"class"`
		Speciality    string `json:"speciality"`
		Type          int    `json:"type"`
		TypeStr       string `json:"type_str"`
	} `json:"schools"`
	ScreenName   string `json:"screen_name"`
	Sex          int    `json:"sex"`
	Site         string `json:"site"`
	Status       string `json:"status"`
	Timezone     int    `json:"timezone"`
	Trending     int    `json:"trending"`
	TV           string `json:"tv"`
	Universities []struct {
		ID              int    `json:"id"`
		Country         int    `json:"country"`
		City            int    `json:"city"`
		Name            string `json:"name"`
		Faculty         int    `json:"faculty"`
		FacultyName     string `json:"faculty_name"`
		Chair           int    `json:"chair"`
		ChairName       string `json:"chair_name"`
		Graduation      int    `json:"graduation"`
		EducationForm   string `json:"education_form"`
		EducationStatus string `json:"education_status"`
	} `json:"universities"`
	Verified    int    `json:"verified"`
	WallDefault string `json:"wall_default"`

	// поле может добавить метод FriendsGetByPhones.
	Phone string `json:"phone"`
	// поле может добавить метод FriendsGetSuggestions.
	FoundWith interface{} `json:"found_with"`
	// поле может добавить метод MessagesGetChat.
	InvitedBy interface{} `json:"invited_by"`
}

User описывает пользователя. Набор полей может меняться в зависимости от вызванного метода и переданных в нем параметров.

type Video

type Video struct {
	ID             int    `json:"id"`
	OwnerID        int    `json:"owner_id"`
	Title          string `json:"title"`
	Description    string `json:"description"`
	Duration       int    `json:"duration"`
	Photo130       string `json:"photo_130"`
	Photo320       string `json:"photo_320"`
	Photo640       string `json:"photo_640"`
	Photo800       string `json:"photo_800"`
	Photo1280      string `json:"photo_1280"`
	FirstFrame130  string `json:"first_frame_130"`
	FirstFrame320  string `json:"first_frame_320"`
	FirstFrame640  string `json:"first_frame_640"`
	FirstFrame800  string `json:"first_frame_800"`
	FirstFrame1280 string `json:"first_frame_1280"`
	Date           int64  `json:"date"`
	AddingDate     int64  `json:"adding_date"`
	Files          *struct {
		MP240    string `json:"mp4_240"`
		MP360    string `json:"mp4_360"`
		MP480    string `json:"mp4_480"`
		MP720    string `json:"mp4_720"`
		External string `json:"external"`
	} `json:"files"`
	Views      int    `json:"views"`
	Comments   int    `json:"comments"`
	Player     string `json:"player"`
	Platform   string `json:"platform"`
	CanEdit    int    `json:"can_edit"`
	CanAdd     int    `json:"can_add"`
	IsPrivate  int    `json:"is_private"`
	AccessKey  string `json:"access_key"`
	Processing int    `json:"processing"`
	Live       int    `json:"live"`
	Upcoming   int    `json:"upcoming"`
	IsFavorite bool   `json:"is_favorite"`

	// поля для методов Photos с параметром Extended=true
	PrivacyView *struct {
		Category string `json:"category"`
		Owners   *struct {
			Allowed  []int `json:"allowed"`
			Excluded []int `json:"excluded"`
		} `json:"owners,omitempty"`
		Lists *struct {
			Allowed  []int `json:"allowed"`
			Excluded []int `json:"excluded"`
		} `json:"lists"`
	} `json:"privacy_view*"`
	PrivacyComment *struct {
		Category string `json:"category"`
		Owners   *struct {
			Allowed  []int `json:"allowed"`
			Excluded []int `json:"excluded"`
		} `json:"owners,omitempty"`
		Lists *struct {
			Allowed  []int `json:"allowed"`
			Excluded []int `json:"excluded"`
		} `json:"lists"`
	} `json:"privacy_comment"`
	CanComment int `json:"can_comment"`
	CanRepost  int `json:"can_repost"`
	Likes      *struct {
		Count     int `json:"count"`
		UserLikes int `json:"user_likes"`
	}
	Repeat int `json:"repeat"`
}

Video описывает видеозапись.

type WallCloseCommentsParams

type WallCloseCommentsParams struct {
	OwnerID int
	PostID  uint
}

WallCloseCommentsParams параметры метода WallCloseComments.

type WallCreateCommentParams

type WallCreateCommentParams struct {
	OwnerID        int
	PostID         uint
	FromGroup      uint
	Message        string
	ReplyToComment int
	Attachments    string
	StickerID      uint
	GUID           string
}

WallCreateCommentParams параметры метода WallCreateComment.

type WallCreateCommentResp

type WallCreateCommentResp struct {
	CommentID    int   `json:"comment_id"`
	ParentsStack []int `json:"parents_stack"`
}

WallCreateCommentResp структура, возвращаемая методом WallCreateComment.

type WallDeleteCommentParams

type WallDeleteCommentParams struct {
	OwnerID   int
	CommentID uint
}

WallDeleteCommentParams параметры метода WallDeleteComment.

type WallDeleteParams

type WallDeleteParams struct {
	OwnerID int
	PostID  uint
}

WallDeleteParams параметры метода WallDelete.

type WallEditAdsStealthParams

type WallEditAdsStealthParams struct {
	OwnerID     int
	PostID      uint
	Message     string
	Attachments string
	Signed      bool
	Lat         float32
	Long        float32
	PlaceID     uint
	LinkButton  string
	LinkTitle   string
	LinkImage   string
	LinkVideo   string
}

WallEditAdsStealthParams параметры метода WallEditAdsStealth.

type WallEditCommentParams

type WallEditCommentParams struct {
	OwnerID     int
	CommentID   uint
	Message     string
	Attachments string
}

WallEditCommentParams параметры метода WallEditComment.

type WallEditParams

type WallEditParams struct {
	OwnerID             int
	PostID              uint
	FriendsOnly         bool
	Message             string
	Attachments         string
	Services            string
	Signed              bool
	PublishDate         int64
	Lat                 float32
	Long                float32
	PlaceID             uint
	MarkAsAds           bool
	CloseComments       bool
	PosterBkgID         uint
	PosterBkgOwnerID    int
	PosterBkgAccessHash string
}

WallEditParams параметры метода WallEdit.

type WallEditResp

type WallEditResp struct {
	PostID int `json:"post_id"`
}

WallEditResp структура, возвращаемая методом WallEdit.

type WallGetByIDParams

type WallGetByIDParams struct {
	Posts            string
	Extended         bool
	CopyHistoryDepth uint
	Fields           string
}

WallGetByIDParams параметры метода WallGetById.

type WallGetByIDResp

type WallGetByIDResp struct {
	Items    []Post  `json:"items"`
	Profiles []User  `json:"profiles"`
	Groups   []Group `json:"groups"`
}

WallGetByIDResp структура, возвращаемая методом WallGetById.

type WallGetCommentParams

type WallGetCommentParams struct {
	OwnerID   int
	CommentID uint
	Extended  bool
	Fields    string
}

WallGetCommentParams параметры метода WallGetComment.

type WallGetCommentResp

type WallGetCommentResp struct {
	Items    []Comment `json:"items"`
	Profiles []User    `json:"profiles"`
	Groups   []Group   `json:"groups"`
}

WallGetCommentResp структура, возвращаемая методом WallGetComment.

type WallGetCommentsParams

type WallGetCommentsParams struct {
	OwnerID          int
	PostID           uint
	NeedLikes        bool
	StartCommentID   uint
	Offset           int
	Count            uint
	Sort             string
	PreviewLength    uint
	Extended         bool
	Fields           string
	CommentID        uint
	ThreadItemsCount uint
}

WallGetCommentsParams параметры метода WallGetComments.

type WallGetCommentsResp

type WallGetCommentsResp struct {
	Count             int       `json:"count"`
	Items             []Comment `json:"items"`
	CurrentLevelCount int       `json:"current_level_count"`
	CanPost           bool      `json:"can_post"`
	ShowReplyButton   bool      `json:"show_reply_button"`
	GroupsCanPost     bool      `json:"groups_can_post"`
	RealOffset        int       `json:"real_offset"`
	Profiles          []User    `json:"profiles"`
	Groups            []Group   `json:"groups"`
}

WallGetCommentsResp структура, возвращаемая методом WallGetComments.

type WallGetParams

type WallGetParams struct {
	OwnerID  int
	Domain   string
	Offset   uint
	Count    uint
	Filter   string
	Extended bool
	Fields   string
}

WallGetParams параметры метода WallGet.

type WallGetRepostsParams

type WallGetRepostsParams struct {
	OwnerID int
	PostID  uint
	Offset  uint
	Count   uint
}

WallGetRepostsParams параметры метода WallGetReposts.

type WallGetRepostsResp

type WallGetRepostsResp struct {
	Items    []Post  `json:"items"`
	Profiles []User  `json:"profiles"`
	Groups   []Group `json:"groups"`
}

WallGetRepostsResp структура, возвращаемая методом WallGetReposts.

type WallGetResp

type WallGetResp struct {
	Count    int     `json:"count"`
	Items    []Post  `json:"items"`
	Profiles []User  `json:"profiles"`
	Groups   []Group `json:"groups"`
}

WallGetResp структура, возвращаемая методом WallGet.

type WallOpenCommentsParams

type WallOpenCommentsParams struct {
	OwnerID int
	PostID  uint
}

WallOpenCommentsParams параметры метода WallOpenComments.

type WallPinParams

type WallPinParams struct {
	OwnerID int
	PostID  uint
}

WallPinParams параметры метода WallPin.

type WallPostAdsStealthParams

type WallPostAdsStealthParams struct {
	OwnerID     int
	Message     string
	Attachments string
	Signed      bool
	Lat         float32
	Long        float32
	PlaceID     uint
	GUID        string
	LinkButton  string
	LinkTitle   string
	LinkImage   string
	LinkVideo   string
}

WallPostAdsStealthParams параметры метода WallPostAdsStealth.

type WallPostParams

type WallPostParams struct {
	OwnerID           int
	FriendsOnly       bool
	FromGroup         bool
	Message           string
	Attachments       string
	Services          string
	Signed            bool
	PublishDate       int64
	Lat               float32
	Long              float32
	PlaceID           uint
	PostID            uint
	GUID              string
	MarkAsAds         bool
	CloseComments     bool
	MuteNotifications bool
}

WallPostParams параметры метода WallPost.

type WallPostResp

type WallPostResp struct {
	PostID int `json:"post_id"`
}

WallPostResp структура, возвращаемая методом WallPost.

type WallReportCommentParams

type WallReportCommentParams struct {
	OwnerID   int
	CommentID uint
	Reason    uint
}

WallReportCommentParams параметры метода WallReportComment.

type WallReportPostParams

type WallReportPostParams struct {
	OwnerID int
	PostID  uint
	Reason  uint
}

WallReportPostParams параметры метода WallReportPost.

type WallRepostParams

type WallRepostParams struct {
	Object            string
	Message           string
	GroupID           uint
	MarkAsAds         bool
	MuteNotifications bool
}

WallRepostParams параметры метода WallRepost.

type WallRepostResp

type WallRepostResp struct {
	Success      int `json:"success"`
	PostID       int `json:"post_id"`
	RepostsCount int `json:"reposts_count"`
	LikesCount   int `json:"likes_count"`
}

WallRepostResp структура, возвращаемая методом WallRepost.

type WallRestoreCommentParams

type WallRestoreCommentParams struct {
	OwnerID   int
	CommentID uint
}

WallRestoreCommentParams параметры метода WallRestoreComment.

type WallRestoreParams

type WallRestoreParams struct {
	OwnerID int
	PostID  uint
}

WallRestoreParams параметры метода WallRestore.

type WallSearchParams

type WallSearchParams struct {
	OwnerID    int
	Domain     string
	Query      string
	OwnersOnly bool
	Count      uint
	Offset     uint
	Extended   bool
	Fields     string
}

WallSearchParams параметры метода WallSearch.

type WallSearchResp

type WallSearchResp struct {
	Count    int     `json:"count"`
	Items    []Post  `json:"items"`
	Profiles []User  `json:"profiles"`
	Groups   []Group `json:"groups"`
}

WallSearchResp структура, возвращаемая методом WallSearch.

type WallUnpinParams

type WallUnpinParams struct {
	OwnerID int
	PostID  uint
}

WallUnpinParams параметры метода WallUnpin.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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