-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
single.*
vs list.*
#5
Comments
The 'single' operation is used to fetch details about a single occurrence when you know its identifier. You could also use the 'list' operation for this purpose, but 'single' emphasizes that you are asking for, and guaranteed to get, a single record in response. |
I'm going to reopen this. I think that use case is potentially problematic, and I think it results in a non-standard API structure. Because they're using So, let's say I "know" that there's only one "Hermidivores" occurrence, so I use Maybe I'm not clear what the benefit of allowing only a single response is. Is it that then you don't have to test its length in the subsequent code? |
No, that's not how it works. The These are two entirely different kinds of transactions, which is why the API provides two separate operations. |
I'm not clear on why people would use the
single
method in the API call. Are there actually cases where people only want a single response for an API call, without knowing how many occurrences actually exist?The text was updated successfully, but these errors were encountered: