Releases: Folleach/GeometryDashAPI
Releases · Folleach/GeometryDashAPI
Some improvements
Changes:
ModeratorTypeas an enumLocalLevelsnow isIReadOnlyCollection
For more internal changes, see #28
Fix bug in serialization: protected properties
TypeDescriptor could not find protected properties.
Because of this ignored them
Add hex for color & naming fixes
Hex colors
Now you can create add a color like this
level.AddColor(new Color(11)
{
Rgb = RgbColor.FromHex("#ffa500") // orange
});And convert color to the hex too
foreach (var color in level.Colors)
Console.WriteLine(RgbColor.ToHex(color.Rgb));Naming fixes
UserPreview.Starts rename to UserPreview.Stars
Account.Starts rename to Starts.Stars
This is my mistake, they meant the stars initially, not the starts
Improvment for your tests
I've added IGameClient for GameClient.
This is necessary so that you can write tests, like this
public static class TestExtensions
{
private static readonly ObjectSerializer serializer = new();
public static Task<ServerResponse<T>> AsSuccessResponse<T>(this T value) where T : IGameObject
{
var data = serializer.Encode(value).ToString();
return Task.FromResult(new ServerResponse<T>(HttpStatusCode.OK, data));
}
}
public class Tests
{
public void MyFavoriteTest()
{
var gameClient = A.Fake<IGameClient>();
A.CallTo(() => gameClient.LoginAsync("test", "123")).Returns(new LoginResponse()
{
AccountId = 111,
UserId = 333
}.AsSuccessResponse());
}
}A.Fake it is FakeItEasy library, see documentation if you are interested
In game messages for GameClient
GameClient got new methods:
bugfix on .net framework 4.8
learn more in #25
Fixes for compability with .net 4.8
v0.2.13-alpha rollback runner OS to ubuntu for publish.yml
Add difficulties to level reponse
v0.2.12 add demon difficulty
use async in file stream
v0.2.11 use async in file stream
Added netstandard 2.0 again
v0.2.10 add netstandard 2.0 again...