Created
October 31, 2018 22:26
-
-
Save bgwaltney/582c2042d85eaacc151e358c6027c22c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import Pusher from 'pusher-js/react-native'; | |
| // Enable pusher logging - don't include this in production | |
| Pusher.logToConsole = true; | |
| var pusher = new Pusher('d81f408fe7b6144f2c97', { cluster: 'us2', forceTLS: true }); | |
| var channel = pusher.subscribe('tweets'); //the channel you're subscribing to | |
| channel.bind('new-tweets', function(data) { //listen for the new-tweet event | |
| alert(JSON.stringify(data)); }); | |
| channel.bind('new-voice-actor', function(data) { // listen for the new-voice-actor event | |
| alert(JSON.stringify(data)); }); | |
| /* When the backend part of this is done we will have each setting be an event type. | |
| "Listen to polly immediately" | |
| "Wait up to an hour for a voice actor" | |
| "Wait two hours? etc." */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment