2017 © Pedro Peláez
 

library pushed-php-api-client

API client library for Pushed platform

image

pushed/pushed-php-api-client

API client library for Pushed platform

  • Saturday, January 24, 2015
  • by pushed
  • Repository
  • 3 Watchers
  • 3 Stars
  • 3,937 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 3 % Grown

The README.md

Pushed Official PHP API Client

How to Install

  1. Add "pushed/pushed-php-api-client": "dev-master", to your composer.json file at the "require": section. (Find more about composer.), (*1)

  2. Run the composer update pushed/pushed-php-api-client --no-dev command in your shell from your root directory., (*2)

Manual Installation

  1. Download and extract the latest Pushed Official PHP API Client source code to your PHP project., (*3)

  2. Require it in your app using the provided autoloader., (*4)

    require_once "/path/to/Pushed/Pushed.php";
    

Basic Usage

App Notification

$params = [
    'app_key' => 'your_app_key',
    'app_secret' => 'your_app_secret',
    'content' => 'Your notification content',
];

(new Pushed())->push->toApp($params);

Channel Notification

$params = [
    'app_key' => 'your_app_key',
    'app_secret' => 'your_app_secret',
    'content' => 'Your notification content',
    'target_alias' => 'your_channel_alias',
];

(new Pushed())->push->toChannel($params);

User Notification

$params = [
    'app_key' => 'your_app_key',
    'app_secret' => 'your_app_secret',
    'content' => 'Your notification content',
    'target_alias' => 'destination_user_alias',
    'access_token' => 'destination_user_access_token',
];

(new \Pushed())->push->toUser($params);

Pushed-ID Notification

$params = [
    'app_key' => 'your_app_key',
    'app_secret' => 'your_app_secret',
    'content' => 'Your notification content',
    'target_alias' => 'destination_user_alias',
    'pushed_id' => 'destination_user_pushed_id',    
];

(new \Pushed())->push->toUser($params);

About Pushed

Pushed is your personal notification center with super awesome services. The app allows you to receive notifications when something important happens. Learn more aboute Pushed: pushed.co. If you find a bug or you think you can improve this script feel free to reach us at dev@pushed.co., (*5)

Packagist Site: https://packagist.org/packages/pushed/pushed-php-api-client, (*6)

The Versions

24/01 2015

dev-master

9999999-dev https://github.com/pushed/pushed-php-api-client

API client library for Pushed platform

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

notification push pushed