<commit_before>[![Build Status](https://travis-ci.org/zensend/zensend_csharp_api.svg?branch=master)](https://travis-ci.org/zensend/zensend_csharp_api)

# ZenSend DotNet Bindings

ZenSend DotNet bindings for sending SMS messages and performing operator lookups. You can sign up for an account at https://zensend.io/

## Installation

To install ZenSend API, run the following command in the [Package Manager Console](http://docs.nuget.org/consume/package-manager-console)

    PM> Install-Package ZenSend -Version 1.0.1

## Sending SMS

    using ZenSend;

    var client = new Client("api_key");
    var result = client.SendSms(originator: "SPINTOWIN", body: "Welcome to spin to win", numbers: new string[]{"4477111222333", "4477222333444"});

    // with all the options

    result = client.SendSms(originator: "SPINTOWIN", body: "Welcome to spin to win", numbers: new string[]{"4477111222333", "4477222333444"}, originatorType: OriginatorType.Alphanumeric, timeToLiveInMinutes: 100, encoding: SmsEncoding.GSM);

    Console.WriteLine(result.Numbers); // => 2
    Console.WriteLine(result.SmsParts); // => 1
    Console.WriteLine(result.Encoding); // => "gsm"
    Console.WriteLine(result.TxGuid); // => "7CDEB38F-4370-18FD-D7CE-329F21B99209"
    Console.WriteLine(result.CostInPence); // => 2.3
    Console.WriteLine(result.NewBalanceInPence); // => 500.0

    // handling errors

    try {
      client.SendSms(originator: "SPINTOWIN", body: "Welcome to spin to win", numbers: new string[]{"4477111222333", "4477222333444"});<commit_msg>remove version from PM install<commit_after>[![Build Status](https://travis-ci.org/zensend/zensend_csharp_api.svg?branch=master)](https://travis-ci.org/zensend/zensend_csharp_api)

# ZenSend DotNet Bindings

ZenSend DotNet bindings for sending SMS messages and performing operator lookups. You can sign up for an account at https://zensend.io/

## Installation

To install ZenSend API, run the following command in the [Package Manager Console](http://docs.nuget.org/consume/package-manager-console)

    PM> Install-Package ZenSend

## Sending SMS

    using ZenSend;

    var client = new Client("api_key");
    var result = client.SendSms(originator: "SPINTOWIN", body: "Welcome to spin to win", numbers: new string[]{"4477111222333", "4477222333444"});

    // with all the options

    result = client.SendSms(originator: "SPINTOWIN", body: "Welcome to spin to win", numbers: new string[]{"4477111222333", "4477222333444"}, originatorType: OriginatorType.Alphanumeric, timeToLiveInMinutes: 100, encoding: SmsEncoding.GSM);

    Console.WriteLine(result.Numbers); // => 2
    Console.WriteLine(result.SmsParts); // => 1
    Console.WriteLine(result.Encoding); // => "gsm"
    Console.WriteLine(result.TxGuid); // => "7CDEB38F-4370-18FD-D7CE-329F21B99209"
    Console.WriteLine(result.CostInPence); // => 2.3
    Console.WriteLine(result.NewBalanceInPence); // => 500.0

    // handling errors

    try {
      client.SendSms(originator: "SPINTOWIN", body: "Welcome to spin to win", numbers: new string[]{"4477111222333", "4477222333444"});
{'fraction_non_alphanumeric': 0.13586251621271075, 'fraction_numerical': 0.07166018158236057, 'mean_word_length': 4.508928571428571, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5656628', 'n_tokens_mistral': 1155, 'n_tokens_neox': 993, 'n_words': 233}