Versions in this module Expand all Collapse all v1 v1.0.1 Sep 5, 2020 v1.0.1-beta2 Sep 5, 2020 v1.0.1-beta1 Sep 5, 2020 v1.0.0 Sep 1, 2020 Changes in this version + const AccountBlocked + const AccountBlockedCode + const AccountNotFound + const AccountNotFoundCode + const AccountNotFoundOnServer + const AccountNotFoundOnServerCode + const ActiveLeadsLeadFilter + const BodyMustBeJSON + const BodyMustBeJSONCode + const CaptchaInputRequired + const CaptchaInputRequiredCode + const CompanyTaskElementType + const CompanyTaskType + const CompletedStatusTaskFilter + const ContactAddCustomFieldNotFound + const ContactAddCustomFieldNotFoundCode + const ContactAddCustomFieldsInternalError + const ContactAddCustomFieldsInternalErrorCode + const ContactAddEmptyArray + const ContactAddEmptyArrayCode + const ContactAddInsufficientAccessRights + const ContactAddInsufficientAccessRightsCode + const ContactAddNotProcessed + const ContactAddNotProcessedCode + const ContactGetSearchError + const ContactGetSearchErrorCode + const ContactTaskElementType + const ContactTaskType + const ContactUpdateCustomFieldNotFound + const ContactUpdateCustomFieldNotFoundCode + const ContactUpdateCustomFieldsInternalError + const ContactUpdateCustomFieldsInternalErrorCode + const ContactUpdateEmptyArray + const ContactUpdateEmptyArrayCode + const ContactUpdateNotProcessed + const ContactUpdateNotProcessedCode + const ContactUpdatedRequiredParametersMissing + const ContactUpdatedRequiredParametersMissingCode + const ContactsEmptyRequest + const ContactsEmptyRequestCode + const ContactsInvalidRequestMethod + const ContactsInvalidRequestMethodCode + const CustomerTaskElementType + const CustomerTaskType + const DisabledAccount + const DisabledAccountCode + const InProgressStatusTaskFilter + const InProgressTasksLeadFilter + const InvalidCredentials + const InvalidCredentialsCode + const InvalidRequest + const InvalidRequestCode + const InvalidRequestMethod + const InvalidRequestMethodCode + const InvalidRequestParameters + const InvalidRequestParametersCode + const LeadAddEmptyArray + const LeadAddEmptyArrayCode + const LeadCustomFieldInvalidID + const LeadCustomFieldInvalidIDCode + const LeadEmptyRequest + const LeadEmptyRequestCode + const LeadInvalidRequestMethod + const LeadInvalidRequestMethodCode + const LeadTaskElementType + const LeadTaskType + const LeadUpdateEmptyArray + const LeadUpdateEmptyArrayCode + const LeadUpdateRequiredParametersMissing + const LeadUpdateRequiredParametersMissingCode + const NoContent + const NoContentCode + const NoTasksLeadFilter + const RateLimitExceeded + const RateLimitExceededCode + const SubscriptionExpire + const SubscriptionExpireCode + const TooManyLinkedEntities + const TooManyLinkedEntitiesCode + const UnauthorizedIPAddress + const UnauthorizedIPAddressCode + type AccountRequestParams struct + With []AccountWithType + type AccountResponse struct + Currency string + CurrentUser int + DatePattern struct{ ... } + Embedded struct{ ... } + ID int + Language string + Name string + Subdomain string + Timezone string + TimezoneOffset string + type AccountWithType string + const AccountWithCustomFields + const AccountWithGroups + const AccountWithMessenger + const AccountWithNoteTypes + const AccountWithNotifications + const AccountWithPipelines + const AccountWithTaskTypes + const AccountWithUsers + type AddContactRequest struct + Add []*ContactAdd + type AddLeadRequest struct + Add []*LeadAdd + type AddNoteRequest struct + Add []*NoteAdd + type AddTaskRequest struct + Add []*TaskAdd + type AmoError struct + ErrorCode int + ErrorDetail string + func (e *AmoError) Error() string + type AuthAccount struct + ID int + Language string + Name string + Subdomain string + Timezone string + type AuthResponse struct + Response struct{ ... } + type AuthUser struct + ID int + Language string + type Client struct + func NewClient(accountURL string, login string, hash string, opts ...ClientOption) (*Client, error) + func (c *Client) AddContact(ctx context.Context, contact *ContactAdd) (int, error) + func (c *Client) AddLead(ctx context.Context, lead *LeadAdd) (int, error) + func (c *Client) AddNote(ctx context.Context, note *NoteAdd) (int, error) + func (c *Client) AddTask(ctx context.Context, task *TaskAdd) (int, error) + func (c *Client) Authorize(ctx context.Context) error + func (c *Client) DownloadAttachment(ctx context.Context, attachment string) ([]byte, error) + func (c *Client) GetAccount(ctx context.Context, reqParams *AccountRequestParams) (*AccountResponse, error) + func (c *Client) GetContacts(ctx context.Context, reqParams *ContactRequestParams) ([]*Contact, error) + func (c *Client) GetLeads(ctx context.Context, reqParams *LeadRequestParams) ([]*Lead, error) + func (c *Client) GetNotes(ctx context.Context, reqParams *NoteRequestParams) ([]*Note, error) + func (c *Client) GetPipelines(ctx context.Context, reqParams *PipelineRequestParams) (map[string]*Pipeline, error) + func (c *Client) GetTasks(ctx context.Context, reqParams *TaskRequestParams) ([]*Task, error) + func (c *Client) UpdateContact(ctx context.Context, contact *ContactUpdate) (int, error) + func (c *Client) UpdateLead(ctx context.Context, lead *LeadUpdate) (int, error) + func (c *Client) UpdateTask(ctx context.Context, task *TaskUpdate) (int, error) + type ClientOption func(c *Client) + func WithHTTPTimeout(d time.Duration) ClientOption + type Contact struct + AccountID int + ClosestTaskAt int + Company struct{ ... } + CreatedAt int + CreatedBy int + CustomFields []*CustomField + Customers struct{} + GroupID int + ID int + Leads struct{ ... } + Links *Links + Name string + ResponsibleUserID int + Tags []*Tag + UpdatedAt int + UpdatedBy int + type ContactAdd struct + CompanyID int + CompanyName string + CreatedAt int + CreatedBy int + CustomFields []*UpdateCustomField + CustomersID int + LeadsID []string + Name string + ResponsibleUserID int + Tags string + UpdatedAt int + type ContactRequestParams struct + ID []int + LimitOffset int + LimitRows int + Query string + ResponsibleUserID int + type ContactUpdate struct + CompanyID int + CompanyName string + CreatedAt int + CreatedBy int + CustomFields []*UpdateCustomField + CustomersID int + ID int + LeadsID []string + Name string + ResponsibleUserID int + Tags string + Unlink *Unlink + UpdatedAt int + type CustomField struct + ID int + IsSystem bool + Name string + Values []*CustomValue + type CustomFieldInfo struct + Code string + Enums map[string]string + FieldType CustomFieldType + ID int + IsDeletable bool + IsEditable bool + IsMultiple bool + IsRequired bool + IsSystem bool + IsVisible bool + Name string + Params struct{} + Sort int + type CustomFieldType int + const BirthDayCustomFieldType + const CheckboxCustomFieldType + const DateCustomFieldType + const ItemsCustomFieldType + const LegalEntityCustomFieldType + const MultiSelectCustomFieldType + const MultiTextCustomFieldType + const NumericCustomFieldType + const OrgLegalNameCustomFieldType + const RadioButtonCustomFieldType + const SelectCustomFieldType + const SmartAddressCustomFieldType + const StreetAddressCustomFieldType + const TextAreaCustomFieldType + const TextCustomFieldType + const URLCustomFieldType + type CustomValue struct + Enum int + Subtype string + Value string + type Error string + var ErrEmptyAPIHash Error = "empty_api_hash" + var ErrEmptyLogin Error = "empty_login" + var ErrEmptyPhoneNumber Error = "empty_phone_number" + var ErrEmptyResponseItems Error = "empty_response_items" + var ErrInvalidEventType Error = "invalid_event_type" + func (e Error) Error() string + type GetContactResponse struct + Embedded struct{ ... } + Links *Links + Response *AmoError + type GetLeadResponse struct + Embedded struct{ ... } + Links *Links + Response *AmoError + type GetNoteResponse struct + Embedded struct{ ... } + Links *Links + Response *AmoError + type GetPipelineResponse struct + Embedded struct{ ... } + Links *Links + Response *AmoError + type GetTaskResponse struct + Embedded struct{ ... } + Links *Links + Response *AmoError + type Group struct + ID int + Name string + type Lead struct + AccountID int + ClosedAt int + ClosestTaskAt int + Contact struct{ ... } + CreatedAt int + CreatedBy int + CustomFields []*CustomField + GroupID int + ID int + IsDeleted bool + Links *Links + MainContact struct{ ... } + Name string + Pipeline struct{ ... } + ResponsibleUserID int + Sale int + StatusID int + Tags []*Tag + UpdatedAt int + type LeadAdd struct + CompanyID int + ContactsID []string + CreatedAt int + CustomFields []*UpdateCustomField + Name string + PipelineID int + RequestID int + ResponsibleUserID int + Sale int + StatusID int + Tags string + UpdatedAt int + type LeadRequestActiveFilter int + type LeadRequestFilter struct + Active LeadRequestActiveFilter + Tasks LeadRequestTasksFilter + type LeadRequestParams struct + Filter *LeadRequestFilter + ID []int + LimitOffset int + LimitRows int + Query string + ResponsibleUserID int + Status []int + type LeadRequestTasksFilter int + type LeadUpdate struct + CompanyID int + ContactsID []string + CreatedAt int + CustomFields []*UpdateCustomField + ID int + Name string + PipelineID int + RequestID int + ResponsibleUserID int + Sale int + StatusID int + Tags string + Unlink *Unlink + UpdatedAt int + type Links struct + Self struct{ ... } + type Note struct + AccountID int + Attachment string + CreatedAt int + CreatedBy int + ElementID int + ElementType int + GroupID int + ID int + IsEditable bool + Links *Links + NoteType int + Parameters *NoteParameters + ResponsibleUserID int + Text string + UpdatedAt int + type NoteAdd struct + CreatedAt string + CreatedBy int + ElementID int + ElementType int + NoteType int + Params *NotePostParameters + ResponsibleUserID int + Text string + UpdatedAt int + type NoteParameters struct + HTML string + Service string + Text string + type NotePostParameters struct + CallResult string + CallStatus int + DURATION int + FROM string + LINK string + PHONE string + SRC string + Text string + UNIQ string + type NoteRequestParams struct + ElementID []int + ID []int + LimitOffset int + LimitRows int + NoteType []int + Type NoteRequestType + type NoteRequestType string + const CompanyNoteType + const ContactNoteType + const LeadNoteType + const TaskNoteType + type NoteTask struct + ID int + Links *Links + Text string + type NoteType struct + Code string + ID int + IsEditable bool + type Pipeline struct + ID int + IsMain bool + Links *Links + Name string + Sort int + Statuses map[string]*PipelineStatus + type PipelineRequestParams struct + ID int + type PipelineStatus struct + Color string + ID int + IsEditable bool + Name string + Sort int + type PostResponse struct + Embedded struct{ ... } + ID int + RequestID int + Response *AmoError + type Tag struct + ID int + Name string + type Task struct + AccountID int + CompleteTillAt int + CreatedAt int + CreatedBy int + ElementID int + ElementType TaskElementType + GroupID int + ID int + IsCompleted bool + Links *Links + ResponsibleUserID int + Result *NoteTask + TaskType int + Text string + UpdatedAt int + type TaskAdd struct + CompleteTill int + CreatedAt int + CreatedBy int + ElementID int + ElementType TaskElementType + IsCompleted bool + RequestID int + ResponsibleUserID int + TaskType int + Text string + UpdatedAt int + type TaskElementType int + type TaskRequestFilter struct + Status TaskRequestStatusFilter + TaskType []int + type TaskRequestParams struct + ElementID []int + Filter *TaskRequestFilter + ID []int + LimitOffset int + LimitRows int + ResponsibleUserID int + Type TaskRequestType + type TaskRequestStatusFilter int + type TaskRequestType string + type TaskType struct + ID int + Name string + type TaskUpdate struct + CompleteTill int + CreatedAt int + CreatedBy int + ElementID int + ElementType TaskElementType + ID int + IsCompleted bool + RequestID int + ResponsibleUserID int + TaskType int + Text string + UpdatedAt int + type Unlink struct + CompanyID int + ContactsID []int + LeadsID []int + type UpdateContactRequest struct + Update []*ContactUpdate + type UpdateCustomField struct + ID int + Values []interface{} + type UpdateCustomValue struct + Subtype string + Value string + type UpdateLeadRequest struct + Update []*LeadUpdate + type UpdateTaskRequest struct + Update []*TaskUpdate + type User struct + GroupID int + ID int + IsActive bool + IsAdmin bool + IsFree bool + Language string + LastName string + Login string + Name string + PhoneNumber string + Rights struct{ ... }