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/docs.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/docs.go')
-rw-r--r-- | vendor/github.com/SevereCloud/vksdk/v2/api/docs.go | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/docs.go b/vendor/github.com/SevereCloud/vksdk/v2/api/docs.go new file mode 100644 index 00000000..48605dae --- /dev/null +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/docs.go @@ -0,0 +1,137 @@ +package api // import "github.com/SevereCloud/vksdk/v2/api" + +import ( + "github.com/SevereCloud/vksdk/v2/object" +) + +// DocsAdd copies a document to a user's or community's document list. +// +// https://vk.com/dev/docs.add +func (vk *VK) DocsAdd(params Params) (response int, err error) { + err = vk.RequestUnmarshal("docs.add", &response, params) + return +} + +// DocsDelete deletes a user or community document. +// +// https://vk.com/dev/docs.delete +func (vk *VK) DocsDelete(params Params) (response int, err error) { + err = vk.RequestUnmarshal("docs.delete", &response, params) + return +} + +// DocsEdit edits a document. +// +// https://vk.com/dev/docs.edit +func (vk *VK) DocsEdit(params Params) (response int, err error) { + err = vk.RequestUnmarshal("docs.edit", &response, params) + return +} + +// DocsGetResponse struct. +type DocsGetResponse struct { + Count int `json:"count"` + Items []object.DocsDoc `json:"items"` +} + +// DocsGet returns detailed information about user or community documents. +// +// https://vk.com/dev/docs.get +func (vk *VK) DocsGet(params Params) (response DocsGetResponse, err error) { + err = vk.RequestUnmarshal("docs.get", &response, params) + return +} + +// DocsGetByIDResponse struct. +type DocsGetByIDResponse []object.DocsDoc + +// DocsGetByID returns information about documents by their IDs. +// +// https://vk.com/dev/docs.getById +func (vk *VK) DocsGetByID(params Params) (response DocsGetByIDResponse, err error) { + err = vk.RequestUnmarshal("docs.getById", &response, params) + return +} + +// DocsGetMessagesUploadServerResponse struct. +type DocsGetMessagesUploadServerResponse struct { + UploadURL string `json:"upload_url"` +} + +// DocsGetMessagesUploadServer returns the server address for document upload. +// +// https://vk.com/dev/docs.getMessagesUploadServer +func (vk *VK) DocsGetMessagesUploadServer(params Params) (response DocsGetMessagesUploadServerResponse, err error) { + err = vk.RequestUnmarshal("docs.getMessagesUploadServer", &response, params) + return +} + +// DocsGetTypesResponse struct. +type DocsGetTypesResponse struct { + Count int `json:"count"` + Items []object.DocsDocTypes `json:"items"` +} + +// DocsGetTypes returns documents types available for current user. +// +// https://vk.com/dev/docs.getTypes +func (vk *VK) DocsGetTypes(params Params) (response DocsGetTypesResponse, err error) { + err = vk.RequestUnmarshal("docs.getTypes", &response, params) + return +} + +// DocsGetUploadServerResponse struct. +type DocsGetUploadServerResponse struct { + UploadURL string `json:"upload_url"` +} + +// DocsGetUploadServer returns the server address for document upload. +// +// https://vk.com/dev/docs.getUploadServer +func (vk *VK) DocsGetUploadServer(params Params) (response DocsGetUploadServerResponse, err error) { + err = vk.RequestUnmarshal("docs.getUploadServer", &response, params) + return +} + +// DocsGetWallUploadServerResponse struct. +type DocsGetWallUploadServerResponse struct { + UploadURL string `json:"upload_url"` +} + +// DocsGetWallUploadServer returns the server address for document upload onto a user's or community's wall. +// +// https://vk.com/dev/docs.getWallUploadServer +func (vk *VK) DocsGetWallUploadServer(params Params) (response DocsGetWallUploadServerResponse, err error) { + err = vk.RequestUnmarshal("docs.getWallUploadServer", &response, params) + return +} + +// DocsSaveResponse struct. +type DocsSaveResponse struct { + Type string `json:"type"` + AudioMessage object.MessagesAudioMessage `json:"audio_message"` + Doc object.DocsDoc `json:"doc"` + Graffiti object.MessagesGraffiti `json:"graffiti"` +} + +// DocsSave saves a document after uploading it to a server. +// +// https://vk.com/dev/docs.save +func (vk *VK) DocsSave(params Params) (response DocsSaveResponse, err error) { + err = vk.RequestUnmarshal("docs.save", &response, params) + return +} + +// DocsSearchResponse struct. +type DocsSearchResponse struct { + Count int `json:"count"` + Items []object.DocsDoc `json:"items"` +} + +// DocsSearch returns a list of documents matching the search criteria. +// +// https://vk.com/dev/docs.search +func (vk *VK) DocsSearch(params Params) (response DocsSearchResponse, err error) { + err = vk.RequestUnmarshal("docs.search", &response, params) + return +} |