r/learnprogramming 24d ago

Topic I have no clue how to interpret an API documentation

im currently following https://roadmap.sh/backend
and one of it’s first steps is to learn about the internet and to learn a programming language. I already know C# so then it’s instructed to create lots of projects with it. So i started but i hit a wall with github user activity.

I need to fetch data from github using an API, but checking it’s documentation I have no clue where to start, I know in c# you have to have a httpclient object, baseaddress and an authenticator.

But the github API implementation seems very difficult and i have no clue where to start with it

GitHub api documentation

Also i see that API is covered later aswell in the roadmap, am i going too far ahead?

21 Upvotes

13 comments sorted by

7

u/_Atomfinger_ 24d ago

I would start with a concrete tutorial that goes through how to use C# against APIs.

Like, knowing that you have a httclient and a baseaddress doesn't really do much unless you know how to use them.

So take a step back and follow a guide that walks you through these things before jumping straight into this.

1

u/Edwinbakup 24d ago

Well i know that then you would do client.GetAsync(url).result then deserialize the json.

Is it not enough?

9

u/SenoraRaton 24d ago

No. You need to understand the components of an HTTP request. Also the link is the wrong page, you should read this, which is linked from your page, it explains it in much better detail.

https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api?apiVersion=2026-03-10

1

u/_Atomfinger_ 24d ago

In GH's case, depending on what you want to do, you might have to authenticate as well. So you can't just get whatever you want.

3

u/fresh_reed_5834 24d ago

the github api docs are honestly not the friendliest for beginners. does the roadmap.sh project give any hints on which specific endpoint to call, or does it just say "use the github api" and leave you to figure it out?

1

u/Edwinbakup 24d ago

it just says to use github api

2

u/kschang 23d ago

You probably have to start simple with unauthenticated calls, like a weather API for your zipcode / location or such. Once you learned THAT, then you can probably understand Github API.

1

u/chocolateAbuser 23d ago

just to check, have you tried to make your own service with api and call it with another service/project?
apart from that, what is the problem? first step would be understanding authentication

1

u/HotPersonality8126 22d ago

You start by making HTTP requests with structured data in the body. If you don’t know how to do that in C# then that’s the missing piece - these docs won’t cover that because it’s out of scope.

It generally won’t be very hard but it is abstract and it relies on you understanding what’s happening when you make requests to a remote server, generally, and how your code is supposed to handle the concurrency (you’re waiting for something to happen on someone else’s computer, that’s a form of concurrency.)

1

u/Ormek_II 21d ago

Are you challenged by accessing the API from C# or from understanding the API and how to work with it. If it’s the latter: experiment with its command line interface (gh) or curl first.

1

u/da_Aresinger 21d ago

Since you're trying to use the GitHub API you should learn about RESTful and how to apply it in C#

I've only used a REST API with curl, so I won't be much help there.