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

com.fattycat.tds.billboard

v0.0.2-xd.1

Published

TapTap Develop Service

Downloads

17

Readme

使用 TapTap.Billboard

使用前提

使用 TapTap.Billboard 前提是必须依赖以下库:

命名空间

using TapTap.Billboard;

接口描述

1.初始化

var dimensionSet = new HashSet<Pair<string, string>>();
Pair<string, string> pair = new Pair<string, string>("platform", "ios");
Pair<string, string> location = new Pair<string, string>("location", "CN");
dimensionSet.Add(pair);
dimensionSet.Add(location);
var templateType = "navigate"; // 可选
var billboardServerUrl = "https://your-billboard-server-url"; // 开发者中心 > 你的游戏 > 游戏服务 > 应用配置 > 域名配置 > 公告
var config = new TapConfig.Builder()
    .ClientID("your_client_id") // 必须,开发者中心对应 Client ID
    .ClientToken("your_client_token") // 必须,开发者中心对应 Client Token
    .ServerURL("https://your_server_url") // 必须,开发者中心 > 你的游戏 > 游戏服务 > 基本信息 > 域名配置 > API
    .RegionType(RegionType.CN) // 可选项,CN 表示中国大陆,IO 表示其他国家或地区
    .TapBillboardConfig(dimensionSet, templateType, billboardServerUrl)
    .ConfigBuilder();
TapBootstrap.Init(config);

2.打开公告

TapBillboard.OpenPanel((any, error) =>
{
    if (error != null)
    {
        // 打开公告失败  可以根据 error.code 和 error.errorDescription 来判断错误原因
    } else
    {
        // 打开公告成功
    }
});

3.获取小红点

TapBillboard.QueryBadgeDetails((badgeDetails, error) =>
{
    if (error != null)
    {
        // 获取小红点信息失败 可以根据 error.code 和 error.errorDescription 来判断错误原因
    }
    else
    {
        // 获取小红点信息成功
        if (badgeDetails.showRedDot == 1) {
            // 有新的公告信息
        } else {
            // 没有新的公告信息
        }
    }
});

4.注册自定义事件监听

TapBillboard.RegisterCustomLinkListener(url =>
{
    // 这里返回的 url 地址和游戏在公告系统内配置的地址是一致的
});

5.解除已注册的自定义事件监听

// 已注册的回调对象需要游戏保存,取消注册的时候要把对象传给 SDK
TapBillboard.UnRegisterCustomLinkListener(registerdListener);