code: function getIdFromUsername (username) {
    var httpOpt = {
      url: '//api.roblox.com/users/get-by-username?username=' + username
    };
    return http(httpOpt)
    .then(function (body) {
      var json = JSON.parse(body);
      var id = json.Id;
      var errorMessage = json.errorMessage;
      var message = json.message;
      if (id) {
        return id;
      } else if (errorMessage || message) {
        throw new Error(errorMessage || message);
      }
    });
  }
docs: Define