How to post across interwiki using api.

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

How to post across interwiki using api.

anirudhsanjeev
Hi,

I'm new to the interwiki API, and need to post to another language's
wikipedia, though en.wikipedia.org/w/api.php (I use a bookmarklet
which use javascript that runs on en.wikipedia.api).

I am trying to generate a request, which contains action=edit along
with summary, token and the required post data.

If i wanted to post to, say the german wikipedia, I am not able to use
de:Article_Title to edit articles. I cannot access de.wikipedia.org,
while I can read german articles fine from en.wikipedia.org

Please suggest a way to use the API to post across the interwiki.
Thank you.

--
Fourth Year Undergraduate Student, Indian Institute of Technology, Kharagpur
E-Mail/jabber/googletalk: [hidden email]
Phone: +91-97335-04828
My PGP key: anirudhsanjeev.org/pubkey.txt

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

Re: How to post across interwiki using api.

Daniel Friesen
The API supports JSONP so there should be no issues with things like
XmlHttpRequest's same-domain limitations.

~Daniel Friesen (Dantman, Nadir-Seen-Fire)
~Profile/Portfolio: http://nadir-seen-fire.com
-The Nadir-Point Group (http://nadir-point.com)
--It's Wiki-Tools subgroup (http://wiki-tools.com)
--The ElectronicMe project (http://electronic-me.org)
-Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
--Animepedia (http://anime.wikia.com)
--Narutopedia (http://naruto.wikia.com)



Anirudh Sanjeev wrote:

> Hi,
>
> I'm new to the interwiki API, and need to post to another language's
> wikipedia, though en.wikipedia.org/w/api.php (I use a bookmarklet
> which use javascript that runs on en.wikipedia.api).
>
> I am trying to generate a request, which contains action=edit along
> with summary, token and the required post data.
>
> If i wanted to post to, say the german wikipedia, I am not able to use
> de:Article_Title to edit articles. I cannot access de.wikipedia.org,
> while I can read german articles fine from en.wikipedia.org
>
> Please suggest a way to use the API to post across the interwiki.
> Thank you.
>
>  


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

Re: How to post across interwiki using api.

Bryan Tong Minh
On Fri, Dec 19, 2008 at 7:34 AM, Daniel Friesen <[hidden email]> wrote:
> The API supports JSONP so there should be no issues with things like
> XmlHttpRequest's same-domain limitations.
>
For security reasons $wgUser is stripped on json callback calls. Plus
you need to make a post request, which is not possible with <script>


Bryan

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

Re: How to post across interwiki using api.

anirudhsanjeev
So if I have some javascript running on en.wikipedia.org which would
be a way to post to de.wikipedia.org?

I tried opening an iframe, allowing the user to edit the wikimarkup
and modifying the form action to point to de.wikipedia.org it didn't
work.

Is there any better solution that can be done using javascript.
Thanks

On Fri, Dec 19, 2008 at 3:27 PM, Bryan Tong Minh
<[hidden email]> wrote:

> On Fri, Dec 19, 2008 at 7:34 AM, Daniel Friesen <[hidden email]> wrote:
>> The API supports JSONP so there should be no issues with things like
>> XmlHttpRequest's same-domain limitations.
>>
> For security reasons $wgUser is stripped on json callback calls. Plus
> you need to make a post request, which is not possible with <script>
>
>
> Bryan
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>



--
Fourth Year Undergraduate Student, Indian Institute of Technology, Kharagpur
E-Mail/jabber/googletalk: [hidden email]
Phone: +91-97335-04828
My PGP key: anirudhsanjeev.org/pubkey.txt

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

Re: How to post across interwiki using api.

Daniel Friesen
In reply to this post by Bryan Tong Minh
JSON or JSONP?

~Daniel Friesen (Dantman, Nadir-Seen-Fire)
~Profile/Portfolio: http://nadir-seen-fire.com
-The Nadir-Point Group (http://nadir-point.com)
--It's Wiki-Tools subgroup (http://wiki-tools.com)
--The ElectronicMe project (http://electronic-me.org)
-Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
--Animepedia (http://anime.wikia.com)
--Narutopedia (http://naruto.wikia.com)



Bryan Tong Minh wrote:

> On Fri, Dec 19, 2008 at 7:34 AM, Daniel Friesen <[hidden email]> wrote:
>  
>> The API supports JSONP so there should be no issues with things like
>> XmlHttpRequest's same-domain limitations.
>>
>>    
> For security reasons $wgUser is stripped on json callback calls. Plus
> you need to make a post request, which is not possible with <script>
>
>
> Bryan
>  


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

Re: How to post across interwiki using api.

Bryan Tong Minh
On Fri, Dec 19, 2008 at 8:36 PM, Daniel Friesen <[hidden email]> wrote:
> JSON or JSONP?
>

JSONP.

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