0.0.4 • Published 6 years ago

github-oo v0.0.4

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

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