Skip to content

Commit 144b88b

Browse files
authored
Update API.md
1 parent 75f088d commit 144b88b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/API.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ where `icon` contains the following fields:
6767
## Examples
6868
### Example: Getting the icon
6969
```js
70-
ddg.query("Hawaii").then(function(res) {
70+
ddg.result("Hawaii").then(function(res) {
7171
var img = document.createElement("img");
7272
img.src = res.icon.src;
7373
img.style.width = res.icon.width + "px";
7474
img.style.height = res.icon.height + "px";
75+
document.body.appendChild(img);
7576
});
7677
```

0 commit comments

Comments
 (0)