google cloud enpoints

18
Google Cloud Endpoints How to add RESTful APIs to an App Engine project Mattia Gasperotti, GDG Trento

Upload: mattia-gasperotti

Post on 10-Aug-2015

32 views

Category:

Technology


0 download

TRANSCRIPT

Google Cloud EndpointsHow to add RESTful APIs to an App Engine project

Mattia Gasperotti, GDG Trento

Introducing Google Cloud Endpoints

Google Cloud Endpoints consists of tools that allow you to generate APIs and client libraries from an App Engine application.

Endpoints makes it easier to create a web backend for web clients and mobile clients (Android, iOs…)

Basic Endpoints Architecture

The development process

1. Write your App Engine backend code as usual

2. Annotate your App Engine backend code (so classes and client libraries can be generated from it).

3. Generate the client library using Google Plugin for

Eclipse [or endpoints.sh (for Linux), or endpoints.cmd

(for Windows)]

4. Write your client app using the generated client libraries

@Annotation

Endpoint annotations describe API configuration, methods, parameters, and other vital details that define the properties and behavior of the Endpoint

https://developers.google.com/appengine/docs/java/endpoints/annotations

Generate Google Cloud EndpointClient Library

https://developers.google.com/eclipse/

APIs ExplorerThe Google APIs Explorer is a tool that helps you explore various APIs.

With the APIs Explorer, you can:

● Browse available APIs and versions.● Explore: see methods available for each API and what

parameters they support along with inline documentation.

● Test: execute requests for any method and see responses in real time.

Example: https://namekeepr.appspot.com/_ah/api/explorer

Code time: simple blog

Some backend code (Java)

Add @Annotation

Generate Cloud Endpoint Client Library

Use generated libs (Android)

Use generated libs (iOs)

...and with Javascript...

Javascript use the same JS client that Google provides for their own APIs

Thank you!

Google Plus gplus.to/gasperotti

Twitter Mattia93it

www mattiagasperotti.com

Facebook /gasperotti