This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
forked from uuumall/gae-java-libpusher
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
committed
May 4, 2010
0 parents
commit 9cf159b
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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 |