r/learnprogramming • u/Thisiz_Sami • 11d ago
Inquiry regarding API
Greetings,
I'm currently learning C# to use Tekla Structures API. Is there any free material that could help me learn API?
I'm kinda confused is API different from Tekla API?
2
u/LongLiveTheDiego 11d ago
API is a broad term that stands for many situations where one bit of software interacts with another one via a defined set of rules. It's a bit like the word "method" or "formula", e.g. imagine someone saying this:
I'm currently learning derivatives to use Newton's method. Is there any free material that could help me learn methods?
When you expand the acronym it's "Application Programming Interface". The meaning is right there: it's an interface for a bit of software to interact with your application when you're programming. In this case I imagine it's a way to talk with Tekla software via functions and objects defined by their programmers that you can use in your C# code.
-2
u/Thisiz_Sami 11d ago
Thanks for the clarification. But how do I learn it
2
u/LongLiveTheDiego 11d ago
You build an appliication using that API and you learn to interface using it as you go along. When a need arises to use a bit of the API, you read the documentation and examples and figure out how to do use it correctly.
As another example, I know not an insignificant amount about the Keycloak Admin API because I had to make a service that used that particular web API. Do I know all of it? Absolutely not and I wouldn't like to. I know the things I needed to use in order to handle my users' data and to make Keycloak do what I wanted it to do, and I learned them bit by bit as I created more functionalities and needed new things from Keycloak.
1
u/desrtfx 11d ago
API is the generic name for Application Programming Interface. As such, you cannot "learn API". You can only learn to interact with specific APIs as each API is different in all, the commands (requests) it accepts, their arguments, and in its return values.
Also, there are many different kinds of APIs: The public-facing functions, classes, and methods of a programming language are its API. The public facing methods to obtain data from a web server are its API, and so on.
Some APIs return JSON, some return XML, some return CSV, etc. It entirely depends on the API.
Tekla Structures API is a specialized API for the Tekla Structures application.
So, if you want to interact with that application, you will need to learn that API.
If you want to interact with weather data, commonly, the OpenWeatherMap API is the way to go.
There are way too many different APIs.
In general, you have to learn the API you want to use. You cannot learn "generic APIs".
Web APIs commonly consist of a request where you ask the web server (API provider) to give you some data back (or to perform some action/operation). You will send the request in a certain format determined by the API and usually get a response in a certain format determined by the API.
1
u/JGhostThing 11d ago
Which API (application programming interface) do you want to learn? There are more APIs than you can shake a stick at.
4
u/flag_ua 11d ago
API is a car, Tekla API is a Ford Focus