mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-22 17:01:59 -08:00
c4157a4d5b
* Update dependencies * Fix whatsmeow API changes
101 lines
3.0 KiB
Go
101 lines
3.0 KiB
Go
package api // import "github.com/SevereCloud/vksdk/v2/api"
|
|
|
|
import (
|
|
"github.com/SevereCloud/vksdk/v2/object"
|
|
)
|
|
|
|
// NotesAdd creates a new note for the current user.
|
|
//
|
|
// https://dev.vk.com/method/notes.add
|
|
func (vk *VK) NotesAdd(params Params) (response int, err error) {
|
|
err = vk.RequestUnmarshal("notes.add", &response, params)
|
|
return
|
|
}
|
|
|
|
// NotesCreateComment adds a new comment on a note.
|
|
//
|
|
// https://dev.vk.com/method/notes.createComment
|
|
func (vk *VK) NotesCreateComment(params Params) (response int, err error) {
|
|
err = vk.RequestUnmarshal("notes.createComment", &response, params)
|
|
return
|
|
}
|
|
|
|
// NotesDelete deletes a note of the current user.
|
|
//
|
|
// https://dev.vk.com/method/notes.delete
|
|
func (vk *VK) NotesDelete(params Params) (response int, err error) {
|
|
err = vk.RequestUnmarshal("notes.delete", &response, params)
|
|
return
|
|
}
|
|
|
|
// NotesDeleteComment deletes a comment on a note.
|
|
//
|
|
// https://dev.vk.com/method/notes.deleteComment
|
|
func (vk *VK) NotesDeleteComment(params Params) (response int, err error) {
|
|
err = vk.RequestUnmarshal("notes.deleteComment", &response, params)
|
|
return
|
|
}
|
|
|
|
// NotesEdit edits a note of the current user.
|
|
//
|
|
// https://dev.vk.com/method/notes.edit
|
|
func (vk *VK) NotesEdit(params Params) (response int, err error) {
|
|
err = vk.RequestUnmarshal("notes.edit", &response, params)
|
|
return
|
|
}
|
|
|
|
// NotesEditComment edits a comment on a note.
|
|
//
|
|
// https://dev.vk.com/method/notes.editComment
|
|
func (vk *VK) NotesEditComment(params Params) (response int, err error) {
|
|
err = vk.RequestUnmarshal("notes.editComment", &response, params)
|
|
return
|
|
}
|
|
|
|
// NotesGetResponse struct.
|
|
type NotesGetResponse struct {
|
|
Count int `json:"count"`
|
|
Items []object.NotesNote `json:"items"`
|
|
}
|
|
|
|
// NotesGet returns a list of notes created by a user.
|
|
//
|
|
// https://dev.vk.com/method/notes.get
|
|
func (vk *VK) NotesGet(params Params) (response NotesGetResponse, err error) {
|
|
err = vk.RequestUnmarshal("notes.get", &response, params)
|
|
return
|
|
}
|
|
|
|
// NotesGetByIDResponse struct.
|
|
type NotesGetByIDResponse object.NotesNote
|
|
|
|
// NotesGetByID returns a note by its ID.
|
|
//
|
|
// https://dev.vk.com/method/notes.getById
|
|
func (vk *VK) NotesGetByID(params Params) (response NotesGetByIDResponse, err error) {
|
|
err = vk.RequestUnmarshal("notes.getById", &response, params)
|
|
return
|
|
}
|
|
|
|
// NotesGetCommentsResponse struct.
|
|
type NotesGetCommentsResponse struct {
|
|
Count int `json:"count"`
|
|
Items []object.NotesNoteComment `json:"items"`
|
|
}
|
|
|
|
// NotesGetComments returns a list of comments on a note.
|
|
//
|
|
// https://dev.vk.com/method/notes.getComments
|
|
func (vk *VK) NotesGetComments(params Params) (response NotesGetCommentsResponse, err error) {
|
|
err = vk.RequestUnmarshal("notes.getComments", &response, params)
|
|
return
|
|
}
|
|
|
|
// NotesRestoreComment restores a deleted comment on a note.
|
|
//
|
|
// https://dev.vk.com/method/notes.restoreComment
|
|
func (vk *VK) NotesRestoreComment(params Params) (response int, err error) {
|
|
err = vk.RequestUnmarshal("notes.restoreComment", &response, params)
|
|
return
|
|
}
|