google-cloud-endpoints

Hot to return a pure array of objects from AppEngine endpoint?

房东的猫 提交于 2019-12-22 10:39:03
问题 I am doing AppEngine endpoints for a RESTFul backend in AppEngine. I use AngujarJS on the client side, managing server data with ngResource. My issue: I am not able to return a pure array from AppEngine Endpoint. I tried this: @ApiMethod( name = "mpscorerapi.getAllResults", path = "/tournament/{tournamentId}/result/" httpMethod = HttpMethod.GET ) public List<SimpleResult> getAllResults(@Named("tournamentId") Long tournamentId) throws NotFoundException { ... } Although this gets the data from

With Android, how do I set the maximum deadline for a Cloud Endpoint request?

六眼飞鱼酱① 提交于 2019-12-22 08:55:27
问题 When making a ClientEndpoint API request from an Android app to an App-Engine service, how do I set a deadline/timeout for the execute() action? I'm looking for something like: Foo foo = endpoint.getSomething(id) .setDeadline(2000/*ms*/) .execute(); 回答1: When building the endpoint, specify a connect and read timeout in HttpRequestInitializer. For example, in this case 20 and 10 secs respectively. SomeEndpoint.Builder endpointBuilder = new SomeEndpoint.Builder( AndroidHttp

Creating a Composite Index for AppEngine in Android-Studio-based project

眉间皱痕 提交于 2019-12-22 08:42:16
问题 I used Android Studio to create both an Android project, and its backend AppEngine Endpoints counterpart. I have a datastore for which I am using Objectify. The system worked great, until I added a filter to my Query (to show only specific given emails). Query<Report> query = ofy().load().type(Report.class).filter("email", user.getEmail()).order("email").order("-when").limit(limit); This is the POJO Datastore Entity: @Entity public class Report { @Id Long id; String who; @Index Date when;

Push Notifications in Android using Google App Engine

时光毁灭记忆、已成空白 提交于 2019-12-22 04:53:09
问题 I am currently developing an app where users create posts that are stored on a server. When another user shows interest in a post by clicking a button, I want to notify the author of the post using push notifications. I have already set up the data storage using cloud endpoints with Google App Engine. Is there anyway I can use these endpoints to implement push notifications? If not is there another easy way to implement push notifications given my current setup? I have already read about

Error 413 (Request Entity Too Large) on a Google Cloud Endpoints API call from Android

风流意气都作罢 提交于 2019-12-22 01:30:32
问题 I have a Google Cloud Endpoints API method as follows. @ApiMethod(name = "setImage", httpMethod = ApiMethod.HttpMethod.POST) public void setImage(HttpServletRequest httpRequest, com.google.appengine.api.users.User appEngineUser, @Named("image") String image) throws IOException, OAuthRequestException, ForbiddenException, com.google.api.server.spi.response.NotFoundException { // Write the image text to a pojo and save the pojo in the datastore. } I generate client libraries for iOS and Android

HTTP code 302 encountered when deploying on Google App Engine Endpoints

百般思念 提交于 2019-12-21 20:45:57
问题 When developing for App Engine Endpoints in Java using the official documentation, after running endpoints.cmd with the appropriate parameters and deploying in GAE, the dev server shows the proper endpoints at http://localhost:8888/_ah/api/discovery/v1/apis , but accessing the explorer for the production version on GAE shows old endpoints at https://<my-app>.appspot.com/_ah/api/discovery/v1/apis . The error was traced to the HTTP 302 (moved temporarily) code found in the Logs of the

Use authorized Google Cloud Endpoints with Google Sign in

最后都变了- 提交于 2019-12-21 17:02:08
问题 I have an app that uses Google Cloud Endpoints. Some methods need authorization so I followed this tutorial. This requires the GET_ACCOUNTS permissions. I am updating the app to work with runtime permissions. I do not like to request permission to read contacts, but GET_ACCOUNTS is in the same group. Because of this I am looking to use authorization without GET_ACCOUNTS permission. I think that Google Sign In could work but I am unable to find a way to use the result from Google Sign In. This

Endpoints stopped working with proxy.html error

邮差的信 提交于 2019-12-21 06:06:07
问题 Error I'm getting Refused to display 'ah/api/static/proxy.html?jsh=m%3B%2F%2">https://appname.appspot.com/ ah/api/static/proxy.html?jsh=m%3B%2F %2…8s_uMxLg#parent=http%3A%2F%2Fappname.appspot.com&rpctoken=....' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. Everything worked until yesterday. Started browser this morning to access app and got above message. Getting this on other endpoint apps too. Seems to fail when I access the endpoints to get info from the backend. 回答1: Yes,

Is it possible to create a google app engine end point which can upload a photo in a blobstore?

拥有回忆 提交于 2019-12-21 05:31:28
问题 I would like to know if is it possible to upload a photo in a appengine blobstore by using an end point ? If yes, please tell how or redirect to any available resource. If not, can you please expose any simple alternative : Using another library ? Using a standard servlet with other libraries ? 回答1: This post should be useful : serving blobstore image through app-engine endpoints api Please see another approach The Photofeed sample Java app. There is also a sample code . This app uses

Appengine Cloud Endpoints with new Google+ sign-in

泪湿孤枕 提交于 2019-12-21 04:52:34
问题 How does the new google+ sign-in apis fit into making authenticated calls to Cloud Endpoints. To use OAuth with endpoints the app must request permission for the 'https://www.googleapis.com/auth/userinfo.email' scope at a minimum. Will using the Google+ sign-in button grant this scope? Or am I going to have to ask my users for yet another permission?? 回答1: The Google+ sign-in button has a "scopes" attribute that you can list additional scopes that you would like to request. You can list the