<commit_before>angular.module('foosey')
  .factory('FooseyService', function($http) 
  {
    var oldUrl = "https://run.blockspring.com/api_v2/blocks/foosey?api_key=<KEY>";
    var url = "http://api.foosey.futbol/app";

	  return {

      // adds a game to the foosey csv
      addGame: function(game)
      {
        data =
        {
          text: game,
          user_name: "app",
          device: "app"
        }
        return $http.post(url, data);
      },

      // get chart data for a player
      charts: function(name)
      {
        data =
        {
          text: "charts " + name,
          device: "app"
        }
        return $http.post(url, data);
      },

      // gets a list of players and their elo ratings
      leaderboard: function()
      {
        data = 
        {
          text: 'leaderboard',
          device: 'app'
        };
        return $http.post(url, data);
      },

      // gets the full game history
      history: function(start, limit)
      {
        data = 
        {
          text: "history " + start + " " + limit,
          device: "app"
        };
        return $http.post(url, data);
      },

      // return a list of players
      players: function()
      {
        data = 
        {
          text: "players",
          device: "app"
        };
        return $http.post(url, data);
      },

      // remove specific game
      remove: function(id)
      {
        data = 
        {
          text: "remove " + id,
          device: "app"
        };
        return $http.post(url, data);
      },

      // get chart data for a player
      teamCharts: function()
      {
        data =
        {
          text: "team",
          device: "app"
        }
        return $http.post(url, data);
      },

      // undo last game
      undo: function()
      {
        data =
        {
          text: "undo"
        }
        return $http.post(url, data);
      }
    }
  });<commit_msg>Fix up the service a wee bit<commit_after>angular.module('foosey')
  .factory('FooseyService', function($http) 
  {
    var url = "http://api.foosey.futbol/app";

	  var service =  {
      addGame: addGame,
      charts: charts,
      leaderboard: leaderboard,
      history: history,
      players: players,
      remove: remove,
      teamCharts: teamCharts,
      undo: undo
    }

    return service;

    // adds a game to the foosey csv
    function addGame(game)
    {
      data =
      {
        text: game,
        user_name: "app",
        device: "app"
      }
      return $http.post(url, data);
    }

    // get chart data for a player
    function charts(name)
    {
      data =
      {
        text: "charts " + name,
        device: "app"
      }
      return $http.post(url, data);
    }

    // gets a list of players and their elo ratings
    function leaderboard()
    {
      data = 
      {
        text: 'leaderboard',
        device: 'app'
      };
      return $http.post(url, data);
    }

    // gets the full game history
    function history(start, limit)
    {
      data = 
      {
        text: "history " + start + " " + limit,
        device: "app"
      };
      return $http.post(url, data);
    }

    // return a list of players
    function players()
    {
      data = 
      {
        text: "players",
        device: "app"
      };
      return $http.post(url, data);
    }

    // remove specific game
    function remove(id)
    {
      data = 
      {
        text: "remove " + id,
        device: "app"
      };
      return $http.post(url, data);
    }

    // get chart data for a player
    function teamCharts()
    {
      data =
      {
        text: "team",
        device: "app"
      }
      return $http.post(url, data);
    }

    // undo last game
    function undo()
    {
      data =
      {
        text: "undo"
      }
      return $http.post(url, data);
    }

  });
{'fraction_non_alphanumeric': 0.12461380020597322, 'fraction_numerical': 0.00025746652935118434, 'mean_word_length': 1.3221757322175731, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '485495', 'n_tokens_mistral': 1239, 'n_tokens_neox': 1197, 'n_words': 300}