Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@halo-dev/admin-api

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@halo-dev/admin-api

Halo admin api client.

Source
npmnpm
Version
1.0.0-alpha.44
Version published
Weekly downloads
6
-95.59%
Maintainers
2
Weekly downloads
 
Created
Source

Admin API Client

npm version npm node-current NPM

A js sdk for Halo's Admin APIs,implemented with TypeScript,encapsulating parameter types and return value types to make the use of API more brief.

Installation

npm install @halo-dev/admin-api --save

Usage

Here is a simple code for obtaining a list of articles.

import { AdminApiClient, HaloRestAPIClient } from "@halo-dev/admin-api";
// http request tool for halo rest api.
const haloRestApiClient = new HaloRestAPIClient({
  baseUrl: process.env.HALO_BASE_URL,
  auth: { adminToken: "halo admin token" },
});
// create adminApiClient by haloRestApiCLient.
const haloAdminClient = new AdminApiClient(haloRestApiClient);
// obtaining a list of articles.
haloAdminClient.post.list().then((res) => {
  console.log(res);
});

Specific use example reference example

License

MIT license

Keywords

halo

FAQs

Package last updated on 26 Nov 2021

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