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 🙏

© 2024 – Pkg Stats / Ryan Hefner

octo-kmail

v1.4.4

Published

This is an SDK to the Kmail bet API in this API you can connect, subscribe and query the active market, line and prices. this project is a base project for working with Kmail API and will save time connecting and running you first requests to Kmail API

Downloads

16

Readme

This is an SDK to the Kmail bet API in this API you can connect, subscribe and query the active market, line and prices. this project is a base project for working with Kmail API and will save time connecting and running you first requests to Kmail API

General Note: This package track only soccer events, but can be changed to track every sport type.

Contents

  • Installation How to include kmail-sdk in your project.

  • Setup How to initiate kmail-sdk.

  • Usage A brief introduction to using the kmail-sdk.

Installation

$> npm install kmail-sdk [--save]

Setup

To initiate the package you'll need to run in init function to compile the .proto files:

  const kmail = require('kmail-sdk');
  kmail.KmailProtoLoader.init(location).then(() => {
    //your code goes here
  });
  • The location is the folder you keep the .proto directory Kmail had provided you.
  • location argument is optional and will take a default directory if not given or empty.

Keep in mind that if you your .proto folder is much different then the default one then this could be an indication this package isn't up to date and you might need to clone it and update the parts you need

Usage

In order use the SDK you need to take the kmailSDK and use it as follows:

const Kmail = require('kmail-sdk');
Kmail.KmailProtoLoader.init().then(() => {  
  const licenseKey = 'zzz';
  const identity = 'xxx';
  const password = 'yyy';
  const kmailIP = 'tcp://1.0.0.127';
  const commandSocketProt = '1';
  const dataSocketProt = '2';
  const company = 'yourIdentity';
  // Creating the sdk object (you don't need more then 1)
  const kmail = new Kmail.KmailSDK(kmailIP, company, commandSocketProt, dataSocketProt, licenseKey, identity, password);

  kmail.emitter.on('statusUpdate', (newStatus) => {
    // Subscribe to all events coming from molly. in order to filter the needed object use the emitter and subscribe to the 
    // needed events
    kmail.subscribeToAll();
  });

  kmail.emitter.on('event', (event) => {
    console.log(`received an event object - "${event}"`);
  });

  kmail.connect(); 
});

Here is the entities list you can register to and their meaning:

| Entity Name | Proto Entity | Note |------------|-----------------------------------|------------------------ | queryFinish | queryStatusModel | received this entity when a query is done | region | regionModel | the region entity. countries and united nations | league | leagueModel | the league entity. containing region id | team | teamModel | the team entity. | event | eventModel | the game entity. contain home team, away team, and league | eventUpdate | eventUpdateModel | an update to the event model (goals, time, red cards) | delete-eventUpdate | eventUpdateModel | a delete update to the event model | line | lineModel | the bet line entity. contain event id | deleted-line | lineModel | delete event for the bet line entity | betOffer | priceModel | the bet entity. contain line id | deleted-betOffer | priceModel | delete event for the bet entity | statusUpdate | N/A | received this entity when the status of the SDK changed (active, inactive) | err | N/A | error occur in the SDK