owncloud/core — pull request #6989 by AdamWill (2014-01-29 06:53:12+00:00)
Title: Migrate Google Drive external storage app to v1.0.2-beta of the google-api-php-client library

The 0.6 series of google-api-php-client is now unmaintained, and upstream [states](http://code.google.com/p/google-api-php-client/):

"Status: The beta release of the next major revision (1.0.1-beta) of the library is available, please migrate when possible. The newer version is published on GitHub. All new development, and issue tracking, will occur on Github."

There's also a [post](https://groups.google.com/forum/#!topic/google-api-php-client/oGImGKrdP2c) in the Google Group with the topic "Launching 1.0-beta, deprecating 0.6, making this group read-only.", that states:

"Development on the Google PHP client library moved to GitHub with the release of 1.0.0-alpha, and now that the 1.0 branch has reached beta status, there will be no further work on the 0.6 branch of the library."

so it seems pretty clear upstream wants people to move to 1.0, yesterday. OC was on a rather old 0.6 version (0.6.2).

This pulls in the latest tagged release from github (1.0.2-beta) and adjusts the app for the changes in the 1.0 series. Mostly it's just changes to class names, but I also had to change the file download function (fopen) a bit, which involved making the Google_Client instance available to it. The authenticatedRequest functions are now in the auth classes not the io classes, and you can't just do s/$io/$auth/ , because they've made those variables private; you have to call getAuth() (if we still wanted io, we'd have to call getIo()), and you can't do that statically.