Search code examples
javascriptgoogle-app-enginegoogle-cloud-endpoints

server namespace for app-engine javascript client


Normally my endpoints have an android/iOS client. I am now trying to work with a javascript client. Looking at the provided git example, I see a number of namespace stuff (lines 9-19). Why are those important? Say my api exists at my-endpoints.appspot.com, do I have to do the namespace thing? How?

Also does anyone have a more comprehensive example they don't mind sharing? Something that more fully exercises the full client api https://developers.google.com/api-client-library/javascript/reference/referencedocs


Solution

  • A good example is Romin Irani's tutorials: https://rominirani.com/google-cloud-endpoints-tutorial-part-4-37ea3aac7948

    Note however that Google recently advised to use the promise mode of the Google API Client Library for JavaScript. See https://developers.google.com/api-client-library/javascript/features/promises#using-promises and How to call App Engine Endpoints with the JavaScript library in promises mode