npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lazycatcloud/sdk

v0.1.424

Published

<!-- * @Author: Bin * @Date: 2023-03-06 * @FilePath: /lzc-sdk/lang/js/README.md -->

Downloads

1,556

Readme

懒猫云应用开发

懒猫云应用平台提供大量系统以及应用层的接口,用户或开发者可以基于开放的接口创造出有趣的应用程序,可以通过阅读本接口文档来帮助开发。

开始开发

@lazycatcloud/sdk 通过 npm 和 yarn 进行分发,你可以通过相应的包管理工具进行安装。

npm i @lazycatcloud/sdk

# or

yarn add @lazycatcloud/sdk

@lazycatcloud/sdk 目前由 grpc apilzc sdk 两个部分组成。

  • grpc api 是基于与懒猫云盒子以及其他组网设备数据以及交互所使用的接口。

  • lzc sdk 是针对懒猫云客户端提供的云应用客户端程序、客户端原生应用系列交互 SDK。

我将通过下列两个示例帮助你分别理解 grpc apilzc sdk

通过 grpc api 获取当前设备信息示例代码:

import { lzcApiGateway } from '@lazycatcloud/sdk/dist/localdevice/device';

const lzcApiGateway = new lzcAPIGateway();
const currentDevice = lzcApiGateway.currentDevice;
console.log('currentDevice', currentDevice);

通过 lzc sdk 打开懒猫云相册应用(更多接口信息请参考 懒猫云应用通用能力开发文档):

import { AppCommon } from '@lazycatcloud/sdk/dist/extentions';

AppCommon.LaunchApp("https://pbkbin.zmide.com", "com.zmide.bin");

stream 类型调用

grpc 有 client stream、server stream 两种方向的流式接口,client stream 依赖 websocket。

server stream 通过封装成Observable提供给调用者。 如果要主动关闭 server stream 需要调用Observable.subscribe(recv)返回结果的unsubscribe()函数。

一般浏览器对同一域名下的长连接(server stream 就是基于此)的并发数量是有限制的,如果不及时关闭,会导致后续所有正常请求 也无法发送出去。

更多文档

懒猫云应用通用能力开发文档

实践指南(面向内部开发者)