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

mmos-sdk-js

v2.1.8

Published

Massively Multiplayer Online Science - Citizen Science API client - Javascript SDK, © 2015-19 MMOS Sàrl

Downloads

6

Readme

Site | Docs | Developer Portal | Twitter |

MMOS SDK - Javascript edition

The MMOS SDK gives easy access to the MMOS API by providing an abstraction layer and encapsulating the authentication modules.

Installation

Using npm:

$ npm i mmos-sdk-js

Note: add --save if you are using npm < 5.0.0

Usage

In Node.js:

const config = {
		game: 'game code',
		apiKey: {
			key: 'your key',
			secret: 'your secret'
		},
		host: 'api.depo.mmos.blue'
};
const Api = require('mmos-sdk-js');
const api = new Api(config);

const response = await api.info();

Documentation

API blueprint is available in compiled html and apib format.

ESDoc can also be generated by running the appropriate npm script:

$ npm install
$ npm run doc:source

Running automated tests

Presently the MMOS SDK automated tests use the MMOS Developer Portal. The MMOS Developer Portal helps developers understand how the MMOS API works through a set of publicly available test projects. Registration is publicly available at (https://devportal.mmos.ch/).

In order to run the tests, first you'll need to creare an account on the MMOS Developer Portal. Please note that the test rely on specific projects to be avaliable for the game, which is presently the Exoplanet research project by the University of Geneva. So first you'll need to add the Unige Exoplanet project to your available projects on the Developer Portal.

Please note that this may change in the future and thus you may need to update to the latest version of the SDK and follow the up-to-date instructions to be able to run the automated tests.

Once the account is created, there are three environment variables that need to be set in order to be able to run the tests:

  • MMOS_SDK_TEST_API_KEY - The MMOS API Key
  • MMOS_SDK_TEST_API_SECRET - The MMOS API Secret
  • MMOS_SDK_TEST_GAME - The game id that is generated from your email address

Windows example:

$ SET MMOS_SDK_TEST_API_KEY=apiKey
$ SET MMOS_SDK_TEST_API_SECRET=secret
$ SET MMOS_SDK_TEST_GAME=my-game
$ npm run test:v2

Linux example:

$ export MMOS_SDK_TEST_API_KEY=apiKey
$ export MMOS_SDK_TEST_API_SECRET=secret
$ export MMOS_SDK_TEST_GAME=my-game
$ npm run test:v2

After setting the following environment variables you can run the npm run test command to run the automated tests

Authentication

Please see the authentication docs for details.

Acknowledgments

The GAPARS project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement Nr 732703

EU flag