New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

s4-client

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

s4-client

Client library for S4 (Simple (time)series storage service)

  • 0.1.0
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

s4-client

Installation

yarn add @propelleraero/s4-client

Usage

Basic Example

import { S4Client, BaseUrl, TableRecord } from 's4-client';

const baseUrl = BaseUrl.STAGING;
const consumer = 'cool-app-name';
// "S4 staging API key" / "S4 production API key" in 1password
const secretKey = '...';

const client = new S4Client(baseUrl, consumer, secretKey);

// Insert records
const tableName = 'debug';
const partitionKey = 'sensor123';
const records: TableRecord[] = [
    {
        timestamp: Date.now(),
        value: 'cool string',
    },
    {
        timestamp: Date.now() + 1000,
        value: 'another cool string',
    },
];

const insertResponse = await client.insertRecords(
    tableName,
    partitionKey,
    records
);
console.log(insertResponse);

// Retrieve records
const start = records[0].timestamp;
const end = start + 10 * 1000;
const queryResponse = await client.retrieveRecords(
    tableName,
    partitionKey,
    start,
    end
);
console.log(queryResponse);

FAQs

Package last updated on 02 May 2022

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