Skip to content

Commit

Permalink
updated readme, fixed namespacing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mitquinn committed Nov 26, 2021
1 parent f0fd5ac commit 3511b32
Show file tree
Hide file tree
Showing 17 changed files with 97 additions and 84 deletions.
59 changes: 36 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,44 @@
Welcome to Heap Helper
# Heap Helper
[![GitHub issues](https://img.shields.io/github/issues/mitquinn/HeapHelper)](https://github.com/mitquinn/HeapHelper/issues)
[![GitHub stars](https://img.shields.io/github/stars/mitquinn/HeapHelper)](https://github.com/mitquinn/HeapHelper/stargazers)
[![GitHub license](https://img.shields.io/github/license/mitquinn/HeapHelper)](https://github.com/mitquinn/HeapHelper/blob/master/LICENSE.md)

This is a composer package the assists with the Heap server side API.
## Description
Heap Helper is a simple wrapper for the Heap server side API.

Developed by:
Mitchell Quinn <mdq2@live.com>
Heap Helper provides:
* simple integration with the Heap server side API.
* wrapper for the Heap API endpoints.
* individual resources that the API is expecting to be provided.

You can learn more about Heap here: https://heapanalytics.com/

```php
$configuration = new \Mitquinn\HeapHelper\HeapConfiguration('apiKey', 'appId');
$heapHelper = new \Mitquinn\HeapHelper\HeapHelper($configuration);

$event = new \Mitquinn\HeapHelper\Resources\HeapEvent(
'eventName',
'alice@example.com',
['propertyKey' => 'propertyValue']
);

$heapResponse = $heapHelper->track($event);
```

## Installation
The recommended way to install Heap Helper is through [Composer.](https://getcomposer.org/)
```
composer require mitquinn/heap-helper
```

## License
Heap Helper is made available under the GNU General Public License (GNU). Please see the [License File](https://github.com/mitquinn/HeapHelper/blob/master/LICENSE.md) for more information.

## Contributors

* Sponsor - Mitchell Quinn - [<mitchell.david.quinn@gmail.com>](mailto:mitchell.david.quinn@gmail.com)


Main Work TODO:
* AddUserProperties API
* AddUserProperties Resource
* BulkAddUserProperties API
* BulkAddUserProperties Resource
* AddAccountProperties API
* User Deletion API
* Auth API

Testing Work TODO:
* Event Resource
* Events Resource
* AddUserProperties API
* AddUserProperties Resource
* BulkAddUserProperties API
* BulkAddUserProperties Resource
* AddAccountProperties API
* User Deletion API
* Auth API


2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"autoload": {
"psr-4": {
"Mquinn\\HeapHelper\\": "src/"
"Mitquinn\\HeapHelper\\": "src/"
}
},
"minimum-stability": "stable"
Expand Down
26 changes: 13 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/HeapConfiguration.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Mquinn\HeapHelper;
namespace Mitquinn\HeapHelper;

class HeapConfiguration
{
Expand Down
16 changes: 8 additions & 8 deletions src/HeapHelper.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php

namespace Mquinn\HeapHelper;
namespace Mitquinn\HeapHelper;

use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
use Mquinn\HeapHelper\Interfaces\HeapHelperInterface;
use Mquinn\HeapHelper\Resources\HeapAccount;
use Mquinn\HeapHelper\Resources\HeapAccounts;
use Mquinn\HeapHelper\Resources\HeapEvent;
use Mquinn\HeapHelper\Resources\HeapEvents;
use Mquinn\HeapHelper\Resources\HeapUser;
use Mquinn\HeapHelper\Resources\HeapUsers;
use Mitquinn\HeapHelper\Interfaces\HeapHelperInterface;
use Mitquinn\HeapHelper\Resources\HeapAccount;
use Mitquinn\HeapHelper\Resources\HeapAccounts;
use Mitquinn\HeapHelper\Resources\HeapEvent;
use Mitquinn\HeapHelper\Resources\HeapEvents;
use Mitquinn\HeapHelper\Resources\HeapUser;
use Mitquinn\HeapHelper\Resources\HeapUsers;
use PHPUnit\Util\Xml\ValidationResult;
use Psr\Http\Client\ClientExceptionInterface;
use Psr\Http\Client\ClientInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/HeapResponse.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Mquinn\HeapHelper;
namespace Mitquinn\HeapHelper;

use GuzzleHttp\Psr7\Response;
use Psr\Http\Message\ResponseInterface;
Expand Down
16 changes: 8 additions & 8 deletions src/Interfaces/HeapHelperInterface.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace Mquinn\HeapHelper\Interfaces;
namespace Mitquinn\HeapHelper\Interfaces;

use Mquinn\HeapHelper\HeapResponse;
use Mquinn\HeapHelper\Resources\HeapAccount;
use Mquinn\HeapHelper\Resources\HeapAccounts;
use Mquinn\HeapHelper\Resources\HeapEvent;
use Mquinn\HeapHelper\Resources\HeapEvents;
use Mquinn\HeapHelper\Resources\HeapUser;
use Mquinn\HeapHelper\Resources\HeapUsers;
use Mitquinn\HeapHelper\HeapResponse;
use Mitquinn\HeapHelper\Resources\HeapAccount;
use Mitquinn\HeapHelper\Resources\HeapAccounts;
use Mitquinn\HeapHelper\Resources\HeapEvent;
use Mitquinn\HeapHelper\Resources\HeapEvents;
use Mitquinn\HeapHelper\Resources\HeapUser;
use Mitquinn\HeapHelper\Resources\HeapUsers;

interface HeapHelperInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Interfaces/HeapResourceInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Mquinn\HeapHelper\Interfaces;
namespace Mitquinn\HeapHelper\Interfaces;

interface HeapResourceInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/Resources/HeapAccount.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Mquinn\HeapHelper\Resources;
namespace Mitquinn\HeapHelper\Resources;

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Pure;
use Mquinn\HeapHelper\Interfaces\HeapResourceInterface;
use Mquinn\HeapHelper\Traits\HasProperties;
use Mitquinn\HeapHelper\Interfaces\HeapResourceInterface;
use Mitquinn\HeapHelper\Traits\HasProperties;

class HeapAccount implements HeapResourceInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/HeapAccounts.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Mquinn\HeapHelper\Resources;
namespace Mitquinn\HeapHelper\Resources;

use JetBrains\PhpStorm\Pure;
use Mquinn\HeapHelper\Interfaces\HeapResourceInterface;
use Mitquinn\HeapHelper\Interfaces\HeapResourceInterface;

class HeapAccounts implements HeapResourceInterface
{
Expand Down
8 changes: 4 additions & 4 deletions src/Resources/HeapEvent.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace Mquinn\HeapHelper\Resources;
namespace Mitquinn\HeapHelper\Resources;


use DateTime;
use InvalidArgumentException;
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Pure;
use Mquinn\HeapHelper\Interfaces\HeapResourceInterface;
use Mquinn\HeapHelper\Traits\HasHeapUserIdentity;
use Mquinn\HeapHelper\Traits\HasProperties;
use Mitquinn\HeapHelper\Interfaces\HeapResourceInterface;
use Mitquinn\HeapHelper\Traits\HasHeapUserIdentity;
use Mitquinn\HeapHelper\Traits\HasProperties;

class HeapEvent implements HeapResourceInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/HeapEvents.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Mquinn\HeapHelper\Resources;
namespace Mitquinn\HeapHelper\Resources;

use JetBrains\PhpStorm\Pure;
use Mquinn\HeapHelper\Interfaces\HeapResourceInterface;
use Mitquinn\HeapHelper\Interfaces\HeapResourceInterface;

class HeapEvents implements HeapResourceInterface
{
Expand Down
8 changes: 4 additions & 4 deletions src/Resources/HeapUser.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace Mquinn\HeapHelper\Resources;
namespace Mitquinn\HeapHelper\Resources;

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Pure;
use Mquinn\HeapHelper\Interfaces\HeapResourceInterface;
use Mquinn\HeapHelper\Traits\HasHeapUserIdentity;
use Mquinn\HeapHelper\Traits\HasProperties;
use Mitquinn\HeapHelper\Interfaces\HeapResourceInterface;
use Mitquinn\HeapHelper\Traits\HasHeapUserIdentity;
use Mitquinn\HeapHelper\Traits\HasProperties;

class HeapUser implements HeapResourceInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/HeapUsers.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Mquinn\HeapHelper\Resources;
namespace Mitquinn\HeapHelper\Resources;

use JetBrains\PhpStorm\Pure;
use Mquinn\HeapHelper\Interfaces\HeapResourceInterface;
use Mitquinn\HeapHelper\Interfaces\HeapResourceInterface;

class HeapUsers implements HeapResourceInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/HasHeapUserIdentity.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Mquinn\HeapHelper\Traits;
namespace Mitquinn\HeapHelper\Traits;

use InvalidArgumentException;

Expand Down
2 changes: 1 addition & 1 deletion src/Traits/HasProperties.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Mquinn\HeapHelper\Traits;
namespace Mitquinn\HeapHelper\Traits;

use InvalidArgumentException;

Expand Down
18 changes: 9 additions & 9 deletions tests/HeapHelperTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

use Mquinn\HeapHelper\HeapConfiguration;
use Mquinn\HeapHelper\HeapHelper;
use Mquinn\HeapHelper\Resources\HeapAccount;
use Mquinn\HeapHelper\Resources\HeapAccounts;
use Mquinn\HeapHelper\Resources\HeapEvent;
use Mquinn\HeapHelper\Resources\HeapEvents;
use Mquinn\HeapHelper\Resources\HeapUser;
use Mquinn\HeapHelper\Resources\HeapUsers;
use Mitquinn\HeapHelper\HeapConfiguration;
use Mitquinn\HeapHelper\HeapHelper;
use Mitquinn\HeapHelper\Resources\HeapAccount;
use Mitquinn\HeapHelper\Resources\HeapAccounts;
use Mitquinn\HeapHelper\Resources\HeapEvent;
use Mitquinn\HeapHelper\Resources\HeapEvents;
use Mitquinn\HeapHelper\Resources\HeapUser;
use Mitquinn\HeapHelper\Resources\HeapUsers;
use PHPUnit\Framework\TestCase;
use Psr\Http\Client\ClientExceptionInterface;

Expand All @@ -34,7 +34,7 @@ protected function setUp(): void
$apiKey = $_SERVER['HEAP_API_KEY'];

$heapConfiguration = new HeapConfiguration($apiKey, $appId);
$heapHelper = new Mquinn\HeapHelper\HeapHelper($heapConfiguration);
$heapHelper = new Mitquinn\HeapHelper\HeapHelper($heapConfiguration);
$this->setHeapHelper($heapHelper);
}

Expand Down

0 comments on commit 3511b32

Please sign in to comment.