Skip to content

Commit

Permalink
Merge pull request #5 from im-perativa/patch-1
Browse files Browse the repository at this point in the history
Update README.md to match PHP SDK README.md
  • Loading branch information
unicodeveloper authored Feb 21, 2024
2 parents 80187f3 + c17c5cb commit 8b6b039
Showing 1 changed file with 76 additions and 3 deletions.
79 changes: 76 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@

* [Installation](#installation)
* [Usage](#usage)
* [Novu API Reference](https://docs.novu.co/api-reference/)
* [In-App Notifications](#in-app-notification-center)
* [Events](#events)
* [Subscribers](#subscribers)
* [Topics](#topics)
* [Activity](#activity)
* [Integrations](#integrations)
* [Layouts](#layouts)
* [Notifications](#notifications)
* [Notification Templates](#notification-templates)
* [Notification Groups](#notification-groups)
Expand All @@ -35,6 +37,7 @@
* [Feeds](#feeds)
* [Messages](#messages)
* [Execution Details](#execution-details)
* [Tenants](#tenants)
* [Validate the MX Record setup for Inbound Parse functionality](#validate-the-mx-record-setup-for-inbound-parse-functionality)
* [Configuration](#configuration)
* [License](#license)
Expand Down Expand Up @@ -258,14 +261,32 @@ $subscribers = Novu::getSubscriberList();

// Create subscriber & get the details of the recently created subscriber returned.
$subscriber = Novu::createSubscriber([
'subscriberId' => 'YOUR_SYSTEM_USER_ID>',
'subscriberId' => '<YOUR_SYSTEM_USER_ID>',
'email' => '<insert-email>', // optional
'firstName' => '<insert-firstname>', // optional
'lastName' => '<insert-lastname>', // optional
'phone' => '<insert-phone>', //optional
'avatar' => '<insert-avatar>', // optional
])->toArray();

// Bulk create subscribers
$response = Novu::bulkCreateSubscribers([
[
'subscriberId' => '<SUBSCRIBER_IDENTIFIER>',
'email' => '<insert-email>', // optional
'firstName' => '<insert-firstname>', // optional
'lastName' => '<insert-lastname>', // optional
'avatar' => '<insert-avatar>', // optional
],
[
'subscriberId' => '<SUBSCRIBER_IDENTIFIER>',
'email' => '<insert-email>', // optional
'firstName' => '<insert-firstname>', // optional
'lastName' => '<insert-lastname>', // optional
'avatar' => '<insert-avatar>', // optional
],
]);

// Get subscriber
$subscriber = Novu::getSubscriber($subscriberId)->toArray();

Expand Down Expand Up @@ -405,6 +426,39 @@ Novu::deleteIntegration($integrationId);

```

### LAYOUTS

```php
use Novu\Laravel\Facades\Novu;

// filter layouts
Novu::filterLayouts(['pageSize' => 1])->toArray();

// Create layout
Novu::createLayout([
'name' => '<insert-name-of-layout>',
'identifier' => '<insert-identifier>',
'content' => '<insert-html-content>',
])->toArray();

// Get a layout
Novu::getLayout('<insert-layout-id>')->toArray();

// Set Layout as default
Novu::setLayoutAsDefault('<insert-layout-id>');

// Update layout
Novu::updateLayout('<insert-layout-id>', [
'name' => '<insert-name-of-layout>',
'identifier' => '<insert-identifier>',
'content' => '<insert-html-content>',
])->toArray();

// Delete layout
Novu::deleteLayout('<insert-layout-id>');

```

### NOTIFICATIONS

```php
Expand Down Expand Up @@ -581,14 +635,17 @@ Novu::deleteFeed();
use Novu\Laravel\Facades\Novu;

// Get messages
Novu::getMessages();
Novu::getMessages([
'page' => 1,
'channel' => ['<insert-channel>'],
]);

// Delete message
Novu::deleteMessage();

```

## EXECUTION DETAILS
### EXECUTION DETAILS

```php
use Novu\Laravel\Facades\Novu;
Expand All @@ -601,6 +658,22 @@ Novu::getExecutionDetails([

```

### TENANTS

```php
use Novu\Laravel\Facades\Novu;

// Create tenant
Novu::createTenant([
'identifier' => '<identifier>',
'name' => '<name>',
]);

// Get tenants
Novu::getTenants()->toArray();

```

### Validate the MX Record setup for Inbound Parse functionality

```php
Expand Down

0 comments on commit 8b6b039

Please sign in to comment.