Hi, all.
Is there some way of retrieving a snippet/summary of documents when
performing a search?
Let me explain better.
For example, when using
*api.php?action=query&list=search&srwhat=text&srsearch=cvs&format=xml
,*the result is
*<api>
<query>
<search>
<p ns="0" title="Instalar CVS"/>
<p ns="0" title="Lista tareas"/>
</search>
</query>
</api>*
And I would like to get something as:
*<api>
<query>
<search>
<p ns="0" title="Instalar CVS">...bla bla cvs bla bla instalar ... cvs
bla bla...</p>
<p ns="0" title="Lista tareas"/>...blabla bla lista tareas bla
bla...</p>
</search>
</query>
</api>*
Is it possible?
Thank you.
--
Manuel Fernández Sánchez de la Blanca
Hi all,
I am trying to create a new layer for the MW API which allows access
over SOAP. I plan to support some often used functions like:
*login / logout
*create / delete a page
*read / update a page
*move a page
For each function I create a query and execute it using the created
ApiMain object.
When requesting an action the user should send the cookies (and the
different tokens). In order to execute the action with proper user
credentials set, I need to set the right cookies.
Which is the best way to set the cookies in the wiki when communicating
directly over ApiMain?
Any suggestions appreciated!
Best regards,
Dian
Platonides, Ran, Roan,
thanks for your feedback. We have built our own client code,
communicate via sockets, and live on a completely different server in
Java, so I assume that I can safely use the API.
Thanks again for your insight.
Raphael
Hi -
I am a bit unsure about whether it is OK to have an external
application calling the MediaWiki API and being able to maintain that
this application is proprietary.
Does usage of the API trigger the virality of GPL ?
We can work around by talking directly to MySQL instead, but using the
REST API would be much more elegant and change resistant.
Thanks for your insights.
Thanks
Raphael
I have installed MediaWiki 1.11.0 locally and
loaded the english Wikipedia data into the
local MySQL tables.
The standard procedure for creating a local
Wikipedia copy only creates the page, revision,
and text tables.
I have also installed the Cite, ExtensionFunctions,
and ParserFunctions extensions.
When I browse to localhost/wiki/api.php I get
the help page for the api, but all requests
I try return empty results (not an error).
Which additional tables or extensions do I need
to get this to work locally?
Cheers,
Johann
It should work from version 1.13. Ensure that in your LocalSettings.php you
have $wgEnableAPI and $wgEnableWriteAPI both set to true.
Marcus
From: mediawiki-api-bounces(a)lists.wikimedia.org
[mailto:mediawiki-api-bounces@lists.wikimedia.org] On Behalf Of javi bueno
Sent: 06 October 2008 14:15
To: mediawiki-api(a)lists.wikimedia.org
Subject: [Mediawiki-api] Problem with action=edit
Hi!
I want to use the edit action of the api and I have a problem with it. I
can't find what version of mediawiki I have to use due to I cannot see this
feature in the api description. I have downloaded several versions of the
mediawiki (1.13, 1.14alpha ...) and when I use ( action=edit ) an error like
the following one is shown on the screen :
<?xml version="1.0" encoding="utf-8"?>
<api>
<error code="unknown_action" info="Unrecognized value for parameter
'action': edit">
...
Anyone knows what version I have to download ?
Thanks.
_____
¡Trónchate de risa con los mejores capítulos de South Park en MSN Vídeo!
<http://video.msn.com/?mkt=es-es&vid=42a9e969-45ad-4c31-bff9-57629e71fac8&pl
aylist=videoByUuids:uuids:e1daa69b-331b-4e99-8325-c936aaee9f97%2Cad4cb47a-90
a8-4b2c-88da-116d2059f4a2%2Cddaade1e-82b2-4914-8277-35e45198f5c6%2C42860247-
e337-4384-94d8-fa444cb4aea7&from=hotmail&tab=s1207179071824>
Hi!
I want to use the edit action of the api and I have a problem with it. I can't find what version of mediawiki I have to use due to I cannot see this feature in the api description. I have downloaded several versions of the mediawiki (1.13, 1.14alpha ...) and when I use ( action=edit ) an error like the following one is shown on the screen :
<?xml version="1.0" encoding="utf-8"?><api> <error code="unknown_action" info="Unrecognized value for parameter 'action': edit"> ...
Anyone knows what version I have to download ?
Thanks.
_________________________________________________________________
¡Entra en el Club oficial de Messenger y te enterarás de todas las novedades!
http://www.vivelive.com/ilovemessenger
As of r41652 [1], action=protect allows the user to specify different
expiry timestamps for different protections, something the UI has
supported for a while.
To support this, the expiry parameter has changed to accept multiple
values, and even duplicate values. The first expiry timestamp will apply
to the first protection, the second to the second, etc. The number of
values in the expiry parameter must be equal to the number of values in
the protections parameter, or an error will occur (for details on the
new error message, see [2]). To preserve backwards compatibility,
setting a single value in the expiry parameter is always allowed: in
that case, all specified protections will have the same expiry timestamp.
Example requests:
api.php?action=protect&token=123ABC&title=Foo&protections=edit=sysop|move=sysop&expiry=infinite
Will add the protections edit=sysop and move=sysop, both of which will
never expire
api.php?action=protect&token=123ABC&title=Foo&protections=edit=autoconfirmed|move=sysop&expiry=20081104000000|infinite
Will add the protections edit=autoconfirmed and move=sysop; the first
will expire on November 4, 2008, the second will never expire
api.php?action=protect&token=123ABC&title=Foo&protections=edit=autoconfirmed|move=sysop|read=user&expiry=20081104000000|infinite
Will cause an error, because 2 expiries were given for 3 protections
api.php?action=protect&token=123ABC&title=Foo&protections=edit=autoconfirmed|move=sysop&expiry=20081104000000|infinite|infinite
Will cause an error, because 3 expiries were given for 2 protections
The output format has also been changed, so multiple expiry times can be
listed.
Old format:
<protect title="Foo" reason="" expiry="infinite">
<protections edit="sysop" move="sysop" />
</protect>
New format:
<protect title="Foo" reason="">
<protections>
<protection edit="sysop" expiry="infinite" />
<protection move="sysop" expiry="infinite" />
</protections>
</protect>
Additionally, the invalidexpiry and pastexpiry error messages have been
changed to mention the expiry timestamp they're referring to. In the new
messages, EXPIRY is replaced by the faulty expiry timestamp.
Old messages:
* code: invalidexpiry
** info: Invalid expiry time
* code: pastexpiry
** info: Expiry time is in the past
New messages:
* code: invalidexpiry
** info: Invalid expiry time ``EXPIRY''
* code: pastexpiry
** info: Expiry time ``EXPIRY'' is in the past
For the newly added error message toofewexpiries or more information
about action=protect, see the documentation at www.mediawiki.org [2].
[1] http://svn.wikimedia.org/viewvc/mediawiki/?view=rev&rev=41652
[2] http://www.mediawiki.org/wiki/API:Edit_-_Protect
_______________________________________________
Mediawiki-api-announce mailing list
Mediawiki-api-announce(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
Hello,
i saw that wikipedia articles are geotagted usint the template
{{coord}},so can I search for a certain article by it's geotag?
i have a certain coordinate,like latitude=37,longitude=-122,then I
want to search articles in wikipedia "nearby" this coordinate,just like
http://geonames.edesign.no/examples/nearbywikipedia
I don't know how to do that .
Any tips/answers are highly appreciated. Thanks.