Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@obelisk/client

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@obelisk/client

Typescript client to interact with Obelisk on a higher level than the regular ReST API calls.

  • 2.10.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Obelisk Client

A client library written in Typescript to interact with Obelisk.

Prerequisites

This library makes use of RxJS (Reactive Extensions for JavaScript). RxJS comes as a peer dependency.

Overview

** This client library only works for web applications that connect on behalf of users. It is meant for the browser, so node-js servers cannot use this. (For those use cases, please refer to the HTTP ReST API documented on Obelisk)**

The client helps to make authorized calls to the API. With the client you create Endpoints. These endpoints can be acted on with methods like execute() or get(). An endpoint takes an API uri as argument. This means that the HTTP REST api is as important to you, as this API.

Installation

npm install @obelisk/client rxjs --save

Usage

To start you need to create an ObeliskClient instance with a proper options object.

import { ClientOptions, ObeliskClient } from '@obelisk/client';

const options: ClientOptions = {
    host: 'https://obelisk.ilabt.imec.be',
    apiVersion: 'v1',
    realm: 'idlab-iot',
    clientId: 'my-client'
}
let client = new ObeliskClient(options);

Now init the client to connect to the Obelisk back-end and start using it. init() returns an Observable that completes once initialization is over.

this.client.init().subscribe({
    next: _ => {
        // do something with the client
    }
})

If you are logged in it will handle all the tokens in the headers for you.

Angular

There is an optional angular package to use in conjunction with the client packages. More information can be found at @obelisk/ngx.

Client API

The generated @obelisk/client api can be found here

Keywords

FAQs

Package last updated on 27 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc