@wireland/githubber
v0.1.0
Published
GitHub API.
Downloads
3
Readme
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
wire build
wire service register --domain example.com
wire stack deploy
Wireline Sandbox
Create a new project using the
service-template
.Update
stack.yml
to add a reference to the Githubber service:stack: github: reference: endpointUrl: "wrn::example.com/github/github"
Modify
handler.js
to import the@wireland/githubber
APIimport { 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); }) };