Source: MediumApiClient
Source: Article
Task<ArticleFansResponse> GetArticleFans(string articleId, CancellationToken ct = default);
-
-
Returns a list of
user_idsof the people who clapped on the article (a.k.avoters).
-
try { var response = await client.Article.GetArticleFans(articleId); // TODO: Handle 'response' of type ArticleFansResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description articleIdstringIt's a unique hash id assigned to every Medium Article.
-
OnSuccess:
ArticleFansResponseOnError:
SdkException<RawError>
-
Task<ArticleResponse> GetArticleInfo(string articleId, CancellationToken ct = default);
-
-
Returns the article related information such as Title, Subtitle, Tags, Topics (assigned by Medium), Publication, Published date and time, Clap Count, Voter Count, Word Count, Reading Time, Language, etc…
-
try { var response = await client.Article.GetArticleInfo(articleId); // TODO: Handle 'response' of type ArticleResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description articleIdstringIt's a unique hash id assigned to every Medium Article.
-
OnSuccess:
ArticleResponseOnError:
SdkException<RawError>
-
Task<ArticleResponsesResponse> GetArticleResponses(string articleId, CancellationToken ct = default);
-
-
Returns a list of responses (
response_ids, same asarticle_ids) for a given article (article_id) Note: To see the content of the response, use the "Get Article's Content" endpoint
-
try { var response = await client.Article.GetArticleResponses(articleId); // TODO: Handle 'response' of type ArticleResponsesResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description articleIdstringIt's a unique hash id assigned to every Medium Article.
-
OnSuccess:
ArticleResponsesResponseOnError:
SdkException<RawError>
-
Task<ArticleContentResponse> GetArticleSContent(string articleId, CancellationToken ct = default);
-
-
Returns the content of an article/story, for the corresponding
article_id
-
try { var response = await client.Article.GetArticleSContent(articleId); // TODO: Handle 'response' of type ArticleContentResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description articleIdstringIt's a unique hash id assigned to every Medium Article.
-
OnSuccess:
ArticleContentResponseOnError:
SdkException<RawError>
-
Task<ArticleMarkdownResponse> GetArticleSMarkdown(string articleId, CancellationToken ct = default);
-
-
Returns the markdown of an article/story from Medium, for the corresponding
article_id
-
try { var response = await client.Article.GetArticleSMarkdown(articleId); // TODO: Handle 'response' of type ArticleMarkdownResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description articleIdstringIt's a unique hash id assigned to every Medium Article.
-
OnSuccess:
ArticleMarkdownResponseOnError:
SdkException<RawError>
-
Task<ArticleRelatedResponse> GetRelatedArticles(string articleId, CancellationToken ct = default);
-
-
Returns a list of
article_idsof the related posts. (Length = 5)Note: If the given article is self-published, related posts will belong to the same author, else related posts will belong to the publication in which the article is published.
-
try { var response = await client.Article.GetRelatedArticles(articleId); // TODO: Handle 'response' of type ArticleRelatedResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description articleIdstringIt's a unique hash id assigned to every Medium Article.
-
OnSuccess:
ArticleRelatedResponseOnError:
SdkException<RawError>
-
Source: ListModel
Task<ListArticlesResponse> GetListArticles(string listId, CancellationToken ct = default);
-
-
Returns an array of
articles_idspresent in the given Medium List.
-
try { var response = await client.ListModel.GetListArticles(listId); // TODO: Handle 'response' of type ListArticlesResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description listIdstringIt's a unique hash id assigned to every Medium List.
-
OnSuccess:
ListArticlesResponseOnError:
SdkException<RawError>
-
Task<ListResponse> GetListInfo(string listId, CancellationToken ct = default);
-
-
Returns the list-related information such as id, name, author, description, thumbnail image url, creation datetime, last article inserted datetime, number of articles in the list, claps, voters, and comments/responses.
-
try { var response = await client.ListModel.GetListInfo(listId); // TODO: Handle 'response' of type ListResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description listIdstringIt's a unique hash id assigned to every Medium List.
-
OnSuccess:
ListResponseOnError:
SdkException<RawError>
-
Task<ListResponsesResponse> GetListResponses(string listId, CancellationToken ct = default);
-
-
Returns an array of
response_idsof the comments (same asarticle_ids) on the given Medium List.
-
try { var response = await client.ListModel.GetListResponses(listId); // TODO: Handle 'response' of type ListResponsesResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description listIdstringIt's a unique hash id assigned to every Medium List.
-
OnSuccess:
ListResponsesResponseOnError:
SdkException<RawError>
-
Source: Misc
Task<LatestpostsResponse> GetLatestPosts(string topicSlug, CancellationToken ct = default);
-
-
Returns a list of latest posts (
article_ids) for a topic/niche (as classified by the Medium platform). Example of a topic/niche can be:- blockchain
- relationships
- mental-health, etc …
These are known as
topic_slugs. At any given moment, this endpoint will return a list of 25 articles (article_ids).
-
try { var response = await client.Misc.GetLatestPosts(topicSlug); // TODO: Handle 'response' of type LatestpostsResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description topicSlugstringIt's a unique string, usually hyphen-separated, representing a topic/niche, as classified by Medium.
-
OnSuccess:
LatestpostsResponseOnError:
SdkException<RawError>
-
Task<RelatedTagsResponse> GetRelatedTags(string tag, CancellationToken ct = default);
-
-
Returns a list of
related_tagsfor the giventag.
-
try { var response = await client.Misc.GetRelatedTags(tag); // TODO: Handle 'response' of type RelatedTagsResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description tagstringIt's a unique string, usually hyphen-separated, representing a class of content.
-
OnSuccess:
RelatedTagsResponseOnError:
SdkException<RawError>
-
Task<TopWriterResponse> GetTopWriters(string topicSlug, int? count, CancellationToken ct = default);
-
-
Returns a list of top writers (
user_ids) within a particular topic/niche (topic_slug). e.g.- blockchain
- relationships
- artificial-intelligence, etc ...
Note: You can use optional
countquery parameter to limit the number of results. The maximum number of top writers within a topic/niche will be 250.
-
try { var response = await client.Misc.GetTopWriters(topicSlug, count); // TODO: Handle 'response' of type TopWriterResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description topicSlugstringIt's a unique string, usually hyphen-separated, representing a topic/niche, as classified by Medium. countint?Limits the number of article_idsin the result.
-
OnSuccess:
TopWriterResponseOnError:
SdkException<RawError>
-
Task<TopfeedsResponse> GetTopfeeds(string tag, string mode, int? after = 0, int? count = 25, CancellationToken ct = default);
-
-
Returns a list of
article_ids(length: 25) for the giventagandmode.
-
try { var response = await client.Misc.GetTopfeeds(tag, mode); // TODO: Handle 'response' of type TopfeedsResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description tagstringIt's a unique string, usually hyphen-separated, representing a class of content. modestringMode:
-hot: For getting trending articles
-new: For getting latest articles
-top_year: For getting best articles of the year
-top_month: For getting best articles of the month
-top_week: For getting best articles of the week
-top_all_time: For getting best article of all timeafterint?To get the subsequent top feeds. ( after< 250)
Default: 0countint?To limit the number of top feeds. ( count< 25)
Default: 25
-
OnSuccess:
TopfeedsResponseOnError:
SdkException<RawError>
-
Source: Publication
Task<PublicationArticlesResponse> GetPublicationArticles(string publicationId, string? from, CancellationToken ct = default);
-
-
Returns the list of
articles_ids, of the latest 25 articles, posted in that publication.
-
try { var response = await client.Publication.GetPublicationArticles(publicationId, from); // TODO: Handle 'response' of type PublicationArticlesResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description publicationIdstringIt's a unique hash id assigned to every Medium Publication. fromstring?To get the articles before specified date and time.
-
OnSuccess:
PublicationArticlesResponseOnError:
SdkException<RawError>
-
Task<PublicationIdForResponse> GetPublicationId(string publicationSlug, CancellationToken ct = default);
-
-
Returns the unique
publication_idfor the givenpublication_slug.Note: You can find the
publication_slugfrom the publication's homepage URL.- medium.com/publication_slug
-
try { var response = await client.Publication.GetPublicationId(publicationSlug); // TODO: Handle 'response' of type PublicationIdForResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description publicationSlugstringIt's a lowercased hyphen-separated unique string alloted to each Medium Publication.
-
OnSuccess:
PublicationIdForResponseOnError:
SdkException<RawError>
-
Task<PublicationResponse> GetPublicationInfo(string publicationId, CancellationToken ct = default);
-
-
Returns the publication related information such as Publication name, Tagline, Description, Tags, Followers Count, Twitter username, Instagram username, Facebook Page name, etc …
Note: If you don't know the
publication_id, you can get it from any article published by it. Use endpoint "/article/{article_id}" to retrieve thepublication_id.
-
try { var response = await client.Publication.GetPublicationInfo(publicationId); // TODO: Handle 'response' of type PublicationResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description publicationIdstringIt's a unique hash id assigned to every Medium Publication.
-
OnSuccess:
PublicationResponseOnError:
SdkException<RawError>
-
Task<PublicationNewsletterResponse> GetPublicationNewsletter(string publicationId, CancellationToken ct = default);
-
-
Returns the newsletter related information such as id, name, description, slug, creator_id, subscribers, image_url, etc …
Note: If you don't know the
publication_id, you can get it from any article published by it. Use endpoint "/article/{article_id}" to retrieve thepublication_id.
-
try { var response = await client.Publication.GetPublicationNewsletter(publicationId); // TODO: Handle 'response' of type PublicationNewsletterResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description publicationIdstringIt's a unique hash id assigned to every Medium Publication.
-
OnSuccess:
PublicationNewsletterResponseOnError:
SdkException<RawError>
-
Source: Search
Task<SearchArticlesResponse> SearchArticles(string query, CancellationToken ct = default);
-
-
Returns the list of
articles_idsfor the given search query results. (Max Length = 1000)
-
try { var response = await client.Search.SearchArticles(query); // TODO: Handle 'response' of type SearchArticlesResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description querystringSearch query
-
OnSuccess:
SearchArticlesResponseOnError:
SdkException<RawError>
-
Task<SearchListsResponse> SearchLists(string query, CancellationToken ct = default);
-
-
Returns an array of
list_idsfor the given search query results. (Max Length = 1000)
-
try { var response = await client.Search.SearchLists(query); // TODO: Handle 'response' of type SearchListsResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description querystringSearch query
-
OnSuccess:
SearchListsResponseOnError:
SdkException<RawError>
-
Task<SearchPublicationsResponse> SearchPublications(string query, CancellationToken ct = default);
-
-
Returns the list of
publication_idsfor the given search query results. (Max Length = 1000)
-
try { var response = await client.Search.SearchPublications(query); // TODO: Handle 'response' of type SearchPublicationsResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description querystringSearch query
-
OnSuccess:
SearchPublicationsResponseOnError:
SdkException<RawError>
-
Task<SearchTagsResponse> SearchTags(string query, CancellationToken ct = default);
-
-
Returns a list of
tagsfor the given search query results. (Max Length = 1000)
-
try { var response = await client.Search.SearchTags(query); // TODO: Handle 'response' of type SearchTagsResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description querystringSearch query
-
OnSuccess:
SearchTagsResponseOnError:
SdkException<RawError>
-
Task<SearchUsersResponse> SearchUsers(string query, CancellationToken ct = default);
-
-
Returns a list of
user_idsfor the given search query results. (Max Length = 1000)
-
try { var response = await client.Search.SearchUsers(query); // TODO: Handle 'response' of type SearchUsersResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description querystringSearch query
-
OnSuccess:
SearchUsersResponseOnError:
SdkException<RawError>
-
Source: User
Task<UserFollowersResponse> GetUserFollowers(string userId, int? count, CancellationToken ct = default);
-
-
Returns the list of
user_idsof the user's followers.Note: The length of this followers' list might be different from what you get in the "Get User Info" Endpoint. It's because, this list doesn't include Medium Users who left the platform. If you really need the exact followers' count, use this endpoint to get the followers' list and take its length as the exact followers' count
-
try { var response = await client.User.GetUserFollowers(userId, count); // TODO: Handle 'response' of type UserFollowersResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description userIdstringUnique hash id assigned to every single Medium user. countint?To limit the number of results. (count < 1500)
-
OnSuccess:
UserFollowersResponseOnError:
SdkException<RawError>
-
Task<UserFollowingResponse> GetUserFollowing(string userId, int? count, CancellationToken ct = default);
-
-
Returns the list of
user_idsof the user's followings.Note: Currently, this list does not contain the
publication_idsof the publications that the user is following.
-
try { var response = await client.User.GetUserFollowing(userId, count); // TODO: Handle 'response' of type UserFollowingResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description userIdstringUnique hash id assigned to every single Medium user. countint?To limit the number of results. (count < 1500)
-
OnSuccess:
UserFollowingResponseOnError:
SdkException<RawError>
-
Task<UserIdForResponse> GetUserId(string username, CancellationToken ct = default);
-
-
Returns the unique
user_idfor the givenusername.Note: You can find the
usernamefrom the user's/author's profile page URL.- username.medium.com
- medium.com/@username
-
try { var response = await client.User.GetUserId(username); // TODO: Handle 'response' of type UserIdForResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description usernamestringIt's a unique string chosen by every single Medium user.
-
OnSuccess:
UserIdForResponseOnError:
SdkException<RawError>
-
Task<UserResponse> GetUserInfo(string userId, CancellationToken ct = default);
-
-
Returns user related information like Full name, Bio, Followers count, Following count, Twitter username, Profile-image URL, User ID, etc...
It takes
user_idas the path parameter.Note: If you don't know the
user_id, then you can get it from the endpoint
'/user/id_for/{username}'.
-
try { var response = await client.User.GetUserInfo(userId); // TODO: Handle 'response' of type UserResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description userIdstringIt's a unique hash id assigned to every single Medium user.
-
OnSuccess:
UserResponseOnError:
SdkException<RawError>
-
Task<UserArticlesResponse> GetUserSArticles(string userId, CancellationToken ct = default);
-
-
Returns the list of articles (
article_ids) written by the user.
-
try { var response = await client.User.GetUserSArticles(userId); // TODO: Handle 'response' of type UserArticlesResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description userIdstringUnique hash id assigned to every single Medium user.
-
OnSuccess:
UserArticlesResponseOnError:
SdkException<RawError>
-
Task<UserInterestsResponse> GetUserSInterests(string userId, CancellationToken ct = default);
-
-
Returns a list of tags that the given user follows.
-
try { var response = await client.User.GetUserSInterests(userId); // TODO: Handle 'response' of type UserInterestsResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description userIdstringUnique hash id assigned to every single Medium user.
-
OnSuccess:
UserInterestsResponseOnError:
SdkException<RawError>
-
Task<UserListsResponse> GetUserSLists(string userId, CancellationToken ct = default);
-
-
Returns an array of
list_idscreated by the user.Note: You can check whether the use has created lists or not beforehand. Check the
has_listattribute in the "Article Info" endpoint.
-
try { var response = await client.User.GetUserSLists(userId); // TODO: Handle 'response' of type UserListsResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description userIdstringUnique hash id assigned to every single Medium user.
-
OnSuccess:
UserListsResponseOnError:
SdkException<RawError>
-
Task<UserPublicationsResponse> GetUserSPublications(string userId, CancellationToken ct = default);
-
-
Returns a list of
publication_idswhere the user is the editor and/or creator.
-
try { var response = await client.User.GetUserSPublications(userId); // TODO: Handle 'response' of type UserPublicationsResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description userIdstringUnique hash id assigned to every single Medium user.
-
OnSuccess:
UserPublicationsResponseOnError:
SdkException<RawError>
-
Task<UserTopArticlesResponse> GetUserSTopArticles(string userId, CancellationToken ct = default);
-
-
Returns a list of
article_idsof the top 10 articles on the user's profile, for a givenuser_id.
-
try { var response = await client.User.GetUserSTopArticles(userId); // TODO: Handle 'response' of type UserTopArticlesResponse } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
Name Type Description userIdstringUnique hash id assigned to every single Medium user.
-
OnSuccess:
UserTopArticlesResponseOnError:
SdkException<RawError>
-
Source: Welcome
Task<Response> GetWelcome(CancellationToken ct = default);
-
-
Test Endpoint Returns the information about the Medium API
-
try { var response = await client.Welcome.GetWelcome(); // TODO: Handle 'response' of type Response } catch (SdkException<RawError> ex) { // TODO: Handle 'ex.Error' of type RawError }
-
OnSuccess:
ResponseOnError:
SdkException<RawError>
-