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 - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "@kaana/kaana-services-js",
"version": "1.0.0",
"version": "1.0.1",
"description": "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.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,1 +0,87 @@

# KaanaServices-JS
# 🚀 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:
```shell
npm install kaana-services
```
## Usage
To get started with Kaana Services, import the functions or classes you need in your JavaScript file:
```javascript
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:
```javascript
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](./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](./LICENSE) file for more information.
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