PageID on PARSE Api

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

PageID on PARSE Api

Luigi Assom
Wiki API team,

I am working on a project to give structure to the knowledge base of wikipedia.
I am using both action=query and action=parse, the latter to fetch content article.

With action=query I can get the pageId of the article, but both actions cannot be combined.

Is there a parameter to fetch pageID of a page with a parse request?

e.g.
action=parse&title=DNA&prop=curid??

Thank you,
Luigi



_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: PageID on PARSE Api

Brad Jorsch (Anomie)
On Wed, Jul 1, 2015 at 12:09 PM, Luigi Assom <[hidden email]> wrote:
e.g.
action=parse&title=DNA&prop=curid??

action=query&titles=DNA&prop=revisions&rvprop=content&rvparse=1, perhaps?


--
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: PageID on PARSE Api

XDiscovery Team
Yes!
thank you!

just to clarify:

what's the difference in revisions *
action=query&titles=DNA&prop=revisions&rvprop=content&rvparse=1

and text * in
api.php?action=parse&page=DNA

?

On Wed, Jul 1, 2015 at 6:44 PM, Brad Jorsch (Anomie) <[hidden email]> wrote:
action=query&titles=DNA&prop=revisions&rvprop=content&rvparse=1




--
Luigi Assom
Founder & CEO @ XDiscovery - Crazy on Human Knowledge
www.xdiscovery.com
Mobile App for knowledge Discovery
APP STORE  | PR  | WEB 

T +39 349 3033334 | +1 415 707 9684
Skype oggigigi

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: PageID on PARSE Api

Brad Jorsch (Anomie)
On Wed, Jul 1, 2015 at 8:36 PM, XDiscovery Team <[hidden email]> wrote:
just to clarify:

what's the difference in revisions *
action=query&titles=DNA&prop=revisions&rvprop=content&rvparse=1

and text * in
api.php?action=parse&page=DNA

There shouldn't be a difference, it's just two ways to access the same thing.

BTW, with format=json (and format=php) you can add &formatversion=2 to your query to get a data structure that should be more easily usable. See https://www.mediawiki.org/wiki/API:JSON_version_2 for details.


--
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api