Skip to content

Latest commit

 

History

History
38 lines (34 loc) · 899 Bytes

get_first_link.md

File metadata and controls

38 lines (34 loc) · 899 Bytes
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

Example

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();