title: Riot API call Node.js
body: <p>js server running some basic api calls from riot.developer. 
  I'm planning on having the match history and stats for each summoner/game available. For this I assume I need the match id's. </p>
  
  <p>I've got a couple of the calls working but seem to have hit a block with this one. Probably staring at my screen for too long!
  Here is my code for the specific request, for clarity, this request is only for the match id's:</p>
  
  <pre><code>function(data, callback) {
      var URL = 'https://euw.api.pvp.net/api/lol/euw/v2.2/matchlist/by-summoner/' + data.id + 'seasons=SEASON2016&amp;beginIndex=0&amp;endIndex=40&amp;api_key=' + api_key;
      request(URL, function (err, response, body) {
          if (response.statusCode == 200) {
              var json = json.parse(body);
              var matchId = 0;
              for (var c = 0; c &lt; json['matches'].length; c++) {
                  data.matches = json['matches'].matchId;
                  data.matches = matchId;
                  console.log(data.matches);
                  callback(null, data);
              }
          } else {
              console.log('line 82');
          }
  
      });
  },
  </code></pre>
  
  <p>I think the problem I'm having is with the way I'm expressing <code>data.matches</code>. Or that there isn't a timeline? </p>
  
  <p><code>data.id</code> and <code>api_key</code> are defined outside of this function and are working correctly. 
  Anyway, thanks for any help you guys might be able to provide.</p>
  
  <p>I should probably mention i have express-handlebars installed.</p>