예제 #1
0
        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();
        }
예제 #2
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="host"></param>
 public AccountApi(ApiHost host) : base(host) {}
예제 #3
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="host"></param>
 public SupportApi(ApiHost host) : base(host) {}
예제 #4
0
 public MessagingApi(ApiHost host) : base(host)
 {
 }
예제 #5
0
 /// <summary>
 /// </summary>
 /// <param name="host"></param>
 public ContactApi(ApiHost host) : base(host) {}
예제 #6
0
 public SupportApi(ApiHost host) : base(host)
 {
 }
예제 #7
0
 public ContentApi(ApiHost host) : base(host)
 {
 }
예제 #8
0
 public ContactApi(ApiHost host) : base(host)
 {
 }
예제 #9
0
 /// <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) {}
예제 #10
0
 public AccountApi(ApiHost host) : base(host)
 {
 }
예제 #11
0
 /// <summary>
 /// </summary>
 /// <param name="host"></param>
 public MessagingApi(ApiHost host) : base(host) {}