Code Monkey home page Code Monkey logo

pushpad-php's People

Contributors

collimarco avatar

Stargazers

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

Watchers

 avatar  avatar

pushpad-php's Issues

[Feature request] Check if userid is subscribed

It would be very useful if the library included a simple function check if there's already a subscription with a certain user id.

This would make it possible to check server-side if it is necessary to prompt the user to enable them.

I know it's already possible to check using JS or the REST API but it would be handy for certain scenarios if a simple function for this was included in the PHP library.

curl response and function returns

Currently, neither of the public functions in notification.php return the curl request data, although the private function "deliver" in the class does.
Also, the request currently only returns one line of data, so on line 43:
list($header, $body) = explode("\r\n\r\n", $res, 2);
$body is never set. $res might be all that is needed, currently.

PSR-4 fails on case sensitive systems

The filenames for your class declarations are currently all lowercase, while the classes start with an uppercase letter. This causes psr-4 autoloading to fail for case sensitive file systems (such as centos). Would it be possible to update the class files in /lib/ from

pushpad.php 
notification.php 

to

Pushpad.php
Notification.php

Problem with deliver_to without tags

There is a problem with deliver_to function. I try to use example code, but I got error if I use this function like this:

$notification->deliver_to($user_ids);

I fixed it by calling this function this way:

$notification->deliver_to($user_ids, ["tags" => null]);

In deliver_to function, just before this line (48):

return $this->deliver($this->req_body($uids, $options['tags']), $options);

there should be something like this:

if (!isset($options['tags'])) { $options['tags']=null; }

Can I set TTL

(Translated by Google)

Hello

Is it possible to configure a TTL ( time to live) ?
I mean, how long the notification is waiting to be delivered.
If the time expires, the notification becomes obsolete , and is eliminated

Thank you

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.