Download the PHP package jacobbennett/sendyphp without Composer

On this page you can find all versions of the php package jacobbennett/sendyphp. 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 sendyphp

SendyPHP

Latest Version on Packagist Total Downloads

A PHP class built to interface with the Sendy API (http://sendy.co)

Installation

Using Composer

Begin by installing this package through Composer. Edit your project's composer.json file to require jacobbennett/sendyphp.

"require": {
    "jacobbennett/sendyphp": "1.3.*"
}

Next, update Composer from the Terminal:

composer update

Non-Composer Installation

Usage

Create an instance of the class while passing in an array including your API key, installation URL, and the List ID you wish to work with.

Methods

After creating a new instance of SendyPHP call any of the methods below

Return Values

The return value of any of these functions will include both a status, and a message to go with that status.

The status is a boolean value of true or false and the message will vary based on the type of action being performed.

I have commented and organized the code so as to be readable, if you have further questions on the status or messages being returned, please refer to the library comments.

subscribe(array $values)

This method takes an array of $values and will attempt to add the $values into the list specified in $list_id

Note: Be sure to add any custom fields to the list in Sendy before utilizing them inside this library. Another Note: If a user is already subscribed to the list, the library will return a status of true. Feel free to edit the code to meet your needs.

unsubscribe($email)

Unsubscribes the provided e-mail address (if it exists) from the current list.

substatus($email)

Returns the status of the user with the provided e-mail address (if it exists) in the current list.

Note: refer to the code or see http://sendy.co/api for the types of return messages you can expect.

subcount()

Returns the number of subscribers to the current list.

createCampaign(array $values)

This method takes an array of $values and will creates a campaign (with an option to send it too).

setListId($list_id) and getListId()

Change or get the list you are currently working with.

Unit tests

All unit tests are located under src/test directory. To run the tests type in the below from the project root.

Ensure that the API keys are setup for testing :


All versions of sendyphp with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
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 jacobbennett/sendyphp contains the following files

Loading the files please wait ....