همان قابلیت SendGroup با این تفاوت که پیام در همان لحظه دریافت ارسال نمیشود بلکه به صف ارسال اضافه شده و در صورتی که آدرس فراخوانی به آن دهید، هر زمان که وضعیت ارسال مشخص شده آدرس شما را فراخوانی میکند

{{:: 'controllers.documentation.chooseFramework' | translate }}
PM > Install-Package NikSms.Library.Net
PM > Install-Package NikSms.Library.NetCore
using NikSms.Library.Net.WebService; using NikSms.Library.Net.ViewModels; using System.Threading.Tasks; using System; using System.Collections.Generic; namespace AwesomeApplication { public class NikSmsWebServiceClient { private readonly PublicServiceV1 service; public NikSmsWebServiceClient(string username, string password) { service = new PublicServiceV1(username, password); } public async Task<long> QueueGroup( string senderNumber, List<string> numbers, string message, DateTime? sendOn = null, int? sendType = null, List<long> yourMessageIds = null, int? callBackId = null, string callBackUrl = null) { var result = await service.QueueGroup( senderNumber, numbers, message, sendOn, sendType, yourMessageIds, callBackId, callBackUrl ); switch (result.Status) { case LibOperationResultStatus.Success: return result.Data; case LibOperationResultStatus.InvalidModel: throw new Exception("Some required inputs are misssing..."); case LibOperationResultStatus.UnAuthorized: throw new Exception("Some thing is wrong with your account (call support!)"); case LibOperationResultStatus.Failed: throw new Exception("Ooops its our fault!"); default: throw new Exception("You sould not be here... :D"); } } } }
PM > Install-Package NikSms.Library.Net
PM > Install-Package NikSms.Library.NetCore
Imports NikSms.Library.Net.WebService Imports NikSms.Library.Net.ViewModels Imports System.Threading.Tasks Imports System Imports System.Collections.Generic Namespace AwesomeApplication Public Class NikSmsWebServiceClient Private ReadOnly service As PublicServiceV1 Public Sub New(ByVal username As String, ByVal password As String) service = New PublicServiceV1(username, password) End Sub Public Async Function QueueGroup(ByVal senderNumber As String, ByVal numbers As List(Of String), ByVal message As String, ByVal Optional sendOn As DateTime? = Nothing, ByVal Optional sendType As Integer? = Nothing, ByVal Optional yourMessageIds As List(Of Long) = Nothing, ByVal Optional callBackId As Integer? = Nothing, ByVal Optional callBackUrl As String = Nothing) As Task(Of Long) Dim result = Await service.QueueGroup(senderNumber, numbers, message, sendOn, sendType, yourMessageIds, callBackId, callBackUrl) Select Case result.Status Case LibOperationResultStatus.Success Return result.Data Case LibOperationResultStatus.InvalidModel Throw New Exception("Some required inputs are misssing...") Case LibOperationResultStatus.UnAuthorized Throw New Exception("Some thing is wrong with your account (call support!)") Case LibOperationResultStatus.Failed Throw New Exception("Ooops its our fault!") Case Else Throw New Exception("You sould not be here... :D") End Select End Function End Class End Namespace
npm install --save niksms.library.javascript
import { ServiceV1, LibOperationResultStatus } from 'niksms'; export default class NikSmsWebServiceClient{ private service: ServiceV1 constructor(username: string, password: string){ this.service = new ServiceV1(username, password); } public async QueueGroup( senderNumber: string, numbers: string[], message: string, sendOn: Date|null = null, sendType: number|null = null, yourMessageIds: number[]|null = null, callBackId?: number|null, callBackUrl?: string|null ): Promise<number> { const result = await this.service.QueueGroup( senderNumber, numbers, message, sendOn, sendType, yourMessageIds, callBackId, callBackUrl ); switch (result.Status) { case LibOperationResultStatus.Success: return result.Data; case LibOperationResultStatus.InvalidModel: throw new Error("Some required inputs are misssing..."); case LibOperationResultStatus.UnAuthorized: throw new Error("Some thing is wrong with your account (call support!)"); case LibOperationResultStatus.Failed: throw new Error("Ooops its our fault!"); default: throw new Error("You sould not be here... :D"); } } }
{{:: 'controllers.documentation.titleTable' | translate }} {{:: 'controllers.documentation.mustDo' | translate }} {{:: 'controllers.documentation.typeTable' | translate }} ِ{{:: 'controllers.documentation.defualtValue' | translate }} ِ{{:: 'controllers.documentation.description' | translate }}
1 senderNumber بله متن شماره خط ارسال
2 numbers بله لیست متنی شماره گیرنده گان
3 message بله متن محتوای پیام
4 sendOn خیر تاریخ تاریخ ارسال
5 sendType خیر عددی نوع ارسال
6 yourMessageIds خیر لیست عددی شناسه های اختصاصی شما برای این پیامک ها
7 callBackId خیر عددی شناسه اختیاری شما برای این ارسال
8 callBackUrl خیر متن آدرس اختیاری فراخوانی در سرور شما
{{:: 'controllers.documentation.titleTable' | translate }} {{:: 'controllers.documentation.typeTable' | translate }} {{:: 'controllers.documentation.description' | translate }}
1
LibOperationResult<long>
عددی شناسه ارسال