google-cloud-endpoints

Executing DISTINCT query with objectify for app engine

旧巷老猫 提交于 2019-12-12 16:45:43
问题 Given the following two tables, how do I write/execute the following query in objectify: SELECT DISTINCT(authorId) FROM Book ORDER BY date DESCENDING LIMIT 30. @Entity Book{ @Id private Long bookId;//auto generated private Key<Author> authorKey; private String title; private Date date; … } @Entity Author{ @Id private Long authorId;//auto generated private String name; … } Note that all I am looking for in my result is a list of authorIds, as in public List<Long> getActiveAuthors(){ ..

AngularJS: how to get system remote?

让人想犯罪 __ 提交于 2019-12-12 13:13:29
问题 Please let me elaborate what is my goal How to take a remote desktop connection from my Angular.js application of a windows application running system. My server is Google App Engine. What I have thought of so far: Windows application will take screen shots and send to Google App Engine Channel API. The Google App Engine channel API will notify the Angular app and send it the screen shots and show it. The problem with this method is that it's very costly and slow. Request Please suggest some

cloud endpoints resource attribute for transmitting named params & body not working

老子叫甜甜 提交于 2019-12-12 10:09:43
问题 I am trying to implement a call to a google cloud endpoint via the gapi.client rpc calls. As described in the docs (and Google Cloud Endpoints - Making calls with JS client, passing params and JSON body), it should be possible to include named parameters and an object body: @ApiMethod(name = "staff.insert", httpMethod="post") public Staff insertStaff(@Named("token") String token, Staff staff) throws ConflictException, NotFoundException, InternalServerErrorException { should be callable via

Mobile Backend handle continuous queries in background

こ雲淡風輕ζ 提交于 2019-12-12 10:04:39
问题 I'm using Mobile Backend Starter in my app, and I'm able to continuously receive data using this code: CloudCallbackHandler<List<CloudEntity>> handler = new CloudCallbackHandler<List<CloudEntity>>() { @Override public void onComplete(List<CloudEntity> results) { Logger.log(MainActivity.this, "onComplete"); } @Override public void onError(IOException e) { Logger.log(MainActivity.this, e); } }; CloudQuery cq = new CloudQuery("Test"); cq.setLimit(50); cq.setSort(CloudEntity.PROP_UPDATED_AT,

How do I setup a ManyToOne relationship using JPA with AppEngine?

百般思念 提交于 2019-12-12 09:55:02
问题 I've been trying to get a relationship working with 2 entities in AppEngine, using JPA, and am currently running into this error: java.io.IOException: com.google.appengine.repackaged.org.codehaus.jackson.map.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain My entities look like this: @Entity public class MyUser { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key key; @OneToMany(fetch = FetchType.LAZY, mappedBy = "user", cascade =

Using Guice Injection in custom Authenticator on Google Cloud Endpoints

和自甴很熟 提交于 2019-12-12 09:47:07
问题 I want to secure a google cloud endpoint with a custom com.google.api.server.spi.config.Authenticator. see this post (Google Cloud Endpoints and user's authentication). For example to authenticate via facebook oauth. The Authenticator must have a default constructor without any params otherwise the Authenticator does not work. So Constructor Injection is not possible like this: @Inject public apiMethod(Log logger, Datastore datastore, MemCacheManager cacheManager) { this.logger = logger; this

Custom Login System with Cloud Endpoints [closed]

…衆ロ難τιáo~ 提交于 2019-12-12 05:27:11
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I know what I'm asking is quite vague, but Google has run up dry on this. I'm trying to build an API in Cloud Endpoints that hooks into a React frontend. The application requires authentication and authorization - so naturally I've got a few options: 1) Custom Login 2) Third Party

Appengine Cloud Endpoints & core data

谁都会走 提交于 2019-12-12 04:54:09
问题 When using Cloud Endpoints generated libs, is there anyway to use core data without manually creating models? Is there any easy way to integrate the two so the objects from the endpoint can be persisted with core data? 回答1: I am not aware of any generic solution. It seems to me that the two philosophies - Appengine Cloud Endpoints as a relational database vs. Core Data as an object graph - are just to different to facilitate a solution without any manual adaptation. So there is no "easy way

Android: Firebase auth for Cloud End Point not working

試著忘記壹切 提交于 2019-12-12 04:21:31
问题 I have followed the link and have done the configuration on the server as mentioned. "/users": post: description: "<Description>" operationId: "<OperationID>" produces: - "application/json" responses: 200: description: "user List" schema: $ref: "#/definitions/echoMessage" parameters: - description: "Search Criteria" in: body name: message required: true schema: $ref: "#/definitions/echoMessage" security: - firebase: [] and firebase: authorizationUrl: "" flow: "implicit" type: "oauth2" x

Project Error (Eclipse) when creating Google Cloud Endpoint in GAE

删除回忆录丶 提交于 2019-12-12 03:48:29
问题 I created a simple project with GAE and i put in my package 'model' the PMF.java (Persistence Manager Factory Class) and a class (Employee.java). After right-clicking the Employee class on Google->Generate Cloud Endpoint Class, the plugin correctly generate my EmployeeEndpoint, but after created that it appears an error on: war->WEB-INF->lib for this jar: appengine-api-labs.jar appengine-endpoints.jar appengine-endpoints-deps.jar And opening the ErrorLog of Eclipse, it just says: An exception