nearby API coordinates

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

nearby API coordinates

Luigi Assom
Hi, 

wiki exposes the nearby search of articles:

I now you can use prop=coordinates to expose the coordinates of one article.

<a href="http://en.wikipedia.org/w/api.php?action=query&amp;prop=coordinates&amp;titles=New%20Jersey|Venice&amp;format=jsonfm">http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm

Is there any api to expose the nearby service for fetching articles close to one's coordinate?
How to do the nearby above?



--
Luigi Assom

Skype contact: oggigigi

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

Re: nearby API coordinates

Brad Jorsch (Anomie)
On Tue, Jun 25, 2013 at 3:40 PM, Luigi Assom <[hidden email]> wrote:

>
> wiki exposes the nearby search of articles:
> http://en.m.wikipedia.org/wiki/Special:Nearby
>
> I now you can use prop=coordinates to expose the coordinates of one article.
>
> http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm
>
> Is there any api to expose the nearby service for fetching articles close to
> one's coordinate?
> How to do the nearby above?

Special:Nearby is a feature of the MobileFrontend extension. You
should file an "enhancement" bug in bugzilla against that extension
asking for API access to the data.

If you already have an account on Wikimedia's bugzilla and are signed
in, this link will take you to the right place to file the request:
https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensions&component=MobileFrontend&bug_severity=enhancement

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

Re: nearby API coordinates

Ed Summers
In reply to this post by Luigi Assom
You might be interested in the list=geosearch API call. I used it in
my demo service ici, which displays articles about your current
location:

    http://inkdroid.org/ici/

I actually ended up pulling out the api querying bits into a separate
Javascript library called wikigeo that takes some coordinates, and
will query the Wikipedia API, and format the results as GeoJSON for
easy placement on Leaflet or Google Maps.

    http://edsu.github.io/wikigeo/

//Ed

On Tue, Jun 25, 2013 at 3:40 PM, Luigi Assom <[hidden email]> wrote:

> Hi,
>
> wiki exposes the nearby search of articles:
> http://en.m.wikipedia.org/wiki/Special:Nearby
>
> I now you can use prop=coordinates to expose the coordinates of one article.
>
> http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm
>
> Is there any api to expose the nearby service for fetching articles close to
> one's coordinate?
> How to do the nearby above?
>
>
>
> --
> Luigi Assom
>
> Skype contact: oggigigi
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

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

Re: nearby API coordinates

Luigi Assom
In reply to this post by Brad Jorsch (Anomie)
Thank you Brad,
done it.

however, I understand there is no wikipedia api to expose the nearby search at the moment, correct?
a) do you plan to set it up ?
b) would it be possible to use the http://en.m.wikipedia.org/wiki/Special:Nearby
but instead of pointing the link to the wikipedia page, to point the link to our db (which is mapped on the wikipedia) ?
how to ?
I would like to return the results possibly using the curid of pages, not only titles.

On Tue, Jun 25, 2013 at 9:50 PM, Brad Jorsch (Anomie) <[hidden email]> wrote:
On Tue, Jun 25, 2013 at 3:40 PM, Luigi Assom <[hidden email]> wrote:
>
> wiki exposes the nearby search of articles:
> http://en.m.wikipedia.org/wiki/Special:Nearby
>
> I now you can use prop=coordinates to expose the coordinates of one article.
>
> <a href="http://en.wikipedia.org/w/api.php?action=query&amp;prop=coordinates&amp;titles=New%20Jersey|Venice&amp;format=jsonfm" target="_blank">http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm
>
> Is there any api to expose the nearby service for fetching articles close to
> one's coordinate?
> How to do the nearby above?

Special:Nearby is a feature of the MobileFrontend extension. You
should file an "enhancement" bug in bugzilla against that extension
asking for API access to the data.

If you already have an account on Wikimedia's bugzilla and are signed
in, this link will take you to the right place to file the request:
https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensions&component=MobileFrontend&bug_severity=enhancement

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



--
Luigi Assom

Skype contact: oggigigi

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

Re: nearby API coordinates

Luigi Assom
In reply to this post by Ed Summers
Thank you Ed,

indeed, I am looking for smthing like this!
I see your examples, is it possible to extend the json in order to get also the curid of articles, not only the url and titles of wiki pages?

Could you also add an example of how to use the list=geosearch api ?

thank you!

On Tue, Jun 25, 2013 at 10:07 PM, Ed Summers <[hidden email]> wrote:
You might be interested in the list=geosearch API call. I used it in
my demo service ici, which displays articles about your current
location:

    http://inkdroid.org/ici/

I actually ended up pulling out the api querying bits into a separate
Javascript library called wikigeo that takes some coordinates, and
will query the Wikipedia API, and format the results as GeoJSON for
easy placement on Leaflet or Google Maps.

    http://edsu.github.io/wikigeo/

//Ed

On Tue, Jun 25, 2013 at 3:40 PM, Luigi Assom <[hidden email]> wrote:
> Hi,
>
> wiki exposes the nearby search of articles:
> http://en.m.wikipedia.org/wiki/Special:Nearby
>
> I now you can use prop=coordinates to expose the coordinates of one article.
>
> <a href="http://en.wikipedia.org/w/api.php?action=query&amp;prop=coordinates&amp;titles=New%20Jersey|Venice&amp;format=jsonfm" target="_blank">http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm
>
> Is there any api to expose the nearby service for fetching articles close to
> one's coordinate?
> How to do the nearby above?
>
>
>
> --
> Luigi Assom
>
> Skype contact: oggigigi
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

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



--
Luigi Assom

Skype contact: oggigigi

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

Re: nearby API coordinates

Ed Summers
You should find an example below the doc if you scan the page for
list=geosearch, I think it has this:

    http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677

It is possible to use the geosearch query as a generator for getting
page information, like revision ids (is that what you meant by
curid?). In wikigeo I wanted to get back image information, summary
text, categories etc, so my api call was somewhat involved. I could
try to write up something about it if you are interested.

//Ed

On Tue, Jun 25, 2013 at 4:16 PM, Luigi Assom <[hidden email]> wrote:

> Thank you Ed,
>
> indeed, I am looking for smthing like this!
> I see your examples, is it possible to extend the json in order to get also
> the curid of articles, not only the url and titles of wiki pages?
>
> Could you also add an example of how to use the list=geosearch api ?
> (this is wrong ..  :)
> http://en.wikipedia.org/w/api.php?action=query&list=geosearch )
>
> thank you!
>
>
> On Tue, Jun 25, 2013 at 10:07 PM, Ed Summers <[hidden email]> wrote:
>>
>> You might be interested in the list=geosearch API call. I used it in
>> my demo service ici, which displays articles about your current
>> location:
>>
>>     http://inkdroid.org/ici/
>>
>> I actually ended up pulling out the api querying bits into a separate
>> Javascript library called wikigeo that takes some coordinates, and
>> will query the Wikipedia API, and format the results as GeoJSON for
>> easy placement on Leaflet or Google Maps.
>>
>>     http://edsu.github.io/wikigeo/
>>
>> //Ed
>>
>> On Tue, Jun 25, 2013 at 3:40 PM, Luigi Assom <[hidden email]>
>> wrote:
>> > Hi,
>> >
>> > wiki exposes the nearby search of articles:
>> > http://en.m.wikipedia.org/wiki/Special:Nearby
>> >
>> > I now you can use prop=coordinates to expose the coordinates of one
>> > article.
>> >
>> >
>> > http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm
>> >
>> > Is there any api to expose the nearby service for fetching articles
>> > close to
>> > one's coordinate?
>> > How to do the nearby above?
>> >
>> >
>> >
>> > --
>> > Luigi Assom
>> >
>> > Skype contact: oggigigi
>> >
>> > _______________________________________________
>> > Mediawiki-api mailing list
>> > [hidden email]
>> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >
>>
>> _______________________________________________
>> Mediawiki-api mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
>
>
> --
> Luigi Assom
>
> Skype contact: oggigigi
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

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

Re: nearby API coordinates

Luigi Assom
thank you Ed, 

for curid I mean pageid of the article.
I basically nead the title, the pageid, the thumbnail (and if possible also the meters of distance from your position )
is it already in your package?


On Tue, Jun 25, 2013 at 10:23 PM, Ed Summers <[hidden email]> wrote:
You should find an example below the doc if you scan the page for
list=geosearch, I think it has this:

    <a href="http://en.wikipedia.org/w/api.php?action=query&amp;list=geosearch&amp;gsradius=10000&amp;gscoord=37.786971|-122.399677" target="_blank">http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677

It is possible to use the geosearch query as a generator for getting
page information, like revision ids (is that what you meant by
curid?). In wikigeo I wanted to get back image information, summary
text, categories etc, so my api call was somewhat involved. I could
try to write up something about it if you are interested.

