Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. /**
  2. * An endpoint class we are exposing
  3. */
  4. @Api(
  5. name = "myApi",
  6. version = "v2",
  7. namespace = @ApiNamespace(
  8. ownerDomain = "awesome.me.com",
  9. ownerName = "awesome.me.com",
  10. packagePath = "api/v2"
  11. )
  12. )
  13. public class MyEndpointV2 extends MyEndpoint{
  14.  
  15.  
  16. @ApiMethod(name = "getContact")
  17. public Charges getContact(ContactRequest request){
  18. return ContactHandler.getContact(request);
  19. }
  20. }
  21.  
  22. myapi.getContact()
  23.  
  24. @Api(
  25. name = "myApi",
  26. version = "v1",
  27. namespace = @ApiNamespace(
  28. ownerDomain = "awesome.me.com",
  29. ownerName = "awesome.me.com",
  30. packagePath = ""
  31. )
  32. )
  33. public class MyEndpoint{
  34.  
  35.  
  36. @ApiMethod(name = "getPeriod")
  37. public Period getPeriod(@Named("days")long days) {
  38. return Handler.getPeriod(days);
  39. }
  40. //other api methods
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement