Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

HannoverJS/hannoverjs-old-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hannoverjs

Build Status npm XO code style styled with prettier

Convenience wrapper for got to interact with the HannoverJS API

Install

npm install hannoverjs

Usage

const hannoverjs = require('hannoverjs')

hannoverjs('/').then(res => {
  console.log(res.body)
})

hannoverjs.getEvents().then(res => {
  console.log(res.body)
})

API

It's a GET request by default, but can be changed in options. options are the same as in got, but with some defaults.

options

endpoint

Type: string
Default: https://hannoverjs-api.now.sh

headers

Type: Object
Default: { 'user-agent': 'https://github.com/hannoverjs/hannoverjs' }

json

Type: boolean
Default: true

hannoverjs(path, [options])

Returns the response from a custom path.

path

Type: string

Custom path which will be appended to options.endpoint. Must start with /.

hannoverjs.getEvents([options])

Returns the response from /events.

hannoverjs.getTalks([options])

Returns the response from /talks.

hannoverjs.getOrganizers([options])

Returns the response from /organizers.

About

[DEPRECATED] Small library to interact with the HannoverJS API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published