Interface UserApiClient


public interface UserApiClient
A delegate to be called by the Controller}. Implement this interface with a Service annotated class.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Optional<org.springframework.web.context.request.NativeWebRequest>
     
    default org.springframework.http.ResponseEntity<UserIdForUsernameGet200Response>
    GET /user/id_for/{username} : Get User ID Returns the unique `user_id` for the given `username`.
    default org.springframework.http.ResponseEntity<MediumUserArticles>
    GET /user/{user_id}/articles : Get User's Articles Returns the list of articles (`article_ids`) written by the given user.
    default org.springframework.http.ResponseEntity<MediumUserFollowers>
    userUserIdFollowersGet(String userId, Integer count, String after)
    GET /user/{user_id}/followers : Get User Followers Returns the list of `user_ids` of the user's followers.
    default org.springframework.http.ResponseEntity<MediumUserFollowing>
    GET /user/{user_id}/following : Get User Following Returns a list of users (`user_ids`) that the given user is following.
    default org.springframework.http.ResponseEntity<MediumUser>
    GET /user/{user_id} : Get User Info Returns user-related information such as their - Username - Full name - Bio - Followers count - Following count - Publication Following count - Twitter Username - Profile Image URL - Background Image URL - Logo Image URL - Tipping Link - List of tags in which the user is Top Writer - When did the user become a Medium Member (conditional) - Whether the user has Lists (boolean) - Whether the user is a Medium-verified book author (boolean) - Whether the user is enrolled in Medium Partner Program (boolean) - Whether the user has allowed notes on their articles (boolean) - Whether the user is suspended or not (boolean) **Note:** If you don't know the `user_id`, you can get it from the _Get User ID_ endpoint (`/user/id_for/{username}`).
    default org.springframework.http.ResponseEntity<MediumUserInterests>
    GET /user/{user_id}/interests : Get User's Interests Returns a list of tags that the given user follows.
    default org.springframework.http.ResponseEntity<MediumUserLists>
    GET /user/{user_id}/lists : Get User's Lists Returns an array of `list_ids` created by the user.
    default org.springframework.http.ResponseEntity<MediumUserPublicationFollowing>
    GET /user/{user_id}/publication_following : Get User Publication Following Returns a list of publications (`publication_ids`) that the given user is following.
    default org.springframework.http.ResponseEntity<MediumUserPublications>
    GET /user/{user_id}/publications : Get User's Publications Returns 2 lists of `publication_ids` where the given user is either an admin (creator/editor) or a contributing writer.
    default org.springframework.http.ResponseEntity<MediumUserTopArticles>
    GET /user/{user_id}/top_articles : Get User's Top Articles Returns a list of `article_ids` of the top 10 articles on the user's profile, for a given `user_id`.
  • Method Details

    • getRequest

      default Optional<org.springframework.web.context.request.NativeWebRequest> getRequest()
    • userIdForUsernameGet

      default org.springframework.http.ResponseEntity<UserIdForUsernameGet200Response> userIdForUsernameGet(String username)
      GET /user/id_for/{username} : Get User ID Returns the unique `user_id` for the given `username`. **Note:** You can find the `username` from the user's/author's profile page URL. - **username**.medium.com - medium.com/@**username**
      Parameters:
      username - It's a unique string chosen by every single Medium user. (required)
      Returns:
      OK (status code 200)
      See Also:
    • userUserIdArticlesGet

      default org.springframework.http.ResponseEntity<MediumUserArticles> userUserIdArticlesGet(String userId)
      GET /user/{user_id}/articles : Get User's Articles Returns the list of articles (`article_ids`) written by the given user.
      Parameters:
      userId - Unique hash id assigned to every single Medium user. (required)
      Returns:
      OK (status code 200)
      See Also:
    • userUserIdFollowersGet

      default org.springframework.http.ResponseEntity<MediumUserFollowers> userUserIdFollowersGet(String userId, Integer count, String after)
      GET /user/{user_id}/followers : Get User Followers Returns the list of `user_ids` of the user's followers. **Note:** When you get the response from the API, it will include an attribute called `next`. You can use this next attribute as query string parameter (`after`) when you make your next API request. This way, you can get the followers that come after the one you're currently looking at.
      Parameters:
      userId - Unique hash id assigned to every single Medium user. (required)
      count - To limit the number of results. (count <= 25) (optional)
      after - To get the results after a particular follower's user id. (optional)
      Returns:
      OK (status code 200)
      See Also:
    • userUserIdFollowingGet

      default org.springframework.http.ResponseEntity<MediumUserFollowing> userUserIdFollowingGet(String userId, Integer count)
      GET /user/{user_id}/following : Get User Following Returns a list of users (`user_ids`) that the given user is following. Use the `count` query parameter (_optional_) to limit the number of results. (count <= 1500) **Note:** This list does not contain the `publication_ids` of the publications that the user is following. To get those, please use _Get User Publication Following_ endpoint (`/user/{user_id}/publication_following`).
      Parameters:
      userId - Unique hash id assigned to every single Medium user. (required)
      count - To limit the number of results. (count < 1500) (optional)
      Returns:
      OK (status code 200)
      See Also:
    • userUserIdGet

      default org.springframework.http.ResponseEntity<MediumUser> userUserIdGet(String userId)
      GET /user/{user_id} : Get User Info Returns user-related information such as their - Username - Full name - Bio - Followers count - Following count - Publication Following count - Twitter Username - Profile Image URL - Background Image URL - Logo Image URL - Tipping Link - List of tags in which the user is Top Writer - When did the user become a Medium Member (conditional) - Whether the user has Lists (boolean) - Whether the user is a Medium-verified book author (boolean) - Whether the user is enrolled in Medium Partner Program (boolean) - Whether the user has allowed notes on their articles (boolean) - Whether the user is suspended or not (boolean) **Note:** If you don't know the `user_id`, you can get it from the _Get User ID_ endpoint (`/user/id_for/{username}`).
      Parameters:
      userId - It's a unique hash id assigned to every single Medium user. (required)
      Returns:
      OK (status code 200)
      See Also:
    • userUserIdInterestsGet

      default org.springframework.http.ResponseEntity<MediumUserInterests> userUserIdInterestsGet(String userId)
      GET /user/{user_id}/interests : Get User's Interests Returns a list of tags that the given user follows.
      Parameters:
      userId - Unique hash id assigned to every single Medium user. (required)
      Returns:
      OK (status code 200)
      See Also:
    • userUserIdListsGet

      default org.springframework.http.ResponseEntity<MediumUserLists> userUserIdListsGet(String userId)
      GET /user/{user_id}/lists : Get User's Lists Returns an array of `list_ids` created by the user. **Note:** You can check whether the use has created lists or not beforehand. Check the `has_list` attribute in the \"Article Info\" endpoint.
      Parameters:
      userId - Unique hash id assigned to every single Medium user. (required)
      Returns:
      OK (status code 200)
      See Also:
    • userUserIdPublicationFollowingGet

      default org.springframework.http.ResponseEntity<MediumUserPublicationFollowing> userUserIdPublicationFollowingGet(String userId)
      GET /user/{user_id}/publication_following : Get User Publication Following Returns a list of publications (`publication_ids`) that the given user is following.
      Parameters:
      userId - Unique hash id assigned to every single Medium user. (required)
      Returns:
      OK (status code 200)
      See Also:
    • userUserIdPublicationsGet

      default org.springframework.http.ResponseEntity<MediumUserPublications> userUserIdPublicationsGet(String userId)
      GET /user/{user_id}/publications : Get User's Publications Returns 2 lists of `publication_ids` where the given user is either an admin (creator/editor) or a contributing writer.
      Parameters:
      userId - Unique hash id assigned to every single Medium user. (required)
      Returns:
      OK (status code 200)
      See Also:
    • userUserIdTopArticlesGet

      default org.springframework.http.ResponseEntity<MediumUserTopArticles> userUserIdTopArticlesGet(String userId)
      GET /user/{user_id}/top_articles : Get User's Top Articles Returns a list of `article_ids` of the top 10 articles on the user's profile, for a given `user_id`.
      Parameters:
      userId - Unique hash id assigned to every single Medium user. (required)
      Returns:
      OK (status code 200)
      See Also: