Alt-Org / Altzone-Server

REST API
9 stars 1 forks source link

Feature request: Add ClanLogo colour data to Clan Data #326

Open BillTheBeast opened 2 weeks ago

BillTheBeast commented 2 weeks ago

What do you want to see in the API?

Add afield to clan that contains all of the data related to the clan logo (which logo is used and which colours are used.)

How do you think this should work?

The logo type can be determined through some sort of Enum or string that tells the client what logo to use. (Currently only heart is available.) The colour data should be as a list of hexadecimal values. The current heart logo has 50 pieces that can have different colours, but later logos can have varying number of pieces.

Any additional info?

clanLogo: { logoType: "Heart", pieceColours: { FF7744, FFFFFF, 00AB39, ... } }

MikhailDeriabin commented 2 weeks ago

@BillTheBeast

Is the pieceColours field array, there the index of the color corresponds to the piece in the logo? Otherwise I am not sure how to convert it in TS, since there are no list data structure

BillTheBeast commented 2 weeks ago

In my head it would be a dynamic size array, since one logo could have 50 pieces and another could have say 37. How this is done in TS, I can't really help you.

If you have to store it as a massive block of string, then that is what needs to be done regardless of how regrettable (and ugly or annoying) that is.

MikhailDeriabin commented 2 weeks ago

ok, yes, the array can be dynamic no problem with that

MikhailDeriabin commented 1 week ago

@Shahtaa Have a look at the feature request above and add the requested functionality for the /clan endpoint. You can find the code for the /clan endpoint in the src/clan folder.