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/leads.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/leads.go')
-rw-r--r-- | vendor/github.com/SevereCloud/vksdk/v2/api/leads.go | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/leads.go b/vendor/github.com/SevereCloud/vksdk/v2/api/leads.go new file mode 100644 index 00000000..e01e7a92 --- /dev/null +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/leads.go @@ -0,0 +1,74 @@ +package api // import "github.com/SevereCloud/vksdk/v2/api" + +import ( + "github.com/SevereCloud/vksdk/v2/object" +) + +// LeadsCheckUserResponse struct. +type LeadsCheckUserResponse object.LeadsChecked + +// LeadsCheckUser checks if the user can start the lead. +// +// https://vk.com/dev/leads.checkUser +func (vk *VK) LeadsCheckUser(params Params) (response LeadsCheckUserResponse, err error) { + err = vk.RequestUnmarshal("leads.checkUser", &response, params) + return +} + +// LeadsCompleteResponse struct. +type LeadsCompleteResponse object.LeadsComplete + +// LeadsComplete completes the lead started by user. +// +// https://vk.com/dev/leads.complete +func (vk *VK) LeadsComplete(params Params) (response LeadsCompleteResponse, err error) { + err = vk.RequestUnmarshal("leads.complete", &response, params) + return +} + +// LeadsGetStatsResponse struct. +type LeadsGetStatsResponse object.LeadsLead + +// LeadsGetStats returns lead stats data. +// +// https://vk.com/dev/leads.getStats +func (vk *VK) LeadsGetStats(params Params) (response LeadsGetStatsResponse, err error) { + err = vk.RequestUnmarshal("leads.getStats", &response, params) + return +} + +// LeadsGetUsersResponse struct. +type LeadsGetUsersResponse object.LeadsEntry + +// LeadsGetUsers returns a list of last user actions for the offer. +// +// https://vk.com/dev/leads.getUsers +func (vk *VK) LeadsGetUsers(params Params) (response LeadsGetUsersResponse, err error) { + err = vk.RequestUnmarshal("leads.getUsers", &response, params) + return +} + +// LeadsMetricHitResponse struct. +type LeadsMetricHitResponse struct { + Result object.BaseBoolInt `json:"result"` // Information whether request has been processed successfully + RedirectLink string `json:"redirect_link"` // Redirect link +} + +// LeadsMetricHit counts the metric event. +// +// https://vk.com/dev/leads.metricHit +func (vk *VK) LeadsMetricHit(params Params) (response LeadsMetricHitResponse, err error) { + err = vk.RequestUnmarshal("leads.metricHit", &response, params) + return +} + +// LeadsStartResponse struct. +type LeadsStartResponse object.LeadsStart + +// LeadsStart creates new session for the user passing the offer. +// +// https://vk.com/dev/leads.start +func (vk *VK) LeadsStart(params Params) (response LeadsStartResponse, err error) { + err = vk.RequestUnmarshal("leads.start", &response, params) + return +} |