Class TwitterController
java.lang.Object
ch.bztf.m226blb1.Base.BaseController
ch.bztf.m226blb1.Platforms.Twitter.TwitterController
- 
Field Summary
Fields inherited from class ch.bztf.m226blb1.Base.BaseController
service - 
Constructor Summary
ConstructorsConstructorDescriptionTwitterController(TwitterService service) Constructor for theTwitterController. - 
Method Summary
 
- 
Constructor Details
- 
TwitterController
Constructor for theTwitterController.- Parameters:
 service- TheTwitterServiceto use.
 
 - 
 - 
Method Details
- 
status
Description copied from class:BaseControllerCheck if the controller is up and running. It can be requested via the base path/.- Overrides:
 statusin classBaseController- Returns:
 - A 
ResponseHandlerwith the status of the controller 
 - 
getUser
@GetMapping("/user") public ResponseHandler<User> getUser(@RequestParam("username") @NotBlank @NotBlank String username, @RequestParam(name="api_key",required=false) @RequestHeader(name="Authorization",required=false) @Size(min=128,max=128) @NotBlank @Size(min=128,max=128) @NotBlank String apiKey) Description copied from class:BaseControllerGets the stats of a user by itsusername. It can be requested via the path/user.- Overrides:
 getUserin classBaseController- Parameters:
 username- the username of theuserapiKey- the api key of theaccount. Can also be passed via theHttpHeaders.AUTHORIZATIONheader.- Returns:
 - the stats of the 
userby theusername - See Also:
 - 
BaseController.serviceGetMapping
 
 - 
getPosts
@GetMapping("/posts") public ResponseHandler<Set<Post>> getPosts(@RequestParam("username") @NotBlank @NotBlank String username, @RequestParam(name="api_key",required=false) @RequestHeader(name="Authorization",required=false) @Size(min=128,max=128) @NotBlank @Size(min=128,max=128) @NotBlank String apiKey, @RequestParam(name="limit",required=false) @RequestHeader(name="Content-Length",required=false) Optional<Integer> limit) Description copied from class:BaseController- Overrides:
 getPostsin classBaseController- Parameters:
 username- the username of theuserapiKey- the api key of theaccount. Can also be passed via theHttpHeaders.AUTHORIZATIONheader.limit- the limit for the posts (must be greater than 0)- Returns:
 - a 
ResponseHandlerwith a set of the last (limit)postsof the user with the givenusername - See Also:
 - 
BaseController.serviceGetMapping
 
 
 -