Skip to content

Commit a72aa49

Browse files
committed
Fix typos in chunk 4 (files 41-50)
1 parent 8d0fa24 commit a72aa49

File tree

10 files changed

+50
-50
lines changed

10 files changed

+50
-50
lines changed

api-reference/queries/endpoint/private.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: 'Private Query'
3-
openapi: 'POST /v1/query/{queryId}/private'
3+
openapi: 'GET /v1/query/{queryId}/private'
44
---
55

66
<Note>

api-reference/queries/endpoint/query-object.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'Overview'
33
icon: "star"
44
---
55

6-
These query management endspoints help you programmatically create and manage Dune SQL queries via the API, ideal for integration with GitHub or other CI/CD pipelines.
6+
These query management endpoints help you programmatically create and manage Dune SQL queries via the API, ideal for integration with GitHub or other CI/CD pipelines.
77

88
### Queries
99

@@ -15,7 +15,7 @@ Each query comes with fields you can edit such as:
1515
- `query_sql`: the raw sql text
1616
- `params`: parameters within the query, using the `{{ foo }}` syntax. See the section below for more details.
1717
- `is_private`: boolean for if query is private or not. Private queries cannot be found or queried by others.
18-
- `archived`: boolean for if query is archived or not. Archived queries cannot run or edited by anyone.
18+
- `archived`: boolean for if query is archived or not. Archived queries cannot be run or edited by anyone.
1919

2020
### Query Parameters
2121

@@ -35,7 +35,7 @@ For passing these parameters through the API request body, you can use the follo
3535
"baz": "2020-12-01T01:20:30Z"
3636
}
3737
```
38-
Where "foo", "bar", and "baz" are three params in a query. If you leave one out, it goes with the default param valiue.
38+
Where "foo", "bar", and "baz" are three params in a query. If you leave one out, it goes with the default param value.
3939

4040
For Queries endpoints, you'll need to define the type and more:
4141

api-reference/queries/endpoint/unarchive.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In Dune context, delete action is replaced by archive as deletion of queries is
1414
<RequestExample>
1515

1616
```bash cURL
17-
curl --request GET \
17+
curl --request POST \
1818
--url https://api.dune.com/api/v1/query/{queryId}/unarchive \
1919
--header 'X-DUNE-API-KEY: <x-dune-api-key>'
2020
```
@@ -37,14 +37,14 @@ url = "https://api.dune.com/api/v1/query/{queryId}/unarchive"
3737

3838
headers = {"X-DUNE-API-KEY": "<x-dune-api-key>"}
3939

40-
response = requests.request("GET", url, headers=headers)
40+
response = requests.request("POST", url, headers=headers)
4141

4242
print(response.text)
4343

4444
```
4545

4646
```javascript JavaScript
47-
const options = {method: 'GET', headers: {'X-DUNE-API-KEY': '<x-dune-api-key>'}};
47+
const options = {method: 'POST', headers: {'X-DUNE-API-KEY': '<x-dune-api-key>'}};
4848

4949
fetch('https://api.dune.com/api/v1/query/{queryId}/unarchive', options)
5050
.then(response => response.json())
@@ -65,7 +65,7 @@ func main() {
6565

6666
url := "https://api.dune.com/api/v1/query/{queryId}/unarchive"
6767

68-
req, _ := http.NewRequest("GET", url, nil)
68+
req, _ := http.NewRequest("POST", url, nil)
6969

7070
req.Header.Add("X-DUNE-API-KEY", "<x-dune-api-key>")
7171

@@ -92,7 +92,7 @@ curl_setopt_array($curl, [
9292
CURLOPT_MAXREDIRS => 10,
9393
CURLOPT_TIMEOUT => 30,
9494
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
95-
CURLOPT_CUSTOMREQUEST => "GET",
95+
CURLOPT_CUSTOMREQUEST => "POST",
9696
CURLOPT_HTTPHEADER => [
9797
"X-DUNE-API-KEY: <x-dune-api-key>"
9898
],
@@ -111,7 +111,7 @@ if ($err) {
111111
```
112112

