Class TwitterController

java.lang.Object
ch.bztf.m226blb1.Base.BaseController
ch.bztf.m226blb1.Platforms.Twitter.TwitterController

@RestController @RequestMapping("/twitter") public class TwitterController extends BaseController
  • Constructor Details

  • Method Details

    • status

      @RequestMapping("/") public ResponseHandler<String> status()
      Description copied from class: BaseController
      Check if the controller is up and running. It can be requested via the base path / .
      Overrides:
      status in class BaseController
      Returns:
      A ResponseHandler with 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: BaseController
      Gets the stats of a user by its username. It can be requested via the path /user .
      Overrides:
      getUser in class BaseController
      Parameters:
      username - the username of the user
      apiKey - the api key of the account. Can also be passed via the HttpHeaders.AUTHORIZATION header.
      Returns:
      the stats of the user by the username
      See Also:
    • 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
      Gets the posts of a user by its username. It can be requested via the path /posts .
      Overrides:
      getPosts in class BaseController
      Parameters:
      username - the username of the user
      apiKey - the api key of the account. Can also be passed via the HttpHeaders.AUTHORIZATION header.
      limit - the limit for the posts (must be greater than 0)
      Returns:
      a ResponseHandler with a set of the last (limit) posts of the user with the given username
      See Also: