static void Main(string[] args) { PlayerProfile currentPlayer; PlayerAuthentication.baseWebAddress = "http://*****:*****@itsligo.ie", "itsPaul$1"); if (logged) { currentPlayer = PlayerAuthentication.getPlayerProfile(); //Console.WriteLine("Token acquired {0}", PlayerAuthentication.PlayerToken); List <GameScoreObject> scores = PlayerAuthentication.getScores(4, "Battle Call"); foreach (var item in scores) { Console.WriteLine("Game {0} {1} Score for {1} is {3}", item.GameId, item.GameName, item.GamerTag, item.score); } if (currentPlayer != null) { PlayerAuthentication.PostScore(new PlayerScoreObject { GameId = scores.First().GameId, PlayerId = currentPlayer.id, score = r.Next(900, 1000) }); } Console.WriteLine("Top 4 scores After New score Added"); foreach (var item in PlayerAuthentication.getScores(4, "Battle Call")) { Console.WriteLine("After New score Game {0} {1} Score for {1} is {3}", item.GameId, item.GameName, item.GamerTag, item.score); } } else { Console.WriteLine("Failed to acquire Token "); } Console.ReadKey(); }
public MainViewModel() { PlayerAuthentication.baseWebAddress = "http://*****:*****@itsligo.ie", "itsPaul$1")) { currentPlayer = PlayerAuthentication.getPlayerProfile(); } list = PlayerAuthentication.getScores(4, "Battle Call"); }
public bool login(string username, string password) { if (PlayerAuthentication.login(username, password)) { _token = PlayerAuthentication.PlayerToken; currentPlayer = PlayerAuthentication.getPlayerProfile(); return(true); } return(false); }
public PlayerInfoViewModel() { if (DesignerProperties.GetIsInDesignMode( new System.Windows.DependencyObject())) { return; } PlayerAuthentication.baseWebAddress = "http://*****:*****@itsligo.ie", "itsPaul$1")) { currentPlayer = PlayerAuthentication.getPlayerProfile(); } }
static void Main(string[] args) { PlayerProfile currentPlayer; //Added the URL for the Web App that is depolyed to Azure... PlayerAuthentication.baseWebAddress = "http://rtjjmonogameserver.azurewebsites.net/";// "http://*****:*****@itsligo.ie", "itsPaul$1"); if (logged) { currentPlayer = PlayerAuthentication.getPlayerProfile(); //Console.WriteLine("Token acquired {0}", PlayerAuthentication.PlayerToken); List <GameScoreObject> scores = PlayerAuthentication.getScores(4, "Battle Call"); foreach (var item in scores) { Console.WriteLine("Game {0} {1} Score for {1} is {3}", item.GameId, item.GameName, item.GamerTag, item.score); } if (currentPlayer != null) { PlayerAuthentication.PostScore(new PlayerScoreObject { GameId = scores.First().GameId, PlayerId = currentPlayer.Id, score = r.Next(900, 1000) }); } Console.WriteLine("Top 4 scores After New score Added"); foreach (var item in PlayerAuthentication.getScores(4, "Battle Call")) { Console.WriteLine("After New score Game {0} {1} Score for {1} is {3}", item.GameId, item.GameName, item.GamerTag, item.score); } } else { Console.WriteLine("Failed to acquire Token "); } ExternalGameObject gameInfo = PlayerAuthentication.getExtGame(1); Console.WriteLine(" Name: {0} \n Summary {1} \n Image URL : {2}", gameInfo.Name, gameInfo.Summary, gameInfo.Cover); Console.ReadKey(); }