Last active
July 5, 2017 23:30
-
-
Save odeke-em/c36276fe2cdbf2bbd1951f6a4c7c77e9 to your computer and use it in GitHub Desktop.
Sample usage of rsp for instant/realtime search
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
<script type="text/javascript" src="https://storage.googleapis.com/realsp/rsp.min.js"></script> | |
var resp = new Resp({ | |
"itemId": "searchInput", | |
"apiKey": "fe4123b3-ad36-44f7-9a5b-0ea8c3abc813", | |
"initialSearch": initialKeyword, | |
"onMessage": handleNewData, | |
"onDisconnected": turnOnSpinnerGIF, | |
"onConnected": turnOffSpinnerGIF, | |
"onError": function(err) { | |
console.log('encountered an error', err); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment