Note that there are some explanatory texts on larger screens.

plurals
  1. POHalo reach stats api?
    primarykey
    data
    text
    <p>Can someone please give me an example of how to access the <a href="http://www.bungie.net/fanclub/statsapi/Group/Resources/Article.aspx?cid=545064" rel="nofollow noreferrer">Halo: Reach stats API</a></p> <p>using jquery ajax?</p> <p>Here is an exert:</p> <blockquote> <p>GetGameHistory(System.String, System.String, System.String, System.String)</p> <p>This function is used to browse through a player's history of games. </p> <p>Parameters</p> <p>identifier: Your application's identifier string. gamertag: The target player's gamertag. variant_class: The variant class of game to get. Valid values are "Campaign", > "Firefight", "Competitive", "Arena", "Invasion", "Custom". Pass "Unknown" to get all games. iPage: The page of results you want, starting at page 0.</p> <p>Return Value A GameHistoryResponse object containing a list of the games matching the criteria you specified.</p> <p>Example <a href="http://www.bungie.net/api/reach/reachapijson.svc" rel="nofollow noreferrer">http://www.bungie.net/api/reach/reachapijson.svc</a> /player/gamehistory/ {identifier}/{gamertag}/{variant_class_string}/{iPage} </p> </blockquote> <p>here was my attempt:</p> <pre><code>var apikey = 'xxx'; var gamertag = 'The Hailwood'; var variant = 'Competitive'; var page = '0'; var url = 'http://www.bungie.net/api/reach/reachapijson.svc/player/gamehistory/'+apikey+'/'+gamertag+'/'+variant+'/'+page; $(document).ready(function() { $.ajax({ url: url, success: function(data) { $('#return').html(data); } }); }); </code></pre> <p>However I get <code>XMLHttpRequest cannot load http://www.bungie.net/api/reach/reachapijson.svc/player/gamehistory/xxx/The%20Hailwood/Competitive/0. Origin http://localhost is not allowed by Access-Control-Allow-Origin.</code></p> <p>What does this mean?</p> <p><hr /><strong>Update:</strong><br /> Ok so I fixed it by setting appropriate permissions.</p> <p>But now I am getting a 400 response from the server.</p> <p>Any idea what would cause this?</p> <p><hr /><strong>Update2:</strong><br /> <strong>API IS NOT OPERATIONAL!</strong> hence why it is not working :(</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload