All URIs are relative to https://api.sms.ir
| Method | HTTP request | Description |
|---|---|---|
| DeleteScheduled | Delete /v1/send/scheduled/{packId} | Delete Scheduled Pack |
| SendBulk | Post /v1/send/bulk | Send Bulk SMS |
| SendLikeToLike | Post /v1/send/likeToLike | Send Like-to-Like SMS |
| SendVerify | Post /v1/send/verify | Send Verification Code (Template) |
DeleteScheduledResponse DeleteScheduled(ctx, packId).Execute()
Delete Scheduled Pack
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sobhaann/smsir"
)
func main() {
packId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SendAPI.DeleteScheduled(context.Background(), packId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SendAPI.DeleteScheduled``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteScheduled`: DeleteScheduledResponse
fmt.Fprintf(os.Stdout, "Response from `SendAPI.DeleteScheduled`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| packId | string |
Other parameters are passed through a pointer to a apiDeleteScheduledRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendResponse SendBulk(ctx).SendBulkRequest(sendBulkRequest).Execute()
Send Bulk SMS
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sobhaann/smsir"
)
func main() {
sendBulkRequest := *openapiclient.NewSendBulkRequest(int32(300000000000), "Your Text", []string{"Mobiles_example"}) // SendBulkRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SendAPI.SendBulk(context.Background()).SendBulkRequest(sendBulkRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SendAPI.SendBulk``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendBulk`: SendResponse
fmt.Fprintf(os.Stdout, "Response from `SendAPI.SendBulk`: %v\n", resp)
}Other parameters are passed through a pointer to a apiSendBulkRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| sendBulkRequest | SendBulkRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendResponse SendLikeToLike(ctx).SendLikeToLikeRequest(sendLikeToLikeRequest).Execute()
Send Like-to-Like SMS
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sobhaann/smsir"
)
func main() {
sendLikeToLikeRequest := *openapiclient.NewSendLikeToLikeRequest(int32(300000000000), []string{"MessageTexts_example"}, []string{"Mobiles_example"}) // SendLikeToLikeRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SendAPI.SendLikeToLike(context.Background()).SendLikeToLikeRequest(sendLikeToLikeRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SendAPI.SendLikeToLike``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendLikeToLike`: SendResponse
fmt.Fprintf(os.Stdout, "Response from `SendAPI.SendLikeToLike`: %v\n", resp)
}Other parameters are passed through a pointer to a apiSendLikeToLikeRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| sendLikeToLikeRequest | SendLikeToLikeRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VerifyResponse SendVerify(ctx).VerifySendRequest(verifySendRequest).Execute()
Send Verification Code (Template)
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sobhaann/smsir"
)
func main() {
verifySendRequest := *openapiclient.NewVerifySendRequest("Mobile_example", int32(123), []openapiclient.VerifySendRequestParametersInner{*openapiclient.NewVerifySendRequestParametersInner()}) // VerifySendRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SendAPI.SendVerify(context.Background()).VerifySendRequest(verifySendRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SendAPI.SendVerify``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendVerify`: VerifyResponse
fmt.Fprintf(os.Stdout, "Response from `SendAPI.SendVerify`: %v\n", resp)
}Other parameters are passed through a pointer to a apiSendVerifyRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| verifySendRequest | VerifySendRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]