google-cloud-endpoints

Using endpoints-proto-datastore, how do you pass attributes to a method that are not contained in the EndpointsModel

那年仲夏 提交于 2019-12-07 13:33:59
问题 I am trying to pass attributes into an API call that are not contained in my EndpointsModel. For example, say I have the following model: class MyModel(EndpointsModel): attr1 = ndb.StringProperty() Then assume I want to pass in attr2 as a parameter, but I don't want attr2 to be used as a filter nor do I want it to be stored in the model. I simply want to pass in some string, retrieve it inside of the method and use it to perform some business logic. The documentation describes the query

Upload File to Google Cloud Storage via appengine

半城伤御伤魂 提交于 2019-12-07 12:18:49
问题 I am trying to upload a file to Google Cloud Storage. My Servlet code is public class UploadFile extends HttpServlet { private final String BUCKET = "XXXXXXXXX"; private boolean isMultipart; private String filePath; private int maxFileSize = 5 * 1024 * 1024; private int maxMemSize = 5 * 1024 * 1024; private File file ; public void init( ){ // Get the file location where it would be stored. filePath = getServletContext().getInitParameter("file-upload"); } public void doPost(HttpServletRequest

Saving blobs with Google Endpoint

三世轮回 提交于 2019-12-07 11:13:06
问题 I have an app that allows users to save blobs in the blobstore. I have a schema that does so presently, but I am interested in something simpler and less twisted. For context, imagine my app allows users to upload the picture of an animal with a paragraph describing what the animal is doing. Present schema User calls my endpoint api to save the paragraph and name of the animal in entity Animal . Note: The Animal entity actually has 4 fields ( name , paragraph , BlobKey , and blobServingUrl as

read image into protorpc message thru endpoints api

非 Y 不嫁゛ 提交于 2019-12-07 11:12:49
问题 To receive a picture from a user into my @endpoints.method do I use messages.BytesField as in image = messages.BytesField(1) stuff = messages.StringField(2) 回答1: Yes, this is the right strategy. When using Cloud Endpoints, the bytes sent to a BytesField must be base64 encoded. After being sent and validated through Google's API infrastructure, the base64 encoded bytes will be sent along to your protorpc.remote.Service class and converted from a base64 string to a native byte-string (instance

Catch Error from gapi.client.load

泪湿孤枕 提交于 2019-12-07 08:38:39
问题 I'm using Google App Engine with Java and Google Cloud Endpoints. In my JavaScript front end, I'm using this code to handle initialization, as recommended: var apisToLoad = 2; var url = '//' + $window.location.host + '/_ah/api'; gapi.client.load('sd', 'v1', handleLoad, url); gapi.client.load('oauth2', 'v2', handleLoad); function handleLoad() { // this only executes once, if (--apisToLoad === 0) { // so this is not executed } } How can I detect and handle when gapi.client.load fails? Currently

AndroidStudio / gradle cannot find javax.persistence package

孤街醉人 提交于 2019-12-07 07:44:27
问题 While attempting to do the following tutorial : https://cloud.google.com/developers/articles/how-to-build-mobile-app-with-app-engine-backend-tutorial/ using Android Studio, I created an Android Studio project and added the CheckIn.java class with the following contents : import java.util.Date; import com.google.appengine.api.datastore.Key; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity

ClientId not updated when deploying - User injected null

流过昼夜 提交于 2019-12-07 05:58:29
问题 I am creating a project with App Engine and Cloud EndPoints using OAuth 2.0. I created and configured all the clientIds (WEB, Android and iOS), but when both I run the server in local or I deploy to App Engine PROD, I always get the following problem: WARNING: getCurrentUser: clientId 292824132082.apps.googleusercontent.com not allowed This clientId 292824132082.apps.googleusercontent.com is the default one generated automatically when you create the Cloud EndPoints the first time, and it is

Unable to generate cloud endpoint class

纵然是瞬间 提交于 2019-12-07 05:42:11
问题 Dear fellow programmers, I am very new to programming and i am following the tutorial on using app engine backend tutorial. However i face some problem along the way. I have Setup App Engine Backend Application Project, created a CheckIn entity class. After which, i follow the instruction to create a new class with the name CheckInEndPoint.java I copy the code from the snippet over to the Class. When i try to Generate Cloud Endpoint Class, i faced an error message. Error Generating API This

Google Endpoints and Public Api Key

自古美人都是妖i 提交于 2019-12-07 04:56:24
问题 To use a Google service you can use OAuth authentication, or, if you don't need to log the user in, you can use a public api key, defining authorized domain as origin of the request. Now, I'm writing my own API using google endpoints and I will allow users to use my APIs with a public api key, and not using OAuth, there are any built-in method to do so in GAE, or I have to write my own code to verify the api key and the origin of the request to my APIs? 回答1: If you are using a client key you

Google App Engine and Android (OAuth, C2DM, or Cloud Messaging) [closed]

天大地大妈咪最大 提交于 2019-12-07 04:47:09
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . As many users of this board I would like to develop an Android app with Google App Engine as the backend server. I need the user to log-in with his/her Google account and upload an image to the GAE server. This