-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
[api-minor] Let getAnnotations
fetch all annotations by default, unless an intent is specified
#6675
[api-minor] Let getAnnotations
fetch all annotations by default, unless an intent is specified
#6675
Conversation
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/8604db59a6a778d/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/8604db59a6a778d/output.txt Total script time: 0.78 mins Published |
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/5c2bd4b090f4d48/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/51363e54897bea7/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/51363e54897bea7/output.txt Total script time: 19.71 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/5c2bd4b090f4d48/output.txt Total script time: 19.72 mins
|
* Page annotation parameters. | ||
* | ||
* @typedef {Object} GetAnnotationsParameters | ||
* @param {string} intent - Determines which annotations that will be fetched, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: change this to either "Determines the annotations that will be fetched" or "Determines which annotations will be fetched"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Looks good to me with the nit addressed. I'll leave the final review for @yurydelendik or @brendandahl as this is an API change. |
…less an intent is specified Currently `getAnnotations` will *only* fetch annotations that are either `viewable` or `printable`. This is "hidden" inside the `core.js` file, meaning that API consumers might be confused as to why they are not recieving *all* the annotations present for a page. I thus think that the API should, by default, return *all* available annotations unless specifically told otherwise. In e.g. the default viewer, we obviously only want to display annotations that are `viewable`, hence this patch adds an `intent` parameter to `getAnnotations` that makes it possible to decide if only `viewable` or `printable` annotations should be fetched.
API changes look good. Thanks. |
[api-minor] Let `getAnnotations` fetch all annotations by default, unless an intent is specified
Currently
getAnnotations
will only fetch annotations that are eitherviewable
orprintable
. This is "hidden" inside thecore.js
file, meaning that API consumers might be confused as to why they are not recieving all the annotations present for a page.I thus think that the API should, by default, return all available annotations unless specifically told otherwise. In e.g. the default viewer, we obviously only want to display annotations that are
viewable
, hence this patch adds anintent
parameter togetAnnotations
that makes it possible to decide if onlyviewable
orprintable
annotations should be fetched.