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

@haul/http-client-github

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

@haul/http-client-github

http client to ease interaction with github api(s)

latest
npmnpm
Version
0.2.1
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

@haul/http-client-github ·

Install

Using npm:

> npm install @haul/http-client-github

Using yarn:

> yarn add @haul/http-client-github

Usage

import {
  createGithubClient,
} from '@haul/http-client-github';

// Initialize the client
const { client, actions } = createGithubClient(
  process.env.GITHUB_API_TOKEN,
);

;(async async () =>  {
  await actions.issue.createComment('user', 'repo', '49302', `Lorem ipsum dolor sit amet`);

  // You can of course interact with the client directly (note that you lose type-safety)
  await client<null>('/path/to/endpoint', { method: 'DELETE' });
})();

createGithubClient(token: string, fns...) => { client, actions }

Creates a new client. You can pass http-client compatible middleware as rest arguments and they will be passed to the

FAQs

Package last updated on 18 Feb 2019

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