GeoQuery

Solved!
Posted in General by akash k Tue Apr 19 2016 07:12:45 GMT+0000 (UTC)·4·Viewed 1,213 times

Does Buddy support Que Query (eg: I want to find how many users are there in my area)
Bradley Serbus
Apr 21, 2016

Hi Akash,

We support geo queries across most of our API objects. Generally you add a 'locationRange' parameter to a search, which is normally a GET request to an object type. Here's a short example to search users within 10,000 meters of a particular latitude/longitude, using our JavaScript SDK:

Buddy.get('/users', { locationRange: "47.1, -122.3, 10000" }
function(err, result) {
if (result.success) {
// Do something with the result!
} else {
}
}
);

Check out all the 'Search' entries in our documentation at http://docs.buddy.com/docs.

Thanks,
Brad


Bradley Serbus marked this as solved
akash k
Apr 21, 2016

Thanx. Is it avafor android sdk.
And your reply is so late .

Bradley Serbus
Apr 21, 2016

Akash,

Sorry for the delay! One cool thing about our documentation is that for each API, you can click on the different SDKs we support, and the code examples automatically translate. So if you go to http://docs.buddy.com/docs/search-users, and click on 'Android', you will see the above example, with more parameters, using our Android SDK.

Thanks,
Brad

akash k
Apr 21, 2016

Thanx again .it really helped.

Markdown is allowed