<commit_before># Semaphore Client

Semaphore Client is a PHP wrapper for the Semaphore SMS API

# Table of Contents
 - [Installation](#installation)
 - [Basic Usage](#basic-usage)

## Installation

```sh
composer require kickstartph/semaphore-client
```

## Basic Usage

### Sending Messages
```php
<?php
    require_once( 'vendor/autoload.php' );

    use Semaphore\SemaphoreClient;
    $client = new SemaphoreClient( '<YOUR_API_KEY>', '<OPTIONAL_SENDER_ID' );
    echo $client->send( '09991234567', 'Your message' );
```
The sender ID can be overridden through the client send command as well:
```php
<?php

    echo $client->send( '09991234567', 'Your message', '<NEW_SENDER_ID>' );
```

Bulk messages (to up to 20 numbers ) can also be sent through the same API call by setting the bulk option to true:

```php
    echo $client->send( '09991234567,09997654321,', 'Your message', null, true );
```


### Account Balance
```php
    $client = new SemaphoreClient( '<YOUR_API_KEY>', '<OPTIONAL_SENDER_ID' );
    echo $client->balance();
```
This call should return something along the lines of:
```json
{
    "status": "success",
    "balance": 72,
    "account_status": "Allowed"
}
```

### Message Status
The encoded_id of the message is returned as a response when a message is sent
```php
    echo $client->message( <ENCODED_ID> );
```

### Retrieving Messages
You can retrieve up to 100 sent messages at a time, with support for pagination by passing the optional $page variable:

```php 
    echo $client->messages( 2 ); //Will return the results for page 2 of sent messages
```

Messages by date range:
```php 
    echo $client->messagesByDate( 'january 1 2015', 'feb 1 2015' ); //Use any date format str_to_time() supports 
```
Messages by telco network:
```php 
    echo $client->messages( 'globe' ); //Returns all messages sent to recipients on the Globe network
```

<commit_msg>Fixed README.md<commit_after># Semaphore Client

Semaphore Client is a PHP wrapper for the Semaphore SMS API

# Table of Contents
 - [Installation](#installation)
 - [Basic Usage](#basic-usage)

## Installation

```sh
composer require kickstartph/semaphore-client
```

## Basic Usage

### Sending Messages
```php
<?php
    require_once( 'vendor/autoload.php' );

    use Semaphore\SemaphoreClient;
    $client = new SemaphoreClient( '<YOUR_API_KEY>', '<OPTIONAL_SENDER_ID' );
    echo $client->send( '09991234567', 'Your message' );
```
The sender ID can be overridden through the client send command as well:
```php
    echo $client->send( '09991234567', 'Your message', '<NEW_SENDER_ID>' );
```

Bulk messages (to up to 20 numbers ) can also be sent through the same API call by setting the bulk option to true:

```php
    echo $client->send( '09991234567,09997654321,', 'Your message', null, true );
```


### Account Balance
```php
    $client = new SemaphoreClient( '<YOUR_API_KEY>', '<OPTIONAL_SENDER_ID' );
    echo $client->balance();
```
This call should return something along the lines of:
```json
{
    "status": "success",
    "balance": 72,
    "account_status": "Allowed"
}
```

### Message Status
The encoded_id of the message is returned as a response when a message is sent
```php
    echo $client->message( <ENCODED_ID> );
```

### Retrieving Messages
You can retrieve up to 100 sent messages at a time, with support for pagination by passing the optional $page variable:

```php 
    //Will return the results for page 2 of sent messages
    echo $client->messages( 2 ); 
```

Messages by date range:
```php 
    //Use any date format str_to_time() supports
    echo $client->messagesByDate( 'january 1 2015', 'feb 1 2015' );  
```
Messages by telco network:
```php 
    //Returns all messages sent to recipients on the Globe network
    echo $client->messages( 'globe' ); 
```


{'fraction_non_alphanumeric': 0.13218997361477572, 'fraction_numerical': 0.03324538258575198, 'mean_word_length': 4.193150684931507, 'pattern_counts': {'":': 6, '<': 18, '<?xml version=': 0, '>': 27, 'https://': 0, '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': '2573103', 'n_tokens_mistral': 1331, 'n_tokens_neox': 1168, 'n_words': 436}