/// <summary> /// Add phone to the blacklist /// </summary> /// <param name="phone">The phone.</param> /// <returns> /// bool "success" /// int "id" /// </returns> public string Add(string phone) { var data = new Dictionary <string, string> { { "phone", phone } }; return(_srv.Call("blacklist/add", data)); }
/// <summary> /// Creating new subaccount /// </summary> /// <param name="subaccount_username">string</param> /// <param name="subaccount_password">string</param> /// <param name="subaccount_id">int</param> /// <param name="data"> /// string "name", /// string "phone", /// string "email" /// </param> /// <returns> /// type /// </returns> public string Add(string subaccount_username, string subaccount_password, string subaccount_id, Dictionary <string, string> data = null) { data = data ?? new Dictionary <string, string>(); data.Add("subaccount_username", subaccount_username); data.Add("subaccount_password", subaccount_password); data.Add("subaccount_id", subaccount_id); return(_srv.Call("subaccounts/add", data)); }
/// <summary> /// Sending messages /// </summary> /// <param name="phone">The phone.</param> /// <param name="text">The text.</param> /// <param name="sender">The sender.</param> /// <param name="data"> /// String "details" Show details of messages, /// String "utf" Change encoding to UTF-8 (Only for FULL SMS), /// String "flash", /// String "speed" Priority canal only for FULL SMS, /// String "test" Test mode, /// String "vcard" vCard message, /// String "wap_push" WAP Push URL address, /// String "date" Set the date of sending, /// String "group_id" Sending to the group instead of a phone number, /// String "contact_id" Sending to phone from contacts, /// String "unique_id" Own identifiers of messages /// </param> /// <returns> /// Boolean "success" /// int "queued" Number of queued messages /// int "unsent" Number of unsent messages /// array "items" /// String "id" /// String "phone" /// String "status" - queued|unsent /// String "queued" Date of enqueued /// int "parts" Number of parts a message /// int "error_code" /// String "error_message" /// String "text" /// </returns> public string SendSms(string phone, string text, string sender = null, Dictionary <string, string> data = null) { data = data ?? new Dictionary <string, string>(); data.Add("phone", phone); data.Add("text", text); data.Add("sender", sender); return(_srv.Call("messages/send_sms", data)); }
/// <summary> /// Creating new Sender name /// </summary> /// <param name="name">string name</param> /// <returns>Boolean "success"</returns> public string Add(string name) { var data = new Dictionary <string, string> { { "name", name } }; var response = _srv.Call("senders/add", data); return(response); }
/// <summary> /// Adding new template /// </summary> /// <param name="name">string name</param> /// <param name="text">string text</param> /// <returns> /// bool "success" /// int "id" /// </returns> public string Add(string name, string text) { var data = new Dictionary <string, string> { { "name", name }, { "text", text } }; return(_srv.Call("templates/add", data)); }
/// <summary> /// Checking phone in to HLR /// </summary> /// <param name="phone">string phone</param> /// <param name="id">string id</param> /// <returns> /// array /// String "phone" /// String "status" /// int "imsi" /// String "network" /// bool "ported" /// String "network_ported" /// </returns> public string Check(string phone, string id = null) { var data = new Dictionary <string, string> { { "phone", phone }, { "id", id } }; return(_srv.Call("phones/check", data)); }
/// <summary> /// Add new contact /// </summary> /// <param name="group_id">The group identifier.</param> /// <param name="phone">The phone.</param> /// <param name="data">The data: /// string "email" /// string "first_name" /// string "last_name" /// string "company" /// string "tax_id" /// string "address" /// string "city" /// string "description" /// </param> /// <returns> /// bool "success" /// int "id" /// </returns> public string Add(string group_id, string phone, Dictionary <string, string> data = null) { data = data ?? new Dictionary <string, string>(); data.Add("phone", phone); data.Add("group_id", group_id); return(_srv.Call("contacts/add", data)); }
/// <summary> /// Add new group /// </summary> /// <param name="name">string name</param> /// <returns> /// array /// bool "success" /// int "id" /// </returns> public string Add(string name) { var data = new Dictionary <string, string> { { "name", name } }; return(_srv.Call("groups/add", data)); }
/// <summary> /// List of received SMS Premium /// </summary> /// <returns> /// array /// array "items" /// int "id" /// string "to_number" Premium number /// string "from_number" Sender phone number /// string "date" /// int "limit" Limitation the number of responses /// string "text" Message /// </returns> public string Index() { var data = new Dictionary <string, string>(); return(_srv.Call("premium/index", data)); }
/// <summary> /// Statistics an sending /// </summary> /// <param name="data"> /// String "type" eco|full|voice|mms, /// String "begin" Start date, /// String "end" End date /// </param> /// <returns> /// array "items", /// int "id", /// String "name", /// int "delivered", /// int "pending", /// int "undelivered", /// int "unsent", /// String "begin", /// String "end", /// String "text", /// String "type" eco|full|voice|mms /// </returns> public string Index(Dictionary <string, string> data = null) { data = data ?? new Dictionary <string, string>(); return(_srv.Call("stats/index", data)); }
/// <summary> /// Adds the specified type. /// </summary> /// <param name="type">The type</param> /// <param name="data">The data</param> /// <returns> /// Boolean "success" /// String "id" /// </returns> public string Add(string type, Dictionary <string, string> data = null) { data = data ?? new Dictionary <string, string>(); data.Add("type", type); return(_srv.Call("files/add", data)); }
/// <summary> /// Register new account /// </summary> /// <param name="data">Data - Dictionary</param> /// <param> string "phone" /// string "email" /// string "first_name" /// string "last_name" /// string "company"</param> /// <returns>bool "success"</returns> public string Add(Dictionary <string, string> data) { return(_srv.Call("account/add", data)); }
/// <summary> /// Preview error /// </summary> /// <param name="code">int code</param> /// <returns> /// array /// int "code" /// String "type" /// String "message" /// </returns> public string View(string code) { var data = new Dictionary <string, string>(); return(_srv.Call("error/" + code, data)); }