How should I get started with the GitHub API in C#?
Asked by
~adjustable wrench!
I'm working through a backend development learning path and have reached the project where I need to build a GitHub user activity application. I already know C#, but I'm struggling to understand the API documentation and figure out where to begin. I understand that C# applications generally use HttpClient, a base address, authentication when required, and JSON deserialization, but the GitHub API still feels overwhelming. The learning path only says to use the GitHub API without specifying which endpoint or approach to start with. Am I attempting this project too early, or is there a beginner-friendly way to learn the necessary API concepts first?
Answers
It would probably help to take a step back and follow a beginner-oriented C# HTTP API tutorial first. Knowing that HttpClient exists, or that you need a base address, is only the starting pointโyou also need to understand request URLs, HTTP methods, status codes, headers, authentication, async calls, and how to deserialize the response. Once those basics make sense, the GitHub documentation will be much easier to navigate.
Reply to this answer
The GitHub documentation can be difficult when youโre new to APIs, especially because it describes a large number of endpoints rather than one complete beginner project. Start by choosing one specific task, such as retrieving a userโs public events, then identify the exact endpoint for that task and test it with a simple GET request. You donโt need to understand the entire API before beginning. The learning path also seems to provide little direction beyond saying to use GitHub, so choosing the endpoint yourself is part of the exercise.
Reply to this answer
Add your answer
Answers are reviewed before publication.
~adjustable wrench!: I understand the basic flow of calling GetAsync and deserializing the JSON. Is that enough to start, or are there other fundamentals I should learn first?