0.1.0 • Published 6 years ago

@wireland/githubber v0.1.0

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
6 years ago

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);
      })
    };