Socket
Book a DemoInstallSign in
Socket

@hoarderapp/sdk

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hoarderapp/sdk

Typescript SDK for Hoarder

0.23.0
latest
Source
npmnpm
Version published
Weekly downloads
3
-25%
Maintainers
1
Weekly downloads
 
Created
Source

Hoarder SDK

This package contains the official typescript SDK for the hoarder API.

Installation

npm install @hoarderapp/sdk

Usage

import { createHoarderClient } from "@hoarderapp/sdk";

// Create a client
const apiKey = "my-super-secret-key";
const addr = `https://hoarder.mydomain.com`;
const client = createHoarderClient({
  baseUrl: `${addr}/api/v1/`,
  headers: {
    "Content-Type": "application/json",
    authorization: `Bearer ${apiKey}`,
  },
});

// Create a bookmark
const {
  data: createdBookmark,
  response: createResponse,
  error: createError,
} = await client.POST("/bookmarks", {
  body: {
    type: "text",
    title: "Search Test 1",
    text: "This is a test bookmark for search",
  },
});

console.log(createResponse.status, createdBookmark, createError);

// Search for bookmarks
const {
  data: searchResults,
  response: searchResponse,
  error: searchError,
} = await client.GET("/bookmarks/search", {
  params: {
    query: {
      q: "test bookmark",
    },
  },
});
console.log(searchResponse.status, searchResults, searchError);

Docs

API docs can be found here.

Versioning

  • This package follows the minor version of the hoarder server. So new APIs introduced in Hoarder version 0.21.0 will be available in this package starting from version 0.21.0.
  • Hoarder strives to maintain backward compatibility in its APIs, so older versions of this package should continue working with newer hoarder server versions.

Keywords

hoarder

FAQs

Package last updated on 22 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.