1.0.12 • Published 4 years ago

game-time-query v1.0.12

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

查询游戏时长限制信息


Features

  • 查询游戏时长限制信息

Installing

NPM

$ npm i game-time-query -S

SCRIPT

  <script type="text/javascript" src="https://unpkg.com/game-time-query/dist/game-time-query.min.js"></script>

Usage

  1. 执行const Instance = GameTimeQuery.Instance获取实例。
  2. 执行Instance.fetch({qid, appkey, source}).then(res => {}).catch(err => {})获取游戏时长信息。

Example

  const Instance = GameTimeQuery.Instance;
  const params = {
    qid: 'qid',
    appkey: 'qppkey',
    source: 'source',
    isJsonp: true
  }

  Instance.fetch(params)
  .then(res => console.log('success', res))
  .catch(err => console.error('error', err))

API

GameTimeQuery.Instance.fetch(object))

fetch方法用于拉取游戏时长信息,返回promise。

请求参数

名称类型描述默认值
qidString(必填)用户id---
appkeyString(必填)游戏的key---
sourceString(必填)来源(sdk_game、page_game、html_game)---
isJsonpBoolean是否用jsonp方式请求false

返回值

名称类型描述
isOpenBoolean是否开启
isAdultBoolean是否成年
allowPlayBoolean是否充许继续玩
nextIntervalNumber下次轮询时间间隔(单位:毫秒))

License

MIT

1.0.11

4 years ago

1.0.12

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago

1.0.1

4 years ago