Package chirp.model

Examples of chirp.model.Post


    this.userRepository = userRepository;
  }

  @POST
  public Response createPost(@PathParam("username") String username, @FormParam("content") String content) {
    Post post = userRepository.getUser(username).createPost(content);

    URI uri = UriBuilder.fromPath(post.getTimestamp().toString()).build();
    return Response.created(uri).build();
  }
View Full Code Here


  @GET
  @Path("{timestamp}")
  @Produces(MediaType.APPLICATION_JSON)
  public PostRepresentation getPost(@PathParam("username") String username, @PathParam("timestamp") String timestamp) {
    Post post = userRepository.getUser(username).getPost(new Timestamp(timestamp));
    return new PostRepresentation(post, false);
  }
View Full Code Here

TOP

Related Classes of chirp.model.Post

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.