GithubHelp home page GithubHelp logo

dropfan / onesignal-server-api Goto Github PK

View Code? Open in Web Editor NEW
15.0 4.0 3.0 41 KB

OneSignal server API for PHP. No third-party dependency that you can use this library in any project or framework.

Home Page: https://dropfan.github.io/onesignal-server-api/

License: MIT License

PHP 100.00%
onesignal onesignal-php push-notifications

onesignal-server-api's Introduction

OneSignal-server-API

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock StyleCI

OneSignal server API for PHP, you can push notifications to any platform. (iOS/APNS, Android/GCM/FCM, WP, Web/Chrome/Safari...etc.)

No third-party dependency that you can use this library in any project or framework.

There are several packages for OneSignal, but some rely on third-party library or certain framework components. That's reason of this project.

Requirements:

You'll need at least PHP 5.6.

Installation:

install via composer:

composer require dropfan/onesignal-server-api

Of course you can clone this project manually then move it into your projects.

git clone https://github.com/DropFan/onesignal-server-api.git

But for simple use,pass parameters by array rather than Object/Class (like ORM), you can move OneSignal.php into your projects only.

Surely, the ORM-style have not been finish. I will finish it later when I have enough time。

Usage:

There are some samples in examples dir.

https://github.com/DropFan/onesignal-server-api/tree/master/examples

You can follow the offical ducumention from OneSignal.

OneSignal API Documention

Contacts:

Author: Tiger(DropFan)

Email: [email protected]

Wechat: DropFan

Telegram: DropFan

https://about.me/DropFan

LICENSE:

MIT License

TODO:

I will complete follow list when I have enough time.

  • OneSignal API wrapper (80%) // not fully test
    • Notifications (100%)
      • create
      • view
      • update
    • Devices (100%)
      • add
      • edit
      • view
    • Apps (100%)
      • create
      • view
      • update
    • Other API (100%)
      • on_session
      • on_purchase
      • on_focus
      • csv_export
      • track open
    • request (via curl) (100%)
    • request (via fsock) (0%) // for non-blocking request
  • Models (50%) // just finish fields and body params, no ORM-style operation)
    • BaseModel
    • Notification
    • Device
    • App
  • ORM-style (1%)
  • PSR-2、PSR-4 (100%)
  • Documents & Comments (about 60%~80%?)
  • PHPUnit (0%)
  • submit to packagist (100%)
  • release 1.0 (coming soon...)
  • release 2.0 // will support ORM operation

onesignal-server-api's People

Contributors

dropfan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

renatosc bobwol

onesignal-server-api's Issues

Error on class OneSignal

Hi.

I tried to use your lib but I am getting the error:

Fatal error: Arrays are not allowed in class constants in /home/datalabs/public_html/tsca/app/OneSignal.php on line 40

which refers to:
const METHODS = ['GET', 'POST', 'PUT', 'DELETE'];

Was your lib working correctly?

PS: Thanks for creating and sharing the lib btw.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.