2017 © Pedro Peláez
 

library urbanairship

Urban Airship PHP Library

image

urbanairship/urbanairship

Urban Airship PHP Library

  • Wednesday, March 28, 2018
  • by robotadam
  • Repository
  • 101 Watchers
  • 35 Stars
  • 139,693 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 37 Forks
  • 1 Open issues
  • 8 Versions
  • 5 % Grown

The README.md

Airship PHP Library

PHP library for use with the Airship REST API for sending notifications. Supports iOS, Android, Amazon, and Windows., (*1)

Airship is no longer actively developing this library, but will respond to feature requests, issues, and pull requests when they are submitted via https://support.airship.com. This library is provided as sample code, and Airship makes no guarantees as to completeness or regularity of updates. However, we do welcome pull requests with a signed contribution agreement <https://docs.google.com/forms/d/e/1FAIpQLScErfiz-fXSPpVZ9r8Di2Tr2xDFxt5MgzUel0__9vqUgvko7Q/viewform>__., (*2)

Requirements

PHP >= 5.3, (*3)

Dependencies, (*4)

  • Composer
  • Httpful
  • Monolog

Development Dependencies, (*5)

PHPUnit, (*6)

Example Usage

<?php

require_once 'vendor/autoload.php';

use UrbanAirship\Airship;
use UrbanAirship\AirshipException;
use UrbanAirship\UALog;
use UrbanAirship\Push as P;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;

UALog::setLogHandlers(array(new StreamHandler("php://stdout", Logger::DEBUG)));

$airship = new Airship("<app key>", "<master secret>");

try {
    $response = $airship->push()
        ->setAudience(P\iosChannel("Insert your iOS channel here!"))
        ->setNotification(P\notification("Hello from PHP"))
        ->setDeviceTypes(P\deviceTypes("ios"))
        ->send();
} catch (AirshipException $e) {
    print_r($e);
}

Resources

The Versions

29/11 2014
24/09 2013
22/08 2013
21/08 2013
23/07 2013