private static void Main(string[] args) { const string clientId = "hqikydyh"; const string clientSecret = "kakdxpvd"; try { var host = new ApiHost(new BasicAuth(clientId, clientSecret)); var messageApi = new MessagingApi(host); MessageResponse msg = messageApi.SendQuickMessage("Arsene", "+233247063817", "Hello Big Bro!", true); Console.WriteLine(msg.Status); } catch (Exception e) { if (e.GetType() == typeof (HttpRequestException)) { var ex = e as HttpRequestException; if (ex != null && ex.HttpResponse != null) { Console.WriteLine("Error Status Code " + ex.HttpResponse.Status); } } throw; } Console.ReadKey(); }
/// <summary> /// Constructor /// </summary> /// <param name="host"></param> public AccountApi(ApiHost host) : base(host) {}
/// <summary> /// Constructor /// </summary> /// <param name="host"></param> public SupportApi(ApiHost host) : base(host) {}
public MessagingApi(ApiHost host) : base(host) { }
/// <summary> /// </summary> /// <param name="host"></param> public ContactApi(ApiHost host) : base(host) {}
public SupportApi(ApiHost host) : base(host) { }
public ContentApi(ApiHost host) : base(host) { }
public ContactApi(ApiHost host) : base(host) { }
/// <summary> /// Default constructor. Use this constructor whenever this class is going to be referenced. /// </summary> /// <param name="host"><see cref="ApiHost" /> The Api Host object.</param> public ContentApi(ApiHost host) : base(host) {}
public AccountApi(ApiHost host) : base(host) { }
/// <summary> /// </summary> /// <param name="host"></param> public MessagingApi(ApiHost host) : base(host) {}