-
Notifications
You must be signed in to change notification settings - Fork 15
Unable to use "distinct" parameter #10
Comments
The first error is happening because we add page parameters to all requests from Not sure if there should be a special case for distinct in these functions, or if distinct should be broken out into its own method, a.la. I think from a readability/code complexity point of view, the second one is probably better (and I would lean towards that), but you could also make an argument that the smaller the API profile, the better (e.g. currently we only have two methods: |
@azylman why doesn't distinct allow pagination? |
@dccarroll - Interesting catch - I didn't realize these were interdependent when we hardcoded
I don't like adding another method either; however, we might consider that the parameters need not exactly map to the API. as we do with all(), there could be more abstraction between the goal (fetching distinct items) and exactly what query parameters get passed behind the scenes to the API. |
No idea, I just know the API rejects any query parameters with Maybe the aggregation pipeline (which we use for distinct) doesn't offsets? |
The command: clever.Section.all(distinct="period") leads to the error: InvalidRequestError: Can only use "distinct" in conjuction with "where" and "limit".
But the command: periods = clever.Section.all(distinct="period",limit=100) also leads to an error: CleverError: ListableAPIResource does not support 'limit' parameter
The limit parameter should be supported in conjunction with the "distinct" parameter.
The text was updated successfully, but these errors were encountered: