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

@ari-tsum/aeolixsdk-node

v0.3.6

Published

(This repository is part of the AEOLIX platform and contains only the Software Development Toolkit)

Downloads

8

Readme

SDK for nodeJS version 0.3.Xs

(This repository is part of the AEOLIX platform and contains only the Software Development Toolkit)

Pre-requisites

Install the sdk and import it in your project

    npm install @ari-tsum/aeolixsdk-node

    var AeolixSDK = require('aeolixsdk-node');

Instance the SDK

  var sdk = new AeolixSDK([args]);
  

Arguments:

  • args: any

By default, the SDK will connect to the FENIX production instance. You can set the "fenixDev" arg to connect to the FENIX-dev instace instead, or even set a custom URL as shown below:

    {
      "autoRefresh": boolean,
      "fenixDev": boolean, // Connects to fenix-dev instance
      "restServerUrl": string, // Optional, configure a custom AEOLIX rest URL
      "socketServerUrl": string, // Optional, configure a custom AEOLIX socket URL

    }

Login

The loging to the AEOLIX platform is made throught the keycloak IDM.

Login throught Keycloak with username and password

  sdk.login(userData, control);

Arguments:

  • userData: any
    {
      "username":"username",
      "password":"pwd",
      "type":"user"
    }
  • control: function to receive server responses.

Set Token

Loging to the AEOLIX platform using a token from a previous login.

Login throught Keycloak with access token

  sdk.setToken(accessToken, control);

Arguments:

  • accessToken: token from a previous login response
  • control: function to receive server responses.

Refresh token

Refresh the token previously generated by login or token exchange throught Keycloak. Version 0.3.2 and higher don't refresh the token automatically

Refres access token throught Keycloak

  sdk.refreshToken(control);

Arguments:

  • control: function to receive server responses.

Publish

This functionality allows to publish a message.

  sdk.publish(dataSourceID, data, control);

Arguments:

  • dataSourceID: data source granted for publish.
  • data: String containing the data to be published.
  • control: function to receive server responses.

Subscribe

This functionality allows to subscribe to an specific datasource and receive all the published information.

   sdk.subscribe(dataSourceID, callback, control);

Arguments:

  • DatasourceID: Datasource granted for subscribtion.
    • callback: callback function to receive AEOLIX data messages.
  • control: function to receive server responses.

Each time that a message arrives, the callback will be executed to receive the data message.

Unsubscribe

This operation will allow to stop receiving data from a subscription.

  sdk.unsubscribe(dataSourceID, control);

Arguments:

  • DatasourceID: Datasource previously subscribed.
  • control: function to receive server responses.

Send Service Request

This functionality allows to publish a service request.

  sdk.sendServiceRequest(serviceID, payload, control);

Arguments:

  • serviceID: service granted for access.
  • payload: String containing the request payload.
  • control: function to receive server responses.

Subscribe to Service Request

This functionality allows to subscribe to an specific service and receive all the user's requests.

   sdk.subscribe2ServiceRequest(serviceID, callback, control);

Arguments:

  • serviceID: service owned.
    • callback: callback function to receive AEOLIX service requests.
  • control: function to receive server responses.

Each time that a message arrives, the callback will be executed to receive the data message.

Unsubscribe Service Request

This operation will allow to stop receiving data from a service request subscription.

  sdk.unsubscribeServiceRequest(serviceID, control);

Arguments:

  • serviceID: service previously subscribed.
  • control: function to receive server responses.

Send Service Response

This functionality allows to publish a service response.

  sdk.sendServiceResponse(serviceID, userID, payload, control);

Arguments:

  • serviceID: service owned.
  • userID: user to send response.
  • payload: String containing the response payload.
  • control: function to receive server responses.

Subscribe to Service Response

This functionality allows to subscribe to an specific service and receive all the owner responses.

   sdk.subscribe2ServiceResponse(serviceID, callback, control);

Arguments:

  • serviceID: service granted to access.
    • callback: callback function to receive AEOLIX service responses.
  • control: function to receive server responses.

Each time that a message arrives, the callback will be executed to receive the data message.

Unsubscribe Service Response

This operation will allow to stop receiving data from a service response subscription.

  sdk.unsubscribeServiceResponse(serviceID, control);

Arguments:

  • serviceID: service previously subscribed.
  • control: function to receive server responses.

License

Due the interoperability needs of these architectures, MyAEOLIX has been fully designed considering Free Libre Open Source Software technologies. The project has been designed and implemented by the Transport Systems and Urban Mobility Unit in the Research & Innovation department in ATOS Spain.