Skip to content

Latest commit

 

History

History
272 lines (175 loc) · 7.04 KB

SendAPI.md

File metadata and controls

272 lines (175 loc) · 7.04 KB

\SendAPI

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)

DeleteScheduled

DeleteScheduledResponse DeleteScheduled(ctx, packId).Execute()

Delete Scheduled Pack

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
packId string

Other Parameters

Other parameters are passed through a pointer to a apiDeleteScheduledRequest struct via the builder pattern

Name Type Description Notes

Return type

DeleteScheduledResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SendBulk

SendResponse SendBulk(ctx).SendBulkRequest(sendBulkRequest).Execute()

Send Bulk SMS

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiSendBulkRequest struct via the builder pattern

Name Type Description Notes
sendBulkRequest SendBulkRequest

Return type

SendResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SendLikeToLike

SendResponse SendLikeToLike(ctx).SendLikeToLikeRequest(sendLikeToLikeRequest).Execute()

Send Like-to-Like SMS

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiSendLikeToLikeRequest struct via the builder pattern

Name Type Description Notes
sendLikeToLikeRequest SendLikeToLikeRequest

Return type

SendResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SendVerify

VerifyResponse SendVerify(ctx).VerifySendRequest(verifySendRequest).Execute()

Send Verification Code (Template)

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiSendVerifyRequest struct via the builder pattern

Name Type Description Notes
verifySendRequest VerifySendRequest

Return type

VerifyResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]