//Ed

On Tue, Jun 25, 2013 at 4:16 PM, Luigi Assom <[hidden email]> wrote:
> Thank you Ed,
>
> indeed, I am looking for smthing like this!
> I see your examples, is it possible to extend the json in order to get also
> the curid of articles, not only the url and titles of wiki pages?
>
> Could you also add an example of how to use the list=geosearch api ?
> (this is wrong ..  :)
> http://en.wikipedia.org/w/api.php?action=query&list=geosearch )
>
> thank you!
>
>
> On Tue, Jun 25, 2013 at 10:07 PM, Ed Summers <[hidden email]> wrote:
>>
>> You might be interested in the list=geosearch API call. I used it in
>> my demo service ici, which displays articles about your current
>> location:
>>
>>     http://inkdroid.org/ici/
>>
>> I actually ended up pulling out the api querying bits into a separate
>> Javascript library called wikigeo that takes some coordinates, and
>> will query the Wikipedia API, and format the results as GeoJSON for
>> easy placement on Leaflet or Google Maps.
>>
>>     http://edsu.github.io/wikigeo/
>>
>> //Ed
>>
>> On Tue, Jun 25, 2013 at 3:40 PM, Luigi Assom <[hidden email]>
>> wrote:
>> > Hi,
>> >
>> > wiki exposes the nearby search of articles:
>> > http://en.m.wikipedia.org/wiki/Special:Nearby
>> >
>> > I now you can use prop=coordinates to expose the coordinates of one
>> > article.
>> >
>> >
>> > <a href="http://en.wikipedia.org/w/api.php?action=query&amp;prop=coordinates&amp;titles=New%20Jersey|Venice&amp;format=jsonfm" target="_blank">http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm
>> >
>> > Is there any api to expose the nearby service for fetching articles
>> > close to
>> > one's coordinate?
>> > How to do the nearby above?
>> >
>> >
>> >
>> > --
>> > Luigi Assom
>> >
>> > Skype contact: oggigigi
>> >
>> > _______________________________________________
>> > Mediawiki-api mailing list
>> > [hidden email]
>> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >
>>
>> _______________________________________________
>> Mediawiki-api mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
>
>
> --
> Luigi Assom
>
> Skype contact: oggigigi
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

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



--
Luigi Assom

Skype contact: oggigigi

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

Re: nearby API coordinates

Ed Summers
Apart from the thumbnail, these come back as part of the example
response in the example, which is easier to see in the JSON (for me):

    http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677&format=json

I suggest you start experimenting with that, and move on to figuring
out how to get images back using geosearch as a generator.

//Ed



On Tue, Jun 25, 2013 at 4:26 PM, Luigi Assom <[hidden email]> wrote:

