Skip to content

Commit ce8f3f6

Browse files
authored
Update Token API Docs (#1035)
* updated docs * fixed outdated endpoint for Quick Start (Using cURL (Command Line)
1 parent f2974fb commit ce8f3f6

File tree

23 files changed

+67
-67
lines changed

23 files changed

+67
-67
lines changed

website/src/pages/ar/token-api/quick-start.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const options = {
4141
},
4242
}
4343

44-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
44+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
4545
.then((response) => response.json())
4646
.then((response) => console.log(response))
4747
.catch((err) => console.error(err))
@@ -55,7 +55,7 @@ To make an API request using **cURL**, open your command line and run the follow
5555

5656
```curl
5757
curl --request GET \
58-
--url https://token-api.thegraph.com/balances/evm/0x2a0c0dbecc7e4d658f48e01e3fa353f44050c208 \
58+
--url https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address} \
5959
--header 'Accept: application/json' \
6060
--header 'Authorization: Bearer <token>'
6161
```
@@ -69,7 +69,7 @@ Make sure to replace `<token>` with the JWT Token generated from your API key.
6969
If the API call fails, try printing out the full response object for additional error details. For example:
7070

7171
```js label="index.js"
72-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
72+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
7373
.then((response) => {
7474
console.log('Status Code:', response.status)
7575
return response.json()

website/src/pages/cs/token-api/quick-start.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const options = {
4141
},
4242
}
4343

44-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
44+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
4545
.then((response) => response.json())
4646
.then((response) => console.log(response))
4747
.catch((err) => console.error(err))
@@ -55,7 +55,7 @@ To make an API request using **cURL**, open your command line and run the follow
5555

5656
```curl
5757
curl --request GET \
58-
--url https://token-api.thegraph.com/balances/evm/0x2a0c0dbecc7e4d658f48e01e3fa353f44050c208 \
58+
--url https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address} \
5959
--header 'Accept: application/json' \
6060
--header 'Authorization: Bearer <token>'
6161
```
@@ -69,7 +69,7 @@ Make sure to replace `<token>` with the JWT Token generated from your API key.
6969
If the API call fails, try printing out the full response object for additional error details. For example:
7070

7171
```js label="index.js"
72-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
72+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
7373
.then((response) => {
7474
console.log('Status Code:', response.status)
7575
return response.json()

website/src/pages/de/token-api/quick-start.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const options = {
4141
},
4242
}
4343

44-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
44+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
4545
.then((response) => response.json())
4646
.then((response) => console.log(response))
4747
.catch((err) => console.error(err))
@@ -55,7 +55,7 @@ To make an API request using **cURL**, open your command line and run the follow
5555

5656
```curl
5757
curl --request GET \
58-
--url https://token-api.thegraph.com/balances/evm/0x2a0c0dbecc7e4d658f48e01e3fa353f44050c208 \
58+
--url https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address} \
5959
--header 'Accept: application/json' \
6060
--header 'Authorization: Bearer <token>'
6161
```
@@ -69,7 +69,7 @@ Make sure to replace `<token>` with the JWT Token generated from your API key.
6969
If the API call fails, try printing out the full response object for additional error details. For example:
7070

7171
```js label="index.js"
72-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
72+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
7373
.then((response) => {
7474
console.log('Status Code:', response.status)
7575
return response.json()

website/src/pages/en/token-api/faq.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ We determine a collection’s spam score using a variety of features drawn from
104104

105105
### How can I report an issue with a collection that was incorrectly labeled as spam or not spam?
106106

107-
Reach out on [Discord](https://discord.gg/graphprotocol) in the Token API channel.
107+
Reach out on [Discord](https://discord.gg/graphprotocol) in the [Token API](https://discord.com/channels/438038660412342282/1354235849532903625) channel.
108108

109109
## Advanced Topics
110110

website/src/pages/en/token-api/quick-start.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const options = {
4343
},
4444
}
4545

46-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
46+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
4747
.then((response) => response.json())
4848
.then((response) => console.log(response))
4949
.catch((err) => console.error(err))
@@ -57,7 +57,7 @@ To make an API request using **cURL**, open your command line and run the follow
5757

5858
```curl
5959
curl --request GET \
60-
--url https://token-api.thegraph.com/balances/evm/0x2a0c0dbecc7e4d658f48e01e3fa353f44050c208 \
60+
--url https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address} \
6161
--header 'Accept: application/json' \
6262
--header 'Authorization: Bearer <token>'
6363
```
@@ -87,7 +87,7 @@ A full list of chain support for The Graph services can be found [here](/support
8787
If the API call fails, try printing out the full response object for additional error details. For example:
8888

8989
```js label="index.js"
90-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
90+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
9191
.then((response) => {
9292
console.log('Status Code:', response.status)
9393
return response.json()

website/src/pages/es/token-api/quick-start.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const options = {
4141
},
4242
}
4343

44-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
44+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
4545
.then((response) => response.json())
4646
.then((response) => console.log(response))
4747
.catch((err) => console.error(err))
@@ -55,7 +55,7 @@ To make an API request using **cURL**, open your command line and run the follow
5555

5656
```curl
5757
curl --request GET \
58-
--url https://token-api.thegraph.com/balances/evm/0x2a0c0dbecc7e4d658f48e01e3fa353f44050c208 \
58+
--url https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address} \
5959
--header 'Accept: application/json' \
6060
--header 'Authorization: Bearer <token>'
6161
```
@@ -69,7 +69,7 @@ Make sure to replace `<token>` with the JWT Token generated from your API key.
6969
If the API call fails, try printing out the full response object for additional error details. For example:
7070

7171
```js label="index.js"
72-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
72+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
7373
.then((response) => {
7474
console.log('Status Code:', response.status)
7575
return response.json()

website/src/pages/fr/token-api/quick-start.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const options = {
4141
},
4242
}
4343

44-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
44+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
4545
.then((response) => response.json())
4646
.then((response) => console.log(response))
4747
.catch((err) => console.error(err))
@@ -55,7 +55,7 @@ To make an API request using **cURL**, open your command line and run the follow
5555

5656
```curl
5757
curl --request GET \
58-
--url https://token-api.thegraph.com/balances/evm/0x2a0c0dbecc7e4d658f48e01e3fa353f44050c208 \
58+
--url https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address} \
5959
--header 'Accept: application/json' \
6060
--header 'Authorization: Bearer <token>'
6161
```
@@ -69,7 +69,7 @@ Make sure to replace `<token>` with the JWT Token generated from your API key.
6969
If the API call fails, try printing out the full response object for additional error details. For example:
7070

7171
```js label="index.js"
72-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
72+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
7373
.then((response) => {
7474
console.log('Status Code:', response.status)
7575
return response.json()

website/src/pages/hi/token-api/quick-start.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const options = {
4141
},
4242
}
4343

44-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
44+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
4545
.then((response) => response.json())
4646
.then((response) => console.log(response))
4747
.catch((err) => console.error(err))
@@ -55,7 +55,7 @@ To make an API request using **cURL**, open your command line and run the follow
5555

5656
```curl
5757
curl --request GET \
58-
--url https://token-api.thegraph.com/balances/evm/0x2a0c0dbecc7e4d658f48e01e3fa353f44050c208 \
58+
--url https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address} \
5959
--header 'Accept: application/json' \
6060
--header 'Authorization: Bearer <token>'
6161
```
@@ -69,7 +69,7 @@ Make sure to replace `<token>` with the JWT Token generated from your API key.
6969
If the API call fails, try printing out the full response object for additional error details. For example:
7070

7171
```js label="index.js"
72-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
72+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
7373
.then((response) => {
7474
console.log('Status Code:', response.status)
7575
return response.json()

website/src/pages/it/token-api/quick-start.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const options = {
4141
},
4242
}
4343

44-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
44+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
4545
.then((response) => response.json())
4646
.then((response) => console.log(response))
4747
.catch((err) => console.error(err))
@@ -55,7 +55,7 @@ To make an API request using **cURL**, open your command line and run the follow
5555

5656
```curl
5757
curl --request GET \
58-
--url https://token-api.thegraph.com/balances/evm/0x2a0c0dbecc7e4d658f48e01e3fa353f44050c208 \
58+
--url https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address} \
5959
--header 'Accept: application/json' \
6060
--header 'Authorization: Bearer <token>'
6161
```
@@ -69,7 +69,7 @@ Make sure to replace `<token>` with the JWT Token generated from your API key.
6969
If the API call fails, try printing out the full response object for additional error details. For example:
7070

7171
```js label="index.js"
72-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
72+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
7373
.then((response) => {
7474
console.log('Status Code:', response.status)
7575
return response.json()

website/src/pages/ja/token-api/quick-start.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const options = {
4141
},
4242
}
4343

44-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
44+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
4545
.then((response) => response.json())
4646
.then((response) => console.log(response))
4747
.catch((err) => console.error(err))
@@ -55,7 +55,7 @@ To make an API request using **cURL**, open your command line and run the follow
5555

5656
```curl
5757
curl --request GET \
58-
--url https://token-api.thegraph.com/balances/evm/0x2a0c0dbecc7e4d658f48e01e3fa353f44050c208 \
58+
--url https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address} \
5959
--header 'Accept: application/json' \
6060
--header 'Authorization: Bearer <token>'
6161
```
@@ -69,7 +69,7 @@ Make sure to replace `<token>` with the JWT Token generated from your API key.
6969
If the API call fails, try printing out the full response object for additional error details. For example:
7070

7171
```js label="index.js"
72-
fetch(`https://token-api.thegraph.com/balances/evm/${address}`, options)
72+
fetch(`https://token-api.thegraph.com/v1/evm/balances?network=mainnet&address=${address}`)
7373
.then((response) => {
7474
console.log('Status Code:', response.status)
7575
return response.json()

0 commit comments

Comments
 (0)