Package EasyVK provides you simple way to work with VK API.
$ go get -u github.com/solidlsnake/easyvk-go/easyvk
import "github.com/solidlsnake/easyvk-go/easyvk"Initialize your VK object with your access token.
vk := easyvk.WithToken("token")Now you can call method of VK API with your vk variable.
Get user profile info:
info, err := vk.Account.GetProfileInfo()Set user status:
userID := 1
ok, err := vk.Status.Set("New status", userID)methodName := "account.banUser"
params := map[string]string{
"user_id": "1",
}
byteArray, err := vk.Request(methodName, params)
if err != nil {
}
// Now work with byteArray.
// Parse it to struct or to interface.