Comprehensive reference for integrating with Relation Graph API endpoints
接口地址
https://api.relationlabs.ai
演示的APIKey
ApiKey: 581c6c4fa0b54912b00088aa563342a4
private key: 89a1a8c7d5f6ab952e02c5c6a71f48d60fbe06c21ec021374907d93d644b1236
查询
本服务采用 REST API 规范,可以使用你喜欢的 httpclient 方便的调用接口。
curl --location 'https://api.relationlabs.ai/api/v1/mutualFriend?address=0x0001%2C0x000002&limit=10' \
--header 'ApiKey: <ApiKey>'
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://api.relationlabs.ai/api/v1/mutualFriend?address=0x0001%2C0x000002&limit=10',
headers: {
'ApiKey': '<ApiKey>'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.relationlabs.ai/api/v1/mutualFriend?address=0x0001%2C0x000002&limit=10"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}