Socket
Socket
Sign inDemoInstall

cocoro-sdk

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cocoro-sdk - npm Package Compare versions

Comparing version 0.3.4 to 0.4.0

3

dist/src/cocoro.d.ts

@@ -8,3 +8,4 @@ import { Device } from './device';

private apiBase;
constructor(appSecret: string, appKey: string);
private serviceName;
constructor(appSecret: string, appKey: string, serviceName?: string);
private sendGETRequest;

@@ -11,0 +12,0 @@ private sendPOSTRequest;

@@ -48,5 +48,7 @@ "use strict";

var Cocoro = /** @class */ (function () {
function Cocoro(appSecret, appKey) {
function Cocoro(appSecret, appKey, serviceName) {
if (serviceName === void 0) { serviceName = 'iClub'; }
this.appSecret = appSecret;
this.appKey = appKey;
this.serviceName = serviceName;
this.isAuthenticated = false;

@@ -92,3 +94,3 @@ this.apiBase = 'https://hms.cloudlabs.sharp.co.jp/hems/pfApi/ta';

switch (_a.label) {
case 0: return [4 /*yield*/, this.sendPOSTRequest("/setting/login/?appSecret=" + this.appSecret + "&serviceName=iClub", {
case 0: return [4 /*yield*/, this.sendPOSTRequest("/setting/login/?appSecret=" + this.appSecret + "&serviceName=" + this.serviceName, {
terminalAppId: "https://db.cloudlabs.sharp.co.jp/clpf/key/" + this.appKey,

@@ -95,0 +97,0 @@ })];

{
"name": "cocoro-sdk",
"version": "0.3.4",
"version": "0.4.0",
"description": "",

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

@@ -13,2 +13,4 @@ # Cocoro Air SDK

If the `serviceName` is not `iClub`, write it down as well.
For the `terminalAppId`, you only need the part after `/key/`

@@ -24,3 +26,4 @@

const cocoro = new Cocoro(appSecret, appKey);
// iClub is the default service name, you can also leave it out
const cocoro = new Cocoro(appSecret, appKey, 'iClub');
await cocoro.login();

@@ -27,0 +30,0 @@

@@ -19,5 +19,8 @@ import { default as fetchCookie } from 'fetch-cookie';

constructor(appSecret: string, appKey: string) {
private serviceName: string;
constructor(appSecret: string, appKey: string, serviceName = 'iClub') {
this.appSecret = appSecret;
this.appKey = appKey;
this.serviceName = serviceName;

@@ -58,3 +61,3 @@ this.isAuthenticated = false;

const res = await this.sendPOSTRequest(
`/setting/login/?appSecret=${this.appSecret}&serviceName=iClub`,
`/setting/login/?appSecret=${this.appSecret}&serviceName=${this.serviceName}`,
{

@@ -61,0 +64,0 @@ terminalAppId: `https://db.cloudlabs.sharp.co.jp/clpf/key/${this.appKey}`,

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