Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Vorkytaka/easyvk-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EasyVK GoDoc

Package EasyVK provides you simple way to work with VK API.

Installation:

Install:

$ go get -u github.com/solidlsnake/easyvk-go/easyvk

Import:

import "github.com/solidlsnake/easyvk-go/easyvk"

How to work:

Initialize your VK object with your access token.

vk := easyvk.WithToken("token")

Now you can call method of VK API with your vk variable.

Examples:

Get user profile info:

info, err := vk.Account.GetProfileInfo()

Set user status:

userID := 1
ok, err := vk.Status.Set("New status", userID)

If you need to call method that not done yet:

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.

List of finished methods:

About

Simple way to work with VK API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages