google-cloud-endpoints

How to unit test Google Cloud Endpoints

♀尐吖头ヾ 提交于 2019-11-29 19:37:21
I'm needing some help setting up unittests for Google Cloud Endpoints. Using WebTest all requests answer with AppError: Bad response: 404 Not Found. I'm not really sure if endpoints is compatible with WebTest. This is how the application is generated: application = endpoints.api_server([TestEndpoint], restricted=False) Then I use WebTest this way: client = webtest.TestApp(application) client.post('/_ah/api/test/v1/test', params) Testing with curl works fine. Should I write tests for endpoints different? What is the suggestion from GAE Endpoints team? After much experimenting and looking at the

Android Google Cloud Storage with “Client ID for Android application” is Forbidden?

允我心安 提交于 2019-11-29 14:54:32
After a lot of reading, I managed to download files from my cloud storage account on android. I had to use the my service account (with the P12 key - which had I had to put into the assets folder), to create the GoogleCredential object. Here is the code - GoogleCredential credent=new GoogleCredential.Builder() .setTransport(httpTransport) .setJsonFactory(JSON_FACTORY) .setServiceAccountPrivateKey(serviceAccountPrivateKey) .setServiceAccountId("myservice-account@developer.gserviceaccount.com").setServiceAccountScopes(Collections.singleton(SCOPE)).build(); Storage client = new Storage.Builder

Generating the API metadata for Cloud Endpoints classes failed

吃可爱长大的小学妹 提交于 2019-11-29 13:02:17
I am working on a backend for my android app on google appengine from months up to now. Everything was working quite good until yesterday. I have not generated endpoint in last 2 months but when I tried to do so yesterday the error showed up. That's the scenario. From Android IDE (Eclipse 4.2) I click on 'Generate cloud endpoint client library'. I have to wait a BIG amount of time... The error appear (I will paste the stacktrace below). Expected output -> all ok and my new endpoint library in my android project. Actual output -> (stacktrace below). I'm working on a machine with Ubuntu 13.04

GAE+Objectify - Parameterized type com.googlecode.objectify.Ref not supported

霸气de小男生 提交于 2019-11-29 12:03:40
I am using Google App engine1.9.3, Eclipse, Objectify5.03. My Class is as follows: import com.googlecode.objectify.Ref; import com.googlecode.objectify.annotation.Entity; import com.googlecode.objectify.annotation.Id; import com.googlecode.objectify.annotation.Load; @Entity public class User { @Id private Long userId; private String userName; @Load private Ref<UserDetails> userDetails; @Load private Ref<UserPassword> userPassword; //getters & setters } When I try creating the google endpoint for this class thru Eclipse, I get the following error: java.lang.IllegalArgumentException:

This API does not support parsing form-encoded input

霸气de小男生 提交于 2019-11-29 11:52:16
问题 I tried to submit data to an endpoint but it said the data size was too large, so I changed the method to POST and received the error: This API does not support parsing form-encoded input. Next I changed the type to application/json, still with post and now I am getting: { "error": { "errors": [ { "domain": "global", "reason": "parseError", "message": "Parse Error" } ], "code": 400, "message": "Parse Error" } } What is the best way to post a large amount of data, i.e. 2730 bytes to an

How to generate client library

六眼飞鱼酱① 提交于 2019-11-29 11:49:52
I am trying to generate java client library for my existing web application, but each time a select "generate cloud endpoint client library" the eclipse shows progress dialog and freezes. Is there a command line tool (something like bin/endpoints.sh) that can be used to generate client library? thanks in advance. EDIT Thanks Dan, I managed to generate client library by using this command: $SDK/endpoints.sh get-client-lib com.test.MyEndpoint You should be able to find out at least a little bit more information about the error in generating the library by looking at the Eclipse error log.

Google sign in issue

为君一笑 提交于 2019-11-29 11:02:25
I use Android Studio 1.0.2 I clicked on the top right google sign in thing and I granted access on the OAuth page, but my internet suddenly dropped in between and I believe this has caused problems. Whenever I click on the top right corner, I get the error log in IDE: IllegalArgumentException: Argument 0 for @NotNull parameter of com/google/gct/login/CredentialedUserRoster.setActiveUser must not be null: Argument 0 for @NotNull parameter of com/google/gct/login/CredentialedUserRoster.setActiveUser must not be null I tried to click on sign out, but nothing happens (I keep getting this log). I

Is there a way to secure Google cloud endpoints proto datastore?

时光总嘲笑我的痴心妄想 提交于 2019-11-29 09:32:35
my setup: Python, google app engine using endpoints_proto_datastore iOS, endpoints Obj-C client library generator Background I've setup a test Google cloud endpoints api and had it running pretty quickly. It works great, using the test app in the iOS simulator, and using Google's APIs Explorer. The API is currently open to all with no authentication. I'd like to: setup an API-key or system-credential that can be used by the app to ensure it alone can access the api - with all others being refused. The method in the Google Endpoints Auth docs (1) is to create an OAuth 2.0 client ID using the

Restrict access to google cloud endpoints to Android app

我的未来我决定 提交于 2019-11-29 07:53:39
I'm using Android Studio to generate Google Cloud Endpoints for an Android app. I've deployed the endpoints and they work ok. What I want to achieve is to enable access to the endpoints only to my app. All the documentation talks about how to enable authentication for users but I only need to restrict the access to the endpoints only from my app. I don't want to use user credentials because the api does not use that. What I tried is creating a client ID for my app in the Google Console and adding to the APi annotation @Api(name = "messageEndpoint", clientIds = {Ids.WEB_CLIENT_ID, Ids.ANDROID

Why is my API not showing up on deployment?

老子叫甜甜 提交于 2019-11-29 07:48:06
I suspect this is caused by the following bug in Endpoints (if valid) but I'm also sure there's a workaround somewhere. https://code.google.com/p/googleappengine/issues/detail?id=9050&can=4&colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log Steps to reproduce: Change a method name, API name of a method, or parameter list in an Endpoints class. Run the endpoints.sh script to generate the API files. Inspect the API files locally and witness the changes being there. So far so good. Deploy to the default version of the app on the server. Check the logs for