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 🙏

© 2025 – Pkg Stats / Ryan Hefner

rise_client

v0.2.8

Published

javascript client allowing one to interact with the RISE API

Downloads

50

Readme

RISE API JS Client Library

This library is designed to allow developers to interact easily with APIs compatible with SHINE, a restful API protocol that allows clients to browse, filter and access a large number of open and licence-protected structured text resources from a wide variety of providers. Please visit https://rise.mpiwg-berlin.mpg.de for more information about SHINE and the RISE project. For a more detailed documentation of this project, please visit https://rise.mpiwg-berlin.mpg.de/jslib.

Usage

As an NPM package

This library is available as an npm package called rise_client; Thus, if you use webpack, yarn or similar, you can import this library into your project by running

 npm install rise_client

at the root of your project. Then, import the library by using

const rise = require('./rise');

This will allow you to call RISE-specific functions.

Directly from an HTML page

You can also use this library the 'old-school way' by linking to it using a script tag - for more information about this and for a more complete, interactive description of this library, please visit https://rise.mpiwg-berlin.mpg.de/jslib. To know more about the RISE & SHINE project, please visit our website at https://rise.mpiwg-berlin.mpg.de.

IMPORTANT: Your IP/Host will need to be whitelisted by the RISE instance you want to access - please contact [email protected] for more information about this.

Initialisation

First, you need to init the client library by doing:

rise.init.setRemote();

This will default the remote to the rise test server (https://rise.mpiwg-berlin.mpg.de). If you prefer to point to a development version or a SHINE-compatible resource provider, simply set the remote of your choice as a parameter to this function like so:

rise.init.setRemote('http://localhost:3000');

Authentication

You can login a user by using auth.login(). Tthis performs the login function on the remote server, and stores the user information/token in local storage.

rise.auth.login('[email protected]', 'userpassword');

If you wish to completely logout the user and empty the RISE js library values stored in local storage, please use

rise.auth.logout();

Please note that authenticating users is not necessary if you just want to consume public/open resources made available by a SHINE-compatible API.

Fetching data

You can call the RISE collection, resource, sections and content unit fetching functions. These functions return a promise (then() and error() syntax). If a call is successful, a standard http response object will be made available in the then() function:

rise.collections.all({filter: 'chin'}).then(function(res){
  console.log(res);
});

Please have a look at index.js as well as the SHINE API definition for an overview of the available calls.

Each SHINE API call function that returns a collection or a resource accepts the following parameters:

filter: allows you to filter the returned objects using a string (defaults to nothing)
page: fetches the required page (defaults to page 1)

Contact

Please contact [email protected] if you have any questions/comments, or if you would like to contribute to this library.

Setup

yarn

Run tests

yarn test

Start dev server

yarn start

Build production version

yarn build

Upgrade packages

yarn upgrade-interactive