Hi, All,
I found in some of the UPLOAD update, there is no page id:
<rc type="log" ns="6" title="File:Lucian A. Sperta- Nunez.jpg" rcid="
114549183" pageid="0" revid="0" old_revid="0" user="Azarel63"oldlen="0"
newlen="0" timestamp="2014-01-05T11:09:38Z" comment="User created page with
UploadWizard" logid="77242320" logtype="upload"logaction="upload" img_sha1="
sf9t03wg27tl73nnde3jzfuxncefux9" img_timestamp="2014-01-05T11:09:36Z"/>
<rc type="log" ns="6" title="File:Gingerbread spices (annotated).jpg" rcid="
114549185" pageid="30485540" revid="0" old_revid="0"user="SKopp" oldlen="0"
newlen="0" timestamp="2014-01-05T11:09:37Z" comment="User created page with
UploadWizard" logid="77242318"logtype="upload" logaction="upload" img_sha1="
q84abqjr2n4bmn7o6j4uovpl5ufs2gq" img_timestamp="2014-01-05T11:09:37Z"/>
The first one has no page id but the second one has.
Does anybody can tell me the differences?
Thanks,
Ethan Liu
Hi, in response to bug 54607 [1], we've changed the semantics of the
mobileformat parameter to action=parse
== Summary ==
Previously, it used to accept strings 'html' or 'wml', later just
'html' and modify the structure of output (see below). This was problematic
because you needed to retrieve the HTML from output in different ways,
depending on whether mobileformat is specified or not. Now,
mobileformat is a boolean parameter, that is if there's a 'mobileformat'
parameter in request, it will be treated as "the output should be
mobile-friendly", regardless of value. And the output structure will
be the same. For compatibility with older callers,
mobileformat=(html|wml) will be special-cased to return the older
structure at least for 6 month from now. These changes will start
being rolled out to the WMF sites starting from tomorrow, Tuesday
October 24th and this process will be complete by October 31st.
== Examples ==
=== Non-mobile parse ===
api.php?action=parse&format=xml
{
"parse": {
"title": "...",
"text": {
"*": "foo"
}
}
}
api.php?action=parse&format=json
<?xml version="1.0"?>
<api>
<parse title="..." displaytitle="...">
<text xml:space="preserve">foo</text>
</parse>
</api>
=== Parse that outputs mobile HTML, old style ===
api.php?action=parse&format=json&mobileformat=html
{
"parse": {
"title": "API",
"text": "foo"
}
}
api.php?action=parse&format=xml&mobileformat=html
<?xml version="1.0"?>
<api>
<parse title="..." text="foo" displaytitle="...">
</parse>
</api>
=== Parse that outputs mobile HTML, new style ===
api.php?action=parse&format=...&mobileformat
Same as for non-mobile parses.
== FAQ ==
Q: I didn't use mobileformat before, does anything change for me?
A: No.
Q: I use mobileformat=html, will my bot/tool be broken now?
A: No, you will have 6 months to switch to new style.
Q: I'm only planning to use mobileformat, what should I do?
A: Just use the new style.
Q: How did this format discrepancy appear in the first place?
A: To err is human.
-----
[1] https://bugzilla.wikimedia.org/show_bug.cgi?id=54607
--
Best regards,
Max Semenik ([[User:MaxSem]])
Hi
I am trying to retrieve the categories of new pages via the API on the
Danish Wikipedia using this API request:
https://da.wikipedia.org/w/api.php?action=query&prop=categories&format=json…
When I make that request, I get this response
https://gist.github.com/cgtdk/e746b6042883b970c640
(a non-broken up version of the API request URL has been added to the
gist as a comment).
The interesting part is line 76 to 86. This is the response item for the
page "VM i bandy 2015". It claims that this page only has one category,
"Kategori:Fremtidige sportsbegivenheder", but it actually has had three
categories ever since the first (and only, as of writing this) revision:
Kategori:Fremtidige sportsbegivenheder, Kategori:VM i bandy, and
Kategori:Sport i 2015.
I have tried to do this several times (with minor modifications) both in
the API Sandbox on dawiki and directly.
When I query the page directly, like this:
https://da.wikipedia.org/w/api.php?action=query&prop=categories&format=json…
I get this response:
https://gist.github.com/cgtdk/69e874cf7d3fae6ee506
which shows the correct category information for the page.
What is going on? Am I doing something wrong or is there a bug?
Thanks,
Christoffer G. Thomsen (meta:User:Cgtdk)
Gerrit change 107389[1] adds RevDel support to various API query modules,
so for example a user with the 'deletedhistory' right will be able to
retrieve the user and summary from prop=revisions.
This will cause some changes:
- list=deletedrevs, list=filearchive, list=recentchanges, and
list=watchlist formerly would not return any information at all for entries
where any field was revision-deleted. These entries will now be returned.
"hidden" indicators will be provided as is done for modules such as
prop=revisions.
- prop=imageinfo, list=logevents, prop=revisions, and list=usercontribs
will now return field values in addition to the "hidden" indicators, if the
user has the necessary user rights.
- When "hidden" indicators are returned, a new indicator "suppressed"
may also be returned to indicate whether suppression was activated.
- prop=imageinfo will now return info for revision-deleted files.
- list=logevents, when searching by user or title, will no longer skip
revisions where the user or title was revision-deleted if the requesting
user has the deletedhistory right.
- list=usercontributions will now look at the correct user rights
(deletedhistory and suppressrevision, not hideuser) to determine whether to
hide revision-deleted contributions.
All clients should be updated to expect rows with hidden fields for
deletedrevs, filearchive, recentchanges, and watchlist, and clients with
advanced permissions should be updated to properly handle (and to not
publicly reveal) the data for revision-deleted fields from these modules as
well as imageinfo, logevents, revisions, and usercontribs.
These changes will be deployed to WMF wikis with 1.23wmf11, see
https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.
[1]: https://gerrit.wikimedia.org/r/#/c/107389/
--
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api-announce mailing list
Mediawiki-api-announce(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
Hi guys.
My name is Max, and i'm iOS developer. I want make "random article" button for iOS. But i don't understand, how does wikipedia random article works. How can i made it? And how can i made random, only in one category? Has article id data about category, or this data are contained in individual properties?
Thanks
Max Ilnitskiy
Hello All,
I am Diwanshi Pandey, an OPW intern working on the project
"Completing mediawiki API development course on Codecademy" . I have
completed Parsing and Querying aspects of API but stuck with Modifications
as i don't have required permissions.
The link to the course:
http://www.codecademy.com/courses/web-intermediate-en-BLea4/4/1
I was trying to get an edit token but there was a warning saying:
"Unrecognized value for parameter 'intoken': edit"
The reason of this issue is certainly because of "callback" parameter.
I have also filed a bug as the above warning is unclear.
In my course, I want to cover getting a token , editing a page , add a page
to watchlist , etc but not deleting a page.
I am blocked by this isuue.
Does anybody know some other way to code it? or Can someone guide me
through some other process?
Thanks
--
*Regards,*
*Diwanshi Pandey*
On Tue, Jan 14, 2014 at 5:47 AM, Xia Zhang <xiazhang(a)google.com> wrote:
>
> From you previous email. You have a QA instance
> https://deployment.wikimedia.beta.wmflabs.org/wiki/Main_Page.
> I have another question: How frequent you update the QA instance? Is it a
> reliable/final QA instance before pushing it to production instance? Or
> still involves in some bug-fix-cycle to the QA?
>
beta.wmflabs.org is updated continuously as changes are merged into the git
repository.
--
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation
The AssertEdit extension has long been installed on WMF wikis,
allowing bots to include "&assert=user" or "&assert=bot" in their
action=edit requests to prevent accidentally editing while logged out.
With Gerrit change 90263,[1] the functionality will be included in
MediaWiki core. At the same time, the following changes will be made
to the functioning of this feature:
* Assertion will be available on all API actions, not just edit.
* Assertion failure will now be indicated by an API error, code
'assertbotfailed' or 'assertuserfailed'.
* The 'nassert' parameter will be ignored, and using it will give an
unrecognized parameter warning.
* Other assertions, such as 'true', 'false', and 'exists', will no
longer function and attempting to use them will result in an
'unknown_assert' error.
Most clients should notice little change from this transition besides
the fact of receiving an error rather than a failure status from
action=edit.
This change will be rolled out with 1.23wmf10, see
https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the
schedule.
[1]: https://gerrit.wikimedia.org/r/#/c/90263/
--
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api-announce mailing list
Mediawiki-api-announce(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
Hi, All,
I'd like to be notified as soon as the API changes. A simple way is to
monitor the page http://en.wikipedia.org/w/api.php
Here is my problem:
Will the page http://en.wikipedia.org/w/api.php be always updated when the
API changes (i.e. add/remove some new params) or the format of the response
changes.
If not, are there any ways to monitor that? Thanks.
When uploading files via the API, various warnings may be returned. One of
these warnings is "deleted-archive", with a value indicating the title
under which the file was previously uploaded and deleted.
With the merge of Gerrit change 105215,[1] which fixes bug 59167,[2] this
"deleted-archive" warning may have an empty value when the file content has
been suppressed. Clients should be adjusted to account for this possibility.
[1]: https://gerrit.wikimedia.org/r/#/c/105215/
[2]: https://bugzilla.wikimedia.org/show_bug.cgi?id=59167
--
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api-announce mailing list
Mediawiki-api-announce(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce