diff options
author | Ivanik <ivan170102@gmail.com> | 2021-01-29 04:25:14 +0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-29 00:25:14 +0100 |
commit | 8764be74616bde87bbbf6c32901cd9f43264d1e0 (patch) | |
tree | 88902ba17d6a6d245cadb7e0b277bee7ef424f99 /vendor/github.com/SevereCloud/vksdk/v2/api/notes.go | |
parent | 5dd15ef8e716c65accb6cd021095c0e19913d55f (diff) | |
download | matterbridge-msglm-8764be74616bde87bbbf6c32901cd9f43264d1e0.tar.gz matterbridge-msglm-8764be74616bde87bbbf6c32901cd9f43264d1e0.tar.bz2 matterbridge-msglm-8764be74616bde87bbbf6c32901cd9f43264d1e0.zip |
Add vk bridge (#1372)
* Add vk bridge
* Vk bridge attachments
* Vk bridge forwarded messages
* Vk bridge sample config and code cleanup
* Vk bridge add vendor
* Vk bridge message edit
* Vk bridge: fix fetching names of other bots
* Vk bridge: code cleanup
* Vk bridge: fix shadows declaration
* Vk bridge: remove UseFileURL
Diffstat (limited to 'vendor/github.com/SevereCloud/vksdk/v2/api/notes.go')
-rw-r--r-- | vendor/github.com/SevereCloud/vksdk/v2/api/notes.go | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/notes.go b/vendor/github.com/SevereCloud/vksdk/v2/api/notes.go new file mode 100644 index 00000000..dd0d4f5e --- /dev/null +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/notes.go @@ -0,0 +1,100 @@ +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://vk.com/dev/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://vk.com/dev/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://vk.com/dev/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://vk.com/dev/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://vk.com/dev/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://vk.com/dev/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://vk.com/dev/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://vk.com/dev/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://vk.com/dev/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://vk.com/dev/notes.restoreComment +func (vk *VK) NotesRestoreComment(params Params) (response int, err error) { + err = vk.RequestUnmarshal("notes.restoreComment", &response, params) + return +} |