> thank you Ed,
>
> for curid I mean pageid of the article.
> I basically nead the title, the pageid, the thumbnail (and if possible also
> the meters of distance from your position )
> is it already in your package?
>
>
> On Tue, Jun 25, 2013 at 10:23 PM, Ed Summers <[hidden email]> wrote:
>>
>> You should find an example below the doc if you scan the page for
>> list=geosearch, I think it has this:
>>
>>
>> http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677
>>
>> It is possible to use the geosearch query as a generator for getting
>> page information, like revision ids (is that what you meant by
>> curid?). In wikigeo I wanted to get back image information, summary
>> text, categories etc, so my api call was somewhat involved. I could
>> try to write up something about it if you are interested.
>>
>> //Ed
>>
>> On Tue, Jun 25, 2013 at 4:16 PM, Luigi Assom <[hidden email]>
>> wrote:
>> > Thank you Ed,
>> >
>> > indeed, I am looking for smthing like this!
>> > I see your examples, is it possible to extend the json in order to get
>> > also
>> > the curid of articles, not only the url and titles of wiki pages?
>> >
>> > Could you also add an example of how to use the list=geosearch api ?
>> > (this is wrong ..  :)
>> > http://en.wikipedia.org/w/api.php?action=query&list=geosearch )
>> >
>> > thank you!
>> >
>> >
>> > On Tue, Jun 25, 2013 at 10:07 PM, Ed Summers <[hidden email]> wrote:
>> >>
>> >> You might be interested in the list=geosearch API call. I used it in
>> >> my demo service ici, which displays articles about your current
>> >> location:
>> >>
>> >>     http://inkdroid.org/ici/
>> >>
>> >> I actually ended up pulling out the api querying bits into a separate
>> >> Javascript library called wikigeo that takes some coordinates, and
>> >> will query the Wikipedia API, and format the results as GeoJSON for
>> >> easy placement on Leaflet or Google Maps.
>> >>
>> >>     http://edsu.github.io/wikigeo/
>> >>
>> >> //Ed
>> >>
>> >> On Tue, Jun 25, 2013 at 3:40 PM, Luigi Assom <[hidden email]>
>> >> wrote:
>> >> > Hi,
>> >> >
>> >> > wiki exposes the nearby search of articles:
>> >> > http://en.m.wikipedia.org/wiki/Special:Nearby
>> >> >
>> >> > I now you can use prop=coordinates to expose the coordinates of one
>> >> > article.
>> >> >
>> >> >
>> >> >
>> >> > http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm
>> >> >
>> >> > Is there any api to expose the nearby service for fetching articles
>> >> > close to
>> >> > one's coordinate?
>> >> > How to do the nearby above?
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Luigi Assom
>> >> >
>> >> > Skype contact: oggigigi
>> >> >
>> >> > _______________________________________________
>> >> > Mediawiki-api mailing list
>> >> > [hidden email]
>> >> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >> >
>> >>
>> >> _______________________________________________
>> >> Mediawiki-api mailing list
>> >> [hidden email]
>> >> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >
>> >
>> >
>> >
>> > --
>> > Luigi Assom
>> >
>> > Skype contact: oggigigi
>> >
>> > _______________________________________________
>> > Mediawiki-api mailing list
>> > [hidden email]
>> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >
>>
>> _______________________________________________
>> Mediawiki-api mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
>
>
> --
> Luigi Assom
>
> Skype contact: oggigigi
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

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

Re: nearby API coordinates

Luigi Assom
OK! thank you Ed!

last question: why do I get only two articles?
I tried to set the limit but still two results..
&gslimit=10
<a href="http://en.wikipedia.org/w/api.php?action=query&amp;list=geosearch&amp;gsradius=10000&amp;gscoord=37.786971|-122.399677&amp;format=json">http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677&format=json&gslimit=10



On Tue, Jun 25, 2013 at 10:36 PM, Ed Summers <[hidden email]> wrote:
Apart from the thumbnail, these come back as part of the example
response in the example, which is easier to see in the JSON (for me):

    <a href="http://en.wikipedia.org/w/api.php?action=query&amp;list=geosearch&amp;gsradius=10000&amp;gscoord=37.786971|-122.399677&amp;format=json" target="_blank">http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677&format=json

I suggest you start experimenting with that, and move on to figuring
out how to get images back using geosearch as a generator.

//Ed



On Tue, Jun 25, 2013 at 4:26 PM, Luigi Assom <[hidden email]> wrote:
> thank you Ed,
>
> for curid I mean pageid of the article.
> I basically nead the title, the pageid, the thumbnail (and if possible also
> the meters of distance from your position )
> is it already in your package?
>
>
> On Tue, Jun 25, 2013 at 10:23 PM, Ed Summers <[hidden email]> wrote:
>>
>> You should find an example below the doc if you scan the page for
>> list=geosearch, I think it has this:
>>
>>
>> <a href="http://en.wikipedia.org/w/api.php?action=query&amp;list=geosearch&amp;gsradius=10000&amp;gscoord=37.786971|-122.399677" target="_blank">http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677
>>
>> It is possible to use the geosearch query as a generator for getting
>> page information, like revision ids (is that what you meant by
>> curid?). In wikigeo I wanted to get back image information, summary
>> text, categories etc, so my api call was somewhat involved. I could
>> try to write up something about it if you are interested.
>>
>> //Ed
>>
>> On Tue, Jun 25, 2013 at 4:16 PM, Luigi Assom <[hidden email]>
>> wrote:
>> > Thank you Ed,
>> >
>> > indeed, I am looking for smthing like this!
>> > I see your examples, is it possible to extend the json in order to get
>> > also
>> > the curid of articles, not only the url and titles of wiki pages?
>> >
>> > Could you also add an example of how to use the list=geosearch api ?
>> > (this is wrong ..  :)
>> > http://en.wikipedia.org/w/api.php?action=query&list=geosearch )
>> >
>> > thank you!
>> >
>> >
>> > On Tue, Jun 25, 2013 at 10:07 PM, Ed Summers <[hidden email]> wrote:
>> >>
>> >> You might be interested in the list=geosearch API call. I used it in
>> >> my demo service ici, which displays articles about your current
>> >> location:
>> >>
>> >>     http://inkdroid.org/ici/
>> >>
>> >> I actually ended up pulling out the api querying bits into a separate
>> >> Javascript library called wikigeo that takes some coordinates, and
>> >> will query the Wikipedia API, and format the results as GeoJSON for
>> >> easy placement on Leaflet or Google Maps.
>> >>
>> >>     http://edsu.github.io/wikigeo/
>> >>
>> >> //Ed
>> >>
>> >> On Tue, Jun 25, 2013 at 3:40 PM, Luigi Assom <[hidden email]>
>> >> wrote:
>> >> > Hi,
>> >> >
>> >> > wiki exposes the nearby search of articles:
>> >> > http://en.m.wikipedia.org/wiki/Special:Nearby
>> >> >
>> >> > I now you can use prop=coordinates to expose the coordinates of one
>> >> > article.
>> >> >
>> >> >
>> >> >
>> >> > <a href="http://en.wikipedia.org/w/api.php?action=query&amp;prop=coordinates&amp;titles=New%20Jersey|Venice&amp;format=jsonfm" target="_blank">http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm
>> >> >
>> >> > Is there any api to expose the nearby service for fetching articles
>> >> > close to
>> >> > one's coordinate?
>> >> > How to do the nearby above?
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Luigi Assom
>> >> >
>> >> > Skype contact: oggigigi
>> >> >
>> >> > _______________________________________________
>> >> > Mediawiki-api mailing list
>> >> > [hidden email]
>> >> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >> >
>> >>
>> >> _______________________________________________
>> >> Mediawiki-api mailing list
>> >> [hidden email]
>> >> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >
>> >
>> >
>> >
>> > --
>> > Luigi Assom
>> >
>> > Skype contact: oggigigi
>> >
>> > _______________________________________________
>> > Mediawiki-api mailing list
>> > [hidden email]
>> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >
>>
>> _______________________________________________
>> Mediawiki-api mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
>
>
> --
> Luigi Assom
>
> Skype contact: oggigigi
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

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



--
Luigi Assom

Skype contact: oggigigi

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

Re: nearby API coordinates

Petr Onderka
That looks like a bug to me. If you set gslimit to 50, you'll get 5 results.
In general, it looks like you'll always get limit/10 results (with a minimum of 2).

Petr Onderka
[[en:User:Svick]]


On Tue, Jun 25, 2013 at 11:15 PM, Luigi Assom <[hidden email]> wrote:
OK! thank you Ed!

last question: why do I get only two articles?
I tried to set the limit but still two results..
&gslimit=10



On Tue, Jun 25, 2013 at 10:36 PM, Ed Summers <[hidden email]> wrote:
Apart from the thumbnail, these come back as part of the example
response in the example, which is easier to see in the JSON (for me):

    http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677&format=json

I suggest you start experimenting with that, and move on to figuring
out how to get images back using geosearch as a generator.

//Ed



On Tue, Jun 25, 2013 at 4:26 PM, Luigi Assom <[hidden email]> wrote:
> thank you Ed,
>
> for curid I mean pageid of the article.
> I basically nead the title, the pageid, the thumbnail (and if possible also
> the meters of distance from your position )
> is it already in your package?
>
>
> On Tue, Jun 25, 2013 at 10:23 PM, Ed Summers <[hidden email]> wrote:
>>
>> You should find an example below the doc if you scan the page for
>> list=geosearch, I think it has this:
>>
>>
>> http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677
>>
>> It is possible to use the geosearch query as a generator for getting
>> page information, like revision ids (is that what you meant by
>> curid?). In wikigeo I wanted to get back image information, summary
>> text, categories etc, so my api call was somewhat involved. I could
>> try to write up something about it if you are interested.
>>
>> //Ed
>>
>> On Tue, Jun 25, 2013 at 4:16 PM, Luigi Assom <[hidden email]>
>> wrote:
>> > Thank you Ed,
>> >
>> > indeed, I am looking for smthing like this!
>> > I see your examples, is it possible to extend the json in order to get
>> > also
>> > the curid of articles, not only the url and titles of wiki pages?
>> >
>> > Could you also add an example of how to use the list=geosearch api ?
>> > (this is wrong ..  :)
>> > http://en.wikipedia.org/w/api.php?action=query&list=geosearch )
>> >
>> > thank you!
>> >
>> >
>> > On Tue, Jun 25, 2013 at 10:07 PM, Ed Summers <[hidden email]> wrote:
>> >>
>> >> You might be interested in the list=geosearch API call. I used it in
>> >> my demo service ici, which displays articles about your current
>> >> location:
>> >>
>> >>     http://inkdroid.org/ici/
>> >>
>> >> I actually ended up pulling out the api querying bits into a separate
>> >> Javascript library called wikigeo that takes some coordinates, and
>> >> will query the Wikipedia API, and format the results as GeoJSON for
>> >> easy placement on Leaflet or Google Maps.
>> >>
>> >>     http://edsu.github.io/wikigeo/
>> >>
>> >> //Ed
>> >>
>> >> On Tue, Jun 25, 2013 at 3:40 PM, Luigi Assom <[hidden email]>
>> >> wrote:
>> >> > Hi,
>> >> >
>> >> > wiki exposes the nearby search of articles:
>> >> > http://en.m.wikipedia.org/wiki/Special:Nearby
>> >> >
>> >> > I now you can use prop=coordinates to expose the coordinates of one
>> >> > article.
>> >> >
>> >> >
>> >> >
>> >> > http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm
>> >> >
>> >> > Is there any api to expose the nearby service for fetching articles
>> >> > close to
>> >> > one's coordinate?
>> >> > How to do the nearby above?
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Luigi Assom
>> >> >
>> >> > Skype contact: oggigigi
>> >> >
>> >> > _______________________________________________
>> >> > Mediawiki-api mailing list
>> >> > [hidden email]
>> >> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >> >
>> >>
>> >> _______________________________________________
>> >> Mediawiki-api mailing list
>> >> [hidden email]
>> >> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >
>> >
>> >
>> >
>> > --
>> > Luigi Assom
>> >
>> > Skype contact: oggigigi
>> >
>> > _______________________________________________
>> > Mediawiki-api mailing list
>> > [hidden email]
>> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >
>>
>> _______________________________________________
>> Mediawiki-api mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
>
>
> --
> Luigi Assom
>
> Skype contact: oggigigi
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

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



--
Luigi Assom

Skype contact: oggigigi

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



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

Re: nearby API coordinates

Luigi Assom
OK, I reported it to bugzilla

On Tue, Jun 25, 2013 at 11:20 PM, Petr Onderka <[hidden email]> wrote:
That looks like a bug to me. If you set gslimit to 50, you'll get 5 results.
In general, it looks like you'll always get limit/10 results (with a minimum of 2).

Petr Onderka
[[en:User:Svick]]


On Tue, Jun 25, 2013 at 11:15 PM, Luigi Assom <[hidden email]> wrote:
OK! thank you Ed!

last question: why do I get only two articles?
I tried to set the limit but still two results..
&gslimit=10



On Tue, Jun 25, 2013 at 10:36 PM, Ed Summers <[hidden email]> wrote:
Apart from the thumbnail, these come back as part of the example
response in the example, which is easier to see in the JSON (for me):

    http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677&format=json

I suggest you start experimenting with that, and move on to figuring
out how to get images back using geosearch as a generator.

//Ed



