GithubHelp home page GithubHelp logo

dalalsunil1986 / gae-java-libpusher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sophea/gae-java-libpusher

0.0 0.0 0.0 105 KB

A Java Google App Engine library for the Pusher REST API (http://www.pusherapp.com)

Java 100.00%

gae-java-libpusher's Introduction

Pusher Java classes for Google App Engine

This Java classes can be used to communicate very easily with the Pusher REST API (http://www.pusherapp.com) from any Google App engine Web application.

Get Started

Simply replace the Pusher specific constants in Pusher.java:

private final static String pusherApplicationId = "";

private final static String pusherApplicationKey = "";

private final static String pusherApplicationSecret = "";

Call one of the two available static methods called "triggerPush" and pass channel name, event name and the message body (JSON encoded data) as parameters:

Pusher.triggerPush("test_channel", "my_event", jsonData);

The second "triggerPush" method provides an additional parameter for the socket_id:

Pusher.triggerPush("test_channel", "my_event", jsonData, socketId);

That's it.

Default values

Sometimes it can be very convenient to prepulate a PusherRequest instance with default channel and/or event name:

PusherRequest p = new PusherRequest("test_channel","my_event");

To send a request to the Pusher API just call "triggerPush" on this instance:

p.triggerPush(jsondata);

License

Copyright 2010, Stephan Scheuermann. Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php

gae-java-libpusher's People

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.