How to retrieve family from graph API? - json

I know how to retrieve family from Facebook using fql. But I can't find how to do so using the much more convenient graph API. Is there a way or is fql the only way to find relationships?

Via graph API it will be:
https://graph.facebook.com/UID/family
which requires user_relationships/friends_relationships extended permissions

Related

Listing model files in BIM360 through data management API

I have a need to display models stored in BIM360 in the Forge Viewer. For this reason I'd like to list all models that are contained in a project.
I was looking at fetching them using the search API. Is this a reasonable way to do it? I guess the only way to identify model files is to use attributes.fileType in the filter? And then look at the relationships.derivatives data. Or is there some other way to search for models?
Unfortunately, your request is not supported by the Search API currently. With my experience, extracting relationships.derivatives out is the only way manually from the API responses that contain this attribute e.g.
GET projects/:project_id/folders/:folder_id/contents
GET projects/:project_id/items/:item_id/tip
GET projects/:project_id/items/:item_id/versions

How can I find some type of objects via OSM

How can i find some type of object via OpenStreetMap ? I want to send the request and receive answer in XML format (JSON will be ok). E.g. i want to know what historical objects or restaurant are available in place where I'm.
Have a look at the Overpass API to query for OSM data and Overpass Turbo for testing/displaying.
For more infos you should checkout the OSM specific sites: http://wiki.openstreetmap.org/wiki/Help
For simple queries a geocoder should suffice. There are various search engines for OSM of which Nominatim is the most popular one currently. Please see Nominatim's usage policy if you intend to use OpenStreetMap's official Nominatim instance, or choose one of the alternatives.
For more complex queries take a look at the Overpass API mentioned in the answer by RoToRa.

How can I get business reviews from google maps using google-maps-api?

When I search for food (for example) in google maps, i get a bunch of businesses, each one having reviews... like in Yelp. I am trying to get those business' reviews so I can use them as training data to my NLP review classifier.
... and also does the api support only javascript? can i do something to use the API with Java?
Google dont make this available by any API.
v3 of the javascript api - only supports javascript - its designed to run in a web-browser. So makes absolutely no sense to run in java. (although can have a browser in a java app)
... other apis can be called from java.

Using C++ with Google Maps API. Only text info required

Is it possible to call Google Maps API using a C++ code to retrieve text info about nearby locations.
I am trying to make a simple application (C++) which gives the information about Nearby places on entering longitude and latitude info. Only data I am looking for is the Name of Nearby place and its distance from mentioned location.
Is it possible?
I think your best option would be to use the Google Places API with the JSON format for request.
I don't know about any library that would perform the thing automatically, but there is a thread on StackOverflow about JSON parsing in C++ . Even it does not provide an answer it as good votes scores.
I guess the web call could be made with something like curl.

Is it possible to get Google Maps Directions using HTTP requests?

Is it possible to use the Google Maps API router just using HTTP? Something like http://maps.google.com?from=blah?to=blah
And have it return some sort of XML or JSON representing the directions?
If you want Google to allow legal access to driving directions via HTTP you might consider voting for the enhancement request: Issue 235. Theoretically, the more people that vote for an enhancement request, the more attention Google give to it.
However, I strongly suspect that there might be contractual issues with the organisations that supply the data. Organisations like TeleAtlas impose restrictions about how Google can use their data. TeleAtlas probably don't want Google to make it legal for people to use their data to create apps for free that directly compete with their own commercial apps and devices.
There is no documented and approved method to access driving directions via an HTTP API request.
This makes it difficult to get driving directions on the server-side, which I assume is your intention.
Not only it is undocumented and difficult to achieve, but it would also violate the restrictions 10.1 and 10.5 of the Google Maps API Terms and Conditions.
However, if you don't mind the challenge, and you believe that rules are there to be broken, you may want to check these articles:
Calculate driving directions using PHP?
Retrieve driving directions from google maps with server-side HTTP calls and show results with static maps for WAP
Actually yes, and they do it themselves
The REST format is like:
http://maps.google.com/maps/nav?output=js&q=from:%20Montreal%20to:%20Toronto&key=apikey
Where q should have the form: "from: x to: y" (url encoded).
Some of the parameters are similar to the HTTP Geocoding service: http://code.google.com/apis/maps/documentation/geocoding/index.html
Mike
As of May, 2010, directions are available via web services:
http://code.google.com/apis/maps/documentation/directions/
Directions are returned in XML or JSON format:
http://maps.google.com/maps/api/directions/json?origin=Boston,MA&destination=Concord,MA&waypoints=Charlestown,MA|Lexington,MA&sensor=false
http://maps.google.com/maps/api/directions/xml?origin=Boston,MA&destination=Concord,MA&waypoints=Charlestown,MA|Lexington,MA&sensor=false
It's pretty danged easy to use.
Here you can find a list of parameters you can pass to the maps.google.com URL. Maybe you'll be able to get the information you need. I don't know what the returned output contains. At least you are able to define different output types.
I have already used this library with python and it works well, although it's against Google Maps API Terms.
API v3 (made the official version in the last six months), does:
http://code.google.com/apis/maps/documentation/directions/
Also note that most of the competing services (Bing Maps, Yahoo, MapQuest, CloudMade, etc) also support RESTful web services along these lines.
As always with these services, check the Terms & Conditions.
I've never used the API but it is pretty easy to get the structured directions data from a google maps page using JS to access the gmap page's DOM.