Skip to content

A java implementation of the pubsubhubbub created by google

License

Notifications You must be signed in to change notification settings

Taahh/Java-PubSubHubbub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java-PubSubHubbub

This tool is an implementation of the PubSubHubbub protocol created by Google. Information can be found @ https://developers.google.com/youtube/v3/guides/push_notifications Basically, the Hub Url (currently defaulted to https://pubsubhubbub.appspot.com) will send a GET request to the spring server and the server will return the hub.challenge parameter provided in the GET request. Once done, the hub returns a 202 Approved and will send POST requests when a topic's feed is updated.

Basics

PSHServer server = PSHServer.create(MainClass.class, "external / public ip here", port);
server.subscribe("topic / youtube url, can be found on the above link");

Events

Current events are:

How to use Events

In any class, you may add a method such as:

@WebEvent
public void onFeedEvent(FeedEvent event)
{
  System.out.println(event.getFeed());
}

@WebEvent
public void onSubscriptionEvent(SubscriptionEvent event)
{
  System.out.println(event.getFeed());
}

@WebEvent
public void onFeedEvent(ValidationRequestEvent event)
{
  System.out.println(event.isSuccessful());
}

The method names don't matter.

About

A java implementation of the pubsubhubbub created by google

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages