From 3b9fa8f66d4032aa7411d99c8aa76df5a28aa4c8 Mon Sep 17 00:00:00 2001 From: Joshua Raphael Date: Fri, 16 Aug 2024 14:16:25 -0700 Subject: [PATCH] redo API section to include examples and better format --- README.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fa17b82..da46234 100644 --- a/README.md +++ b/README.md @@ -40,16 +40,20 @@ profile, err := client.GetUserProfile("jamiras") Check out the [examples](examples/) directory for how to call each endpoint, as well as our GoDocs (TBD) ## API -Click the function names to open their complete docs on the docs site. +Click a link to open their complete docs on the docs site or example code.

User

-* [`GetUserProfile()`](https://api-docs.retroachievements.org/v1/get-user-profile.html) - Get a user's basic profile information. -* [`GetUserRecentAchievements()`](https://api-docs.retroachievements.org/v1/get-user-recent-achievements.html) - Get a list of achievements recently earned by the user. -* [`GetAchievementsEarnedBetween()`](https://api-docs.retroachievements.org/v1/get-achievements-earned-between.html) - Get a list of achievements earned by a user between two dates. -* [`GetAchievementsEarnedOnDay()`](https://api-docs.retroachievements.org/v1/get-achievements-earned-on-day.html) - Get a list of achievements earned by a user on a given date. +|Function|Description|Links| +|-|-|-| +|`GetUserProfile(string)`|Get a user's basic profile information.|[docs](https://api-docs.retroachievements.org/v1/get-user-profile.html) \| [example](examples/user/getuserprofile/getuserprofile.go)| +|`GetUserRecentAchievements(string, int)`|Get a list of achievements recently earned by the user.|[docs](https://api-docs.retroachievements.org/v1/get-user-recent-achievements.html) \| [example](examples/user/getuserrecentachievements/getuserrecentachievements.go)| +|`GetAchievementsEarnedBetween(string, time.Time, time.Time)`|Get a list of achievements earned by a user between two dates.|[docs](https://api-docs.retroachievements.org/v1/get-achievements-earned-between.html) \| [example](examples/user/getachievementsearnedbetween/getachievementsearnedbetween.go)| +|`GetAchievementsEarnedOnDay(string, time.Time)`|Get a list of achievements earned by a user on a given date.|[docs](https://api-docs.retroachievements.org/v1/get-achievements-earned-on-day.html) \| [example](examples/user/getachievementsearnedonday/getachievementsearnedonday.go)|

Game

-* [`GetGame()`](https://api-docs.retroachievements.org/v1/get-game.html) - Get basic metadata about a game. -* [`GetGameExtended()`](https://api-docs.retroachievements.org/v1/get-game-extended.html) - Get extended metadata about a game. \ No newline at end of file +|Function|Description|Links| +|-|-|-| +|`GetGame(int)`|Get basic metadata about a game.|[docs](https://api-docs.retroachievements.org/v1/get-game.html) \| [example](examples/game/getgame/getgame.go)| +|`GetGameExtended(int)`|Get extended metadata about a game.|[docs](https://api-docs.retroachievements.org/v1/get-game-extended.html) \| [example](examples/game/getgameextended/getgameextended.go)| \ No newline at end of file