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
At least one of the filters has been passed (filters cannot be 0 in number).
Not more than one filter is passed (hence, mutually exclusive).
Currently there's no way to raise an error if the user enters more than one filter, or enters 0 filters.
This is a bit tricky to implement, and I've not yet found the correct approach to make this happen. The filters are clearly distinguished in the API docs for each method.
The basic idea is to make the client library prompt the user/raise an error before the request is made if they have passed more than one filter/haven't passed any filter.
As of now, I could only think of making some kind of custom filter type, and check if exactly one parameter of the filter type exists in the params passed by the user (There can also be a better approach than this).
For some methods, there are some parameters which are of the
filter
type, implying that exactly one of them has to be passed for one request. Example of filters: https://developers.google.com/youtube/v3/docs/activities/list#parameters.This requires checking 2 things:
Currently there's no way to raise an error if the user enters more than one filter, or enters 0 filters.
This is a bit tricky to implement, and I've not yet found the correct approach to make this happen. The filters are clearly distinguished in the API docs for each method.
The basic idea is to make the client library prompt the user/raise an error before the request is made if they have passed more than one filter/haven't passed any filter.
As of now, I could only think of making some kind of custom
filter
type, and check if exactly one parameter of thefilter
type exists in the params passed by the user (There can also be a better approach than this).Supporting mutually exclusive groups has been opened as an issue in TypeScript itself, but it was rejected (microsoft/TypeScript#38120, microsoft/TypeScript#14094).
The text was updated successfully, but these errors were encountered: