How do I call Google Drive API v3 in codename one? - codenameone

I try to find ways to read and write Google drive described in.
Codenameone Connect to Google Drive
But The Google Sign-In JavaScript platform library for Web is deprecated, and unavailable for download after March 31, 2023.
I also find the document but need to call Google Identity Services authorization API. I think I can't use this API in cn1.
https://developers.google.com/identity/gsi/web/guides/overview
Any advices for Google Drive read/write for my cn1 app user?

Related

Google Cloud Java SDK

I was going through the Google Cloud Java SDK on Github when I came across this line. I don't quite understand the meaning of "within Compute/App Engine". This is in with regards to Authentication for Google Cloud Services.
Github Link :
https://github.com/GoogleCloudPlatform/google-cloud-java
*When using google-cloud libraries from within Compute/App Engine, no additional authentication steps are necessary. For example:
`Storage storage = StorageOptions.getDefaultInstance().getService();`*
You can access Google APIs from anywhere on the internet. If the code accessing GCS is running on a phone, on your desktop, on AWS, on a server in colo, then you will need to do the authentication described.
However if you are accessing the API from code that is already running on Google Cloud Platform, then the authentication is automatically provided.

Google App Engine and Google Calendar API

I was wondering if I need the Google java client libraries to access my google calendars from GAE. Are they part of the Google App Engine SDK by default?
Moreover I was not able to find a good example or tutorial which shows how to create, read, update and delete Google calendar events from an Google Cloud Platform app.
Thanks a lot, if you can offer same code examples or links to appropriate and working tutorials.
You're looking for the Google Java API client:
https://developers.google.com/api-client-library/java/
This library isn't included in App Engine by default, but there are instructions on that page for how to install it. When you have it set up, here's the guide for using the calendar API:
https://github.com/google/google-api-java-client-samples/tree/master/calendar-appengine-sample
Hope this helps!

Generate json key for Google Cloud permissions

I have a project and wish to generate a new json key for my service account. I need to do it from app engine via the sdk. Is this possible; I can't find the library? Or can it only be created manually in the console?
There is only one API that lets you manipulate the projects on Google Developer console its called Google Cloud Resource manager API. Here is some notes on my testing of it. Google Developer console API
This API is still in BETA and very new. currently all it lets you do is insert update delete list and get projects. You cant do anything with the settings of the project.
I have been unable to track down any kind of support forum or request forum for this API. It would be nice if they would extend it so we can make changes to the consent screen, oauth credentials and API settings. Not to mention check the Quota programmatically.

Calling Google Endpoint api from a custom Domain

Is it possible to call, my endpoint api (https://myapi.appspot.com/_ah/api/) from my web app hosted in another domain (i.e. www.mydomain.com)?
Thanks.
You actually can't with cloud endpoint version 1, as stated in the doc. It comes out of the box with version 2 (beta as of March 2017)
Note: version 1 of the Google Cloud Endpoints Frameworks did not support custom domains but version 2 does.
Same question on stackoverflow:
App engine endpoints API - 404 with custom domain
Deploy Google Endpoint in a custom Domain
Yes of course.
You can call your endpoints wherever you are.
You can develop an App engine backend based on Enpoints and call them from Android, IOS or another web app.
It's like Google APIs. The same way to consume them.
https://developers.google.com/appengine/docs/python/endpoints/

How to create and upload a file in google Drive using Salesforce APEX and Drive APIs?

I want to create and upload a document (txt) to google Drive with the help of Salesforce.com APEX code and Google Drive APIs.
Do anybody has idea?
thanks
Yes, you can.
Since Google Drive SDK is basically HTTP request and there is HttpRequest Class in Apex, you can use Google Drive SDK with Apex. However, there is no official support for Apex in Google Drive, and you should build your own library for it. Here is documentation about Drive API having some detail of requests and responses you will have with Drive SDK.

Resources