hashnode.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
New to Corsair? See API access, authentication, and error handling.
Comments
list
comments.list
List comments on a post
Risk: read
await corsair.hashnode.api.comments.list({});
| Name | Type | Required | Description |
|---|---|---|---|
postId | string | Yes | — |
first | number | Yes | — |
after | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
post | object | Yes | — |
post full type
post full type
{
comments: {
edges: {
node: {
id: string,
content: {
html?: string,
markdown?: string,
text?: string
},
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
totalReactions: number,
dateAdded: string
},
cursor: string
}[],
pageInfo: {
hasNextPage: boolean,
endCursor?: string | null
}
}
}
Drafts
create
drafts.create
Create a new draft
Risk: write
await corsair.hashnode.api.drafts.create({});
| Name | Type | Required | Description |
|---|---|---|---|
publicationId | string | Yes | — |
title | string | No | — |
subtitle | string | No | — |
contentMarkdown | string | No | — |
slug | string | No | — |
tags | object[] | No | — |
seriesId | string | No | — |
disableComments | boolean | No | — |
originalArticleURL | string | No | — |
publishedAt | string | No | — |
settings | object | No | — |
metaTags | object | No | — |
coverImageOptions | object | No | — |
publishAs | string | No | — |
coAuthors | string[] | No | — |
tags full type
tags full type
{
slug: string,
name?: string
}[]
settings full type
settings full type
{
enableTableOfContent?: boolean,
delist?: boolean,
activateNewsletter?: boolean,
slugOverridden?: boolean
}
metaTags full type
metaTags full type
{
title?: string,
description?: string,
image?: string
}
coverImageOptions full type
coverImageOptions full type
{
coverImageURL?: string,
coverImageAttribution?: string,
coverImagePhotographer?: string,
isCoverAttributionHidden?: boolean,
stickCoverToBottom?: boolean
}
| Name | Type | Required | Description |
|---|---|---|---|
createDraft | object | Yes | — |
createDraft full type
createDraft full type
{
draft: {
id: string,
title?: string | null,
subtitle?: string | null,
slug?: string | null,
content?: {
markdown?: string,
html?: string,
text?: string
} | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
coverImage?: {
url?: string | null,
attribution?: string | null
} | null,
tags?: {
id: string,
name: string,
slug: string
}[] | null,
publication?: {
id: string,
title: string
} | null,
series?: {
id: string,
name: string,
slug: string
} | null,
updatedAt: string,
scheduledDate?: string | null,
readTimeInMinutes?: number,
isSubmittedForReview?: boolean
}
}
delete
drafts.delete
Delete a draft [DESTRUCTIVE - IRREVERSIBLE]
Risk: destructive · Irreversible
await corsair.hashnode.api.drafts.delete({});
| Name | Type | Required | Description |
|---|---|---|---|
draftId | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
deleteDraft | object | Yes | — |
deleteDraft full type
deleteDraft full type
{
draft?: {
id: string
} | null
}
get
drafts.get
Get a draft by ID
Risk: read
await corsair.hashnode.api.drafts.get({});
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
draft | object | No | — |
draft full type
draft full type
{
id: string,
title?: string | null,
subtitle?: string | null,
slug?: string | null,
content?: {
markdown?: string,
html?: string,
text?: string
} | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
coverImage?: {
url?: string | null,
attribution?: string | null
} | null,
tags?: {
id: string,
name: string,
slug: string
}[] | null,
publication?: {
id: string,
title: string
} | null,
series?: {
id: string,
name: string,
slug: string
} | null,
updatedAt: string,
scheduledDate?: string | null,
readTimeInMinutes?: number,
isSubmittedForReview?: boolean
}
publish
drafts.publish
Publish a draft as a post
Risk: write
await corsair.hashnode.api.drafts.publish({});
| Name | Type | Required | Description |
|---|---|---|---|
draftId | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
publishDraft | object | Yes | — |
publishDraft full type
publishDraft full type
{
post: {
id: string,
title: string,
subtitle?: string | null,
slug: string,
brief: string,
url: string,
coverImage?: {
url?: string | null,
isPortrait?: boolean,
attribution?: string | null
} | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
publication?: {
id: string,
title: string,
url?: string | null,
displayTitle?: string | null
} | null,
tags?: {
id: string,
name: string,
slug: string
}[] | null,
content?: {
html?: string,
markdown?: string,
text?: string
} | null,
seo?: {
title?: string | null,
description?: string | null
} | null,
ogMetaData?: {
image?: string | null
} | null,
publishedAt: string,
updatedAt?: string | null,
readTimeInMinutes: number,
reactionCount: number,
responseCount: number,
replyCount?: number,
series?: {
id: string,
name: string,
slug: string
} | null,
featured?: boolean
}
}
update
drafts.update
Update an existing draft
Risk: write
await corsair.hashnode.api.drafts.update({});
| Name | Type | Required | Description |
|---|---|---|---|
draftId | string | Yes | — |
title | string | No | — |
subtitle | string | No | — |
contentMarkdown | string | No | — |
slug | string | No | — |
tags | object[] | No | — |
seriesId | string | No | — |
disableComments | boolean | No | — |
originalArticleURL | string | No | — |
publishedAt | string | No | — |
settings | object | No | — |
metaTags | object | No | — |
coverImageOptions | object | No | — |
publishAs | string | No | — |
coAuthors | string[] | No | — |
tags full type
tags full type
{
slug: string,
name?: string
}[]
settings full type
settings full type
{
enableTableOfContent?: boolean,
delist?: boolean,
activateNewsletter?: boolean,
slugOverridden?: boolean
}
metaTags full type
metaTags full type
{
title?: string,
description?: string,
image?: string
}
coverImageOptions full type
coverImageOptions full type
{
coverImageURL?: string,
coverImageAttribution?: string,
coverImagePhotographer?: string,
isCoverAttributionHidden?: boolean,
stickCoverToBottom?: boolean
}
| Name | Type | Required | Description |
|---|---|---|---|
updateDraft | object | Yes | — |
updateDraft full type
updateDraft full type
{
draft: {
id: string,
title?: string | null,
subtitle?: string | null,
slug?: string | null,
content?: {
markdown?: string,
html?: string,
text?: string
} | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
coverImage?: {
url?: string | null,
attribution?: string | null
} | null,
tags?: {
id: string,
name: string,
slug: string
}[] | null,
publication?: {
id: string,
title: string
} | null,
series?: {
id: string,
name: string,
slug: string
} | null,
updatedAt: string,
scheduledDate?: string | null,
readTimeInMinutes?: number,
isSubmittedForReview?: boolean
}
}
Feed
list
feed.list
Get the global feed of posts
Risk: read
await corsair.hashnode.api.feed.list({});
| Name | Type | Required | Description |
|---|---|---|---|
first | number | Yes | — |
after | string | No | — |
filter | object | No | — |
filter full type
filter full type
{
tags?: string[],
excludeTags?: string[],
publications?: string[],
excludePublications?: string[]
}
| Name | Type | Required | Description |
|---|---|---|---|
feed | object | Yes | — |
feed full type
feed full type
{
edges: {
node: {
id: string,
title: string,
subtitle?: string | null,
slug: string,
brief: string,
url: string,
coverImage?: {
url?: string | null,
isPortrait?: boolean,
attribution?: string | null
} | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
publication?: {
id: string,
title: string,
url?: string | null,
displayTitle?: string | null
} | null,
tags?: {
id: string,
name: string,
slug: string
}[] | null,
content?: {
html?: string,
markdown?: string,
text?: string
} | null,
seo?: {
title?: string | null,
description?: string | null
} | null,
ogMetaData?: {
image?: string | null
} | null,
publishedAt: string,
updatedAt?: string | null,
readTimeInMinutes: number,
reactionCount: number,
responseCount: number,
replyCount?: number,
series?: {
id: string,
name: string,
slug: string
} | null,
featured?: boolean
},
cursor: string
}[],
pageInfo: {
hasNextPage: boolean,
endCursor?: string | null
}
}
Images
createUploadURL
images.createUploadURL
Create a presigned image upload URL
Risk: write
await corsair.hashnode.api.images.createUploadURL({});
| Name | Type | Required | Description |
|---|---|---|---|
contentType | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
createImageUploadURL | object | Yes | — |
createImageUploadURL full type
createImageUploadURL full type
{
presignedPost: {
url: string,
fields: {
}
}
}
Me
me
me
Get the current authenticated user
Risk: read
await corsair.hashnode.api.me({});
| Name | Type | Required | Description |
|---|---|---|---|
me | object | Yes | — |
me full type
me full type
{
id: string,
name: string,
username: string,
email: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
}
Pages
get
pages.get
Get a static page by slug
Risk: read
await corsair.hashnode.api.pages.get({});
| Name | Type | Required | Description |
|---|---|---|---|
host | string | Yes | — |
slug | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
publication | object | Yes | — |
publication full type
publication full type
{
staticPage?: {
id: string,
title: string,
slug: string,
content?: {
html?: string,
markdown?: string,
text?: string
} | null,
hidden?: boolean,
ogMetaData?: {
image?: string | null
} | null,
seo?: {
title?: string | null,
description?: string | null
} | null
} | null
}
list
pages.list
List static pages in a publication
Risk: read
await corsair.hashnode.api.pages.list({});
| Name | Type | Required | Description |
|---|---|---|---|
host | string | Yes | — |
first | number | Yes | — |
after | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
publication | object | Yes | — |
publication full type
publication full type
{
staticPages: {
edges: {
node: {
id: string,
title: string,
slug: string,
content?: {
html?: string,
markdown?: string,
text?: string
} | null,
hidden?: boolean,
ogMetaData?: {
image?: string | null
} | null,
seo?: {
title?: string | null,
description?: string | null
} | null
},
cursor: string
}[],
pageInfo: {
hasNextPage: boolean,
endCursor?: string | null
}
}
}
Posts
get
posts.get
Get a single post by ID
Risk: read
await corsair.hashnode.api.posts.get({});
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
post | object | No | — |
post full type
post full type
{
id: string,
title: string,
subtitle?: string | null,
slug: string,
brief: string,
url: string,
coverImage?: {
url?: string | null,
isPortrait?: boolean,
attribution?: string | null
} | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
publication?: {
id: string,
title: string,
url?: string | null,
displayTitle?: string | null
} | null,
tags?: {
id: string,
name: string,
slug: string
}[] | null,
content?: {
html?: string,
markdown?: string,
text?: string
} | null,
seo?: {
title?: string | null,
description?: string | null
} | null,
ogMetaData?: {
image?: string | null
} | null,
publishedAt: string,
updatedAt?: string | null,
readTimeInMinutes: number,
reactionCount: number,
responseCount: number,
replyCount?: number,
series?: {
id: string,
name: string,
slug: string
} | null,
featured?: boolean
}
getBySlug
posts.getBySlug
Get a post by publication host and slug
Risk: read
await corsair.hashnode.api.posts.getBySlug({});
| Name | Type | Required | Description |
|---|---|---|---|
host | string | Yes | — |
slug | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
publication | object | Yes | — |
publication full type
publication full type
{
post?: {
id: string,
title: string,
subtitle?: string | null,
slug: string,
brief: string,
url: string,
coverImage?: {
url?: string | null,
isPortrait?: boolean,
attribution?: string | null
} | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
publication?: {
id: string,
title: string,
url?: string | null,
displayTitle?: string | null
} | null,
tags?: {
id: string,
name: string,
slug: string
}[] | null,
content?: {
html?: string,
markdown?: string,
text?: string
} | null,
seo?: {
title?: string | null,
description?: string | null
} | null,
ogMetaData?: {
image?: string | null
} | null,
publishedAt: string,
updatedAt?: string | null,
readTimeInMinutes: number,
reactionCount: number,
responseCount: number,
replyCount?: number,
series?: {
id: string,
name: string,
slug: string
} | null,
featured?: boolean
} | null
}
list
posts.list
List posts in a publication
Risk: read
await corsair.hashnode.api.posts.list({});
| Name | Type | Required | Description |
|---|---|---|---|
host | string | Yes | — |
first | number | Yes | — |
after | string | No | — |
filter | object | No | — |
filter full type
filter full type
{
tagSlugs?: string[]
}
| Name | Type | Required | Description |
|---|---|---|---|
publication | object | Yes | — |
publication full type
publication full type
{
posts: {
edges: {
node: {
id: string,
title: string,
subtitle?: string | null,
slug: string,
brief: string,
url: string,
coverImage?: {
url?: string | null,
isPortrait?: boolean,
attribution?: string | null
} | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
publication?: {
id: string,
title: string,
url?: string | null,
displayTitle?: string | null
} | null,
tags?: {
id: string,
name: string,
slug: string
}[] | null,
content?: {
html?: string,
markdown?: string,
text?: string
} | null,
seo?: {
title?: string | null,
description?: string | null
} | null,
ogMetaData?: {
image?: string | null
} | null,
publishedAt: string,
updatedAt?: string | null,
readTimeInMinutes: number,
reactionCount: number,
responseCount: number,
replyCount?: number,
series?: {
id: string,
name: string,
slug: string
} | null,
featured?: boolean
},
cursor: string
}[],
pageInfo: {
hasNextPage: boolean,
endCursor?: string | null
},
totalDocuments?: number
}
}
publish
posts.publish
Publish a new post
Risk: write
await corsair.hashnode.api.posts.publish({});
| Name | Type | Required | Description |
|---|---|---|---|
title | string | Yes | — |
publicationId | string | Yes | — |
contentMarkdown | string | Yes | — |
subtitle | string | No | — |
slug | string | No | — |
coverImage | string | No | — |
tags | object[] | No | — |
originalArticleURL | string | No | — |
metaTitle | string | No | — |
metaDescription | string | No | — |
ogImage | string | No | — |
disableComments | boolean | No | — |
isDelisted | boolean | No | — |
enableToc | boolean | No | — |
publishAs | string | No | — |
coAuthors | string[] | No | — |
seriesId | string | No | — |
publishedAt | string | No | — |
tags full type
tags full type
{
slug: string,
name?: string
}[]
| Name | Type | Required | Description |
|---|---|---|---|
publishPost | object | Yes | — |
publishPost full type
publishPost full type
{
post: {
id: string,
title: string,
subtitle?: string | null,
slug: string,
brief: string,
url: string,
coverImage?: {
url?: string | null,
isPortrait?: boolean,
attribution?: string | null
} | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
publication?: {
id: string,
title: string,
url?: string | null,
displayTitle?: string | null
} | null,
tags?: {
id: string,
name: string,
slug: string
}[] | null,
content?: {
html?: string,
markdown?: string,
text?: string
} | null,
seo?: {
title?: string | null,
description?: string | null
} | null,
ogMetaData?: {
image?: string | null
} | null,
publishedAt: string,
updatedAt?: string | null,
readTimeInMinutes: number,
reactionCount: number,
responseCount: number,
replyCount?: number,
series?: {
id: string,
name: string,
slug: string
} | null,
featured?: boolean
}
}
search
posts.search
Search posts within a publication
Risk: read
await corsair.hashnode.api.posts.search({});
| Name | Type | Required | Description |
|---|---|---|---|
first | number | Yes | — |
after | string | No | — |
sortBy | DATE_PUBLISHED_ASC | DATE_PUBLISHED_DESC | No | — |
filter | object | Yes | — |
filter full type
filter full type
{
query?: string,
publicationId: string,
deletedOnly?: boolean,
authorIds?: string[],
tagIds?: string[]
}
| Name | Type | Required | Description |
|---|---|---|---|
searchPostsOfPublication | object | Yes | — |
searchPostsOfPublication full type
searchPostsOfPublication full type
{
edges: {
node: {
id: string,
title: string,
subtitle?: string | null,
slug: string,
brief: string,
url: string,
coverImage?: {
url?: string | null,
isPortrait?: boolean,
attribution?: string | null
} | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
publication?: {
id: string,
title: string,
url?: string | null,
displayTitle?: string | null
} | null,
tags?: {
id: string,
name: string,
slug: string
}[] | null,
content?: {
html?: string,
markdown?: string,
text?: string
} | null,
seo?: {
title?: string | null,
description?: string | null
} | null,
ogMetaData?: {
image?: string | null
} | null,
publishedAt: string,
updatedAt?: string | null,
readTimeInMinutes: number,
reactionCount: number,
responseCount: number,
replyCount?: number,
series?: {
id: string,
name: string,
slug: string
} | null,
featured?: boolean
},
cursor: string
}[],
pageInfo: {
hasNextPage: boolean,
endCursor?: string | null
}
}
update
posts.update
Update an existing post
Risk: write
await corsair.hashnode.api.posts.update({});
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
title | string | No | — |
subtitle | string | No | — |
contentMarkdown | string | No | — |
slug | string | No | — |
coverImage | string | No | — |
tags | object[] | No | — |
originalArticleURL | string | No | — |
metaTitle | string | No | — |
metaDescription | string | No | — |
ogImage | string | No | — |
disableComments | boolean | No | — |
isDelisted | boolean | No | — |
enableToc | boolean | No | — |
publishAs | string | No | — |
coAuthors | string[] | No | — |
seriesId | string | No | — |
publishedAt | string | No | — |
tags full type
tags full type
{
slug: string,
name?: string
}[]
| Name | Type | Required | Description |
|---|---|---|---|
updatePost | object | Yes | — |
updatePost full type
updatePost full type
{
post: {
id: string,
title: string,
subtitle?: string | null,
slug: string,
brief: string,
url: string,
coverImage?: {
url?: string | null,
isPortrait?: boolean,
attribution?: string | null
} | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
publication?: {
id: string,
title: string,
url?: string | null,
displayTitle?: string | null
} | null,
tags?: {
id: string,
name: string,
slug: string
}[] | null,
content?: {
html?: string,
markdown?: string,
text?: string
} | null,
seo?: {
title?: string | null,
description?: string | null
} | null,
ogMetaData?: {
image?: string | null
} | null,
publishedAt: string,
updatedAt?: string | null,
readTimeInMinutes: number,
reactionCount: number,
responseCount: number,
replyCount?: number,
series?: {
id: string,
name: string,
slug: string
} | null,
featured?: boolean
}
}
Publications
get
publications.get
Get a publication by host
Risk: read
await corsair.hashnode.api.publications.get({});
| Name | Type | Required | Description |
|---|---|---|---|
host | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
publication | object | No | — |
publication full type
publication full type
{
id: string,
title: string,
displayTitle?: string | null,
url?: string | null,
favicon?: string | null,
about?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
seo?: {
title?: string | null,
description?: string | null
} | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
ogMetaData?: {
image?: string | null
} | null,
isTeam?: boolean,
links?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
followersCount?: number | null
}
list
publications.list
List publications for the authenticated user
Risk: read
await corsair.hashnode.api.publications.list({});
| Name | Type | Required | Description |
|---|---|---|---|
first | number | Yes | — |
after | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
me | object | Yes | — |
me full type
me full type
{
publications: {
edges: {
node: {
id: string,
title: string,
displayTitle?: string | null,
url?: string | null,
favicon?: string | null,
about?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
seo?: {
title?: string | null,
description?: string | null
} | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null,
ogMetaData?: {
image?: string | null
} | null,
isTeam?: boolean,
links?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
followersCount?: number | null
},
cursor: string
}[],
pageInfo: {
hasNextPage: boolean,
endCursor?: string | null
}
}
}
Series
get
series.get
Get a series by slug
Risk: read
await corsair.hashnode.api.series.get({});
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
series | object | No | — |
series full type
series full type
{
id: string,
name: string,
slug: string,
description?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
coverImage?: string | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null
}
list
series.list
List series in a publication
Risk: read
await corsair.hashnode.api.series.list({});
| Name | Type | Required | Description |
|---|---|---|---|
host | string | Yes | — |
first | number | Yes | — |
after | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
publication | object | Yes | — |
publication full type
publication full type
{
seriesList: {
edges: {
node: {
id: string,
name: string,
slug: string,
description?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
coverImage?: string | null,
author?: {
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
} | null
},
cursor: string
}[],
pageInfo: {
hasNextPage: boolean,
endCursor?: string | null
}
}
}
Tags
get
tags.get
Get a tag by slug
Risk: read
await corsair.hashnode.api.tags.get({});
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
tag | object | No | — |
tag full type
tag full type
{
id: string,
name: string,
slug: string,
tagline?: string | null,
logo?: string | null,
postsCount?: number,
followersCount?: number
}
Users
get
users.get
Get a user by username
Risk: read
await corsair.hashnode.api.users.get({});
| Name | Type | Required | Description |
|---|---|---|---|
username | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
user | object | No | — |
user full type
user full type
{
id: string,
name: string,
username: string,
profilePicture?: string | null,
coverImage?: string | null,
bio?: {
text?: string | null,
html?: string,
markdown?: string
} | null,
socialMediaLinks?: {
twitter?: string | null,
github?: string | null,
linkedin?: string | null,
website?: string | null
} | null,
location?: string | null,
dateJoined?: string | null
}