
Product
Redesigned Repositories Page: A Faster Way to Prioritize Security Risk
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
github.com/DiGregory/golang-vk-api
go get github.com/himidori/golang-vk-api
client, err := vkapi.NewVKClient(vkapi.DeviceIPhone, "username", "password")
client, err := vkapi.NewVKClientWithToken("token", nil)
// listening received messages
client.AddLongpollCallback("msgin", func(m *vkapi.LongPollMessage) {
fmt.Printf("new message received from uid %d\n", m.UserID)
})
// listening deleted messages
client.AddLongpollCallback("msgdel", func(m *vkapi.LongPollMessage) {
fmt.Printf("message %d was deleted\n", m.MessageID)
})
// listening sent messages
client.AddLongpollCallback("msgout", func(m *vkapi.LongPollMessage) {
fmt.Printf("sent message to uid %d\n", m.UserID)
})
// listening read messages
client.AddLongpollCallback("msgread", func(m *vkapi.LongPollMessage) {
fmt.Printf("message %d was read\n", m.MessageID)
})
// listening users online
client.AddLongpollCallback("msgonline", func(m *vkapi.LongPollMessage) {
fmt.Printf("user %d is now online\n", m.UserID)
// starting
client.ListenLongPollServer()
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
Security News
Slopsquatting is a new supply chain threat where AI-assisted code generators recommend hallucinated packages that attackers register and weaponize.
Security News
Multiple deserialization flaws in PyTorch Lightning could allow remote code execution when loading untrusted model files, affecting versions up to 2.4.0.