New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

icelist-sdk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

icelist-sdk

JavaScript/TypeScript client library for the ICE List Wiki API

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

ICE List Wiki JavaScript/TypeScript SDK

JavaScript/TypeScript client library for the ICE List Wiki API.

Installation

npm install @icelist/sdk
# or
yarn add @icelist/sdk

Quick Start

TypeScript

import { IceListClient } from "@icelist/sdk";

const client = new IceListClient();

// Search for content
const results = await client.search("Timothy Donahue");
results.forEach((result) => {
  console.log(`${result.title}: ${result.snippet}`);
});

// Get a specific page
const page = await client.getPage("Main_Page");
console.log(page.title);
console.log(page.extract);

// Get full page content
const content = await client.getPageContent("Main_Page");
console.log(content.wikitext);
console.log(content.html);

// List category members
const agents = await client.getCategoryMembers("Agents", 50);
agents.forEach((agent) => {
  console.log(agent.title);
});

// Get recent changes
const changes = await client.getRecentChanges(10);
changes.forEach((change) => {
  console.log(`${change.title} - ${change.timestamp}`);
});

JavaScript (CommonJS)

const { IceListClient } = require("@icelist/sdk");

const client = new IceListClient();

async function main() {
  const results = await client.search("agents");
  console.log(results);
}

main();

Browser

<script type="module">
  import { IceListClient } from "https://cdn.skypack.dev/@icelist/sdk";

  const client = new IceListClient();
  const results = await client.search("incidents");
  console.log(results);
</script>

API Reference

new IceListClient(options?)

Create a new client instance.

Options:

  • baseUrl?: string - Base URL of the wiki (default: https://wiki.icelist.is)
  • userAgent?: string - Custom user agent string
  • timeout?: number - Request timeout in milliseconds (default: 30000)

client.search(query, limit?): Promise<SearchResult[]>

Search for pages matching a query.

Returns: Array of search results with title, snippet, timestamp, etc.

client.getPage(title): Promise<PageInfo>

Get basic information about a page.

Returns: Page metadata including title, extract, and URL.

client.getPageContent(title): Promise<PageContent>

Get full page content in both wikitext and HTML.

Returns: Object with wikitext and rendered HTML.

client.getCategoryMembers(category, limit?, namespace?): Promise<CategoryMember[]>

List all pages in a category.

Returns: Array of pages in the category.

client.getRecentChanges(limit?): Promise<RecentChange[]>

Get recent changes to the wiki.

Returns: Array of recent changes with metadata.

Error Handling

import {
  IceListClient,
  IceListAPIError,
  PageNotFoundError,
  NetworkError,
  InvalidParameterError,
} from "@icelist/sdk";

const client = new IceListClient();

try {
  const page = await client.getPage("NonexistentPage");
} catch (error) {
  if (error instanceof PageNotFoundError) {
    console.log(`Page not found: ${error.title}`);
  } else if (error instanceof IceListAPIError) {
    console.log(`API error: ${error.code} - ${error.message}`);
  }
}

Development

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Lint
npm run lint

# Format
npm run format

Requirements

  • Node.js 14+
  • TypeScript 4+ (for TypeScript projects)

License

MIT License

Keywords

icelist

FAQs

Package last updated on 23 Jan 2026

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