MCPcopy Create free account
hub / github.com/9d8dev/next-wp / getPostsByAuthor

Function getPostsByAuthor

lib/wordpress.ts:318–320  ·  view source on GitHub ↗
(authorId: number)

Source from the content-addressed store, hash-verified

316}
317
318export async function getPostsByAuthor(authorId: number): Promise<Post[]> {
319 return wordpressFetch<Post[]>("/wp-json/wp/v2/posts", { author: authorId });
320}
321
322export async function getPostsByAuthorSlug(
323 authorSlug: string

Callers

nothing calls this directly

Calls 1

wordpressFetchFunction · 0.85

Tested by

no test coverage detected