GetPendingMessageCount
Returns the number of messages currently waiting in queue at our gateway. Returns -1 on error.
// uses JQuery libraryvar postUrl = "https://secure.smsgateway.ca/services/account.svc/" + accountKey "/PendingMessageCount"
$.ajax({ url: postUrl, method: "GET", contentType: "application/json;charset=UTF-8"}).done(function(response) { alert(response);}).error(function (xhr, textStatus, errorThrown) { alert (xhr.responseText);});<?php// using SOAP Module - http://ca3.php.net/soap
class SMSParam { public $AccountKey;}
$client = new SoapClient('https://secure.smsgateway.ca/sendsms.asmx?WSDL');$parameters = new SMSParam;
$parameters -> AccountKey = accountKey;
$Result = $client->GetPendingMessageCount($parameters);?>' Service Reference (SOAP)Using client = New SwiftSMS.SendSMSSoapClient Dim response = client.GetPendingMessageCount(accountKey)End Using
' WebClient (REST)Dim url = String.Format("https://secure.smsgateway.ca/services/account.svc/{0}/PendingMessageCount", accountKey)
Using wClient = New Net.WebClient wClient.Encoding = New UTF8Encoding() wClient.Headers.Add(HttpRequestHeader.ContentType, "application/json")
Dim wResponse = wClient.DownloadString(url)End Usingcurl "https://secure.smsgateway.ca/services/account.svc/[accountKey]/PendingMessageCount"// Service Reference / SOAPusing (var client = new SwiftSecure.SendSMSSoapClient()){ var messagesRemaining = client.GetPendingMessageCount(accountKey);}
// Web Client / RESTvar url = string.Format("https://secure.smsgateway.ca/services/account.svc/{0}/PendingMessageCount", accountKey);
using (var wClient = new System.Net.WebClient()){ wClient.Encoding = Encoding.UTF8; wClient.Headers.Add(HttpRequestHeader.ContentType, "application/json");
var messagesRemaining = wClient.DownloadString(url);}HTTP Request
GET:/services/account.svc/:accountKey/PendingMessageCount| Parameter | Description | Location |
|---|---|---|
| AccountKey | Your Swift SMS Gateway account key | URL |
Returns
integer