Astro Loaders by LekoArts
Need to pull in content using Astro's content layer? Reach for one of the provided loaders below and stop dealing with complicated third-party APIs.
Star on GithubUse loaders for
- Clerk
-
Flickr
- Plausible
-
Trakt
clerkLoader({ clientOptions?: ClerkClientOptions; method: { name: string; options: string | Object } })
Access certain Clerk Backend APIs by choosing a method name.
Return values of users.getUserList():
flickrPeopleGetPhotosLoader({ username: string })
Return photos from the given user's photostream. Only photos visible to the calling user will be returned.




flickrPhotosetsGetListLoader({ username: string })
Returns the photosets belonging to the specified user.
flickrPhotosetsGetPhotosLoader({ username: string; photoset_id: string })
Get the list of photos in a photoset.
Title: 3D - Total images: 3


flickrPhotosetsGetListWithPhotosLoader({ username: string })
This loader combines the flickrPhotosetsGetListLoader() and flickrPhotosetsGetPhotosLoader() loaders to get the most out of photosets. You'll get back the photosets and their list of photos.
Title: 3D - Total images: 3



Title: Winter - Total images: 2


Plausible
plausibleLoader({ query: PlausibleQuery })
Access the Plausible Stats API with your custom query.
Return value of a custom query:
{
"results": [
{
"metrics": [
744
],
"dimensions": []
}
],
"meta": {}
}traktUsersStatsLoader({ id: string })
Returns stats about the movies, shows, and episodes a user has watched, collected, and rated.
{
"movies": {
"plays": 543,
"watched": 500,
"minutes": 66399,
"collected": 0,
"ratings": 478,
"comments": 0
},
"shows": {
"watched": 238,
"collected": 0,
"ratings": 217,
"comments": 0
},
"seasons": {
"ratings": 6,
"comments": 0
},
"episodes": {
"plays": 9444,
"watched": 9400,
"minutes": 373305,
"collected": 0,
"ratings": 8,
"comments": 0
},
"network": {
"friends": 2,
"followers": 9,
"following": 2
},
"ratings": {
"total": 709,
"distribution": {
"1": 2,
"2": 4,
"3": 8,
"4": 21,
"5": 62,
"6": 136,
"7": 212,
"8": 178,
"9": 69,
"10": 17
}
}
}traktUsersWatchedLoader({ id: string; type: 'movies' | 'shows'; extended: string[] })
Returns all movies or shows a user has watched sorted by most plays.
traktUsersListsLoader({ id: string })
Returns all personal lists for a user.
traktUsersRatingsLoader({ id: string; type: string; rating?: string; extended?: string[] })
Get a user's ratings filtered by type. You can optionally filter for a specific rating between 1 and 10.
traktUsersHistoryLoader({ id: string; type: string; item_id?: number; start_at?: string; end_at?: string; extended?: string[] })
Returns movies and episodes that a user has watched, sorted by most recent.