Documentation ¶
Index ¶
Constants ¶
const ( LangFR = "fr" LangDE = "de" LangRU = "ru" LangEN = "en" LangZH = "zh" )
Variables ¶
var ( ErrAccountBlocked = errors.New("account blocked") ErrWrongKey = errors.New("wrong key") ErrNoKey = errors.New("no key") ErrNoService = errors.New("no service or invalid service name") ErrRequestNotFound = errors.New("request not found") ErrAPIAccessDisabled = errors.New("api access disabled") ErrAPIAccessIP = errors.New("api access blocked for this IP") ErrLowBalance = errors.New("low balance") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetBalance ¶
func (Client) GetFreeList ¶
GetFreeList depending on the parameters returns information on available countries with free numbers, received messages and the list of restricted services.
Without parameters: returns a list of available countries with free numbers, messages received by the first number from the list and the list of restricted services.
With country parameter: returns a list of available free numbers of that country, messages received by the first number from the list and the list of restricted services.
With country and number parameters: returns a list of SMS messages received by this number and the list of restrices services. You can send this request to get a number that can be used for SMS receiption
later on, for example for testing.
func (*Client) GetTariffs ¶
type GetBalanceResp ¶
type GetFreeListResponse ¶
type GetFreeListResponse struct { BaseResp Countries []struct { PhoneCode int `json:"country"` Name string `json:"country_text"` OriginalName string `json:"country_original"` } `json:"countries"` Numbers map[string]struct { CountryCode int `json:"country"` CountryName string `json:"country_original"` DateHumans string `json:"data_humans"` FullNumber string `json:"full_number"` Archived bool `json:"is_archive"` } `json:"numbers"` Messages struct { CurrentPage int `json:"current_page"` Data []*Message `json:"data"` FirstPageURL string `json:"first_page_url"` From int `json:"from"` LastPage int `json:"last_page"` LastPageURL string `json:"last_page_url"` Links []*Link `json:"links"` NextPageURL string `json:"next_page_url"` Path string `json:"path"` PerPage int `json:"per_page"` PrevPageURL string `json:"prev_page_url"` To int `json:"to"` Total int `json:"total"` Number string `json:"number"` Country int `json:"country"` } `json:"messages"` Ignore string `json:"ignore"` }