G-Loot Esports Platform

G-Loot Esports Platform

  • Mobile game wrapper
  • G-Rewards

›Compliance service

Introduction

  • Introduction
  • Prerequisites & limitations

The process

  • Getting vouchers
  • Hosting the tournament
  • Delivering vouchers

Leaderboard service

  • Introduction
  • Guide
  • API specification
  • Report score

Compliance service

  • Guide
  • API specification

API Specification

Overview

Base urls:

  • dev: https://compliance-gloot-dev.appspot.com/api/v1
  • prod: https://compliance-gloot.appspot.com/api/v1

Endpoints

  • Get status : GET /status
  • Get geodata : GET /geodata

Response data

  • Status
  • Geodata

Authorization

When requesting status or geodata, if the ip-query parameter is omitted, the call will use the ip-adress of the machine making the call. In this case no authentication is required.

When requesting status or geodata for another IP adress than the machine making the call, the request needs a service account token in the Authorization-header. The token is a JWT bearer token that should be kept secret from the client. The token should be preceeded by the token type Bearer in the header.

Pseudo code JSON example:

{
  "headers": {
    "Authorization": "Bearer ${your-service-account-token-here}",
    "Content-Type": "application/json"
  }
}

Endpoints

Get status

Returns whether or not a specific IP adress is allowed to compete on our platform. If available, the geodata of the ip will be passed for convenience.

URL : GET /status

Authentication required : If ip-query parameter is specified with an ip-adress other than the machine making the call, yes.

Parameters:

NameTyperequiredValueDefaultDescription
ipquerynostring-The ip adress for which the status should be fetched. Defaults to the ip of the caller.

Success response 200: Status

Error response 403: no content (faulty or missing authorization token)

Error response 422: no content (invalid IP adress provided)

Get geodata

Returns the location data of a specific IP adress.

URL : GET /geodata

Authentication required : If ip-query parameter is specified with an ip-adress other than the machine making the call, yes.

Parameters:

NameTyperequiredValueDefaultDescription
ipquerynostring-The IP adress for which the geodata should be fetched. Defaults to the ip of the caller.

Success response 200: Geodata

Error response 404: no content (geodata could not be found)

Error response 403: no content (faulty or missing authorization token)

Error response 422: no content (invalid IP adress provided)

Data types

Status

PropertyNullableTypeDescription
blockednobooleanTrue if the IP adress is completely blocked from participating on our platform.
geodatayesGeodataIf available, the location data for the IP adress.

JSON example

{
  "blocked: true"
  "geodata": {
    "alpha2": "SE"
    "country" : "sweden"
    "region"  : null
    "city"    : null
  }
}

Geodata

PropertyNullableTypeDescription
alpha2nostringISO 3166-1 alpha-2.
countrynostringHuman readable country name.
regionyesstringRegion within the country.
cityyesstringCity name. Omitted if not set.

JSON example

{
  "alpha2": "SE"
  "country" : "sweden"
  "region"  : "Stockholm"
  "city"    : "Stockholm"
}
← Guide
  • Overview
    • Base urls:
    • Endpoints
    • Response data
  • Authorization
  • Endpoints
    • Get status
    • Get geodata
  • Data types
    • Status
    • Geodata
G-Loot Esports Platform
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Facebook Open Source
Copyright © 2020 G-Loot