public static async Task <string> GetLatestRevisionAsync(HHotel hotel) { string body = await ReadContentAsync <string>(hotel.ToUri(), "/gamedata/external_variables/1").ConfigureAwait(false); int revisionStartIndex = body.LastIndexOf("/gordon/") + 8; if (revisionStartIndex != 7) { int revisionEndIndex = body.IndexOf('/', revisionStartIndex); if (revisionEndIndex != -1) { return(body[revisionStartIndex..revisionEndIndex]);
public static async Task <HUser> GetUserAsync(string name, HHotel hotel) => HUser.Create(await ReadContentAsync <string>(hotel.ToUri(), ("/api/public/users?name=" + name)));
public static string GetImagingUrl(string figureString, HHotel hotel, string gesture = S_2_G_1_D_2_H_2_A_0) => $"{hotel.ToUri()}/habbo-imaging/avatar/{figureString},{gesture},{CalculateMD5Hash(figureString + gesture + IMAGER_SALT)}.png";
public static Task <HUser> GetUserAsync(string name, HHotel hotel) => ReadContentAsync <HUser>(hotel.ToUri(), "/api/public/users?name=" + name);