github-oo

0.0.4 • Public • Published

This is a GitHub REST API Object Oriented abstraction for JavaScript. This is still an experiment (and therefore very incomplete). It depends on octokit/node-github.

Motivation

Convinience only. Using octokit/node-github:

let res = await github.repos.getForUser({username: "rxaviers"});
// Get next pages...
let repos = flatten(pages.map(res => res.data));

Using node-github-oo:

let user = new User({login: "rxaviers"});
let repos = await user.getRepos();

Usage

import GitHubApi from "github";
import GitHubApi from "github-oo";

// Read octokit/node-github for instructions...
const github = new GitHubApi(...);
github.authenticate(...);

const {User, Repo, Branch} = new GitHubOO(github);
...

API

TBD

Package Sidebar

Install

npm i github-oo

Weekly Downloads

1

Version

0.0.4

License

MIT

Last publish

Collaborators

  • rxaviers