lundi 29 novembre 2021

How can I consume an API in Java? [duplicate]

Last time I asked a question about API I realized I wasn't very concise with what I needed, so I'm asking again.

I've learned from my last question that an API is consumed, not integrated. Basically what I want to know, is how can I access the methods from that my API provides(let's assume for example GET circuits and GET drivers are the two methods). I want to use these two methods to build a web application(java based), but I don't see any tutorials on how to just access the methods. I am familiar with Java, but not with this kind of usage and I really want to learn the know how. Do I need a framework(Spring) to work on my Web-Application? Can you direct me for some tutorials or some steps on how to just build a super-simple application?

I tried to make an API Request in IntelliJ, but it's saying that I don't have the key, I tried to put it in a class using the code snippet provided by the API I'm using, but I don't know where to write it exactly in order for IntelliJ to see it and use it. If you need any more details about my question, please ask me, I really need help in this matter(take in consideration that it's my first time building an Web Application using API's)

P.S: I've read loads of sites, but none of the seem to explain how to do what I need.




Aucun commentaire:

Enregistrer un commentaire