Skip to content

skiffek/node-scoreg

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

A simple client to the scoreg.at webservices

Resources

License

Stars

Watchers

Forks

Packages

No packages published