113113
```java Java
114-
HttpResponse<String> response = Unirest.get("https://api.dune.com/api/v1/query/{queryId}/unarchive")
114+
HttpResponse<String> response = Unirest.post("https://api.dune.com/api/v1/query/{queryId}/unarchive")
115115
.header("X-DUNE-API-KEY", "<x-dune-api-key>")
116116
.asString();
117117
```

api-reference/queries/endpoint/unprivate.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To access Query endpoints, an [Analyst plan](https://dune.com/pricing) or higher
1010
<RequestExample>
1111

1212
```bash cURL
13-
curl --request GET \
13+
curl --request POST \
1414
--url https://api.dune.com/api/v1/query/{queryId}/unprivate \
1515
--header 'X-DUNE-API-KEY: <x-dune-api-key>'
1616
```
@@ -33,14 +33,14 @@ url = "https://api.dune.com/api/v1/query/{queryId}/unprivate"
3333

3434
headers = {"X-DUNE-API-KEY": "<x-dune-api-key>"}
3535

36-
response = requests.request("GET", url, headers=headers)
36+
response = requests.request("POST", url, headers=headers)
3737

3838
print(response.text)
3939

4040
```
4141

4242
```javascript JavaScript
43-
const options = {method: 'GET', headers: {'X-DUNE-API-KEY': '<x-dune-api-key>'}};
43+
const options = {method: 'POST', headers: {'X-DUNE-API-KEY': '<x-dune-api-key>'}};
4444

4545
fetch('https://api.dune.com/api/v1/query/{queryId}/unprivate', options)
4646
.then(response => response.json())
@@ -61,7 +61,7 @@ func main() {
6161

6262
url := "https://api.dune.com/api/v1/query/{queryId}/unprivate"
6363

64-
req, _ := http.NewRequest("GET", url, nil)
64+
req, _ := http.NewRequest("POST", url, nil)
6565

6666
req.Header.Add("X-DUNE-API-KEY", "<x-dune-api-key>")
6767

@@ -88,7 +88,7 @@ curl_setopt_array($curl, [
8888
CURLOPT_MAXREDIRS => 10,
8989
CURLOPT_TIMEOUT => 30,
9090
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
91-
CURLOPT_CUSTOMREQUEST => "GET",
91+
CURLOPT_CUSTOMREQUEST => "POST",
9292
CURLOPT_HTTPHEADER => [
9393
"X-DUNE-API-KEY: <x-dune-api-key>"
9494
],
@@ -107,7 +107,7 @@ if ($err) {
107107
```
108108

109109
```java Java
110-
HttpResponse<String> response = Unirest.get("https://api.dune.com/api/v1/query/{queryId}/unprivate")
110+
HttpResponse<String> response = Unirest.post("https://api.dune.com/api/v1/query/{queryId}/unprivate")
111111
.header("X-DUNE-API-KEY", "<x-dune-api-key>")
112112
.asString();
113113
```

api-reference/queries/endpoint/update.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,22 @@ query = dune.update_query(
3535
)
3636
```
3737

38-
```python Python
38+
```bash cURL
3939
curl --request PATCH \
4040
--url https://api.dune.com/api/v1/query/{queryId} \
4141
--header 'Content-Type: application/json' \
4242
--header 'X-DUNE-API-KEY: <x-dune-api-key>' \
4343
--data '{
4444
"query_id": 1252207,
45-
"query_sql": "{{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}"
45+
"query_sql": "SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}"
4646
}'
4747
```
4848

4949
```javascript JavaScript
5050
const options = {
5151
method: 'PATCH',
5252
headers: {'X-DUNE-API-KEY': '<x-dune-api-key>', 'Content-Type': 'application/json'},
53-
body: '{"query_id":1252207,"query_sql":"{{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}"}'
53+
body: '{"query_id":1252207,"query_sql":"SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}"}'
5454
};
5555

5656
fetch('https://api.dune.com/api/v1/query/{queryId}', options)
@@ -73,7 +73,7 @@ func main() {
7373

7474
url := "https://api.dune.com/api/v1/query/{queryId}"
7575

76-
payload := strings.NewReader("{\n \"query_id\": 1252207,\n ,\n \"query_sql\": \"{{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}")
76+
payload := strings.NewReader("{\n \"query_id\": 1252207,\n \"query_sql\": \"SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}")
7777

7878
req, _ := http.NewRequest("PATCH", url, payload)
7979

@@ -104,7 +104,7 @@ curl_setopt_array($curl, [
104104
CURLOPT_TIMEOUT => 30,
105105
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
106106
CURLOPT_CUSTOMREQUEST => "PATCH",
107-
CURLOPT_POSTFIELDS => "{\n \"query_id\": 1252207,\n \"query_sql\": \"{{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}",
107+
CURLOPT_POSTFIELDS => "{\n \"query_id\": 1252207,\n \"query_sql\": \"SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}",
108108
CURLOPT_HTTPHEADER => [
109109
"Content-Type: application/json",
110110
"X-DUNE-API-KEY: <x-dune-api-key>"
@@ -127,7 +127,7 @@ if ($err) {
127127
HttpResponse<String> response = Unirest.patch("https://api.dune.com/api/v1/query/{queryId}")
128128
.header("X-DUNE-API-KEY", "<x-dune-api-key>")
129129
.header("Content-Type", "application/json")
130-
.body("{\n \"query_id\": 1252207,\n \"query_sql\": \"{{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}")
130+
.body("{\n \"query_id\": 1252207,\n \"query_sql\": \"SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}")
131131
.asString();
132132
```
133133

api-reference/quickstart/queries-eg.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ In this quickstart, we will walk through how to turn any dashboard (or set of qu
66

77
### Prerequisites
88
- Python environment set up (check out [Anaconda Navigator](https://docs.continuum.io/free/navigator/) if you want somewhere to start.)
9-
- Have a Dune API key from the team/user who's queries you want to manage (to obtain one [follow the steps here](../overview/authentication#generate-an-api-key))
9+
- Have a Dune API key from the team/user whose queries you want to manage (to obtain one [follow the steps here](../overview/authentication#generate-an-api-key))
1010

1111
### Set up a new repo from the GitHub template
1212

api-reference/quickstart/results-eg.mdx

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -97,27 +97,27 @@ You can choose to either get the latest query result without triggering an execu
9797
<Tabs>
9898
<Tab title="Get latest result without execution">
9999
```python
100-
query_result = dune.get_latest_result(3373921) # get latest result in json format
101-
# query_result = dune.get_latest_result_dataframe(3373921) # get latest result in Pandas dataframe format
102-
```
100+
query_result = dune.get_latest_result(3373921) # get latest result in json format
101+
# query_result = dune.get_latest_result_dataframe(3373921) # get latest result in Pandas dataframe format
102+
```
103103
</Tab>
104-
<Tab title="Query a query">
105-
```python
106-
query = QueryBase(
107-
query_id=3373921,
108-
109-
# uncomment and change the parameter values if needed
110-
# params=[
111-
# QueryParameter.text_type(name="contract", value="0x6B175474E89094C44Da98b954EedeAC495271d0F"), # default is DAI
112-
# QueryParameter.text_type(name="owner", value="owner"), # default using vitalik.eth's wallet
113-
# ],
114-
)
104+
<Tab title="Query a query">
105+
```python
106+
query = QueryBase(
107+
query_id=3373921,
108+
109+
# uncomment and change the parameter values if needed
110+
# params=[
111+
# QueryParameter.text_type(name="contract", value="0x6B175474E89094C44Da98b954EedeAC495271d0F"), # default is DAI
112+
# QueryParameter.text_type(name="owner", value="owner"), # default using vitalik.eth's wallet
113+
# ],
114+
)
115115

116116
query_result = dune.run_query_dataframe(
117-
query=query
118-
# , ping_frequency = 10 # uncomment to change the seconds between checking execution status, default is 1 second
119-
# , performance="large" # uncomment to run query on large engine, default is medium
120-
# , batch_size = 5_000 # uncomment to change the maximum number of rows to retrieve per batch of results, default is 32_000
117+
query=query
118+
# , ping_frequency = 10 # uncomment to change the seconds between checking execution status, default is 1 second
119+
# , performance="large" # uncomment to run query on large engine, default is medium
120+
# , batch_size = 5_000 # uncomment to change the maximum number of rows to retrieve per batch of results, default is 32_000
121121
)
122122

123123
# Note: to get the result in csv format, call run_query_csv(); for json format, call run_query().
@@ -164,10 +164,10 @@ You can choose to either get the latest query result without triggering an execu
164164
)
165165

166166
query_result = dune.run_query_dataframe(
167-
query=query
168-
# , ping_frequency = 10 # uncomment to change the seconds between checking execution status, default is 1 second
169-
# , performance="large" # uncomment to run query on large engine, default is medium
170-
# , batch_size = 5_000 # uncomment to change the maximum number of rows to retrieve per batch of results, default is 32_000
167+
query=query
168+
# , ping_frequency = 10 # uncomment to change the seconds between checking execution status, default is 1 second
169+
# , performance="large" # uncomment to run query on large engine, default is medium
170+
# , batch_size = 5_000 # uncomment to change the maximum number of rows to retrieve per batch of results, default is 32_000
171171
)
172172

173173
# Note: to get the result in csv format, call run_query_csv(); for json format, call run_query().

api-reference/quickstart/tables-eg.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ DUNE_API_KEY=<paste your API key here>
1616
</Tip>
1717

1818
### Upload the CSV
19-
Follow below steps to upload your CSV. Please make sure to modify paths to your .env file and to your CSV file.
19+
Follow the below steps to upload your CSV. Please make sure to modify paths to your .env file and to your CSV file.
2020

2121
```python
2222
import dotenv, os
@@ -45,7 +45,7 @@ with open(csv_file_path) as open_file:
4545

4646
Once the upload is successful, you will see the data show up under [Your Data](https://dune.com/queries?category=uploaded_data) in the Data Explorer.
4747

48-
You can query your uploaded table under the name `dune.<team or user handle>.dataset_<table name defined>`. For example, here I defined the table name to be "cereal_table" and my team name is "dune", so to access the uploaded table we will do `select * from dune.dune.dataset_cereal_table`
48+
You can query your uploaded table under the name `dune.<team or user handle>.dataset_<table name defined>`. For example, here I defined the table name to be "cereal_table" and my team name is "dune", so to access the uploaded table we will do `select * from dune.dune.dataset_cereal_table`.
4949

5050

5151

api-reference/tables/endpoint/clear.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ headers = {
2323
"X-DUNE-API-KEY": "<x-dune-api-key>"
2424
}
2525

26-
response = requests.request("POST", url, data=data, headers=headers)
26+
response = requests.request("POST", url, headers=headers)
2727
```
2828

2929
</RequestExample>

api-reference/tables/endpoint/create.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The resulting table will be empty, and can be inserted into with the [/insert en
1313
</Note>
1414

1515
## Schema
16-
You need to define the schema of your data by providing `schema` array of columns in the request. Each column has three parameters:
16+
You need to define the schema of your data by providing a `schema` array of columns in the request. Each column has three parameters:
1717

1818
**name**: the name of the field
1919

@@ -61,7 +61,7 @@ table = dune.create_table(
6161
```typescript TS SDK
6262
import { DuneClient, ColumnType } from "@duneanalytics/client-sdk";
6363

64-
client = new DuneClient(process.env.DUNE_API_KEY!);
64+
const client = new DuneClient(process.env.DUNE_API_KEY!);
6565
const result = await client.table.create({
6666
namespace: "my_user",
6767
table_name: "interest_rates",

0 commit comments

Comments
 (0)