Forum > Networking and Web Programming

Using REST API's

(1/3) > >>

anon101:
Hey guys,
I'm new to this forum (and Lazarus) so sorry if I've posted this in the wrong place or done anything else wrong here.
I'm planning to create a program which will use Trello's API to receive information on a specific card (e.g. labels, name/title, etc) and use it for something else. However, I'm confused about how to go about using their API in Lazarus (I've never really attempted to do web-based programming before, and normally just stick to Java (or another language I've learnt in the past) to do everything, however, I was recently intrigued by Lazarus's ability to compile a GUI nearly anywhere).
So any help explaining how to go about using their API to collect this data for a desktop program would be greatly appreciated.
Thanks so much!!!

Leledumbo:
Welcome to the forum and use the search functionality, limiting the search to this particular subforum. REST API consumption is quite common task and has been asked and answered quite a few times. Comeback when you're stuck with what you have tried so far.

Thaddy:
A good example is the google api's. That comes with a rather easy to use reflector/converter for the google rest api's.
You can probably use it for any rest api. (but this is not quite suitable for real beginners)

anon101:
Hi Thaddy,
I'm not quite sure about what you mean when you say a reflector/converter.
Would you have a guide or anything you can refer me to?

I have googled this, and all I need is to use a GET request.
But how do I do this with Lazarus/Free Pascal?

I have myself looked this up to try and find what I can, and it appears there are several ways to go about this (I think), I need to use HTTPS connections, and there seem to be several external libraries like Synapse and Indy to do so. But isn't there something already in Lazarus which would easily allow me to use the GET and POST requests (as I want it to be able to run on as many platforms as possible)?

Thanks for helping!!!

lucamar:
Built in libraries, other than the lower-level sockets and fcl-net, start p.e. with FPC's fcl-web (folder {FPC-Src}/packages/fcl-web/)--specifically, for you, fphttpclient--and follow with the various Lazarus components which use it to implement higher level clients (like the mentioned googleapis, etc.)

These may be enough for quick development or to give you an idea, but beware that most serious web development is actually done with Synapse or Indy; you should become used to them if you plan to do it long-term.

Navigation

[0] Message Index

[#] Next page

Go to full version