name |
cbbaseinfo |
cbparameters |
data |
get_first_link |
description |
Retrieves the first link from the search results for the given query. |
|
parameters |
returns |
name |
typeName |
description |
query |
string |
The search query. |
|
|
signatureTypeName |
description |
typeArgs |
Promise |
A promise that resolves with the first link of the search results. |
type |
name |
intrinsic |
string |
|
|
|
|
name |
category |
link |
get_first_link |
search |
get_first_link.md |
|
import codebolt from '@codebolt/codeboltjs';
async function exampleGetFirstLink() {
try {
const firstLink = await codebolt.bsearch.get_first_link("JavaScript documentation");
console.log("First link:", firstLink);
} catch (error) {
console.error("Failed to retrieve the first link:", error);
}
}
exampleGetFirstLink();