Package com.mediumapi.apiclient
Interface UserApi
public interface UserApi
-
Method Summary
Modifier and TypeMethodDescriptiondefault UserApiClientdefault 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`.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.default org.springframework.http.ResponseEntity<MediumUserFollowers>userUserIdFollowersGet(String userId, @Valid Integer count, @Valid 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>userUserIdFollowingGet(String userId, @Valid Integer count) 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>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}`).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.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.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>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.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`.
-
Method Details
-
getDelegate
-
userIdForUsernameGet
@RequestMapping(method=GET, value="/user/id_for/{username}", produces="application/json") default org.springframework.http.ResponseEntity<UserIdForUsernameGet200Response> userIdForUsernameGet(@PathVariable("username") 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)
-
userUserIdArticlesGet
@RequestMapping(method=GET, value="/user/{user_id}/articles", produces="application/json") default org.springframework.http.ResponseEntity<MediumUserArticles> userUserIdArticlesGet(@PathVariable("user_id") 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)
-
userUserIdFollowersGet
@RequestMapping(method=GET, value="/user/{user_id}/followers", produces="application/json") default org.springframework.http.ResponseEntity<MediumUserFollowers> userUserIdFollowersGet(@PathVariable("user_id") String userId, @Valid @RequestParam(value="count",required=false) @Valid Integer count, @Valid @RequestParam(value="after",required=false) @Valid 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)
-
userUserIdFollowingGet
@RequestMapping(method=GET, value="/user/{user_id}/following", produces="application/json") default org.springframework.http.ResponseEntity<MediumUserFollowing> userUserIdFollowingGet(@PathVariable("user_id") String userId, @Valid @RequestParam(value="count",required=false) @Valid 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)
-
userUserIdGet
@RequestMapping(method=GET, value="/user/{user_id}", produces="application/json") default org.springframework.http.ResponseEntity<MediumUser> userUserIdGet(@PathVariable("user_id") 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)
-
userUserIdInterestsGet
@RequestMapping(method=GET, value="/user/{user_id}/interests", produces="application/json") default org.springframework.http.ResponseEntity<MediumUserInterests> userUserIdInterestsGet(@PathVariable("user_id") 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)
-
userUserIdListsGet
@RequestMapping(method=GET, value="/user/{user_id}/lists", produces="application/json") default org.springframework.http.ResponseEntity<MediumUserLists> userUserIdListsGet(@PathVariable("user_id") 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)
-
userUserIdPublicationFollowingGet
@RequestMapping(method=GET, value="/user/{user_id}/publication_following", produces="application/json") default org.springframework.http.ResponseEntity<MediumUserPublicationFollowing> userUserIdPublicationFollowingGet(@PathVariable("user_id") 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)
-
userUserIdPublicationsGet
@RequestMapping(method=GET, value="/user/{user_id}/publications", produces="application/json") default org.springframework.http.ResponseEntity<MediumUserPublications> userUserIdPublicationsGet(@PathVariable("user_id") 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)
-
userUserIdTopArticlesGet
@RequestMapping(method=GET, value="/user/{user_id}/top_articles", produces="application/json") default org.springframework.http.ResponseEntity<MediumUserTopArticles> userUserIdTopArticlesGet(@PathVariable("user_id") 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)
-