UNPKG

hellojs-xiaotian

Version:

A clientside Javascript library for standardizing requests to OAuth2 web services (and OAuth1 - with a shim)

94 lines (74 loc) 2.39 kB
--- title: HelloJs Tests layout: default --- <!-- IE7 support --> <script src="../assets/json2/json2.js"></script> <script src="../assets/knockout/dist/knockout.js"></script> <!-- AUTHENTICATION --> <script src="../src/hello.polyfill.js"></script> <script src="../src/hello.js"></script> <script src="../demos/client_ids.js"></script> <script> // // hello.all.js // Load all modules function loadModule(a){ for(var i=0;i<a.length;i++){ document.write('<script src="../src/modules/'+a[i]+'"><\/script>'); } } loadModule([ 'facebook.js', 'flickr.js', 'google.js', 'windows.js', 'dropbox.js', 'twitter.js', 'yahoo.js', 'instagram.js', 'joinme.js', 'linkedin.js', 'foursquare.js', 'github.js', 'soundcloud.js', 'joinme.js', 'vk.js' ]); </script> <body class="adorn-fullscreen"> <header> <h1>hello.js endpoint tests</h1> </header> <blockquote> <ol> <li>Select the scope of the services you want to test <li>Click the sign-in buttons along the top of the table, and give consent to the application <li>Click the <button class="run"></button> to run a test <li>Click on the <button class="response passed"></button> or <button class="response error"></button> response buttons to view the data </ol> </blockquote> <h2>hello( x ).<b>login</b>( [ options ] [, callback] )</h2> <div data-bind="template: { name: 'tests-template', data: { test : $root, filter:'login' } }"></div> <h2>hello( x ).<b>logout</b>([ callback ])</h2> <div data-bind="template: { name: 'tests-template', data: { test : $root, filter:'logout' } }"></div> <h2>hello( x ).<b>getAuthResponse</b>()</h2> <div data-bind="template: { name: 'tests-template', data: { test : $root, filter:'getAuthResponse' } }"></div> <h2>hello( x ).<b>api</b>( path [, method ][, data ][, callback ] )</h2> <div data-bind="template: { name: 'tests-template', data: { test : $root, filter:'api' } }"></div> <!-- Tests --> <script src="../assets/index.js"></script> <script type="text/html" id="tests-template"></script> <script type="text/javascript"> // Initiate the library hello.init(CLIENT_IDS_ALL,{ redirect_uri: '../redirect.html', oauth_proxy: OAUTH_PROXY_URL }); getText('../assets/test_network.html', function(response){ document.getElementById('tests-template').text = response; ko.applyBindings(model); }); </script> </body> </html>