OA-signalling icon indicating copy to clipboard operation
OA-signalling copied to clipboard

Integrate with the OA button API

Open Daniel-Mietchen opened this issue 12 years ago • 10 comments

Hopefully, there will be an API for the OA Button at some point, so that we can query it and display the information on Wikipedia as well.

Daniel-Mietchen avatar Nov 21 '13 13:11 Daniel-Mietchen

See also https://github.com/OAButton/OAButton/issues/181 .

Daniel-Mietchen avatar Nov 21 '13 13:11 Daniel-Mietchen

Also, https://github.com/Daniel-Mietchen/OA-signalling/issues/4

wrought avatar Jan 19 '14 22:01 wrought

At this point, it seems optimal to review the early version of the OA Button API, write a JavaScript gadget for implementation on any arbitrary MediaWiki install, especially for the format of citations provided in Wikipedia (and especially further English WP), then use this to push to the OA Button team as requirements for their API so we can see full implementation.

@Juul is assigned.

wrought avatar Mar 25 '14 22:03 wrought

@Juul - The early version of the OA Button API is available in #4 should have put a more descriptive label in my comment above.

wrought avatar Mar 27 '14 22:03 wrought

Here are some proposed changes and additions to the OA Button API.

The OA button "pop-up" panel has a field for article URL. This is supposed to be the non-OA article. We won't have this for wikipedia citations. It would make more sense to remove this field and perhaps have a hidden field that can be set to the wikipedia article url.

The OA button API currently requires a per-user API key. We will not have this for wikipedia users so either the OA button API must allow submissions with no API key, or some other form of authentication must be implemented for wikipedia users. This should not require any action from the wikipedia user other than to be logged in to wikipedia.

In addition, we will need an additional API from OA-button. It should allow us to do a query with the following parameters:

*DOI or a set of DOIs *time_from [optional] *time_to [optional] *result_type (full, brief or count)

If result_type:full is specified, then for each incident where someone reported hitting a paywall the server should return:

*Location of incident *Time of incident *User-specified reason for needing access.

If result_type:brief is specified then the server should return:

*Location of incident *Time of incident

If result_type:count is specified then the server should return only:

*A count of the total number of incidents *[Optionally the number of incidents for each of the top-three countries]

If time_from or time_to or both are specified, then the results should be limited to the specified time frame.

@Daniel-Mietchen - I am not sure how exactly we are going to use this data, but this API proposal seems like it would cover most of the types of data we'd want to show.

Juul avatar Apr 10 '14 15:04 Juul

Yes, that's a good start and probably covers most of what we need.

I am thinking about OAB integration in terms of scenarios, which would be:

  1. signalling to WP readers (initially only those who activated the gadget) that a given ref had previously been reported to OAB
  2. allowing WP readers to easily report a given reference to OAB through the gadget, adding an automated note that the reference has been cited on WP articles Y and Z (with version IDs).
  3. stating that a given reference X is cited on WP pages Y and Z when OAB are to display information pertaining to that article X.

Another scenario (outside of the article namespace) would be that when an article is being reported to OAB through the bookmarklet with some mention of Wikipedia (especially in the free-text field), that we could get this information in order to display it somewhere on-wiki, perhaps on some subpage of WikiProject OA.

Not sure at all how to deal with embargo times and potential green copies of a given ref, or with refs cited outside article namespace (e.g. on talk pages, Portals or WikiProject pages).

Daniel-Mietchen avatar Apr 10 '14 22:04 Daniel-Mietchen

Marc and I discussed his assessment, and his comment, and I updated the gadget directory's readme with notes for clarity, please give it a look:

https://github.com/Daniel-Mietchen/OA-signalling/tree/master/oa-btn-gadget#oa-button-service--api-specification

I believe this specification agrees with our general expectations for Wikipedia:

  1. "OA Button" appears alongside relevant citations (e.g. those with DOIs)
  2. Clicking the button allows a user to submit an incident report to the openaccessbutton.org application, including both the referrer URL (e.g. the wikipedia article) as well as the source url (e.g. the URL of the article that is paywalled), which should display on openaccessbutton.org somehow too.
  3. If there are other incident reports for a given citation, a count is displayed inside or alongside the button as well.

wrought avatar Apr 12 '14 07:04 wrought

Note: Good example of how this service extension for OA Button is relevant to be built not just for Wikipedia, but for instance, Open WetWare. E.g. http://onlinelibrary.wiley.com/doi/10.1002/pmic.201090040/full on http://openwetware.org/wiki/Antibodypedia

wrought avatar Apr 12 '14 08:04 wrought

I am not sure about the CSS classes - such things tend not to be handled in templates, and I'd expect community resistance to that change. Plus, it won't work across languages and wikis.

I'd expect the solution to have to do with Wikidata - we plan to introduce the "license" property there soon (basically waiting for NISO to come out with their recommendations), and there should be a way to use or adapt that for the purposes of the OA Button gadget.

Yes, use of the gadget in places like OpenWetWare is definitely a scenario that we should have in mind when building the gadget.

Daniel-Mietchen avatar Apr 14 '14 02:04 Daniel-Mietchen

Development of the OA Button API has now moved to https://github.com/OAButton/backend .

Daniel-Mietchen avatar Nov 09 '14 02:11 Daniel-Mietchen