Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 622 Bytes

USAGE.md

File metadata and controls

41 lines (30 loc) · 622 Bytes
import { Dub } from "dub";

const dub = new Dub({
    token: "DUB_API_KEY",
});

async function run() {
    const result = await dub.links.create({
        url: "https://google/com",
    });

    // Handle the result
    console.log(result);
}

run();
import { Dub } from "dub";

const dub = new Dub({
    token: "DUB_API_KEY",
});

async function run() {
    const result = await dub.links.upsert({
        url: "https://google/com",
    });

    // Handle the result
    console.log(result);
}

run();