HackHands JS SDK
Last updated 3 years ago by assisantunes .
ISC · Original npm · Tarball · package.json
$ cnpm install hackhands 
SYNC missed versions from official npm registry.

Pluralsight Mentor - JS SDK

This codebase can be used in server-side (node) and client-side (Browser)



Responsible to initialize a new instance of the SDK. You can use multiple instances in the same app/process. Check the full documentation under docs/Constructor.md


Responsible for authenticate a instance in correct user (mentor or student). Multiple methods are available, check the full documentation under docs/Authentication.md


This module allows a mentor to listen for new requests in realtime. Check the full documentation under docs/Notification.md


Module responsible for everything that happens inside the session environment. Some functionalities include Pause/Resume/Close a session and send messages via Chat system. Check the full documentation under docs/Session.md


Generic module that allows to fetch and set data on the Mentor API. Check the full documentation under docs/Api.md

Real world examples

Basic usage

// Set your settings to initiate a SDK instance
var settings = {
    debug: 'false',
    environment: 'stage'

var HH = HHSDK(settings);

Listen for new requests and send to a slack channel

var HH = require('HHSDK')()

// Authenticate using a expert token

HH.notifications.on('session:available', function(session){
    // Create a payload to send to slack
	var slackPayload = JSON.stringify({
		"icon_url": session.issue.author.profile_thumb.large,
		"username": session.issue.author.name + '',
		"text": "[*_"+session.issue.department.title + "_*] `"+session.issue.title+"`\n"+session.issue.description+"\n\n <https://hackhands.com/session/"+session.issue.key+"/| :computer: Connect to this session>"
    // Send to slack
    require('request').post('https://hooks.slack.com/yourKey').form({payload: slackPayload})

Current Tags

  • 3.7.2                                ...           latest (3 years ago)

1 Versions

  • 3.7.2                                ...           3 years ago
Maintainers (1)
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 4
Dependencies (6)
Dev Dependencies (30)
Dependents (0)

Copyright 2014 - 2017 © taobao.org |