diff --git a/api/README.md b/api/README.md new file mode 100644 index 0000000..ec04f49 --- /dev/null +++ b/api/README.md @@ -0,0 +1,33 @@ +# Tercul API Documentation + +This document provides documentation for the Tercul GraphQL API. + +## Queries + +### `trendingWorks` + +The `trendingWorks` query returns a list of trending works. + +**Signature:** + +```graphql +trendingWorks(timePeriod: String, limit: Int): [Work!]! +``` + +**Arguments:** + +* `timePeriod` (String, optional): The time period to get trending works for. Can be "daily", "weekly", or "monthly". Defaults to "daily". +* `limit` (Int, optional): The maximum number of trending works to return. Defaults to 10. + +**Example:** + +```graphql +query GetTrendingWorks { + trendingWorks(limit: 5) { + id + name + } +} +``` + +This query will return the top 5 trending works for the day.