Skip to content

Commit eb768f4

Browse files
Merge pull request #127 from MauricioRobayo/development
fix: query method documentation
2 parents 550f1e2 + 17eff7a commit eb768f4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,15 @@ This method allows you to use any custom [`SoQL query`](https://dev.socrata.com/
180180
For example:
181181

182182
```js
183-
const data = await trmApi.query(
184-
"SELECT valor, vigenciadesde WHERE valor >= 4150 AND vigenciadesde < '2020-08-01'"
185-
);
183+
trmApi
184+
.query(
185+
"SELECT valor, vigenciadesde WHERE valor >= 4150 AND vigenciadesde < '2020-08-01'"
186+
)
187+
.then((data) => console.log(data))
188+
.catch((error) => console.log(error));
186189
```
187190

188-
It will always return an array of objects with the requested fields (or all the fields if no SELECT clause used):
191+
It will return an array of objects each with the requested fields (or all the fields if no SELECT clause used):
189192

190193
```js
191194
[

0 commit comments

Comments
 (0)