Download the PHP package notifea/notifea-php without Composer
On this page you can find all versions of the php package notifea/notifea-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download notifea/notifea-php
More information about notifea/notifea-php
Files in notifea/notifea-php
Package notifea-php
Short Description Pure PHP repository for Notifea services.
License MIT
Homepage https://notifea.com
Informations about the package notifea-php
notifea-php
Pure PHP repository for using Notifea services.
Notifea provides clients very user-friendly way of sending transactional emails and sms to their users.
Install
To install the SDK you need to be using Composer in your project. To install it please see the docs.
After you installed Composer install the SDK
Minimum requirements
This package will require you to use:
- PHP 7.0 or higher
- guzzlehttp/guzzle 6.0 or higher
- ext-json
Usage
All email and sms endpoints are accessed via NotifeaClient. First start by configuring this client.
Your authentication
token can be generated in access-tokens section.
Usage - emails
To interact with email endpoints use EmailService
. First start by instantiating.
Send email
Sending an email can be as simple as using this few lines of code:
$sentEmail
will contain updated Email
object with all interesting information.
Get emails
To get emails, use this piece of code:
$emails
will be a new Collection
containing all returned Email
objects
Get single email
To get a single email entity, only email uuid is needed:
$email
will be an Email
object
Delete email
To delete a single email entity from notifea database, usage of this function is sufficient
$result
will be an either true
on successful deletion or NotifeaException
will be
triggered on any failure (such as email not found)
Usage - sms
To interact with sms endpoints use SmsService
. First start by instantiating.
Send sms
Sending an sms can be as simple as using this few lines of code:
$sentSms
will contain updated Sms
object with all interesting information.
To find out what is your sms_sender_id
go into your Management section of your sms senders.
Get sms
To get all sms, use this piece of code:
$smss
will be a new Collection
containing all returned Sms
objects
Get single sms
To get a single sms entity, only sms uuid is needed:
$sms
will be an Sms
object
Delete sms
To delete a single sms entity from notifea database, this function is sufficient
$result
will be an either true
on successful deletion or NotifeaException
will be
triggered on any failure (such as sms not found)
Usage - sms senders
Since May our customers may interact with sms senders by using SmsSenderService
. This is especially handy if you need to have
different Sender Names shown in your SMS
First start by instantiating.
Create sms sender
Creating an sms sender can be as simple as using this few lines of code:
$createdSmsSender
will contain updated SmsSender
object with all interesting information such as your sms_sender_id that you need for sending SMS.
Get sms senders
To get all sms senders, use this piece of code:
$smsSenders
will be a new Collection
containing all returned SmsSender
objects
Get single sms sender
To get a single sms sender entity, only sms sender uuid is needed:
$smsSender
will be an SmsSender
object
Update sms sender
To update a single sms sender entity, you may use updateSmsSender() method and pass in an SmsSender object with the updated data
Delete sms sender
To delete a single sms sender entity from notifea database, this function is sufficient
$result
will be an either true
on successful deletion or NotifeaException
will be
triggered on any failure (such as sms sender not found)
Community
Contributing
Dependencies are managed through composer
:
Tests can be run via phpunit: