#You can also use wget
curl https://api.datagummy.com/amazon?date=2024-11-20&type=earnings \
-H 'X-API-KEY: abc' \
-H 'X-API-SECRET: xyz'
GET https//api.datagummy.com/amazon?date=2024-11-20&type=earnings HTTP/1.1
Host: api.datagummy.com
X-API-KEY: abc
X-API-SECRET: xyz
var headers = {
'X-API-KEY': 'abc',
'X-API-SECRET': 'xyz
};
$.ajax({
url: 'https://api.datagummy.com/amazon?date=2024-11-20&type=earnings',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.datagummy.com/amazon?date=2024-11-20&type=earnings');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
'X-API-KEY: abc',
'X-API-SECRET: xyz',
]);
$response = curl_exec($curl);
curl_close($curl);
print_r($response);
const request = require('node-fetch');
const headers = {
'X-API-KEY': 'abc',
'X-API-SECRET': 'xyz
};
fetch('https://api.datagummy.com/amazon?date=2024-11-20&type=earnings',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'X-API-KEY' => 'abc',
'X-API-SECRET' => 'xyz'
}
result = RestClient.post 'https://api.datagummy.com/amazon?date=2024-11-20&type=earnings',
params: {},
headers: headers
p JSON.parse(result)
import requests
headers = {
'X-API-KEY': 'abc',
'X-API-SECRET': 'xyz
}
r = requests.get('https://api.datagummy.com/amazon?date=2024-11-20&type=earnings', params = {}, headers = headers)
print r.json()
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"X-API-KEY": []string{"abc"},
"X-API-SECRET": []string{"xyz"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.datagummy.com/amazon?date=2024-11-20&type=earnings", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)}