Documentation
¶
Index ¶
- Constants
- Variables
- type BearerAuth
- type BlackListPhoneNumber
- type BlacklistApi
- func (blacklistApi *BlacklistApi) AddPhoneNumber(ctx context.Context, phoneNumber string, expireAt *Date) (*BlackListPhoneNumber, error)
- func (blacklistApi *BlacklistApi) DeleteAllPhoneNumbers(ctx context.Context) error
- func (blacklistApi *BlacklistApi) DeletePhoneNumber(ctx context.Context, id string) error
- func (blacklistApi *BlacklistApi) GetPageIterator(ctx context.Context, filters *BlacklistPhoneNumbersCollectionFilters) *BlacklistPhoneNumbersCollectionIterator
- func (blacklistApi *BlacklistApi) GetPhoneNumbers(ctx context.Context, filters *BlacklistPhoneNumbersCollectionFilters) (*BlacklistPhoneNumberCollection, error)
- type BlacklistPhoneNumberCollection
- type BlacklistPhoneNumbersCollectionFilters
- type BlacklistPhoneNumbersCollectionIterator
- type ClickResponse
- type ClicksCollectionFilters
- type ClicksCollectionResponse
- type ClicksReportResponse
- type Client
- func (client *Client) CheckError(r *http.Response) ([]byte, error)
- func (client *Client) Delete(ctx context.Context, path string) error
- func (client *Client) Get(ctx context.Context, path string, result interface{}) error
- func (client *Client) LegacyGet(ctx context.Context, path string, result interface{}) error
- func (client *Client) LegacyPost(ctx context.Context, path string, result interface{}, data interface{}) error
- func (client *Client) NewJsonRequest(method, path string, body interface{}) (*http.Request, error)
- func (client *Client) NewRequest(method, path string, buf io.Reader, contentType ContentType) (*http.Request, error)
- func (client *Client) NewUrlencodedRequest(method, path string, body interface{}) (*http.Request, error)
- func (client *Client) Post(ctx context.Context, path string, result interface{}, data interface{}) error
- func (client *Client) Put(ctx context.Context, path string, result interface{}, data interface{}) error
- func (client *Client) Urlencoded(ctx context.Context, method, path string, result interface{}, data interface{}) error
- type Collection
- type CollectionMeta
- type Contact
- type ContactCollectionResponse
- type ContactGroup
- type ContactGroupPermissions
- type ContactGroupPermissionsCollectionResponse
- type ContactGroupsCollectionResponse
- type ContactListFilters
- type ContactsApi
- func (contactsApi *ContactsApi) AddContactToGroup(ctx context.Context, groupId, contactId string) (*Contact, error)
- func (contactsApi *ContactsApi) AddContactsToGroup(ctx context.Context, groupId string, filters *ContactListFilters) error
- func (contactsApi *ContactsApi) AddGroupPermissions(ctx context.Context, groupId string, permissions *ContactGroupPermissions) (*ContactGroupPermissions, error)
- func (contactsApi *ContactsApi) AddUserGroupPermissions(ctx context.Context, groupId, username string, ...) (*ContactGroupPermissions, error)
- func (contactsApi *ContactsApi) BindContactToGroup(ctx context.Context, contactId string, groupId string) (*ContactGroupsCollectionResponse, error)
- func (contactsApi *ContactsApi) CreateContact(ctx context.Context, contact *Contact) (*Contact, error)
- func (contactsApi *ContactsApi) CreateCustomField(ctx context.Context, name, type_ string) (*CustomField, error)
- func (contactsApi *ContactsApi) CreateGroup(ctx context.Context, group *ContactGroup) (*ContactGroup, error)
- func (contactsApi *ContactsApi) DeleteAllContacts(ctx context.Context) error
- func (contactsApi *ContactsApi) DeleteAllGroup(ctx context.Context) error
- func (contactsApi *ContactsApi) DeleteContact(ctx context.Context, id string) error
- func (contactsApi *ContactsApi) DeleteCustomField(ctx context.Context, fieldId string) error
- func (contactsApi *ContactsApi) DeleteGroup(ctx context.Context, groupId string) error
- func (contactsApi *ContactsApi) GetContact(ctx context.Context, id string) (*Contact, error)
- func (contactsApi *ContactsApi) GetContactFromGroup(ctx context.Context, groupId, contactId string) (*Contact, error)
- func (contactsApi *ContactsApi) GetContactGroup(ctx context.Context, contactId string, groupId string) (*ContactGroup, error)
- func (contactsApi *ContactsApi) GetContactGroups(ctx context.Context, id string) (*ContactGroupsCollectionResponse, error)
- func (contactsApi *ContactsApi) GetContacts(ctx context.Context, filters *ContactListFilters) (*ContactCollectionResponse, error)
- func (contactsApi *ContactsApi) GetContactsPageIterator(ctx context.Context, filters *ContactListFilters) *ContactsCollectionIterator
- func (contactsApi *ContactsApi) GetCustomFields(ctx context.Context) (*CustomFieldsCollectionResponse, error)
- func (contactsApi *ContactsApi) GetGroup(ctx context.Context, groupId string) (*ContactGroup, error)
- func (contactsApi *ContactsApi) GetGroupPermissions(ctx context.Context, groupId string) (*ContactGroupPermissionsCollectionResponse, error)
- func (contactsApi *ContactsApi) GetGroups(ctx context.Context) (*ContactGroupsCollectionResponse, error)
- func (contactsApi *ContactsApi) GetUserGroupPermissions(ctx context.Context, groupId, username string) (*ContactGroupPermissions, error)
- func (contactsApi *ContactsApi) MoveContactsToGroup(ctx context.Context, groupId string, filters *ContactListFilters) error
- func (contactsApi *ContactsApi) RemoveContactFromGroup(ctx context.Context, groupId, contactId string) error
- func (contactsApi *ContactsApi) RemoveContactsFromGroup(ctx context.Context, groupId string, filters *ContactListFilters) error
- func (contactsApi *ContactsApi) RemoveUserGroupPermissions(ctx context.Context, groupId, username string) error
- func (contactsApi *ContactsApi) UnbindContactFromGroup(ctx context.Context, contactId string, groupId string) error
- func (contactsApi *ContactsApi) UpdateContact(ctx context.Context, id string, contact *Contact) (*Contact, error)
- func (contactsApi *ContactsApi) UpdateCustomField(ctx context.Context, fieldId, name string) (*CustomField, error)
- func (contactsApi *ContactsApi) UpdateGroup(ctx context.Context, groupId string, group *ContactGroup) (*ContactGroup, error)
- type ContactsCollectionIterator
- type ContentType
- type CustomField
- type CustomFieldsCollectionResponse
- type Date
- type ErrorResponse
- type ExpireTimeUnit
- type Hlr
- type HlrApi
- type HlrResponse
- type InvalidNumber
- type Link
- type LinkResponse
- type LinkType
- type LinksCollectionResponse
- type MediaObject
- type MediaObjectType
- type Mms
- type MmsApi
- func (mmsApi *MmsApi) Get(ctx context.Context, id string) (*MmsCollectionResponse, error)
- func (mmsApi *MmsApi) RemoveScheduled(ctx context.Context, id string) (*MmsRemoveResponse, error)
- func (mmsApi *MmsApi) Schedule(ctx context.Context, to, subject, image string, sendAt *Timestamp) (*MmsCollectionResponse, error)
- func (mmsApi *MmsApi) Send(ctx context.Context, to, subject, image string) (*MmsCollectionResponse, error)
- func (mmsApi *MmsApi) SendRaw(ctx context.Context, mms *Mms) (*MmsCollectionResponse, error)
- func (mmsApi *MmsApi) SendToGroup(ctx context.Context, group, subject, image string) (*MmsCollectionResponse, error)
- type MmsCollectionResponse
- type MmsRemoveResponse
- type MmsResponse
- type PageIterator
- type PaginationFilters
- type ProfileApi
- type ProfileDetailsResponse
- type SMIL
- type Sender
- type SenderApi
- func (senderApi *SenderApi) Create(ctx context.Context, name string) (*SenderResponse, error)
- func (senderApi *SenderApi) Delete(ctx context.Context, name string) error
- func (senderApi *SenderApi) Get(ctx context.Context, name string) (*SenderResponse, error)
- func (senderApi *SenderApi) GetAll(ctx context.Context) (*SenderCollectionResponse, error)
- func (senderApi *SenderApi) MakeDefault(ctx context.Context, name string) error
- type SenderCollectionResponse
- type SenderResponse
- type ShortUrlApi
- func (shortUrlApi *ShortUrlApi) CreateLink(ctx context.Context, targetUrl, name, description string) (*LinkResponse, error)
- func (shortUrlApi *ShortUrlApi) CreateLinkRaw(ctx context.Context, link *Link) (*LinkResponse, error)
- func (shortUrlApi *ShortUrlApi) CreateReport(ctx context.Context, filters *ClicksCollectionFilters) (*ClicksReportResponse, error)
- func (shortUrlApi *ShortUrlApi) DeleteLink(ctx context.Context, id string) error
- func (shortUrlApi *ShortUrlApi) GetClicks(ctx context.Context, filters *ClicksCollectionFilters) (*ClicksCollectionResponse, error)
- func (shortUrlApi *ShortUrlApi) GetLink(ctx context.Context, id string) (*LinkResponse, error)
- func (shortUrlApi *ShortUrlApi) GetLinks(ctx context.Context) (*LinksCollectionResponse, error)
- func (shortUrlApi *ShortUrlApi) UpdateLink(ctx context.Context, id, targetUrl, name, description string) (*LinkResponse, error)
- func (shortUrlApi *ShortUrlApi) UpdateLinkRaw(ctx context.Context, id string, link *Link) (*LinkResponse, error)
- type Sms
- type SmsApi
- func (smsApi *SmsApi) Get(ctx context.Context, id string) (*SmsResultCollection, error)
- func (smsApi *SmsApi) RemoveScheduled(ctx context.Context, id string) (*SmsRemoveResult, error)
- func (smsApi *SmsApi) Schedule(ctx context.Context, to, message string, from string, sendAt *Timestamp) (*SmsResultCollection, error)
- func (smsApi *SmsApi) Send(ctx context.Context, to, message string, from string) (*SmsResultCollection, error)
- func (smsApi *SmsApi) SendFlash(ctx context.Context, to, message string, from string) (*SmsResultCollection, error)
- func (smsApi *SmsApi) SendRaw(ctx context.Context, sms *Sms) (*SmsResultCollection, error)
- func (smsApi *SmsApi) SendToGroup(ctx context.Context, group, message string, from string) (*SmsResultCollection, error)
- type SmsRemoveResult
- type SmsResponse
- type SmsResultCollection
- type SubusersApi
- func (accountApi *SubusersApi) CreateUser(ctx context.Context, user *User) (*UserResponse, error)
- func (accountApi *SubusersApi) DeleteUser(ctx context.Context, id string) error
- func (accountApi *SubusersApi) GetUser(ctx context.Context, id string) (*UserResponse, error)
- func (accountApi *SubusersApi) ListUsers(ctx context.Context) (*UserCollectionResponse, error)
- func (accountApi *SubusersApi) UpdateUser(ctx context.Context, id string, user *User) (*UserResponse, error)
- type Timestamp
- type User
- type UserCollectionResponse
- type UserCredentials
- type UserPoints
- type UserResponse
- type Vms
- type VmsApi
- func (vmsApi *VmsApi) Get(ctx context.Context, id string) (*VmsCollectionResponse, error)
- func (vmsApi *VmsApi) RemoveScheduled(ctx context.Context, id string) (*VmsRemoveResponse, error)
- func (vmsApi *VmsApi) Schedule(ctx context.Context, to, message, from string, sendAt *Timestamp) (*VmsCollectionResponse, error)
- func (vmsApi *VmsApi) Send(ctx context.Context, to, message, from string) (*VmsCollectionResponse, error)
- func (vmsApi *VmsApi) SendRaw(ctx context.Context, vms *Vms) (*VmsCollectionResponse, error)
- func (vmsApi *VmsApi) SendToGroup(ctx context.Context, group, message, from string) (*VmsCollectionResponse, error)
- type VmsCollectionResponse
- type VmsRemoveResponse
- type VmsResponse
Constants ¶
View Source
const ( ExpireTimeSeconds = ExpireTimeUnit("seconds") ExpireTimeMinutes = ExpireTimeUnit("minutes") ExpireTimeHours = ExpireTimeUnit("hours") ExpireTimeDays = ExpireTimeUnit("days") )
View Source
const ( Version = "1.2.3" Name = "smsapi-go" BaseUrlPl = "https://api.smsapi.pl/" BaseUrlCom = "https://api.smsapi.com/" DefaultTimeout = 30 * time.Second )
View Source
const ( ContentTypeJson = ContentType("application/json") ContentTypeXFormUrlencoded = ContentType("application/x-www-form-urlencoded") )
View Source
const (
DateLayout = "2006-01-02"
)
View Source
const DefaultPageSize = 100
View Source
const SMILTemplate = `` /* 337-byte string literal not displayed */
Variables ¶
View Source
var NoMoreResults = errors.New("no more results")
Functions ¶
This section is empty.
Types ¶
type BearerAuth ¶
type BearerAuth struct {
AccessToken string
}
func (*BearerAuth) String ¶
func (a *BearerAuth) String() string
type BlackListPhoneNumber ¶
type BlacklistApi ¶
type BlacklistApi struct {
// contains filtered or unexported fields
}
func (*BlacklistApi) AddPhoneNumber ¶
func (blacklistApi *BlacklistApi) AddPhoneNumber(ctx context.Context, phoneNumber string, expireAt *Date) (*BlackListPhoneNumber, error)
func (*BlacklistApi) DeleteAllPhoneNumbers ¶
func (blacklistApi *BlacklistApi) DeleteAllPhoneNumbers(ctx context.Context) error
func (*BlacklistApi) DeletePhoneNumber ¶
func (blacklistApi *BlacklistApi) DeletePhoneNumber(ctx context.Context, id string) error
func (*BlacklistApi) GetPageIterator ¶
func (blacklistApi *BlacklistApi) GetPageIterator(ctx context.Context, filters *BlacklistPhoneNumbersCollectionFilters) *BlacklistPhoneNumbersCollectionIterator
func (*BlacklistApi) GetPhoneNumbers ¶
func (blacklistApi *BlacklistApi) GetPhoneNumbers(ctx context.Context, filters *BlacklistPhoneNumbersCollectionFilters) (*BlacklistPhoneNumberCollection, error)
type BlacklistPhoneNumberCollection ¶
type BlacklistPhoneNumberCollection struct {
CollectionMeta
Collection []*BlackListPhoneNumber `json:"collection"`
}
type BlacklistPhoneNumbersCollectionFilters ¶
type BlacklistPhoneNumbersCollectionFilters struct {
PaginationFilters
Query string `url:"q,omitempty"`
}
type BlacklistPhoneNumbersCollectionIterator ¶
type BlacklistPhoneNumbersCollectionIterator struct {
// contains filtered or unexported fields
}
func (*BlacklistPhoneNumbersCollectionIterator) Next ¶
func (b *BlacklistPhoneNumbersCollectionIterator) Next() (*BlacklistPhoneNumberCollection, error)
type ClickResponse ¶
type ClicksCollectionFilters ¶
type ClicksCollectionResponse ¶
type ClicksCollectionResponse struct {
Size int `json:"size"`
Collection []*ClickResponse `json:"collection"`
}
type ClicksReportResponse ¶
type ClicksReportResponse struct {
ReportUrl string `json:"link"`
}
type Client ¶
type Client struct {
BaseUrl *url.URL
Auth *BearerAuth
Sms *SmsApi
Profile *ProfileApi
Subusers *SubusersApi
Contacts *ContactsApi
ShortUrl *ShortUrlApi
Hlr *HlrApi
Sender *SenderApi
Blacklist *BlacklistApi
Mms *MmsApi
Vms *VmsApi
// contains filtered or unexported fields
}
func NewInternationalClient ¶
func (*Client) LegacyPost ¶
func (*Client) NewJsonRequest ¶
func (*Client) NewRequest ¶
func (*Client) NewUrlencodedRequest ¶
type Collection ¶
type Collection interface {
GetSize() uint
}
type CollectionMeta ¶
type CollectionMeta struct {
Size uint `json:"Size"`
}
func (*CollectionMeta) GetSize ¶
func (c *CollectionMeta) GetSize() uint
type Contact ¶
type Contact struct {
Id string `json:"id,omitempty" url:"id,omitempty"`
FirstName string `json:"first_name,omitempty" url:"first_name,omitempty"`
LastName string `json:"last_name,omitempty" url:"last_name,omitempty"`
PhoneNumber string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
Email string `json:"email,omitempty" url:"email,omitempty"`
Gender string `json:"gender,omitempty" url:"gender,omitempty"`
BirthdayDate string `json:"birthday_date,omitempty" url:"birthday_date,omitempty"`
Description string `json:"description,omitempty" url:"description,omitempty"`
City string `json:"city,omitempty" url:"city,omitempty"`
Source string `json:"source,omitempty" url:"source,omitempty"`
DateCreated string `json:"date_created,omitempty" url:"date_created,omitempty"`
DateUpdated string `json:"date_updated,omitempty" url:"date_updated,omitempty"`
}
type ContactCollectionResponse ¶
type ContactCollectionResponse struct {
CollectionMeta
Collection []*Contact `json:"collection"`
}
type ContactGroup ¶
type ContactGroup struct {
Id string `json:"id,omitempty" url:"id,omitempty"`
Name string `json:"name,omitempty" url:"name,omitempty"`
Description string `json:"description,omitempty" url:"description,omitempty"`
ContactsCount int `json:"contacts_count,omitempty" url:"contacts_count,omitempty"`
DateCreated string `json:"date_created,omitempty" url:"date_created,omitempty"`
DateUpdated string `json:"date_updated,omitempty" url:"date_updated,omitempty"`
CreatedBy string `json:"created_by,omitempty" url:"created_by,omitempty"`
Idx string `json:"idx,omitempty" url:"idx,omitempty"`
Permissions []*ContactGroupPermissions `json:"permissions,omitempty" url:"permissions,omitempty"`
}
type ContactGroupPermissions ¶
type ContactGroupPermissionsCollectionResponse ¶
type ContactGroupPermissionsCollectionResponse struct {
Size int `json:"size"`
Collection []ContactGroupPermissions `json:"collection"`
}
type ContactGroupsCollectionResponse ¶
type ContactGroupsCollectionResponse struct {
Size int `json:"size"`
Collection []*ContactGroup `json:"collection"`
}
type ContactListFilters ¶
type ContactListFilters struct {
PaginationFilters
Query string `url:"q,omitempty"`
OrderBy string `url:"order_by,omitempty"`
PhoneNumber []string `url:"phone_number,omitempty"`
Email []string `url:"email,omitempty"`
FirstName []string `url:"first_name,omitempty"`
LastName []string `url:"last_name,omitempty"`
GroupId []string `url:"group_id,omitempty"`
Gender string `url:"gender,omitempty"`
BirthdayDate []string `url:"birthday_date,omitempty"`
}
type ContactsApi ¶
type ContactsApi struct {
// contains filtered or unexported fields
}
func (*ContactsApi) AddContactToGroup ¶
func (*ContactsApi) AddContactsToGroup ¶
func (contactsApi *ContactsApi) AddContactsToGroup(ctx context.Context, groupId string, filters *ContactListFilters) error
func (*ContactsApi) AddGroupPermissions ¶
func (contactsApi *ContactsApi) AddGroupPermissions(ctx context.Context, groupId string, permissions *ContactGroupPermissions) (*ContactGroupPermissions, error)
func (*ContactsApi) AddUserGroupPermissions ¶
func (contactsApi *ContactsApi) AddUserGroupPermissions(ctx context.Context, groupId, username string, permissions *ContactGroupPermissions) (*ContactGroupPermissions, error)
func (*ContactsApi) BindContactToGroup ¶
func (contactsApi *ContactsApi) BindContactToGroup(ctx context.Context, contactId string, groupId string) (*ContactGroupsCollectionResponse, error)
func (*ContactsApi) CreateContact ¶
func (*ContactsApi) CreateCustomField ¶
func (contactsApi *ContactsApi) CreateCustomField(ctx context.Context, name, type_ string) (*CustomField, error)
func (*ContactsApi) CreateGroup ¶
func (contactsApi *ContactsApi) CreateGroup(ctx context.Context, group *ContactGroup) (*ContactGroup, error)
func (*ContactsApi) DeleteAllContacts ¶
func (contactsApi *ContactsApi) DeleteAllContacts(ctx context.Context) error
func (*ContactsApi) DeleteAllGroup ¶
func (contactsApi *ContactsApi) DeleteAllGroup(ctx context.Context) error
func (*ContactsApi) DeleteContact ¶
func (contactsApi *ContactsApi) DeleteContact(ctx context.Context, id string) error
func (*ContactsApi) DeleteCustomField ¶
func (contactsApi *ContactsApi) DeleteCustomField(ctx context.Context, fieldId string) error
func (*ContactsApi) DeleteGroup ¶
func (contactsApi *ContactsApi) DeleteGroup(ctx context.Context, groupId string) error
func (*ContactsApi) GetContact ¶
func (*ContactsApi) GetContactFromGroup ¶
func (*ContactsApi) GetContactGroup ¶
func (contactsApi *ContactsApi) GetContactGroup(ctx context.Context, contactId string, groupId string) (*ContactGroup, error)
func (*ContactsApi) GetContactGroups ¶
func (contactsApi *ContactsApi) GetContactGroups(ctx context.Context, id string) (*ContactGroupsCollectionResponse, error)
func (*ContactsApi) GetContacts ¶
func (contactsApi *ContactsApi) GetContacts(ctx context.Context, filters *ContactListFilters) (*ContactCollectionResponse, error)
func (*ContactsApi) GetContactsPageIterator ¶
func (contactsApi *ContactsApi) GetContactsPageIterator(ctx context.Context, filters *ContactListFilters) *ContactsCollectionIterator
func (*ContactsApi) GetCustomFields ¶
func (contactsApi *ContactsApi) GetCustomFields(ctx context.Context) (*CustomFieldsCollectionResponse, error)
func (*ContactsApi) GetGroup ¶
func (contactsApi *ContactsApi) GetGroup(ctx context.Context, groupId string) (*ContactGroup, error)
func (*ContactsApi) GetGroupPermissions ¶
func (contactsApi *ContactsApi) GetGroupPermissions(ctx context.Context, groupId string) (*ContactGroupPermissionsCollectionResponse, error)
func (*ContactsApi) GetGroups ¶
func (contactsApi *ContactsApi) GetGroups(ctx context.Context) (*ContactGroupsCollectionResponse, error)
func (*ContactsApi) GetUserGroupPermissions ¶
func (contactsApi *ContactsApi) GetUserGroupPermissions(ctx context.Context, groupId, username string) (*ContactGroupPermissions, error)
func (*ContactsApi) MoveContactsToGroup ¶
func (contactsApi *ContactsApi) MoveContactsToGroup(ctx context.Context, groupId string, filters *ContactListFilters) error
func (*ContactsApi) RemoveContactFromGroup ¶
func (contactsApi *ContactsApi) RemoveContactFromGroup(ctx context.Context, groupId, contactId string) error
func (*ContactsApi) RemoveContactsFromGroup ¶
func (contactsApi *ContactsApi) RemoveContactsFromGroup(ctx context.Context, groupId string, filters *ContactListFilters) error
func (*ContactsApi) RemoveUserGroupPermissions ¶
func (contactsApi *ContactsApi) RemoveUserGroupPermissions(ctx context.Context, groupId, username string) error
func (*ContactsApi) UnbindContactFromGroup ¶
func (*ContactsApi) UpdateContact ¶
func (*ContactsApi) UpdateCustomField ¶
func (contactsApi *ContactsApi) UpdateCustomField(ctx context.Context, fieldId, name string) (*CustomField, error)
func (*ContactsApi) UpdateGroup ¶
func (contactsApi *ContactsApi) UpdateGroup(ctx context.Context, groupId string, group *ContactGroup) (*ContactGroup, error)
type ContactsCollectionIterator ¶
type ContactsCollectionIterator struct {
// contains filtered or unexported fields
}
func (*ContactsCollectionIterator) Next ¶
func (b *ContactsCollectionIterator) Next() (*ContactCollectionResponse, error)
type ContentType ¶
type ContentType string
type CustomField ¶
type CustomFieldsCollectionResponse ¶
type CustomFieldsCollectionResponse struct {
Size int `json:"size"`
Collection []CustomField `json:"collection"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Status int
Code int `json:"error"`
Message string `json:"message"`
InvalidNumbers []*InvalidNumber `json:"invalid_numbers,omitempty"`
}
func (*ErrorResponse) Error ¶
func (error *ErrorResponse) Error() string
type ExpireTimeUnit ¶
type ExpireTimeUnit string
type HlrApi ¶
type HlrApi struct {
// contains filtered or unexported fields
}
func (*HlrApi) CheckNumber ¶
type HlrResponse ¶
type InvalidNumber ¶
type Link ¶
type Link struct {
Url string `json:"url" url:"url,omitempty"`
Name string `json:"name" url:"name,omitempty"`
ExpireTime int `json:"expire_time,omitempty" url:"expire_time,omitempty"`
ExpireUnit ExpireTimeUnit `json:"expire_unit,omitempty" url:"expire_unit,omitempty"`
Description string `json:"description" url:"description,omitempty"`
Type LinkType `json:"type" url:"type,omitempty"`
}
type LinkResponse ¶
type LinkResponse struct {
Id string `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
ShortUrl string `json:"short_url"`
Filename string `json:"filename"`
Type string `json:"type"`
Expire *Timestamp `json:"expire"`
Hits int `json:"hits"`
HitsUnique int `json:"hits_unique"`
Description string `json:"description"`
}
type LinksCollectionResponse ¶
type LinksCollectionResponse struct {
Size int `json:"size"`
Collection []*LinkResponse `json:"collection"`
}
type MediaObject ¶
type MediaObject struct {
Source string
Type MediaObjectType
}
func NewImgMediaObject ¶
func NewImgMediaObject(source string) *MediaObject
func NewTextMediaObject ¶
func NewTextMediaObject(source string) *MediaObject
func NewVideoMediaObject ¶
func NewVideoMediaObject(source string) *MediaObject
type MediaObjectType ¶
type MediaObjectType string
type Mms ¶
type Mms struct {
To string `json:"to,omitempty"`
Group string `json:"group,omitempty"`
Subject string `json:"subject,omitempty"`
Message *SMIL `json:"smil,omitempty"`
Date *Timestamp `json:"date,omitempty"`
DateValidate string `json:"date_validate,omitempty"`
Idx string `json:"idx,omitempty"`
CheckIdx bool `json:"check_idx,omitempty"`
NotifyUrl string `json:"notify_url,omitempty"`
Test bool `json:"test,omitempty"`
}
type MmsApi ¶
type MmsApi struct {
// contains filtered or unexported fields
}
func (*MmsApi) RemoveScheduled ¶
func (*MmsApi) SendToGroup ¶
type MmsCollectionResponse ¶
type MmsCollectionResponse struct {
Count int `json:"count"`
Collection []*MmsResponse `json:"list"`
}
type MmsRemoveResponse ¶
type MmsResponse ¶
type MmsResponse struct {
Id string `json:"id,omitempty"`
Points float32 `json:"points,omitempty"`
Number string `json:"number,omitempty"`
DateSent *Timestamp `json:"date_sent,omitempty"`
SubmittedNumber string `json:"submitted_number,omitempty"`
Status string `json:"status,omitempty"`
Idx string `json:"idx,omitempty"`
Error string `json:"error,omitempty"`
}
type PageIterator ¶
type PageIterator struct {
Client *Client
Context context.Context
Filters url.Values
Uri string
Size uint
Limit uint
Offset uint
}
func NewPageIterator ¶
func NewPageIterator(c *Client, ctx context.Context, uri string, v interface{}) *PageIterator
func (*PageIterator) Next ¶
func (i *PageIterator) Next(result Collection) error
type PaginationFilters ¶
type ProfileApi ¶
type ProfileApi struct {
// contains filtered or unexported fields
}
func (*ProfileApi) Details ¶
func (accountApi *ProfileApi) Details(ctx context.Context) (*ProfileDetailsResponse, error)
type ProfileDetailsResponse ¶
type ProfileDetailsResponse struct {
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
Username string `json:"username,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
PaymentType string `json:"payment_type,omitempty"`
UserType string `json:"user_type,omitempty"`
Points float32 `json:"points,omitempty"`
}
type SMIL ¶
type SMIL struct {
Items []*MediaObject
// contains filtered or unexported fields
}
func (*SMIL) GetMinifiedTplResult ¶
func (*SMIL) GetTplResult ¶
func (SMIL) MarshalJSON ¶
type SenderApi ¶
type SenderApi struct {
// contains filtered or unexported fields
}
type SenderCollectionResponse ¶
type SenderCollectionResponse struct {
Size int `json:"size"`
Collection []*SenderResponse `json:"collection"`
}
type SenderResponse ¶
type ShortUrlApi ¶
type ShortUrlApi struct {
// contains filtered or unexported fields
}
func (*ShortUrlApi) CreateLink ¶
func (shortUrlApi *ShortUrlApi) CreateLink(ctx context.Context, targetUrl, name, description string) (*LinkResponse, error)
func (*ShortUrlApi) CreateLinkRaw ¶
func (shortUrlApi *ShortUrlApi) CreateLinkRaw(ctx context.Context, link *Link) (*LinkResponse, error)
func (*ShortUrlApi) CreateReport ¶
func (shortUrlApi *ShortUrlApi) CreateReport(ctx context.Context, filters *ClicksCollectionFilters) (*ClicksReportResponse, error)
func (*ShortUrlApi) DeleteLink ¶
func (shortUrlApi *ShortUrlApi) DeleteLink(ctx context.Context, id string) error
func (*ShortUrlApi) GetClicks ¶
func (shortUrlApi *ShortUrlApi) GetClicks(ctx context.Context, filters *ClicksCollectionFilters) (*ClicksCollectionResponse, error)
func (*ShortUrlApi) GetLink ¶
func (shortUrlApi *ShortUrlApi) GetLink(ctx context.Context, id string) (*LinkResponse, error)
func (*ShortUrlApi) GetLinks ¶
func (shortUrlApi *ShortUrlApi) GetLinks(ctx context.Context) (*LinksCollectionResponse, error)
func (*ShortUrlApi) UpdateLink ¶
func (shortUrlApi *ShortUrlApi) UpdateLink(ctx context.Context, id, targetUrl, name, description string) (*LinkResponse, error)
func (*ShortUrlApi) UpdateLinkRaw ¶
func (shortUrlApi *ShortUrlApi) UpdateLinkRaw(ctx context.Context, id string, link *Link) (*LinkResponse, error)
type Sms ¶
type Sms struct {
To string `json:"to,omitempty"`
Message string `json:"message,omitempty"`
From string `json:"from,omitempty"`
Group string `json:"group,omitempty"`
Flash bool `json:"flash,omitempty"`
Fast bool `json:"fast,omitempty"`
Test bool `json:"test,omitempty"`
Encoding string `json:"encoding,omitempty"`
Details bool `json:"details,omitempty"`
Date *Timestamp `json:"date,omitempty"`
Datacoding string `json:"datacoding,omitempty"`
Udh string `json:"udh,omitempty"`
SkipForeign bool `json:"skip_foreign,omitempty"`
AllowDuplicates bool `json:"allow_duplicates,omitempty"`
Idx string `json:"idx,omitempty"`
CheckIdx bool `json:"check_idx,omitempty"`
Nounicode bool `json:"nounicode,omitempty"`
Normalize bool `json:"normalize,omitempty"`
PartnerId bool `json:"partner_id,omitempty"`
MaxParts int `json:"max_parts,omitempty"`
ExpirationDate int `json:"expiration_date,omitempty"`
DiscountGroup string `json:"discount_group,omitempty"`
NotifyUrl string `json:"notify_url,omitempty"`
Template string `json:"template,omitempty"`
MessageParam1 string `json:"param1,omitempty"`
MessageParam2 string `json:"param2,omitempty"`
MessageParam3 string `json:"param3,omitempty"`
MessageParam4 string `json:"param4,omitempty"`
}
type SmsApi ¶
type SmsApi struct {
// contains filtered or unexported fields
}
func (*SmsApi) RemoveScheduled ¶
func (*SmsApi) SendToGroup ¶
type SmsRemoveResult ¶
type SmsResponse ¶
type SmsResponse struct {
Id string `json:"id,omitempty"`
Points float32 `json:"points,omitempty"`
Number string `json:"number,omitempty"`
DateSent *Timestamp `json:"date_sent,omitempty"`
SubmittedNumber string `json:"submitted_number,omitempty"`
Status string `json:"status,omitempty"`
Idx string `json:"idx,omitempty"`
Error string `json:"error,omitempty"`
Message string `json:"message,omitempty"`
Length int `json:"length,omitempty"`
Parts int `json:"parts,omitempty"`
}
type SmsResultCollection ¶
type SmsResultCollection struct {
Count int `json:"count"`
Collection []*SmsResponse `json:"list"`
}
type SubusersApi ¶
type SubusersApi struct {
// contains filtered or unexported fields
}
func (*SubusersApi) CreateUser ¶
func (accountApi *SubusersApi) CreateUser(ctx context.Context, user *User) (*UserResponse, error)
func (*SubusersApi) DeleteUser ¶
func (accountApi *SubusersApi) DeleteUser(ctx context.Context, id string) error
func (*SubusersApi) GetUser ¶
func (accountApi *SubusersApi) GetUser(ctx context.Context, id string) (*UserResponse, error)
func (*SubusersApi) ListUsers ¶
func (accountApi *SubusersApi) ListUsers(ctx context.Context) (*UserCollectionResponse, error)
func (*SubusersApi) UpdateUser ¶
func (accountApi *SubusersApi) UpdateUser(ctx context.Context, id string, user *User) (*UserResponse, error)
type User ¶
type User struct {
Credentials *UserCredentials `json:"credentials"`
Active bool `json:"active"`
Description string `json:"description"`
Points *UserPoints `json:"points"`
}
type UserCollectionResponse ¶
type UserCollectionResponse struct {
Size int `json:"size"`
Collection []*UserResponse `json:"collection"`
}
type UserCredentials ¶
type UserPoints ¶
type UserResponse ¶
type UserResponse struct {
Id string `json:"id"`
Username string `json:"username"`
Active bool `json:"active"`
Description string `json:"description"`
Points *UserPoints `json:"points"`
}
type Vms ¶
type Vms struct {
To string `json:"to,omitempty"`
Group string `json:"group,omitempty"`
From string `json:"from,omitempty"`
Tts string `json:"tts,omitempty"`
File string `json:"file,omitempty"`
TtsLector string `json:"tts_lector,omitempty"`
Date *Timestamp `json:"date,omitempty"`
DateValidate string `json:"date_validate,omitempty"`
Try string `json:"try,omitempty"`
Interval string `json:"interval,omitempty"`
SkipGms string `json:"skip_gsm,omitempty"`
Idx string `json:"idx,omitempty"`
CheckIdx string `json:"check_idx,omitempty"`
NotifyUrl string `json:"notify_url,omitempty"`
Test string `json:"test,omitempty"`
}
type VmsApi ¶
type VmsApi struct {
// contains filtered or unexported fields
}
func (*VmsApi) RemoveScheduled ¶
func (*VmsApi) SendToGroup ¶
type VmsCollectionResponse ¶
type VmsCollectionResponse struct {
Count int `json:"count"`
Collection []*VmsResponse `json:"list"`
}
type VmsRemoveResponse ¶
type VmsResponse ¶
type VmsResponse struct {
Id string `json:"id,omitempty"`
Points float32 `json:"points,omitempty"`
Number string `json:"number,omitempty"`
DateSent *Timestamp `json:"date_sent,omitempty"`
SubmittedNumber string `json:"submitted_number,omitempty"`
Status string `json:"status,omitempty"`
Idx string `json:"idx,omitempty"`
Error string `json:"error,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.