On Tue, Jun 25, 2013 at 4:26 PM, Luigi Assom <[hidden email]> wrote:
> thank you Ed,
>
> for curid I mean pageid of the article.
> I basically nead the title, the pageid, the thumbnail (and if possible also
> the meters of distance from your position )
> is it already in your package?
>
>
> On Tue, Jun 25, 2013 at 10:23 PM, Ed Summers <[hidden email]> wrote:
>>
>> You should find an example below the doc if you scan the page for
>> list=geosearch, I think it has this:
>>
>>
>> http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677
>>
>> It is possible to use the geosearch query as a generator for getting
>> page information, like revision ids (is that what you meant by
>> curid?). In wikigeo I wanted to get back image information, summary
>> text, categories etc, so my api call was somewhat involved. I could
>> try to write up something about it if you are interested.
>>
>> //Ed
>>
>> On Tue, Jun 25, 2013 at 4:16 PM, Luigi Assom <[hidden email]>
>> wrote:
>> > Thank you Ed,
>> >
>> > indeed, I am looking for smthing like this!
>> > I see your examples, is it possible to extend the json in order to get
>> > also
>> > the curid of articles, not only the url and titles of wiki pages?
>> >
>> > Could you also add an example of how to use the list=geosearch api ?
>> > (this is wrong ..  :)
>> > http://en.wikipedia.org/w/api.php?action=query&list=geosearch )
>> >
>> > thank you!
>> >
>> >
>> > On Tue, Jun 25, 2013 at 10:07 PM, Ed Summers <[hidden email]> wrote:
>> >>
>> >> You might be interested in the list=geosearch API call. I used it in
>> >> my demo service ici, which displays articles about your current
>> >> location:
>> >>
>> >>     http://inkdroid.org/ici/
>> >>
>> >> I actually ended up pulling out the api querying bits into a separate
>> >> Javascript library called wikigeo that takes some coordinates, and
>> >> will query the Wikipedia API, and format the results as GeoJSON for
>> >> easy placement on Leaflet or Google Maps.
>> >>
>> >>     http://edsu.github.io/wikigeo/
>> >>
>> >> //Ed
>> >>
>> >> On Tue, Jun 25, 2013 at 3:40 PM, Luigi Assom <[hidden email]>
>> >> wrote:
>> >> > Hi,
>> >> >
>> >> > wiki exposes the nearby search of articles:
>> >> > http://en.m.wikipedia.org/wiki/Special:Nearby
>> >> >
>> >> > I now you can use prop=coordinates to expose the coordinates of one
>> >> > article.
>> >> >
>> >> >
>> >> >
>> >> > http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm
>> >> >
>> >> > Is there any api to expose the nearby service for fetching articles
>> >> > close to
>> >> > one's coordinate?
>> >> > How to do the nearby above?
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Luigi Assom
>> >> >
>> >> > Skype contact: oggigigi
>> >> >
>> >> > _______________________________________________
>> >> > Mediawiki-api mailing list
>> >> > [hidden email]
>> >> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >> >
>> >>
>> >> _______________________________________________
>> >> Mediawiki-api mailing list
>> >> [hidden email]
>> >> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >
>> >
>> >
>> >
>> > --
>> > Luigi Assom
>> >
>> > Skype contact: oggigigi
>> >
>> > _______________________________________________
>> > Mediawiki-api mailing list
>> > [hidden email]
>> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >
>>
>> _______________________________________________
>> Mediawiki-api mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
>
>
> --
> Luigi Assom
>
> Skype contact: oggigigi
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

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



--
Luigi Assom

Skype contact: oggigigi

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



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




--
Luigi Assom

Skype contact: oggigigi

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

Re: nearby API coordinates

Luigi Assom
Hi everybody,
I fail to combine geodata extension results for a generator, and module to get images:

<a href="http://en.wikipedia.org/w/api.php?action=query&amp;prop=pageimages&amp;pithumbsize=100&amp;pilimit=20&amp;list=geosearch&amp;gsradius=10000&amp;gscoord=37.786971|-122.399677&amp;format=jsonfm&amp;gslimit=50">http://en.wikipedia.org/w/api.php?action=query&prop=pageimages&pithumbsize=100&pilimit=20&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677&format=jsonfm&gslimit=50

I also tried with the sandbox and to combine a generator of coordinates with generator of images, but did not work.
instead, when I use prop=coordinates, it works; but i want to fetch articles nearby a location

How do you fetch thumbnails in nearby search of wikipedia?
thank you again!


On Wed, Jun 26, 2013 at 10:04 AM, Luigi Assom <[hidden email]> wrote:
OK, I reported it to bugzilla


On Tue, Jun 25, 2013 at 11:20 PM, Petr Onderka <[hidden email]> wrote:
That looks like a bug to me. If you set gslimit to 50, you'll get 5 results.
In general, it looks like you'll always get limit/10 results (with a minimum of 2).

Petr Onderka
[[en:User:Svick]]


On Tue, Jun 25, 2013 at 11:15 PM, Luigi Assom <[hidden email]> wrote:
OK! thank you Ed!

last question: why do I get only two articles?
I tried to set the limit but still two results..
&gslimit=10



On Tue, Jun 25, 2013 at 10:36 PM, Ed Summers <[hidden email]> wrote:
Apart from the thumbnail, these come back as part of the example
response in the example, which is easier to see in the JSON (for me):

    http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677&format=json

I suggest you start experimenting with that, and move on to figuring
out how to get images back using geosearch as a generator.

//Ed



On Tue, Jun 25, 2013 at 4:26 PM, Luigi Assom <[hidden email]> wrote:
> thank you Ed,
>
> for curid I mean pageid of the article.
> I basically nead the title, the pageid, the thumbnail (and if possible also
> the meters of distance from your position )
> is it already in your package?
>
>
> On Tue, Jun 25, 2013 at 10:23 PM, Ed Summers <[hidden email]> wrote:
>>
>> You should find an example below the doc if you scan the page for
>> list=geosearch, I think it has this:
>>
>>
>> http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677
>>
>> It is possible to use the geosearch query as a generator for getting
>> page information, like revision ids (is that what you meant by
>> curid?). In wikigeo I wanted to get back image information, summary
>> text, categories etc, so my api call was somewhat involved. I could
>> try to write up something about it if you are interested.
>>
>> //Ed
>>
>> On Tue, Jun 25, 2013 at 4:16 PM, Luigi Assom <[hidden email]>
>> wrote:
>> > Thank you Ed,
>> >
>> > indeed, I am looking for smthing like this!
>> > I see your examples, is it possible to extend the json in order to get
>> > also
>> > the curid of articles, not only the url and titles of wiki pages?
>> >
>> > Could you also add an example of how to use the list=geosearch api ?
>> > (this is wrong ..  :)
>> > http://en.wikipedia.org/w/api.php?action=query&list=geosearch )
>> >
>> > thank you!
>> >
>> >
>> > On Tue, Jun 25, 2013 at 10:07 PM, Ed Summers <[hidden email]> wrote:
>> >>
>> >> You might be interested in the list=geosearch API call. I used it in
>> >> my demo service ici, which displays articles about your current
>> >> location:
>> >>
>> >>     http://inkdroid.org/ici/
>> >>
>> >> I actually ended up pulling out the api querying bits into a separate
>> >> Javascript library called wikigeo that takes some coordinates, and
>> >> will query the Wikipedia API, and format the results as GeoJSON for
>> >> easy placement on Leaflet or Google Maps.
>> >>
>> >>     http://edsu.github.io/wikigeo/
>> >>
>> >> //Ed
>> >>
>> >> On Tue, Jun 25, 2013 at 3:40 PM, Luigi Assom <[hidden email]>
>> >> wrote:
>> >> > Hi,
>> >> >
>> >> > wiki exposes the nearby search of articles:
>> >> > http://en.m.wikipedia.org/wiki/Special:Nearby
>> >> >
>> >> > I now you can use prop=coordinates to expose the coordinates of one
>> >> > article.
>> >> >
>> >> >
>> >> >
>> >> > http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm
>> >> >
>> >> > Is there any api to expose the nearby service for fetching articles
>> >> > close to
>> >> > one's coordinate?
>> >> > How to do the nearby above?
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Luigi Assom
>> >> >
>> >> > Skype contact: oggigigi
>> >> >
>> >> > _______________________________________________
>> >> > Mediawiki-api mailing list
>> >> > [hidden email]
>> >> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >> >
>> >>
>> >> _______________________________________________
>> >> Mediawiki-api mailing list
>> >> [hidden email]
>> >> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >
>> >
>> >
>> >
>> > --
>> > Luigi Assom
>> >
>> > Skype contact: oggigigi
>> >
>> > _______________________________________________
>> > Mediawiki-api mailing list
>> > [hidden email]
>> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> >
>>
>> _______________________________________________
>> Mediawiki-api mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
>
>
> --
> Luigi Assom
>
> Skype contact: oggigigi
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

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



--
Luigi Assom

Skype contact: oggigigi

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



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




--
Luigi Assom

Skype contact: oggigigi



--
Luigi Assom

Skype contact: oggigigi

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

Re: nearby API coordinates

Max Semenik
On 26.06.2013, 12:26 Luigi wrote:

> Hi everybody,
> I fail to combine geodata extension results for a generator, and module to get images:

> http://en.wikipedia.org/w/api.php?action=query&prop=pageimages&pithumbsize=100&pilimit=20&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677&format=jsonfm&gslimit=50

http://en.wikipedia.org/w/api.php?action=query&prop=pageimages&pithumbsize=100&pilimit=20&generator=geosearch&ggsradius=10000&ggscoord=37.786971|-122.399677&format=jsonfm&ggslimit=50

--
Best regards,
  Max Semenik ([[User:MaxSem]])


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