1.0.2 • Published 4 years ago

node-golfbert v1.0.2

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

node-golfbert

Node wrapper for the Golfbert API.

Please reference https://golfbert.com/api/docs for additional parameters to pass in as options to certain methods.

Installing

npm i node-golfbert

Usage

Instantiate Client

const Golfbert = require('node-golfbert');
const golfbert = new Golfbert({
  apiKey: 'GOLFBERT_API_KEY',
  accessKey: 'GOLFBERT_ACCESS_KEY',
  secretKey: 'GOLFBERT_SECRET_KEY'
});

Sample

golfbert
  .getCourses()
  .then((data) => console.log(data))
  .catch((err) => console.log(err));

Available Methods

Ping / API Status

golfbert.ping()

Courses

golfbert.getCourses(options)
golfbert.getCourseById(id)
golfbert.getCourseHolesById(id)
golfbert.getCourseScorecardById(id)
golfbert.getCourseTeeboxesById(id)

Holes

golfbert.getHoles(options)
golfbert.getHoleById(id)
golfbert.getHolePolygonsById(id)
golfbert.getHoleTeeboxesById(id)

Teeboxes

golfbert.getTeeboxColors()
golfbert.getTeeboxTypes()