just0rz / wg-api-sharp-library

WG API Sharp library
MIT License
4 stars 2 forks source link

GetPlayerAchievements return List<Player> #4

Closed Lorac closed 9 years ago

Lorac commented 9 years ago

At line 400 in WGApplication.cs, I'm wondering why you are returning List when we are trying to use the method for one player in particular. Shouldn't return List ?

just0rz commented 9 years ago

I'll take a look and get back to you.

just0rz commented 9 years ago

I think the issue is that if you send a list of account ids(players) you get a list of players with Achievements list populated for each player. Anyway i noticed that i forgot to remove the NotImplementedException at the end :) OR i didn't merge the branch where i have that fixed yet.

I agree that it's a little confusing maybe i need to add a bit more details.

If you have any suggestions feel free to implement it and i'll merge it.

I'll leave this open until it gets clarified.

just0rz commented 9 years ago

http://eu.wargaming.net/developers/api_reference/wot/account/achievements/

This is the API reference.

Lorac commented 9 years ago

Well I can understand that If you send an array of accountIds it makes sense to return a list of players with acheivements list populated. But I saw a method call GetPlayerAchievements with one accountID so I though it would return the list of acheivements for that player.

So I guess it's not implemented like that for now or it's a working as design?

just0rz commented 9 years ago

I think you are right. I could return the list of Achievements if the request is only for one accountid or I could return a Player with its achievements populated. I see your point.

Lorac commented 9 years ago

Well given the method name I would return a List.