2021-01-28 23:25:14 +00:00
|
|
|
package api // import "github.com/SevereCloud/vksdk/v2/api"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/SevereCloud/vksdk/v2/object"
|
|
|
|
)
|
|
|
|
|
|
|
|
// LeadFormsCreateResponse struct.
|
|
|
|
type LeadFormsCreateResponse struct {
|
|
|
|
FormID int `json:"form_id"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// LeadFormsCreate leadForms.create.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/leadForms.create
|
2021-01-28 23:25:14 +00:00
|
|
|
func (vk *VK) LeadFormsCreate(params Params) (response LeadFormsCreateResponse, err error) {
|
|
|
|
err = vk.RequestUnmarshal("leadForms.create", &response, params)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// LeadFormsDeleteResponse struct.
|
|
|
|
type LeadFormsDeleteResponse struct {
|
|
|
|
FormID int `json:"form_id"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// LeadFormsDelete leadForms.delete.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/leadForms.delete
|
2021-01-28 23:25:14 +00:00
|
|
|
func (vk *VK) LeadFormsDelete(params Params) (response LeadFormsDeleteResponse, err error) {
|
|
|
|
err = vk.RequestUnmarshal("leadForms.delete", &response, params)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// LeadFormsGetResponse struct.
|
|
|
|
type LeadFormsGetResponse object.LeadFormsForm
|
|
|
|
|
|
|
|
// LeadFormsGet leadForms.get.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/leadForms.get
|
2021-01-28 23:25:14 +00:00
|
|
|
func (vk *VK) LeadFormsGet(params Params) (response LeadFormsGetResponse, err error) {
|
|
|
|
err = vk.RequestUnmarshal("leadForms.get", &response, params)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// LeadFormsGetLeadsResponse struct.
|
|
|
|
type LeadFormsGetLeadsResponse struct {
|
|
|
|
Leads []object.LeadFormsLead `json:"leads"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// LeadFormsGetLeads leadForms.getLeads.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/leadForms.getLeads
|
2021-01-28 23:25:14 +00:00
|
|
|
func (vk *VK) LeadFormsGetLeads(params Params) (response LeadFormsGetLeadsResponse, err error) {
|
|
|
|
err = vk.RequestUnmarshal("leadForms.getLeads", &response, params)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// LeadFormsGetUploadURL leadForms.getUploadURL.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/leadForms.getUploadURL
|
2021-01-28 23:25:14 +00:00
|
|
|
func (vk *VK) LeadFormsGetUploadURL(params Params) (response string, err error) {
|
|
|
|
err = vk.RequestUnmarshal("leadForms.getUploadURL", &response, params)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// LeadFormsListResponse struct.
|
|
|
|
type LeadFormsListResponse []object.LeadFormsForm
|
|
|
|
|
|
|
|
// LeadFormsList leadForms.list.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/leadForms.list
|
2021-01-28 23:25:14 +00:00
|
|
|
func (vk *VK) LeadFormsList(params Params) (response LeadFormsListResponse, err error) {
|
|
|
|
err = vk.RequestUnmarshal("leadForms.list", &response, params)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// LeadFormsUpdateResponse struct.
|
|
|
|
type LeadFormsUpdateResponse struct {
|
|
|
|
FormID int `json:"form_id"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// LeadFormsUpdate leadForms.update.
|
|
|
|
//
|
2024-08-27 17:04:05 +00:00
|
|
|
// https://dev.vk.com/method/leadForms.update
|
2021-01-28 23:25:14 +00:00
|
|
|
func (vk *VK) LeadFormsUpdate(params Params) (response LeadFormsUpdateResponse, err error) {
|
|
|
|
err = vk.RequestUnmarshal("leadForms.update", &response, params)
|
|
|
|
return
|
|
|
|
}
|