<commit_before>pushover-net
============

Simple, standalone, clean PHP wrapper for the pushover.net API

## What can this wrapper do?

Good question. Put simply this is a minimalistic setup which allows you to:

- Push messages (examples/example.php shows you how)
- Validate users, groups and their devices
- Process receipts, if you want to
- Easily extend the functionality (look at the base classes `PushOver\Api` and `PushOver\Model\Data`)

## What can't it do (yet)?

Another good question. Things that are missing from this wrapper (but will be added shortly) are:

- Support for XML formatted responses
- More examples
- Unit tests
- Improve data-model consistency, and make the overall API more consistent

What might be added in the future?

- Better error/exception handling
- Data models should implement the `\Traversable` interface somehow
- A php 5.3 compatible branch??
- ...<commit_msg>Added a bit more details to readme<commit_after>pushover-net
============

Simple, standalone, clean PHP wrapper for the pushover.net API

### A basic example (push a message):

Pushing a message is quite simple. But unlike other wrappers I've seen, it is equally easy to validate users and groups,
Check receipts for pushed message, choose the sounds (through constants) etc...

Here's a simple example:

```php
<?php
$credentials = new Credentials(
    'APP token',
    'user API'
);

//API settings array
$apiSettings = [
    'baseUrl'   => 'the url',//default works fine
    'output'    => Api::OUTPUT_JSON
];

//create message object
$message = new Message(
    [
        'message'  => 'The message',
        'title'    => 'The title',
        'priority' => Message::PRIORITY_EMERGENCY,
        'sound'    => Message::SOUND_GAME
    ],
    $credentials
);

//USING THE WRAPPER:
//get API section:
$api = Api::GetApiSection(
    Api::SECTION_PUSH,//get push section,
    $apiSettings
);

//push message
$response = $api->pushMessage($message);

//check receipt, alternative way of creating API wrapper:
$api = new Receipt($apiSettings);

//get the receipt for the response
$receipt = $api->getReceipt(
    $response,
    $credentials
);

```

Bascially, this example serves to show that, after constructing the `Credentials` class, the use of the API is pretty
straightforward. After all things have been set up, it's a simple matter of passing through objects.

If anything goes wrong, an appropriate exception will be thrown.

## What can this wrapper do?

Good question. Put simply this is a minimalistic setup which allows you to:

- Push messages (examples/example.php shows you how)
- Validate users, groups and their devices
- Process receipts, if you want to
- Easily extend the functionality (look at the base classes `PushOver\Api` and `PushOver\Model\Data`)

## What can't it do (yet)?

Another good question. Things that are missing from this wrapper (but will be added shortly) are:

- Support for XML formatted responses
- More examples
- Unit tests
- Improve data-model consistency, and make the overall API more consistent

What might be added in the future?

- Better error/exception handling
- Data models should implement the `\Traversable` interface somehow
- A php 5.3 compatible branch??
- ...
{'fraction_non_alphanumeric': 0.09587340986658392, 'fraction_numerical': 0.0012410797393732546, 'mean_word_length': 3.8481203007518796, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 11, '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': '4749747', 'n_tokens_mistral': 909, 'n_tokens_neox': 876, 'n_words': 409}