Open BillTheBeast opened 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
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.
ok, yes, the array can be dynamic no problem with that
@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.
logoType
fieldlogoType
must be enumpieceColours
enough to check that it is an array of strings
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, ... } }