google-cloud-endpoints

Versioning with endpoint V2 on GAE

六眼飞鱼酱① 提交于 2019-12-09 05:07:31
问题 I have the live version of my app deployed with its endpoints (no problem with that). I also want to easily be able to test other versions (e.g. staging). With endpointV1 : no problem. With endpointV2 : Everything works fine if I deploy to the live version (at https://[PROJECT-ID].appspot.com but does not work for other versions. After deploying to staging at https://staging-dot-[PROJECT-ID].appspot.com the deployment is successful, but when the frontend calls the backend, the request is

Generate cloud endpoint client library suddenly stopped working

青春壹個敷衍的年華 提交于 2019-12-09 00:45:33
问题 Normally when I right-click my app engine project and choose "Generate cloud endpoint client library" using the Google plugin for Eclipse, it generates the client libraries and automatically copies them into the Android client project. However, for no apparent reason, the client library is no longer being copied to the client project. In fact, it has been removed (so now I have a lot of errors in my project because it can't find the libraries). I've tried re-generating the client library

What is the best way to auth, identify and store delicate information about users?

巧了我就是萌 提交于 2019-12-08 13:39:34
With the purpose of learning about endpoints I'm building an app called "Where Are You?". The app lets users request the location of other users. The idea is that it does so by letting the user select a contact, lookup the contact by phone number in my endpoint. If found it means that the contact have the app and GCM is sent requesting the location. If the contact isn't found a SMS is sent with an url which will request the location through a browser, perform a http post of said location and have the server GCM it back to the person requesting the location. I need to authenticate users of the

How to return a json object in Google Endpoints

纵饮孤独 提交于 2019-12-08 13:02:46
问题 The way I'm doing right now is I have a response class with a string message and return a json string. On the client side, I parse the string to use it as a object. I was wondering if we can simply return a json object rather going through the parsing part what I use now: class Response(messages.Message): resp = messages.StringField(1) on the client side I will get something like this {resp: "{"message": "sucess", "some_data":"data"}"} and I parse the resp string. However, my desired response

How can one subclass endpoints.ServiceException?

假如想象 提交于 2019-12-08 10:36:22
问题 The documentation mentions "subclassing endpoints.ServiceException" at https://developers.google.com/appengine/docs/python/endpoints/exceptions. However, subclasses can't really express anything beyond a string message, "state" and http code. For any application to have smarter exception handling, errors need to carry more than this. How can one subclass the exception class, providing a custom message/state? 回答1: Currently, there is no way to extend the payload, but you can customize the

Google App Engine api throws 503, but error not shown in the admin console

给你一囗甜甜゛ 提交于 2019-12-08 09:39:21
问题 I have deployed my project in Google App Engine, python using API endpoints. The API calls made from AngularJS throws a 503. But when I look through into the admin console it shows the status as 200. If the same API is called once again with same parameters it does not throw an error and it works perfectly fine. The quota limit is set to "unlimited". Attaching the screenshot of the response. 来源: https://stackoverflow.com/questions/43255910/google-app-engine-api-throws-503-but-error-not-shown

Any way to cache query results from google cloud endpoints?

戏子无情 提交于 2019-12-08 09:35:53
问题 I need to store the results of the query that i fired the last time locally on the client android app for immediately using the data. The updated data can be fetched later from an AsyncTack or a thread The objects that the generated client libraries return are of class that extends GenericJson is there any way to convert this into a String and store in sharedpreferences and Later instantiate the Objects again ? heres the class definition // IntelliJ API Decompiler stub source generated from a

How to add more scopes in GoogleCloud Endpoints

牧云@^-^@ 提交于 2019-12-08 09:21:30
问题 So, I want to use Plus.me or lets say userinfo.profile scope with Google Cloud Endpoints with python as a backend. Server Configuration: @endpoints.api( name='sidebar', version='v1',# auth=AUTH_CONFIG, allowed_client_ids=[WEB_CLIENT_ID, ANDROID_CLIENT_ID, endpoints.API_EXPLORER_CLIENT_ID], audiences=[ANDROID_AUDIENCE], scopes=[endpoints.EMAIL_SCOPE, "https://www.googleapis.com/auth/plus.me"]) class Sidebar(remote.Service): Does anybody have an idea how to send the appropriate scope from

Response header GAE endpoints

╄→尐↘猪︶ㄣ 提交于 2019-12-08 06:35:50
问题 Is it possible to take control over creating response in Google App Engine's Endpoints? I know that GAE can inject Request object to some API method Thanks in advance. 回答1: I don't think Google Cloud Endpoints officially support that. But one thing you can try to do is to extends com.google.api.server.spi.SystemServiceServlet class, and make some customization there. And then change your servletclass in the web.xml file into the one you created. I personally never try to do that, so I cannot

How to cache the response in google cloud endpoint?

大兔子大兔子 提交于 2019-12-08 06:32:14
问题 I'm making an android app which uses google cloud endpoints as the backend. So I'm making request from the app. I want to cache the response of these requests in memory as well as storage. I want to cache the response on the phone, so that I don't have to make unnecessary repeated network requests. I searched the internet for some inbuilt solution but couldn't find anything like that in the api provided by google. There's a total of about 2MB data that I want to cache. This data is spread