1

I am very new to echonest and curl. I have an up and running echoprint server and echoprint codegen is also working fine. I am able to push codes to my local server using ingest method.

But I don't know how to query the server using the curl request.

How can I send the syntax or example of the curl request for querying the echoprint server?

halfer
  • 19,824
  • 17
  • 99
  • 186
Sourabh Jaiswal
  • 101
  • 2
  • 10

1 Answers1

0

Once you are up with code parsed by codegen library you can always call api layer for ingest, sample code where i use PHP script top of the echoprint server

            $curl = curl_init();
            curl_setopt_array( $curl, array(
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => 'http://localhost:8080/ingest',
            CURLOPT_USERAGENT => 'URl Request',
            CURLOPT_POST => 1,
            CURLOPT_POSTFIELDS => array(
                'fp_code' => $songcode,
                'track_id' => $trackid,
                'length'=>$length,
                'artist' => $artist,
                'codever' => $codecover
            )
        ) );
    $resp = curl_exec( $curl );
    curl_close( $curl );