Class TwitterService

java.lang.Object
ch.bztf.m226blb1.Base.BaseService
ch.bztf.m226blb1.Platforms.Twitter.TwitterService

@Service public class TwitterService extends BaseService
  • Constructor Details

  • Method Details

    • mapJsonToUser

      public User mapJsonToUser(@NotBlank @NotBlank String json)
      Description copied from class: BaseService
      Maps the JSON data to a user object
      Specified by:
      mapJsonToUser in class BaseService
      Parameters:
      json - the JSON data to map
      Returns:
      the created user object
      See Also:
      • ObjectMapper
    • mapJsonToPosts

      public Set<Post> mapJsonToPosts(@NotBlank @NotBlank String json, @Min(10L) @javax.validation.constraints.Min(10L) int limit)
      Description copied from class: BaseService
      Maps the JSON data to a set of posts
      Specified by:
      mapJsonToPosts in class BaseService
      Parameters:
      json - the JSON data to map
      limit - the limit of the posts
      Returns:
      the created set of posts limited by limit
      See Also:
      • ObjectMapper
    • getUserRequestUri

      protected String getUserRequestUri(String username)
      Description copied from class: BaseService
      Gets the uri for requesting the user data
      Specified by:
      getUserRequestUri in class BaseService
      Parameters:
      username - the username of the user
      Returns:
      the uri for requesting the user data
      See Also:
      • User
    • getPostRequestUri

      protected String getPostRequestUri(String username, int limit)
      Description copied from class: BaseService
      Gets the uri for requesting the posts data
      Specified by:
      getPostRequestUri in class BaseService
      Parameters:
      username - the username of the user
      limit - the limit of the posts
      Returns:
      the uri for requesting the posts data
      See Also:
      • User