[MediaWiki-l] Calling the API from within an extension's own API module

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

[MediaWiki-l] Calling the API from within an extension's own API module

George, Garrett J. (JSC-CB111)[SGT, INC]
Hey all,

I'm currently building an api module to act as a pseudo backend for and standalone application and I'm trying to call the api for editing pages. I could use the cURL PHP library to make an HTTP request but that seems silly given that the extension's PHP is already being run within wiki. I know with Cargo I could do something like "CargoQuery::run(...)" but in the case of MW's default "api.php" I'm unsure of how to do it.

Thanks,

Garrett
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Calling the API from within an extension's own API module

Brian Wolff
See https://m.mediawiki.org/wiki/API:Calling_internally or just call
WikiPage::doEditContent() directly

--
Brian

On Tuesday, May 29, 2018, George, Garrett J. (JSC-CB111)[SGT, INC] <
[hidden email]> wrote:
> Hey all,
>
> I'm currently building an api module to act as a pseudo backend for and
standalone application and I'm trying to call the api for editing pages. I
could use the cURL PHP library to make an HTTP request but that seems silly
given that the extension's PHP is already being run within wiki. I know
with Cargo I could do something like "CargoQuery::run(...)" but in the case
of MW's default "api.php" I'm unsure of how to do it.
>
> Thanks,
>
> Garrett
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l