Migrating to Drive SDK from DocumentsList API V3 - google-drive-api

I just came to know that DocumentsList API is depricated. So i thought of migrating my app to Drive and saw this page. I mostly use urls like https://docs.google.com/feeds/default/private/full/. So is it enough to replace them with new URL's like this https://www.googleapis.com/drive/v2/files/ ?
Just wanted to confirm is that all i need to takecare or am I missing anything. My App uses OAuth2 for authorization. Do I need to change anything in there too?

If you are constructing the requests yourself, you have to replace the URLs but also take into account that the responses from the Drive API will be JSON-formatted and not XML-formatted as in the Documents List API.
If instead you are using one of the Google-provided client libraries, you have to start using a newer client library, that you can download from https://developers.google.com/drive/downloads.
The migration guide is mostly a guide that maps methods from the Documents List API into methods of the Drive API and should be used as reference to know what is available and where.

Oauth 2.0 is fine. You can even use the same tokens you already have for Documents List v3.

Related

Is there any API to get metadata schema for Google Drive rest API

On Google Drive documentation I could see schema for individual resources like File,Permissions etc but no where mentioned about API for meat data of all resources.
The Discovery Service API is an interesting if little known API it gives you all the information you could ever need about Google APIs.
If you take the following command and place it in a web browser you will see everything you could ever want to know about the Google Drive API v3.
https://www.googleapis.com/discovery/v1/apis/drive/v3/rest

Do you need to migrate to Drive API when using https://spreadsheets.google.com/feeds/

The 22nd of January, I received an email with the subject 'Important: Steps to migrate from discontinued Documents List API' from Google Apps .
Important: Steps to migrate from discontinued Documents List API
Hello administrators,
We recently communicated that Documents List API will be discontinued on April 20, 2015. This change means that service calls for this API will no longer be supported, and any Google Apps features that are implemented using this API will no longer function.
Our records indicate that you may have an application that uses Documents List API, and we recommend that you migrate to Drive API, which has comparable
functionality, as soon as possible.
Here's what you need to do:
Determine if you have an application that makes requests to these
types of URLs:
https://docs.google.com/feeds/
https://docs.googleusercontent.com/
https://spreadsheets.google.com/feeds/
Migrate the applications to Drive
API. If you have questions
about migration, please contact Google Apps for Work Support.
Sincerely, The Google Apps for Work Team
I think it says that applications using https://spreadsheets.google.com/feeds/ should migrate to the new Drive API. But in the new Drive API, this URL is used too:
https://developers.google.com/google-apps/spreadsheets/#sheets_api_urls_visibilities_and_projections
Is there a typo somewhere in the URL either in the email or Drive API documentation?
Or is this email saying that when you determined you used any of these URL's you're OK?
PS: I opened a case at Google but I fear a late response, so I asked here.
Short answer is no.
The Docslist API is being discontinued because it has been replaced by the Drive API. In the case of the Spreadsheet API, there is no replacement API (yet - maybe one day), so it remains supported.
The only gotcha is that at some point, only OAuth 2 will be supported for authentication/authorisation so if you're using OAuth 1 or u/p, you have some work to do.
The official Google response is that the Spreadsheets API will continue to function after the 20 April shutdown:
"Apologies for the confusing email. The sheets API is not yet deprecated and will continue to operate beyond the April shutdowns."
https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3709

Are there examples or support for Google Drive API with ColdFusion?

I would like to access the Google Drive API via ColdFusion (version 9) but I have not found any up to date information to do so. Does anyone know of any information out there regarding this?
Since Google Drive SDK is basically HTTP request and since you can make http request with ColdFusion, you can use Google Drive SDK with ColdFusion. However, there is no official support for ColdFusion in Google Drive, and you should build your own library for it. Here is documentation about Drive API having some details of requests and responses you will have with Drive SDK.
FYI, you can easily test API requests using OAuth 2.0 Playground

Google Maps iOS SDK - Search for places

