2017 © Pedro Peláez
 

library aweber

The official AWeber API client library.

image

aweber/aweber

The official AWeber API client library.

  • Wednesday, September 13, 2017
  • by johnbrodie
  • Repository
  • 35 Watchers
  • 79 Stars
  • 175,819 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 68 Forks
  • 11 Open issues
  • 8 Versions
  • 6 % Grown

The README.md

This client library has been deprecated.

This library will no longer be supported and does not support OAuth2.

### Please visit our PHP Examples as a reference.

AWeber API PHP Library Build Status

PHP library for easily integrating with the AWeber API., (*1)

Basic Usage:

Refer to demo.php to see a working example of how to authenticate an app and query the API., (*2)

For more complete documentation please refer to: https://labs.aweber.com/docs/php-library-walkthrough, (*3)

Handling Errors:

Sometimes errors happen and your application should handle them appropriately. Whenever an API error occurs an AWeberAPIException will be raised with a detailed error message and documentation link to explain what is wrong., (*4)

You should wrap any calls to the API in a try/except block., (*5)

Common Errors: * Bad request (400 error) * Your application is not authorized (401 error) * Your application has been rate limited (403 error) * Resource not found (404 error) * API Temporarily unavailable (503 error), (*6)

Refer to https://labs.aweber.com/docs/troubleshooting for the complete list, (*7)

Example Below:, (*8)

getAccount($accessKey, $accessSecret);

try {
    $resource = $account->loadFromUrl('/accounts/idontexist');
} catch (AWeberAPIException $exc) {
    print "
  • $exc->type on $exc->url, refer to $exc->message for more info ...
    "; } ?>

    Accessing personally identifiable subscriber data

    In order to view or update the email, name, misc_notes, and ip_address fields of a subscriber, your app must specifically request access to subscriber data. Refer to our documentation at https://labs.aweber.com/docs/permissions for more information on how to be able to access personally identifiable subscriber information., (*9)

    Changelog:

    2017-09-02: v1.1.18 * Fixing issues on the formatting of nested objects on 'application/json' requests * Fixing issue with extra data being sent in header. * Fixing issue to allow the creation of custom fields to be sent as form encoded., (*10)

    2017-08-21: v1.1.17 * Fixing UTF-8 issues on creates, (*11)

    2016-12-16: v1.1.16 * Composer autoload with classmap, (*12)

    2016-11-09: v1.1.15 * Create AWeberEntry for Broadcast Entry endpoint, (*13)

    2015-02-17: v1.1.13 * Remove double encoding in requests to support utf-8, (*14)

    2014-02-05: v1.1.12 * Add composer file., (*15)

    2013-04-25: v1.1.11 * Fixed a bug in the Collection Find Subscriber method where fetching the next page in the collection had not included the previous search parameters., (*16)

    • We've changed how we store collection data internally in AWeberCollection objects to reduce the amount of memory required for large collections., (*17)

      To lower memory usage, the AWeberCollection only stores a single page of entries as you iterate thru the collection., (*18)

      • foreach and sequential array indexing operations now require less memory., (*19)

      • Random access of array elements by indexes will fetch pages of the collection from the API on demand if the collection data is not already in memory., (*20)

    2013-02-07: v1.1.10 * Updated APIUnreachableException to provide more diagnostic data., (*21)

    2013-01-03: v1.1.9 * Updated client library to support 1.0.17 of the API. (Broadcast Statistics), (*22)

    2012-12-13: v1.1.8 * Fixed a bug that resulted in Exceptions being raised when using collections when the collection size is zero., (*23)

    2012-12-10: v1.1.7 * Added a parameter to the Move Subscriber method for last followup message number sent. * to support version 1.0.16 of the API. See https://labs.aweber.com/docs/changelog, (*24)

    2012-09-19: v1.1.6 * Fixed a bug that prevented resource attributes from being saved when the initial value of the resource attribute was null. * used array_key_exists instead of isset for evaluation of associative arrays. Requires PHP >= 4.0.7, (*25)

    2012-07-05: v1.1.5 * Fixed a bug were a utf8_encode notice was raised when updating subscriber custom field values., (*26)

    2012-05-08: v1.1.4 Some API Developers have reported AWeberOAuthDataMissing exceptions when using the demo.php script. This error message is not helpful as the typical cause for this exception is an invalid consumer key or secret., (*27)

    The client library has been refactored to always raise an AWeberAPIException when a 40x/50x http status code response is returned. This exception will clearly indicate the cause of the error for easier troubleshooting. * Refactored makeRequest to always raise an AWeberAPIException when a 40x or 50x status is returned. * Refactored makeRequest to indicate transient networking or firewall connectivity issues. * Refactored mock adaptor makeRequest for testing to behave the same way as the real makeRequest does., (*28)

    2012-04-18: v1.1.3, (*29)

    • Removed usage of deprecated split function.

    2011-12-23: v1.1.2, (*30)

    • Fixed a bug in the AWeberCollection class to properly set the URL of entries found in collections.

    2011-10-10: v1.1.1, (*31)

    • Raise an E_USER_WARNING instead of a fatal error if multiple instances of the client library are installed.

    2011-08-29: v1.1.0, (*32)

    • Modified client library to raise an AWeberAPIException on any API errors (HTTP status >= 400)
    • Refactored tests for better code coverage
    • Refactored move and create methods to return the resource or raise an AWeberAPIException on error.
    • Added getActivity method to a subscriber entry.

    Running Tests:

    Testing the PHP api library requires installation of a few utilities., (*33)

    Requirements

    Apache Ant is used to run the build targets in the build.xml file. Get the latest version., (*34)

    Setup /etc/php.ini configuration file. Make sure include_path contains the correct directories.(/usr/lib/php on MacOS) Set date.timezone to your local timezone., (*35)

    Execute Tests

    Once the above requirements are installed, make sure to run composer install, this will ensure all the test dependencies are installed., (*36)

    Run the tests from the base directory using the command: ant., (*37)

    Individual test can be run by specifying ant targets: ant phpunit, ant phpcs., (*38)

  • The Versions

    09/11 2016

    v1.1.15

    1.1.15.0 https://www.aweber.com

    The official AWeber API client library.

      Sources   Download

    GPL-2.0

    api email client

    19/02 2015

    dev-bump

    dev-bump https://www.aweber.com

    The official AWeber API client library.

      Sources   Download

    GPL-2.0

    api email client

    19/02 2015

    v1.1.14

    1.1.14.0 https://www.aweber.com

    The official AWeber API client library.

      Sources   Download

    GPL-2.0

    api email client

    05/02 2014

    v1.1.12

    1.1.12.0 https://www.aweber.com

    The official AWeber API client library.

      Sources   Download

    GPL-2.0

    api email client