Download the PHP package jiririedl/php-sendy without Composer

On this page you can find all versions of the php package jiririedl/php-sendy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-sendy

PHP sendy client

PHP interface for Sendy api (http://sendy.co/) with full support Sendy API (http://sendy.co/api)

Installation

Using composer

Simply add new require jiririedl/php-sendy to your composer.json.

and update in console

Using autoload (alternative dirty way)

If you don't use Composer (for some reasons) you can download and include library bootstrap into your project manually. This wil add spl_autoload for SendyPHP namespace.

Using autoload method (alternative dirty dirty way)

If you have your own solution of class autoloading, there is prepared autload function in /src/autoload.php. Calling includes requested class from SendyPHP namespace or returns FALSE

Usage

Create instance of \SendyPHP\Sendy with URL of your Sendy installation and API key. Your API key is located in sendy - login as Admin and go to "Settings" (/settings) - your key is located in right side under topic "Your API key" beware of white spaces!

Some request doesn't need API key for work (f.e. unsubscribe()) so setting api key is optional. You can also set api key by using setURL().

Methods

Sendy API Requests

All requests uses curl library for calling Sendy API. If you have installed library by using Composer, curl was checked automatically, otherwise you can check this in your phpinfo, or just try to call some method from curl (http://php.net/manual/en/ref.curl.php).

Subscribe

This method adds a new subscriber to a list. You can also use this method to update an existing subscriber.

Parameters
Example
Exceptions

All exceptions are extended from \SendyPHP\Exception so you can easily catch just this parent class

Return values

Returns TRUE on success or FALSE on failure.

UnSubscribe

This method unsubscribes a user from a list.

Parameters
Example
Exceptions

All exceptions are extended from \SendyPHP\Exception so you can easily catch just this parent class

Return values

Returns TRUE on success or FALSE on failure.

Delete

This method deletes a subscriber off a list (only supported in Sendy version 2.1.1.4 and above).

Parameters
Example
Exceptions

All exceptions are extended from \SendyPHP\Exception so you can easily catch just this parent class

Return values

Returns TRUE on success or FALSE on failure.

Get active subscriber count

This method gets the total active subscriber count.

Parameters
Example
Exceptions

All exceptions are extended from \SendyPHP\Exception so you can easily catch just this parent class

Return values

Returns number of active subscribers or FALSE on failure.

Get subscribtion status

This method gets the current status of a subscriber (eg. subscribed, unsubscribed, bounced, complained).

Parameters
Example
Exceptions

All exceptions are extended from \SendyPHP\Exception so you can easily catch just this parent class

Return values

\SendyPHP\Response\SubscriptionStatus returned object has many of usable methods (see phpdoc) f.e. by calling success() are you able to check if API returns some subscribers status.

Create campaign

Creates draft of campaign

Parameters
Example
Exceptions

All exceptions are extended from \SendyPHP\Exception so you can easily catch just this parent class

Return values

Returns TRUE on success or FALSE on failure.

Send campaign

Creates draft and automatically sends campaign

Parameters
Example
Exceptions

All exceptions are extended from \SendyPHP\Exception so you can easily catch just this parent class

Return values

Returns TRUE on success or FALSE on failure.

Other methods

Set cURL option

Sets cURL option You can set cURL options f.e. CURLOPT_SSL_VERIFYPEER or CURLOPT_SSL_VERIFYHOST some parameters (\CURLOPT_RETURNTRANSFER, \CURLOPT_POST, \CURLOPT_POSTFIELDS) are used, if you try to set one of these exception is thrown. See http://php.net/manual/en/function.curl-setopt.php for more informations.

Parameters
Exceptions

\SendyPHP\Exception\UnexpectedValueException is thrown if you try to set one of predefined options (\CURLOPT_RETURNTRANSFER, \CURLOPT_POST and \CURLOPT_POSTFIELDS).

Clear cURL option

Sets cURL option Clears user defined cURL options

Set URL

Sets sendy installation URL Clears user defined cURL options

Exceptions

\SendyPHP\Exception\InvalidURLException is thrown if URL is invalid.

Set API key

Sets api key

Parameters
Exceptions

\SendyPHP\Exception\DomainException is thrown if API key is not string.


All versions of php-sendy with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
lib-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jiririedl/php-sendy contains the following files

Loading the files please wait ....