I'm new to both iOS programming & the Google Maps iOS SDK, so apologies if this is a basic question.
I want to include a Google map, in an app and give users the ability to search for various places (restaurants, bars, gyms, etc) within a certain radius of a marker.
I know this is possible using the javascript api, but can it be done using the maps iOS SDK? I have read all of the information here and have searched Stack Overflow & Google but I can't really find anything that gives me any pointers.
Within the documentation, Google say that using a URL Scheme you can launch a native iOS app and pass in parameters for searches, directions etc. Is this what I need to be using, or is that more tailored to a webapp?
Any help, advice, or pointers to tutorials (other than the ones provided by Google) would be massively appreciated.
Cheers
The Google Maps URL Scheme can currently only be used to open the Google Maps app to search for a location or for directions. It can't search for places. Also, if your own app did this, then it would shut down your app and switch to the maps app, which may not be what you want. It will also only work if the user has installed the Google Maps app.
You would probably want to use the Google Places API to make http requests from your native app. You can request a response in either JSON or XML format. Then you'll need to parse the response, and use it to add markers to a GMSMapView using the Google Maps SDK for iOS.
This blog post describes this library which the blog post's author wrote to wrap the Google Places API. You wouldn't need most of this code, but it might give you an idea of where to start. This class is the main one which handles the requests to the places API.
Note that this library uses a third-party JSON parser - SBJsonParser. As of version 5.0 iOS includes a native JSON parser, NSJSONSerialization. So if your app's minimum supported iOS version is 5.0 or higher, you don't need to use a third-party library.

When using the Google Places API, what is the difference between "using the JavaScript library" and "calling the API directly"?

I have seen the two forms of reference to the Google Places Library/Service, using JavaScript vs calling the API directly, a number of times, but I don't understand the difference. The Google Docs don't describe anything about two methods of accessing the API.
For example, this question talks about 2 ways of accessing the API: OVER_QUERY_LIMIT in a loop
And it appears that there is some type of direct web access taking place in this question: Querying Google Places API using jQuery
Is this something where there was an old way that involved formatting URL parameters and the new way is by utilizing the JavaScript library calls?
FINAL SUMMARY EDIT: There are two distinct ways of requesting data from Google, as described in #Dan Nissenbaum's answer below. And since my original question, the QUERY_LIMIT question referenced above has been edited to also include more information about the two options.
Perhaps you are referring to the distinction between the Google Places API that is intended for use on the SERVER (i.e., utilizing PHP to call the Google Places API directly), and using the completely different approach of the Google Places Javascript Library in which the BROWSER executes Javascript using the Javascript library provided by Google (that internally wraps calls to the Google Places API, so that you, as a Javascript programmer, only need to understand the Javascript library provided by Google, and use that)?
Here are the two scenarios.
Scenario #1: Use the API directly. For this method, you must refer to Google's API documentation for the Google Places API: https://developers.google.com/maps/documentation/places/.
Using this API works as follows (giving a simple example only). Say you want to retrieve places within 1000 meters of latitude=-27.2531166, longitude=138.8655664. You need to hit a URL as described by the API documentation: https://developers.google.com/maps/documentation/places/#PlaceSearchRequests.
In this example, the URL looks like this (it's long):
https://maps.googleapis.com/maps/api/place/search/json?location=-27.2531166,138.8655664&radius=1000&sensor=false&key=AddYourOwnKeyHere
You need a key for your personal use, which I assume you have. There are other options you can specify, such as limiting the results to restaurants, etc.
When you hit this URL, the data will be returned in either JSON, or XML format, as specified by the text json in the URL above (use the text xml for xml). This data is returned exactly like data is returned from any URL call when you hit a URL in your browser.
You can test this by simply typing the URL directly in your browser, and see the results.
To use the API directly from code, you will need to use code that hits the external URL above within code and retrieves the results within code (for example, using the PHP CURL library, or using AJAX in Javascript).
Scenario #2: You use the Javascript library that Google provides that wraps the API, so you don't need to deal with it. I'll update the answer with more details about this, if you don't know what this is.
The docs do discuss the two different approaches. The Places Library utilizes the Google Places services from within the JavaScript Google Maps API. If you are using the Google Maps API in a browser, this is probably the approach for you:
https://developers.google.com/maps/documentation/javascript/places
There is also a web service, which allows you to query directly from your application. You query it using direct http calls to Google services. If you need access to the data on your server or a mobile device, this is the approach you want to take:
https://developers.google.com/maps/documentation/places