<commit_before>'use strict';

/* Services */

/* Official domain*/
//var domainUrl = 'http://2-dot-smg-server.appspot.com';
//var domainUrl = 'http://3-dot-smg-server.appspot.com';
/* Container test domain */
//var domainUrl = 'http://2-dot-smg-server-rl.appspot.com';
// Self container test domain 1 */
//var domainUrl = 'http://2-dot-smg-container-server2.appspot.com/';
var domainUrl = 'http://3-dot-smg-container-server2.appspot.com/';
// Self container test domain 2 */';
//var domainUrl = 'http://2-dot-smg-container-server2.appspot.com/';
//var domainUrl = 'http://3-dot-smg-container-testserver.appspot.com/';

/**
 * For login as a player
 */
smgContainer.factory('PlayerService', ['$resource', function($resource) {
	return $resource(domainUrl + '/players/:playerId',
			{playerId: '@playerId', password: <PASSWORD>'}//,
			//{register: {method:'POST', params:{}, headers:{'Content-Type': 'application/json'},  isArray:false}}
	);
}]);

/**
 * To get the game info
 */
smgContainer.factory('GetGameInfoService', ['$resource', function($resource) {
	return $resource(domainUrl + '/games/:gameId',
			{gameId: '@gameId'}
	);
}]);

/**
 * To get a player's info
 */
smgContainer.factory('GetPlayerInfoService', ['$resource', function($resource) {
	return $resource(domainUrl + '/playerInfo',
			{playerId: '@playerId', targetId: '@targetId', accessSignature: '@accessSignature'}
	);
}]);

/**
 * To join a queue for auto match through Channel API
 */
smgContainer.factory('joinQueueService', ['$resource', function($resource) {
	return $resource(domainUrl + '/queue',
			{}
	);
}]);

/**
 * To insert a match to the server. Also to get new match info (asynchronous mode)
 */
smgContainer.factory('NewMatchService', ['$resource', function($resource) {
	return $resource(domainUrl + '/newMatch:playerId',
			{playerId: '@playerId', accessSignature: '@accessSignature'}
	);
}]);

/**
 * To get the new state from the server (asynchronous mode)
 */
smgContainer.factory('NewMatchStateService', ['$resource', function($resource) {
	return $resource(domainUrl + '/state:matchId',
			{matchId: '@matchId', playerId: '@playerId', accessSignature: '@accessSignature'}
	);
}]);

/**
 * To get match info
 */
/*smgContainer.factory('GetMatchInfoService', ['$resource', function($resource) {
 return $resource(domainUrl + '/matches/:matchId',
 {matchId: '@matchId', accessSignature: '@accessSignature', playerId: '@playerId'}
 );
 }]);*/

/**
 * To login as a developer
 */
/*smgContainer.factory('DevService', ['$resource', function($resource) {
 return $resource(domainUrl + '/developers/:developerId',
 {developerId: '@developerId', password: <PASSWORD>'}
 );
 }]);*/

/**
 * To submit a game
 */
/*
 smgContainer.factory('UploadGameService', ['$resource', function($resource) {<commit_msg>Fixed some typo in services.js<commit_after>'use strict';

/* Services */

/* Official domain*/
//var domainUrl = 'http://2-dot-smg-server.appspot.com';
//var domainUrl = 'http://3-dot-smg-server.appspot.com';
/* Container test domain */
//var domainUrl = 'http://2-dot-smg-server-rl.appspot.com';
// Self container test domain 1 */
//var domainUrl = 'http://2-dot-smg-container-server2.appspot.com/';
var domainUrl = 'http://3-dot-smg-container-server2.appspot.com/';
// Self container test domain 2 */';
//var domainUrl = 'http://2-dot-smg-container-server2.appspot.com/';
//var domainUrl = 'http://3-dot-smg-container-testserver.appspot.com/';

/**
 * For login as a player
 */
smgContainer.factory('PlayerService', ['$resource', function($resource) {
	return $resource(domainUrl + '/players/:playerId',
			{playerId: '@playerId', password: <PASSWORD>'}//,
			//{register: {method:'POST', params:{}, headers:{'Content-Type': 'application/json'},  isArray:false}}
	);
}]);

/**
 * To get the game info
 */
smgContainer.factory('GetGameInfoService', ['$resource', function($resource) {
	return $resource(domainUrl + '/games/:gameId',
			{gameId: '@gameId'}
	);
}]);

/**
 * To get a player's info
 */
smgContainer.factory('GetPlayerInfoService', ['$resource', function($resource) {
	return $resource(domainUrl + '/playerInfo',
			{playerId: '@playerId', targetId: '@targetId', accessSignature: '@accessSignature'}
	);
}]);

/**
 * To join a queue for auto match through Channel API
 */
smgContainer.factory('joinQueueService', ['$resource', function($resource) {
	return $resource(domainUrl + '/queue',
			{}
	);
}]);

/**
 * To insert a match to the server. Also to get new match info (asynchronous mode)
 */
smgContainer.factory('NewMatchService', ['$resource', function($resource) {
	return $resource(domainUrl + '/newMatch/:playerId',
			{playerId: '@playerId', accessSignature: '@accessSignature'}
	);
}]);

/**
 * To get the new state from the server (asynchronous mode)
 */
smgContainer.factory('NewMatchStateService', ['$resource', function($resource) {
	return $resource(domainUrl + '/state/:matchId',
			{matchId: '@matchId', playerId: '@playerId', accessSignature: '@accessSignature'}
	);
}]);

/**
 * To get match info
 */
/*smgContainer.factory('GetMatchInfoService', ['$resource', function($resource) {
 return $resource(domainUrl + '/matches/:matchId',
 {matchId: '@matchId', accessSignature: '@accessSignature', playerId: '@playerId'}
 );
 }]);*/

/**
 * To login as a developer
 */
/*smgContainer.factory('DevService', ['$resource', function($resource) {
 return $resource(domainUrl + '/developers/:developerId',
 {developerId: '@developerId', password: <PASSWORD>'}
 );
 }]);*/

/**
 * To submit a game
 */
/*
 smgContainer.factory('UploadGameService', ['$resource', function($resource) {
{'fraction_non_alphanumeric': 0.20142984807864164, 'fraction_numerical': 0.004289544235924933, 'mean_word_length': 4.865828092243187, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '3682446', 'n_tokens_mistral': 1804, 'n_tokens_neox': 1771, 'n_words': 386}