Open spitfire64 opened 3 years ago
Thanks, I will look at this,
I have now learned how to interact with the API through PHP. A simple example for anyone that like to get started using PHP:
class Borsdata
{
private $base_url = 'https://apiservice.borsdata.se';
private $version = 'v1';
private $key = 'my_key';
private $sleep =0.11; // Max 100 requests allowed per 10s
function get_all_instruments_from_borsdata(){
$endpoint = "/instruments";
$url = $this->base_url.'/'.$this->version.'/'.$endpoint.'?authKey='.$this->key;
$r = json_decode(file_get_contents($url), true);
return $r['instruments'];
}
}
Tack Henrik. Jag har kommit igång själv och lagt upp lite PHP kod å gitHub ifall någon annan kan behöva lite starthjälp MVH/Mårten Hansson
On Mon, 8 Mar 2021 at 08:44, Henrik notifications@github.com wrote:
Thanks, I will look at this,
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Borsdata-Sweden/API/issues/10#issuecomment-792546056, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWACSDONMN777SEUJP5YPDTCR545ANCNFSM4V2S772A .
Looks great! If you have some sample code, maybe I can add this to our rep? We dont have any knowledge in php.
Just published a simple (quick and dirty) php class sample code to interact with the API through PHP.
Thanks reinew. I added link on our startpage to your repo.
Thanks for linking but the name is wrong. It's not in python, it's php and have sample code for all the functions.
Sorry. Now its fixed :) Thanks again
Please write a little sample code in OO PHP!