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

sgtcloud-html5-sdk

v2.0.0

Published

A html5 out-of-box sdk for damn cool mbaas

Downloads

28

Readme

sgtcloud-html5-sdk

介绍

A html5 out-of-box sdk for damn cool mbaas.

致力于发展为 mbass的, 开箱即用的, 超酷的 html5 软件开发工具.

了解更多, 请访问我们的主页 http://www.sgtcloud.cn

安装

  • 直接下载最新版本的 release

  • 解压该 release

  • 在 $release/dist 目录中选择你需要的sdk

  • 引入sdk到你的项目中

入门

将 sdk 引入到项目中 :

<script src="sgtcloud-html5-sdk.2.0.0.min.js"></script>

或则使用CDN的方式 :

<script src="http://www.sgtcloud.cn/dist/sgtcloud-html5-sdk.2.0.0.min.js"></script>

点击 申请应用标识
首次使用需要初始化应用标识 :

SgtApi.init({
    appId: 'xxx'	//填写应用标识
});

生成一个简单实体 :

var user = new SgtApi.entity.User();
user.userName = 'xxx';
user.password = 'xxx';

再调用一个简单业务, 每个业务的最后一个参数都是一个回调函数 :

SgtApi.UserService.register(user, function(result, data) {
    if(result) {  //表示注册成功
		/* 返回用户注册信息 */
        //data
    }
});

当登录/注册成功后, 可以操作该用户去执行其他业务

文档

技术架构

sdk 采用了 jsonrpc2.0 的通讯协议

业务模块

  • 用户
    User - UserService

  • 角色
    Player - PlayerService

  • 角色扩展
    PlayerExtra - PlayerExtraService

  • 成就
    Achievement - AchievementService

  • 公告
    Announcement - AnnouncementService

  • 活动
    Campaign - CampaignService

  • 签到
    CheckinBoard - CheckinBoardService

  • 任务
    Task - TaskService

  • 日常任务
    DailyTask - DailyTaskService

  • 好友
    Friendship - FriendshipService

  • 好友扩展
    FriendshipExtra - FriendshipExtraService

  • 黑名单
    Blacklist - BlackListService

  • 抽奖
    GachaBox - GachaBoxService

  • 排行榜
    LeaderBoard - LeaderBoardService

  • 邮件
    Mail - MailService

  • 通知
    Notification - NotificationService

  • 充值
    Purchase - PurchaseService

  • 商城
    Store - StoreService

  • 计费点
    ChargePoint - ChargePointService

  • Boss
    Boss - BossService

  • 文件存储
    FileStorage - FileStorageService

  • 礼包
    GiftCode - GiftCodeService

  • 个人通道
    PrivateChannel - PrivateChannelService

  • 公共通道
    PublicChannel - PublicChannelService

  • 第三方
    DelegateDid - DelegateDidService

  • 结构化数据
    StructuredDate - StructuredDateService

  • 反馈
    Ticket - TicketService

贡献

如果你有好的意见或建议,欢迎给我们提 issue 或 pull request,为提升 sgtcloud-html5-sdk 贡献力量

License

The MIT License(http://opensource.org/licenses/MIT) 请自由地享受和参与开源