These are chat archives for Ruhrpottpatriot/GW2.NET

17th
Dec 2015
Robert Logiewa
@Ruhrpottpatriot
Dec 17 2015 11:48
xD, yeah that is a problem
BTW: I think implementing IQueryable isn't a big problem. URL transformation is a bit work and error prone, so maybe make another push for them implementing OData?
Steven Liekens
@StevenLiekens
Dec 17 2015 12:08
odata is never gonna happen
but I don't see how else you're gonna do this
there's millions of valid linq queries that are not supported by the API
from c in colors where c.Name == "Black" select c;
Steven Liekens
@StevenLiekens
Dec 17 2015 12:14
I don't like IQueryable that much tbh
Robert Logiewa
@Ruhrpottpatriot
Dec 17 2015 12:14
We don't have to support all. Throwing exceptions for queries that are not supported is a totally fine way to do with IQueryable
Steven Liekens
@StevenLiekens
Dec 17 2015 12:14
it promises too much
Robert Logiewa
@Ruhrpottpatriot
Dec 17 2015 12:14
It's a header interface after all
There is another way to do this:
We don't implement IQueryable, but write our own somewhat similar stuff
I'm doing something similar at the moment with a parser I'm writing
Expressions offer a unique way to build up queries
Steven Liekens
@StevenLiekens
Dec 17 2015 12:17
there's no way that we can provide a usable IQueryable implementation without requiring that you read the API documentation to see what is supported or not
like for /v2/colors
Robert Logiewa
@Ruhrpottpatriot
Dec 17 2015 12:17
See my other option
Steven Liekens
@StevenLiekens
Dec 17 2015 12:18
it only supports querying by Color.Id
Robert Logiewa
@Ruhrpottpatriot
Dec 17 2015 12:19
Well in the worst case we could query all things and then filter, but then we could do it with IEnumerable too and put aside IQueryable
Steven Liekens
@StevenLiekens
Dec 17 2015 12:19
exactly
Robert Logiewa
@Ruhrpottpatriot
Dec 17 2015 12:19
Again: I'm not saying we should implement IQueryable, I'm proposing we should look at expressions trees to simplify Queries