Are you the ultimate hacker for good?

We are beyond excited to announce that this year Pusher is a global BattleHack partner along with Twitter, Sendgrid, Twilio and others.

If you haven’t yet heard, BattleHack is a series of global hackathons organised by PayPal. From Tokyo to Athens, London to Berlin, the best of the best will be hacking on beyond-imaginable projects. Amazing talented crowds, awesome venues, love from partners and tons of treats and prizes – no doubts here – this is an opportunity not to be missed.

First place winners in each city will get a pretty epic axe, as well as flights and accommodation to attend the World Finals in Silicon Valley, and a chance to win $100K USD.

We will be there to cheer and support you in the following cities: London, Athens, Tokyo, Berlin, Venice, Toronto, New York, Stockholm and Tel Aviv.

How you can use Pusher at BattleHack

Pusher is an evented Pub/Sub platform that can easily be integrated into any technology stack. You can effortlessly add notifications, activity streams, real-time data visualizations, chat and collaborative experiences using our APIs and libraries.

Not only that, but we’re a perfect partner with many of the other BattleHack partner APIs. Anytime you interact with a partner API or get data back from an API you can instantly push that data to client devices using Pusher. For example, an incoming SMS or a phone call from Twilio, an email via SendGrid, Tweets from Twitter, Push location data from BLEep or BlueCats beacons.

The great thing is that using Pusher is as easy as 6 lines of code.

When an interaction, data change or event occurs within the app you’re building, you trigger an event on a channel using Pusher. Let’s take an incoming email WebHook interaction from SendGrid and using the Inbound Parse WebHook as an example:

// Create Pusher instance using app credentials
var pusher = new Pusher(appConfig);

// Handle WebHook from SendGrid
app.post('/sendgrid', function(req, res) {
var email = {
from: req.body.from,
to: req.body.to,
subject: req.body.subject,
text: req.body.text
};

// Trigger an event sending the email to anybody subscribing to
// the 'sendgrid-email' channel and bound to the 'got-mail' event
pusher.trigger('sendgrid-email, 'got-mail', email);
});

On the client you subscribe to the channel the event will be triggered on and bind to the event to receive the data:

// Connect
var pusher = new Pusher(appKey);

// Subscribe
var channel = pusher.subscribe('sendgrid-email');

// Bind
channel.bind('got-mail', function(email) {
// Add to UI
});

You can see how easy it is to do something similar with a Twilio SMS or incoming phone call WebHook, a Braintree payment WebHook or anywhere else you see events occurring within your apps; from system interactions like WebHooks to user interactions where somebody clicks a button in a UI.

We have libraries for Ruby, PHP, Python, Node.js, Java, .NET, JavaScript (browser), Android and iOS so no matter what your tech stack of choice is, we have an option for you.

Of course, we’ll also be at most of the events to help you out. So please grab us if we can help you with anything. Anything at all!

Register for BattleHack

BattleHack is the hottest hack around, so don’t delay – sign up now! Registration is open 24/7.

Good luck and we’re looking forward to see you soon!

About Olga Dukova

At Pusher Olga looks after all things events: from hackathons to workshops, conferences and drinkups. Born in Russia, bred in Spain, based in London. Intrigued by everything new and unknown. A massive fan of typography, the IoT, Clojure and French Bulldogs.

Latest Posts By Olga Dukova