Sha256: 336bde294a83277b5fba31bf3e793eac09ae416490bae09491cb249c4b70946f

Contents?: true

Size: 832 Bytes

Versions: 34

Compression:

Stored size: 832 Bytes

Contents

<h2 id="usage">Usage</h2>

<p>In your hypertext (HTML) document using a plain vanilla cross-domain JavaScript
request (using the JSONP technique):</p>

<pre><code>&lt;script&gt;
  function handleGames( json ) {
     // Do something with the returned data
  }
&lt;/script&gt;

&lt;script src="<%= url( '/' ) %>event/en.2012_13/round/2?callback=handleGames"&gt;&lt;/script&gt;
</code></pre>

<p>Or using the jQuery library using the <a href="http://api.jquery.com/jQuery.getJSON"><code>getJSON</code> function</a>:</p>

<pre><code>$.getJSON('<%= url( '/' ) %>event/en.2012_13/round/2?callback=?', function(json) {
  // Do something with the returned data
});
</code></pre>

<p>Note: Add the <code>callback=?</code> query parameter to tell jQuery to use a cross-domain JSONP request.</p>

<p>That’s it.</p>

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
sportdb-1.8.27 lib/sportdb/service/views/_usage.erb
sportdb-1.8.26 lib/sportdb/service/views/_usage.erb
sportdb-1.8.25 lib/sportdb/service/views/_usage.erb
sportdb-1.8.24 lib/sportdb/service/views/_usage.erb
sportdb-1.8.23 lib/sportdb/service/views/_usage.erb
sportdb-1.8.22 lib/sportdb/service/views/_usage.erb
sportdb-1.8.21 lib/sportdb/service/views/_usage.erb
sportdb-1.8.20 lib/sportdb/service/views/_usage.erb
sportdb-1.8.19 lib/sportdb/service/views/_usage.erb
sportdb-1.8.18 lib/sportdb/service/views/_usage.erb
sportdb-1.8.17 lib/sportdb/service/views/_usage.erb
sportdb-1.8.16 lib/sportdb/service/views/_usage.erb
sportdb-1.8.15 lib/sportdb/service/views/_usage.erb
sportdb-1.8.14 lib/sportdb/service/views/_usage.erb
sportdb-1.8.13 lib/sportdb/service/views/_usage.erb
sportdb-1.8.12 lib/sportdb/service/views/_usage.erb
sportdb-1.8.11 lib/sportdb/service/views/_usage.erb
sportdb-1.8.10 lib/sportdb/service/views/_usage.erb
sportdb-1.8.9 lib/sportdb/service/views/_usage.erb
sportdb-1.8.8 lib/sportdb/service/views/_usage.erb