Mailing List Archive

Fetching multiple diffs at once
Can multiple diffs be fetched in the same API request? If not, what is the
best way to obtain diffs (in HTML form) for many revision IDs at once?

Suggestions involving the Wikimedia Toolforge replica databases would also
work, since I'm working on a Toolforge tool.

Thanks,
Enterprisey
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Fetching multiple diffs at once [ In reply to ]
On Fri, May 29, 2020 at 12:48 AM A Person <apersonwiki@gmail.com> wrote:
>
> Can multiple diffs be fetched in the same API request? If not, what is the
> best way to obtain diffs (in HTML form) for many revision IDs at once?
>
> Suggestions involving the Wikimedia Toolforge replica databases would also
> work, since I'm working on a Toolforge tool.

As far as I know, https://www.mediawiki.org/wiki/API:Compare is the
only API to get HTML formatted diffs between revisions. That Action
API endpoint does not have a "batch" option that would allow a single
API request to return multiple page diffs.

The Wiki Replicas do not provide revision content data (wikitext), so
there is no neat hack to be done there to work around the lack of a
batch diff API. I think your main option is making a diff request for
each page/revision you are interested in either in series or parallel
from your application code. I would love for someone else to prove me
wrong on that though. :)

Bryan
--
Bryan Davis Technical Engagement Wikimedia Foundation
Principal Software Engineer Boise, ID USA
[[m:User:BDavis_(WMF)]] irc: bd808

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Fetching multiple diffs at once [ In reply to ]
Dose this work?
-------------------------------------------------------------------------------------
--Nathaniel Sturtz




On Fri, May 29, 2020 at 12:38 PM Bryan Davis <bd808@wikimedia.org> wrote:

> On Fri, May 29, 2020 at 12:48 AM A Person <apersonwiki@gmail.com> wrote:
> >
> > Can multiple diffs be fetched in the same API request? If not, what is
> the
> > best way to obtain diffs (in HTML form) for many revision IDs at once?
> >
> > Suggestions involving the Wikimedia Toolforge replica databases would
> also
> > work, since I'm working on a Toolforge tool.
>
> As far as I know, https://www.mediawiki.org/wiki/API:Compare is the
> only API to get HTML formatted diffs between revisions. That Action
> API endpoint does not have a "batch" option that would allow a single
> API request to return multiple page diffs.
>
> The Wiki Replicas do not provide revision content data (wikitext), so
> there is no neat hack to be done there to work around the lack of a
> batch diff API. I think your main option is making a diff request for
> each page/revision you are interested in either in series or parallel
> from your application code. I would love for someone else to prove me
> wrong on that though. :)
>
> Bryan
> --
> Bryan Davis Technical Engagement Wikimedia Foundation
> Principal Software Engineer Boise, ID USA
> [[m:User:BDavis_(WMF)]] irc: bd808
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>

--

ICSD Confidentiality Notice: This email and any attachments are covered

by the Electronic Communications Privacy Act, 18 U.S.C.§§2510-2521 and
may
contain privileged and confidential information intended only for
the use
of the individual or entity named. If
you are not the intended recipient,
you are hereby notified that you
should not review, use, disclose,
distribute, copy, or forward this
email. If you have received this email
in error, please notify the
sender immediately and delete/destroy any and
all copies
of the original message. 
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l