Conflict is using gcloud and google-api-client in ruby - google-api-ruby-client

I want to install gcloud 0.11.0, which is depandent on google-api-client version 0.8.3. However, in order to user Google Drive, I need 0.9+.
How can they reside together? Google specifically says - you can use them both... Huh?!
The Google APIs Ruby Client is a client library for using the broad set of Google APIs. gcloud is built specifically for the Google Cloud Platform and is the recommended way to integrate Google Cloud APIs into your Ruby applications. If your application requires both Google Cloud Platform and other Google APIs, the 2 libraries may be used by your application.

Have you tried using them both? The namespaces are different, so I believe it should work just fine.
Also, the next version of gcloud-ruby (due out soon) should be on 0.9.x.

Related

Nativescript different api endpoint for dev/qa/prod environments strategy

I have a NS app that talks to a web api backend. I do not want to hardcode the api base url in the app itself because I need to be able to use different urls for development, testing, and production for different versions of the app.
E.g. Version 1.0 is in production and is pointing to https://someapi.com. I am currently working on version 1.1 and I want to point that to https://dev.someapi.com during development and testing because I have API changes as well. Once this version is QA'd and passes app store validation agains the test API. I will push it to production, deploy the API, and point the version 1.1 from https://dev.someapi.com to https://someapi.com.
Currently, I have a database table that has the api endpoint for each version and environment, so if I needed to QA the app for version 1.1, I query the database when I load the app and get the api endpoint for this version and environment.
Is there a better way for doing this?
Thanks.
Use environment variable with Nativescript CLI & Webpack. You may configure the URLs based on what environment you are building the app for.
There are lot of similar other ways around if you go through Webpack docs.

How to implement Google Analytics for an electron based windows app using universal-analytics?

I want to implement google analytics on my windows app which is primarily built using electron based front-end and Java Spring-boot based back-end. I was not able to find suitable solutions for the same online.
You need to use Measurement Protocol, a standard set of rules for collecting and sending hits from any internet-connected device to Analytics: https://support.google.com/analytics/answer/6086079?hl=en

Firebase Admin SDK - How lacking is the Java release compared to the Node.JS?

I am looking to create a microservice in the backend of my android and iOS app that sends push notification requests to firebase (using maven to organize project). I would like to use the Java admin SDK for this as I am looking to make this call in the backend in this app server rather than right from the android or iOS side. I have been exploring this API and the Java version is missing two APIs that the Node.JS one currently has. I read up on what the two APIs do but I was wondering if anyone who has been working with the admin SDK know how the two Java APIs missing will handicap me in terms of features?
As of today, you won't find the following 2 APIs in the Java Admin SDK:
Firebase Cloud Messaging (FCM)
User management
User management API for Java is currently being developed. FCM will be added in the near future too.

Does Google Container Engine SDK/API exist?

I am planning to launch container cluster from an SDK/API. Presently, I am fine with any language, but I prefer NodeJS SDK. As far as I have seen, I could not find any Container engine SDK. Here is the NodeJS SDK for GCP which does not contain container engine. In fact it contains SDK only for very few GCP services.
I came across OAuth API for container engine but it involves human intervention to launch it. I am looking for service account based authentication for the SDK.
Are there container engine SDKs available ?
Update after discussion with Robert Lacok:
This is the code I tried to use for container APIs with API-key, it does not work. It expects Oauth 2 token, or some other credentials other than Service account. I tried API-key it didnt work. I dont know how to use Service account authentication with the API.
Here is my source code:
Here is the error:
I see a method for Application Default credentials. But I dont think so it will be useful for my use-case. I am trying to create container cluster from AWS Lambda. So, I cant use application default credentials. Is there any other options ?
The API for Google Container Engine is very limited at the moment as all the features are in Alpha status and because they can change not many people are incorporating them into the SDKs they are developing.
These are the current available APIs: https://cloud.google.com/sdk/gcloud/reference/container/
And here is the Alpha APIs: https://cloud.google.com/sdk/gcloud/reference/alpha/container/
What you probably want to do is making calls to the REST API and using the client library for OAuth2 authentication.
You can browse the API documentation and see that every method has a short how-to for a number of languages, NODE.JS being one of them. Have a look here for an example on how to create a container cluster.
You also mentioned service account authentication. The preferred way to do this is to use the application default credentials, you can have a little read about them here.
In short, you want to set an environment variable GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json which is a key to service account you generated in console.
Then the client library will take care of the rest (getting the OAuth tokens and what not).

From Siena on GAE using Play framework 1.X to which database/api/module on Heroku using Play 2.0?

I've really enjoyed using Play framework 1.X on Google App Engine with Siena for data storing.
Now I'm looking into using Play framework 2.0 for a new project. As Play isn't ready for GAE I'm going to try out Heroku. What are my options if I want the simplicity of annotating my classes like with Siena and having them stored in some NoSQL database at Heroku? Can I use the built in data storage support in Play or are there any modules that support some NoSQL addon at Heroku?
Edit:
I want to use Play's Java API (not Scala).
With Play 1.2.X you could use the "MongoLab" add-on to Heroku together with the Morphia Play module.
As for Play2, I would suggest checking out the "salat" plugin to access your MongoDB's. See https://github.com/zenexity/Zest for an example play2 app using salat. Good luck!
If your models are not too specific to GAE, you can switch to postgres quite easily with Siena. It's one of its main purpose ;)

Resources