npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

pinnacle-sports-api

v1.0.8

Published

Pinnacle Sports API

Downloads

17

Readme

pinnacle-sports-api

This module is for retrieving data from the Pinnacle Sports API. See www.pinnaclesports.com/en/api/manual for the API's manual.

Please note that you must have a funded account at www.pinnaclesports.com for this module to work. You must also call the API from an IP address allowed by Pinnacle Sports. Because online sports gambling is not allowed in the USA, you may not call the API from a USA IP address.

Installation

npm install pinnacle-sports-api --save

Examples

Require and Initialize the Module

var pinnacleAPI = require('pinnacle-sports-api');
var pinnacle = new pinnacleAPI('<your-username>', '<your-password>');

Optionally Set to a Development Environment

If you would like mock data instead of real, live data from the API (for example, if you have a USA IP address on your local machine and cannot access the live API), you can set the module to a development environment. It will only call mock URLs and return mock data when this is set.

pinnacle.setEnvironmentDev();

Get Sports

pinnacle.getSports(function(err, response, body) {
  if (err) throw new Error(err);
  console.log(body);
});

Get Leagues

var options = {sportId: 3};
pinnacle.getLeagues(options, function(err, response, body) {
  if (err) throw new Error(err);
  console.log(body);
});

Get Fixtures

var options = {sportId: 3};
pinnacle.getFixtures(options, function(err, response, body) {
  if (err) throw new Error(err);
  console.log(body);
});

Get Settled Fixtures

var options = {sportId: 3};
pinnacle.getSettledFixtures(options, function(err, response, body) {
  if (err) throw new Error(err);
  console.log(body);
});

Get Teaser Groups

var options = {oddsFormat: 'AMERICAN'};
pinnacle.getTeaserGroups(options, function(err, response, body) {
  if (err) throw new Error(err);
  console.log(body);
});

Get Odds

var options = {sportId: 3};
pinnacle.getOdds(options, function(err, response, body) {
  if (err) throw new Error(err);
  console.log(body);
});

Get Currencies

pinnacle.getCurrencies(function(err, response, body) {
  if (err) throw new Error(err);
  console.log(body);
});