Closed unpluggedsam closed 2 years ago
Hello Sam, I think it looks good with the queries but just wondering why we have Optionals since in a previous PR I believe we switched away from them.
Hello Sam, I think it looks good with the queries but just wondering why we have Optionals since in a previous PR I believe we switched away from them.
So I was actually meaning to bring this up. The point of the optional is to handle the possibility of the player not being in a guild. The other option is to just throw an exception. I was going to look for more input from you guys.
Hello Sam, I think it looks good with the queries but just wondering why we have Optionals since in a previous PR I believe we switched away from them.
So I was actually meaning to bring this up. The point of the optional is to handle the possibility of the player not being in a guild. The other option is to just throw an exception. I was going to look for more input from you guys.
I feel like being consistent with either Optionals or nulls is important but I agree that we should discuss this as a group.
Hello Sam, I think it looks good with the queries but just wondering why we have Optionals since in a previous PR I believe we switched away from them.
So I was actually meaning to bring this up. The point of the optional is to handle the possibility of the player not being in a guild. The other option is to just throw an exception. I was going to look for more input from you guys.
Providing users with errors to handle as well as Optional's may be complicated, however it would be the most explainable way to deal with a problem like that. I agree we should have a conversation on best implementation.
This PR will refactor the way
Query
's are used to communicate with the API.⚫
Query
Query
not abstract.Endpoint
and a array ofQueryParameter
's.QueryParameter
's to add parameters to the request.⚫
QueryParameter
HypixeQueryParameterType
), and a value (String).⚫
HypixelQueryParameterType
⚫
RequestController
Query
and send it to theRequestFactory
.RequestController
instead ofRequestFactory
.Notes:
These commits will not practically change anything, it just makes it much easier to create new requests to the API which will be nice when we need to implement Skyblock.