curl --location --request GET 'http://localhost:5001/appgregator/us-central1/twitter/users/user-by-name?name=qantor.co.id&connection_name=twitter-1&username=docial'
--header 'x-api-key: 43c464439b5507293ba7b315c9875907'
{
"data": [
{
"id": "145251358",
"name": "Docial Porter",
"username": "docial"
},
{
"id": "2621412174",
"name": "Pranksy 📦",
"username": "pranksy"
}
]
}
{
"errors": [
{
"detail": "Could not find user with username: [TwitterDec].",
"title": "Not Found Error",
"resource_type": "user",
"parameter": "username",
"value": "TwitterDec",
"type": "https://api.twitter.com/2/problems/resource-not-found"
}
]
}
curl --location --request GET 'https://us-central1-appgregator.cloudfunctions.net/twitter/users/user-by-name?name=qantor.co.id&connection_name=twitter-1&usernames=docial,pranksy' \
--header 'x-api-key: 43c464439b5507293ba7b315c9875907'
var axios = require('axios');
var config = {
method: 'get',
url: 'https://us-central1-appgregator.cloudfunctions.net/twitter/users/user-by-name?name=qantor.co.id&connection_name=twitter-1&usernames=docial,pranksy',
headers: {
'x-api-key': '43c464439b5507293ba7b315c9875907'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://us-central1-appgregator.cloudfunctions.net/twitter/users/user-by-name?name=qantor.co.id&connection_name=twitter-1&usernames=docial,pranksy',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-api-key: 43c464439b5507293ba7b315c9875907'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;