• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

antoniojps/graphql-pubg: GraphQL wrapper for the PUBG API (deprecated)

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

antoniojps/graphql-pubg

开源软件地址(OpenSource Url):

https://github.com/antoniojps/graphql-pubg

开源编程语言(OpenSource Language):

JavaScript 100.0%

开源软件介绍(OpenSource Introduction):

- Warning: this project is not being maintained and it's usage is not recommended.

graphql-pubg

GraphQL-pubg

PUBG API aggregator on top of GraphQL

How to start the server?

  1. Clone the repository
$ git clone https://github.com/antoniojps/graphql-pubg.git
$ cd graphql-pubg
  1. Paste your API KEY to .env

    • create .env file from .env.example (just remove .example) and add your API KEY
  2. Install dependencies and start the server

$ npm install

// Starts both the webpack server as well as the graphQL server on 2 different ports
$ npm start

GraphQL API

http://localhost:9000/graphql .

Access GraphiQL

http://localhost:9000/graphiql

Example Queries:

The last 2 games of the player "shroud" in the North American server

{
  player(name:"shroud",shards:"pc-na",matchesLimit:2){
    matches{
      id
      gameMode
      createdAt
      map
      isCustomMatch
      duration
      totalParticipants
      rosters{
        id
        slot
        stats{
          rank
          kills
          damage
          dbnos
        }
        participants{
          id
          name
          kills
          damage
          dbnos
        } 
      }
    }
  }
}

Get single match data

{
  match(id:"47529205-1e29-4149-ac67-90907027c5f0",shards:"pc-eu"){
      id
      map
      isCustomMatch
      rosters{
        stats{
          rank
          kills
          damage
        }
        participants{
          name
          kills
          damage
        }
      }
    }
}

Notes

  • Shards is defaulted to "pc-eu" on all queries
  • matchesLimit in the Player query is capped at 5 as of now (you can change this at Utils/filter/player.js on the function getPlayerMatchesArr
  • Error handling is really limited
  • No telemetry data

Docs for the Utils




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap