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

@kaana/kaana-services-js

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kaana/kaana-services-js

Kaana Services is a JavaScript library that provides an API for the Kaana ecosystem, allowing developers to easily connect and make authenticated HTTP requests to get information about users and other applications.

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

🚀 Kaana Services

Kaana Services is a JavaScript library for building apps that integrate with the Kaana ecosystem. It provides an API gateway for authenticating users and making requests to Kaana services, as well as a set of data classes for working with the app's database.

Installation

To install Kaana Services in your project, simply run the following command in your terminal:

npm install kaana-services

Usage

To get started with Kaana Services, import the functions or classes you need in your JavaScript file:

import { login, logout, fetchData } from "kaana-services";

// Login to Kaana
login("username", "password")
  .then((token) => {
    // Do something with the session token
  })
  .catch((error) => {
    // Handle errors here
  });

// Get data from Kaana
fetchData("/v1/data")
  .then((data) => {
    // Do something with the retrieved data
  })
  .catch((error) => {
    // Handle errors here
  });

// Logout from Kaana
logout()
  .then(() => {
    // The session has been closed
  })
  .catch((error) => {
    // Handle errors here
  });

You can also use the Data and DataCollection classes to interact with the application's database:

import { Data, DataCollection } from "kaana-services";

// Create an instance of the Data class
const data = new Data();

// Get all data
data
  .getAll()
  .then((allData) => {
    // Use all data here
  })
  .catch((error) => {
    // Handle errors here
  });

// Create an instance of the DataCollection class
const collectionName = "myCollection";
const collection = new DataCollection(collectionName);

// Get all data from the collection
collection
  .getAll()
  .then((allData) => {
    // Use all data here
  })
  .catch((error) => {
    // Handle errors here
  });

Contributing

If you want to contribute to Kaana Services, that would be great! Check out CONTRIBUTING.md to learn more about how you can help improve the library.

License

Kaana Services is distributed under the MIT license. See the LICENSE file for more information.

Keywords

FAQs

Package last updated on 21 Feb 2023

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