Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Messages *messagesService
// contains filtered or unexported fields
}
Client is the campay API client. Do not instantiate this client with Client{}. Use the New method instead.
type Message ¶
type Message struct {
Contact string `json:"contact"`
Content string `json:"content"`
CreatedAt time.Time `json:"created_at"`
FailureReason string `json:"failure_reason"`
ID string `json:"id"`
LastAttemptedAt time.Time `json:"last_attempted_at"`
OrderTimestamp time.Time `json:"order_timestamp"`
Owner string `json:"owner"`
ReceivedAt time.Time `json:"received_at"`
RequestReceivedAt time.Time `json:"request_received_at"`
SendTime int `json:"send_time"`
SentAt time.Time `json:"sent_at"`
Status string `json:"status"`
Type string `json:"type"`
UpdatedAt time.Time `json:"updated_at"`
UserID string `json:"user_id"`
}
Message represents and incoming or outgoing SMS message
type MessageResponse ¶
type MessageResponse struct {
Data Message `json:"data"`
Message string `json:"message"`
Status string `json:"status"`
}
MessageResponse is the response gotten with a message content
type MessageSendParams ¶
type MessageSendParams struct {
Content string `json:"content"`
From string `json:"from"`
To string `json:"to"`
}
MessageSendParams is the request payload for sending a message
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is options for constructing a client
func WithAPIKey ¶
WithAPIKey sets the api key for the httpsms API
func WithBaseURL ¶
WithBaseURL sets the base url for the httpsms API
func WithHTTPClient ¶
WithHTTPClient sets the underlying HTTP client used for API requests. By default, http.DefaultClient is used.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
