Forum > General

Rapidapi (https://rapidapi.com/)

(1/2) > >>

alaa123456789:
Hi ,
i was searching all the day to find a way how to use https://rapidapi.com/ in lazarus
this website has many useful free API's , for example https://rapidapi.com/dmisdm/api/youtube-dl4
it has implantation in many different programming languages but not in pascal , anyone could help with this?

thanks

MarkMLl:
What does it do? I think an introduction is in order rather than expecting people to invest time in looking at an unknown website.

What language is the standard API in? If it's C (as distinct from C++ with object oriented stuff) FPC has a conversion tool which gets .h files mostly right.

MarkMLl

paweld:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses  fphttpclient, fpopenssl, opensslsockets, httpprotocol; procedure TForm1.Button1Click(Sender: TObject);var  hc: TFPHttpClient;  api: String = 'https://youtube-dl4.p.rapidapi.com/';     //rapidapi youtube-dl  key: String = '***********************';                 //your rapidapi key  host: String = 'youtube-dl4.p.rapidapi.com';             //rapidapi youtube host  outjson: String = '';begin  hc := TFPHttpClient.Create(nil);  hc.AllowRedirect := True;  hc.AddHeader('X-RapidAPI-Key', key);  hc.AddHeader('X-RapidAPI-Host', host);  try    outjson := hc.Get(api + '?url=' + HTTPEncode('https://www.youtube.com/watch?v=lNK8EIoNJS8'));  finally    hc.Free;  end;end;

marcov:
Seems that RapidAPI is simply a rental marketplace for web apis. The marketplace aspect seems to be way larger than the coding side of things.

But they have a simple generator for the simplest of APIs in multiple languages, so the simplest would be to ask them to add Delphi and/or lazarus to the languages.

alaa123456789:

--- Quote from: MarkMLl on July 02, 2022, 07:32:02 pm ---What does it do? I think an introduction is in order rather than expecting people to invest time in looking at an unknown website.

What language is the standard API in? If it's C (as distinct from C++ with object oriented stuff) FPC has a conversion tool which gets .h files mostly right.

MarkMLl

--- End quote ---

it is providing useful api's you could use it in the applications for example covid19 api
anyway thanks for the guys who has replied already with example so everybody in this forum could get benefit from it

regards

Navigation

[0] Message Index

[#] Next page

Go to full version