There are some more user friendly ways to construct this library that I think should be added. For instance the implementation for many of the builder methods simply just keep appending the same query parameter to the list even if a param has already been added before. Ideally the library would find and update the parameter rather than add a duplicate. Consider this code:
var query = QueryBuilder<SitemapItem>.New.ContentTypeIs("myType");
query.Limit(100);
query.Limit(200);
Console.WriteLine(query.Build());
// outputs
// ?content_type=myType&limit=100&limit=200
The desired outcome would be ?content_type=myType&limit=200 as adding the parameter on twice produces an invalid query and allowing the the limit to be updated can simply some code.
There are some more user friendly ways to construct this library that I think should be added. For instance the implementation for many of the builder methods simply just keep appending the same query parameter to the list even if a param has already been added before. Ideally the library would find and update the parameter rather than add a duplicate. Consider this code:
The desired outcome would be
?content_type=myType&limit=200as adding the parameter on twice produces an invalid query and allowing the the limit to be updated can simply some code.