Google app engine - RESTFul Service Framework for AppEngine

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

I am working on a project that involves mobile and web clients with Google s AppEngine PAAS. I would like to use RESTFul webservices with my AppEngine app.

http://stackoverflow.com/questions/4051397/restlet-posting-json-to-appengine-error http://stackoverflow.com/questions/4051397/restlet-posting-json-to-appengine-error

http://stackoverflow.com/questions/80799/jax-rs-frameworks http://stackoverflow.com/questions/80799/jax-rs-frameworks

Answers

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

@Api(name = "tictactoe")
public class ScoreEndpoint {
  @ApiMethod(name = "scores.get")
  public Score get(@Named("id") String id) {
    PersistenceManager pm = getPersistenceManager();
    Score score = pm.getObjectById(Score.class, id);
    pm.close();
    return score;
  }

  @ApiMethod(name = "scores.list")
  public List<Score> list() {
    PersistenceManager pm = getPersistenceManager();
    Query query = pm.newQuery(Score.class);
    return (List<Score>) pm.newQuery(query).execute();
  }
}

Features

Learn More

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

You can also watch several talks from Google I/O:

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/9453561/restful-service-framework-for-appengine

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils