You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why are there so many calls that require id's for instance a summoner id:
$api->stats()->ranked($summoner->id);
Rather than be like:
$summoner->stats->ranked();
I imagine this saves api calls? But if you have a populated summoner instance then you'll have the summoner Id available to that instance.
I imagine that we would also then need to have static methods / the current method so that when you already had id's on hand via DB or etc that you could still call them.
Maybe there could be a way to populate instances too with an array pulled from the DB/ORM?
The text was updated successfully, but these errors were encountered:
I agree with you but the problem in implementing this feature is two folds.
First, the summoner DTO that you are using does not know about the API, it's only a data transfer object and, as such, only contains information that we got from the api.
Second, this would add a lot of extra methods, or attributes, to the summoner dto which do not really belong.
How would you propose solving both of these design issues?
Why are there so many calls that require id's for instance a summoner id:
Rather than be like:
I imagine this saves api calls? But if you have a populated summoner instance then you'll have the summoner Id available to that instance.
I imagine that we would also then need to have static methods / the current method so that when you already had id's on hand via DB or etc that you could still call them.
Maybe there could be a way to populate instances too with an array pulled from the DB/ORM?
The text was updated successfully, but these errors were encountered: