public Task <bool> AssignPlayerAsync(int slot, string userId) { return(request.Create() .Identifier(slot.ToString()) .Method("assign") .AddParameter(userId) .Build() .SendAsync <bool>( ApiRequestTarget.Village, ApiRequestType.Get)); }
public Task <ItemSellResult> SellItemAsync(string userId, Guid itemId, double amount, double pricePerItem) { return(request.Create() .Identifier(userId) .Method("sell") .AddParameter(itemId.ToString()) .AddParameter(((long)amount).ToString()) .AddParameter(((long)pricePerItem).ToString()) .Build() .SendAsync <ItemSellResult>( ApiRequestTarget.Marketplace, ApiRequestType.Get)); }
public Task <AuthToken> AuthenticateAsync(string username, string password) { return(request.Create() .AddParameter("Username", username) .AddParameter("Password", password) .Build() .SendAsync <AuthToken>(ApiRequestTarget.Auth, ApiRequestType.Post)); }
public Task <byte[]> DownloadBackupAsync() { return(request.Create() .Identifier("backup") .Method("download") .Build() .SendAsync <byte[]>(ApiRequestTarget.Admin, ApiRequestType.Get)); }
public Task <RavenNest.Models.Player> PlayerJoinAsync(string userId, string username) { return(request.Create() .Identifier(userId) .AddParameter("value", username) .Build() .SendAsync <RavenNest.Models.Player>( ApiRequestTarget.Players, ApiRequestType.Post)); }
public Task PlayerRemoveAsync(Guid characterId) { if (client.Desynchronized) { return(Task.CompletedTask); } return(request.Create() .AddParameter(characterId.ToString()) .Build() .SendAsync <bool>( ApiRequestTarget.Players, ApiRequestType.Remove)); }
public Task <GameInfo> GetAsync() { return(request.Create().Build().SendAsync <GameInfo>(ApiRequestTarget.Game, ApiRequestType.Get)); }
public Task <ItemCollection> GetAsync() { return(request.Create() .Build() .SendAsync <ItemCollection>(ApiRequestTarget.Items, ApiRequestType.Get)); }