Created
August 13, 2013 16:08
-
-
Save nicholashagen/6222749 to your computer and use it in GitHub Desktop.
API example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Path('/:sport/:league/events') | |
class EventResource { | |
String sport | |
String league | |
@Path('/:year/:month/:day') | |
EventResponse getEventsForDate(Integer year, Integer month, Integer day) { ... } | |
@Path('/today') | |
EventResponse getTodaysEvents() { ... } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
RESTful Invocation: /baseball/mlb/events/2013/06/20
Direct Invocation: new EventResource(sport: 'baseball', league: 'mlb').getEventsForDate(2013, 6, 20)