Foursquare API nearByVenue service issue - iphone

Using Foursquare api "Venue" service.. i am parsing nearByVenue details like shop, restaurant etc.
Suppose as an example i am getting following link:
https://api.foursquare.com/v1/venues.json?geolat=40.562362&geolong=-111.938689
Issue is I am getting only 10 nearbyDetails.. suppose I am standing in New York there should be number of venue details.. why I am getting only 10 details only ?
Is there any other service or i am following wrong approach to use it?
Thanks

Add l=n where n is your limit in query string. The default limit is set to 30.
https://api.foursquare.com/v1/venues.json?geolat=40.562362&geolong=-111.938689&l=10

https://api.foursquare.com/v1/venues.xml?geolat=40.562362&geolong=-111.938689&l=50&q=coffee
You can change the value of l="no of result" parameter.
And also if you want to search for particular keyword like ATM, Coffee
then you can add the parameter q and add it's value like q="atm", q="coffee", etc.
hope it will be helpful to you.

Related

Gremlin: Generate a list by location of counts for active versus inactive users

I have vertices people, usertype, and location. People has outgoing edges people_location and people_usertype. People has property 'name', usertype has property 'activationStatus', and location has property 'name'.
I want to create a list that looks like this:
[[1]: https://i.stack.imgur.com/lKzZL.png]
I want the count of people, by location, for activationStatus "active" and "inactive" where the location has "US" in it.
This is all I have only for count of people by location where the location 'name' begins with US:
g.V()hasLabel('people').out('people_publicisofficelocation')
.filter(has('name',between('US','UT')))
.groupCount().by('name')
It is running but not yielding results.
You can simulate 'starts with' behavior in versions of TinkerPop prior to 3.4 using something like has('name',between('US','UT')) so you could replace the filter line above with that. If the graph implementation you are using supports TinkerPop 3.4 there are additional text predicates you can use for begins with, ends with and contains.
As others have said if you can post some sample addV() and addE() steps that build part of your graph it will be easier to give a more precise answer.
This worked for me!
g.V().hasLabel('Location').filter(has('name',between('US','UT')))
.project('Name','Active', 'Inactive', 'Total')  .by('name')  .by(__.both('people_location').out('people_usertype')
.where(values('activationStatus').is(eq('Active'))).count())  .by(__.both('people_location').out('people_usertype')
.where(values('activationStatus').is(eq('Inactive'))).count()) 
.by(__.both('people_location').out('people_usertype').count())

Retrive all districts based on city name from REST query

I've searched for solution for that problem on here-api documentation but I can't really find it out ! I'm starting doubt if this even possible.
Ok so basicly what i need to know for now:
1. Is this even possible on this platform ?
2. Using exactly which 'module' (eg. PLATFORM DATA EXTENSION,BATCH GEOCODER)
There is no straight solution to get all districts in a city since district concept varies from one place to another(country-specific). Still you can try one of the below options:
administrative-areas-buildings category in places api
city-town-village category in places api
retrieveAreas mode in geocoder api (apply bbox or increase the radius of prox parameter and see if it works for your location)
Search Text in geocoder can also be used if you are search for districts which match a regex
You can check if the above 1) and 2) are applicable to your location using https://places.demo.api.here.com/places/v1/categories/places?at=41.8369%2C-87.684&app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg

Facebook graph api where location equals

I'm trying to search pages which location city equals to xyz.
For example find page Guiness in city = Wroclaw, it looks like this:
/search?q=Guiness&type=page&city=Wroclaw
But it doesn't work ?!
I tried many different ways.
I think the problem is in that the location is complex type, but I can't find in documentation how to search by complex type :(.
Hope help will came soon.
Thanks !
It's clearly documented what is possible with the /search endpoint:
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.5#search
You can't use other parameters than outlined there. Either this would be
/search?q=Guiness%20Wroclaw&type=page&fields=id,name,location
or search for a place with center coordinate and a distance:
/search?q=Guiness&type=place&center=52.231804,21.007973&distance=5000

Does the use of place parameter in queries using the Facebook Graph API affect the results of post searches?

I 've been trying to test the place parameter when used for searching post using the Facebook Graph API. However it does not seem to affect results !!
For example:
https://graph.facebook.com/search?q=coffee&type=post&center=44,55&distance=1000
in the previous URL results do not change when I change the values of latitude and longitude (44,55) or the radius (1000)
Am I doing something wrong ?
I think the "distance" and "center" parameters only work when you use the parameter "type=place".
e.g. The two links below return demonstrate this.
https://graph.facebook.com/search?q=coffee&type=place&center=44.270962,55.096039&distance=1000&access_token=[access_token]
https://graph.facebook.com/search?q=coffee&type=place&center=53.270962,-6.096039&distance=1000&access_token=[access_token]
Once you have all the places returned, you could then do a further search on each place for their posts that contain coffee...

Facing issue when search using Zend_Lucene

I am using zend_lucene for search functionality.I 've the following code,
$doc->addField(Zend_Search_Lucene_Field::Text('categoryName', $result->name));
Here name in "$result->name" is varchar type in Database. Also have some following values like dinesh,kumar123,3333. For testing purpose i have stored number in name field. when i search dinesh , Search comes with exact result but when i use number search, That is 3333 Search has no result. What i done wrong on the code Zend_Search_Lucene_Field::Text.
Is there any way for search number/char/alphanumeric (kumar123) ?
Thanks in Advance
Finally i found by declaring "Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive());" and use Zend_Search_Lucene_Field::Keyword instead of Zend_Search_Lucene_Field::Text