import { getListing } from './client.ts'
import type { GetListingInput } from './client.ts'
/**
* Read a Reddit listing (front page or a subreddit).
* @param params.subreddit - Community name. Omit for the authenticated front page.
* @param params.sort - `best`, `hot`, `new`, `top`, `rising`, or `controversial`.
* @example
* import getListing from 'kody:@kody/reddit/get-listing'
* const listing = await getListing({ subreddit: 'programming', sort: 'hot', limit: 5 })
* // => { listing: { after: '...', posts: [{ id, title, author, score, ... }] } }
*/
export default async function getListingEntrypoint(params: GetListingInput = {}) {
return getListing(params)
}