Exemplo n.º 1
0
        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]);
Exemplo n.º 2
0
 public static async Task <HUser> GetUserAsync(string name, HHotel hotel) => HUser.Create(await ReadContentAsync <string>(hotel.ToUri(), ("/api/public/users?name=" + name)));
Exemplo n.º 3
0
 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";
Exemplo n.º 4
0
 public static Task <HUser> GetUserAsync(string name, HHotel hotel) => ReadContentAsync <HUser>(hotel.ToUri(), "/api/public/users?name=" + name);