2021-01-28 23:25:14 +00:00
|
|
|
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.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/notes.add
|
2021-01-28 23:25:14 +00:00
|
|
|
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.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/notes.createComment
|
2021-01-28 23:25:14 +00:00
|
|
|
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.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/notes.delete
|
2021-01-28 23:25:14 +00:00
|
|
|
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.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/notes.deleteComment
|
2021-01-28 23:25:14 +00:00
|
|
|
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.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/notes.edit
|
2021-01-28 23:25:14 +00:00
|
|
|
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.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/notes.editComment
|
2021-01-28 23:25:14 +00:00
|
|
|
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.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/notes.get
|
2021-01-28 23:25:14 +00:00
|
|
|
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.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/notes.getById
|
2021-01-28 23:25:14 +00:00
|
|
|
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.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/notes.getComments
|
2021-01-28 23:25:14 +00:00
|
|
|
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.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/notes.restoreComment
|
2021-01-28 23:25:14 +00:00
|
|
|
func (vk *VK) NotesRestoreComment(params Params) (response int, err error) {
|
|
|
|
err = vk.RequestUnmarshal("notes.restoreComment", &response, params)
|
|
|
|
return
|
|
|
|
}
|