Skip to content
A simple client to the scoreg.at webservices
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
src
test
.editorconfig
.eslintrc.json
.gitignore
.travis.yml
LICENSE
README.md
package-lock.json
package.json
tsconfig.json
tslint.json

README.md

npm version build status

node-scoreg

A simple client to the scoreg.at webservices, now with TypeScript support.

Install

$ npm install node-scoreg --save

Usage

const { MemberV2 } = require("node-scoreg");
const memberV2service = new MemberV2({
	username: "myUsername",
	password: "myPassword",
	accessKey: "myAccessKey",
});

memberV2service.findScoutIdsForOrganization().then(scoutIds => console.log(scoutIds));
memberV2service.findMemberByScoutId("anyScoutId").then(member => console.log(member));
memberV2service.findMemberCompleteByScoutId("anyScoutId").then(memberComplete => console.log(memberComplete));

As of ECMAScript 2017 (ES8), you can also use async/await:

const scoutIds = await memberV2service.findScoutIdsForOrganization();
console.log(scoutIds.length);

How to get your access key

Ask your Gruppen-Administrator! The Gruppen-Administrator will...

  1. Log in to SCOREG
  2. Open your member details (the page with your "Stammdaten", "Details", "Beschreibung", etc.)
  3. Click on tab "Berechtigungen"
  4. Add "WebService-Zugriff Mitglieder (Gruppe)" for your organization to you
  5. Locate the access key for your organization within the table, and send it to you

API

constructor({ username, password, accessKey, agent = { keepAlive: true } })

/**
 * @constructor
 * @param {object} options
 * @param {string} options.username
 * @param {string} options.password
 * @param {string} options.accessKey
 * @param {object} [options.agent] - An instance of {@link https://nodejs.org/dist/latest-v8.x/docs/api/http.html#http_class_http_agent https.Agent}, or options to create one
 */
constructor({ username, password, accessKey, agent = { keepAlive: true } }) {}

findScoutIdsForOrganization()

/**
 * @return {Promise<string[]>}
 */
findScoutIdsForOrganization() {}

findMemberByScoutId(scoutId)

/**
 * @param {string} scoutId
 * @return {Promise<object>}
 */
findMemberByScoutId(scoutId) {}

findMemberCompleteByScoutId(scoutId)

/**
 * @param {string} scoutId
 * @return {Promise<object>}
 */
 findMemberCompleteByScoutId(scoutId) {}

License

The Unlicense

You can’t perform that action at this time.