@wireland/githubber

0.1.0 • Public • Published

Github API Demo

Simple wrapper to Github API.

Usage

First make sure we have examples monorepo initialized. Run yarn from the examples repo root.

Deploy the Githubber stack service

Run the follwing commands from the examples/githubber

  1. wire build
  2. wire service register --domain example.com
  3. wire stack deploy

Wireline Sandbox

  1. Create a new project using the service-template.

  2. Update stack.yml to add a reference to the Githubber service:

    stack:
      github:
        reference:
          endpointUrl: "wrn::example.com/github/github"
  3. Modify handler.js to import the @wireland/githubber API

    import { Wireline } from '@wirelineio/sdk';
    
    import Github from '@wireland/githubber';
    
    module.exports = {
      test: Wireline.exec(async (event, context) => {
        const { username = 'richburdon' } = event.queryStringParameters || {};
        return new Github(context).lookup(username);
      })
    };

Readme

Keywords

none

Package Sidebar

Install

npm i @wireland/githubber

Weekly Downloads

0

Version

0.1.0

License

UNLICENSED

Unpacked Size

6.89 kB

Total Files

7

Last publish

Collaborators

  • ashwinp
  • elmasse
  • richburdon
  • tinchoz49