An open API service indexing awesome lists of open source software.

https://github.com/gr2m/octokit-plugin-hello-world

Simple Octokit.js plugin for demo purposes
https://github.com/gr2m/octokit-plugin-hello-world

Last synced: about 1 year ago
JSON representation

Simple Octokit.js plugin for demo purposes

Awesome Lists containing this project

README

          

# octokit-plugin-hello-world

> Simple Octokit.js plugin for demo purposes

[![@latest](https://img.shields.io/npm/v/octokit-plugin-hello-world.svg)](https://www.npmjs.com/package/octokit-plugin-hello-world)
[![Build Status](https://github.com/gr2m/octokit-plugin-hello-world/workflows/Test/badge.svg)](https://github.com/gr2m/octokit-plugin-hello-world/actions?workflow=Test)
[![Greenkeeper](https://badges.greenkeeper.io/gr2m/octokit-plugin-hello-world.svg)](https://greenkeeper.io/)

## Usage

Browsers

Load `octokit-plugin-hello-world` and [`@octokit/core`](https://github.com/octokit/core.js) (Or others such as [`@octokit/rest`](https://github.com/octokit/rest.js)) directly from [cdn.pika.dev](https://cdn.pika.dev)

```html

import { Octokit } from "https://cdn.pika.dev/@octokit/core";
import { helloWorld } from "https://cdn.pika.dev/octokit-plugin-hello-world";

```

Node

Install with npm install octokit-plugin-hello-world

```js
const { Octokit } = require("@octokit/core");
const { helloWorld } = require("octokit-plugin-hello-world");
```

```js
const MyOctokit = Octokit.plugin(helloWorld);

const octokit = new MyOctokit();
octokit.helloWorld();
// logs "Hello, world!
```

See [`@octoki/core`](https://github.com/octokit/core.js) for available APIs to create more advanced plugins.

## License

[MIT](LICENSE)