From 1385a3cefc7312a3f18e8d78a854411b53c75e67 Mon Sep 17 00:00:00 2001 From: Ken Date: Wed, 1 Nov 2017 13:27:17 -0400 Subject: Initial commit of the new logs. --- source/.DS_Store | Bin 0 -> 6148 bytes source/_static/.DS_Store | Bin 0 -> 6148 bytes source/_static/css/vainglory.css | 586 +++++++++++++++++++++++ source/_static/images/logo.png | Bin 0 -> 12145 bytes source/_static/images/vainglory.ico | Bin 0 -> 1519 bytes source/_static/images/vainglory/btn-1.png | Bin 0 -> 3227 bytes source/_static/images/vainglory/main-bg.jpg | Bin 0 -> 30740 bytes source/_templates/layout.html | 22 + source/authorization/authorization.rst | 68 +++ source/changelog/changelog.rst | 9 + source/community_sdks/community_sdks.rst | 46 ++ source/conf.py | 175 +++++++ source/datacenters/datacenters.rst | 9 + source/errors/errors.rst | 32 ++ source/index.rst | 22 + source/introduction.rst | 24 + source/links/links.rst | 67 +++ source/makingrequests/makingrequests.rst | 187 ++++++++ source/match_data_summary/match_data_summary.rst | 163 +++++++ source/matches/matches.rst | 348 ++++++++++++++ source/players/players.rst | 105 ++++ source/receivingresponses/receivingresponses.rst | 76 +++ source/samples/samples.rst | 90 ++++ source/teams/teams.rst | 127 +++++ source/telemetry/telemetry.rst | 233 +++++++++ source/titles/titles.rst | 9 + 26 files changed, 2398 insertions(+) create mode 100644 source/.DS_Store create mode 100644 source/_static/.DS_Store create mode 100644 source/_static/css/vainglory.css create mode 100644 source/_static/images/logo.png create mode 100644 source/_static/images/vainglory.ico create mode 100644 source/_static/images/vainglory/btn-1.png create mode 100644 source/_static/images/vainglory/main-bg.jpg create mode 100644 source/_templates/layout.html create mode 100644 source/authorization/authorization.rst create mode 100644 source/changelog/changelog.rst create mode 100644 source/community_sdks/community_sdks.rst create mode 100644 source/conf.py create mode 100644 source/datacenters/datacenters.rst create mode 100644 source/errors/errors.rst create mode 100644 source/index.rst create mode 100644 source/introduction.rst create mode 100644 source/links/links.rst create mode 100644 source/makingrequests/makingrequests.rst create mode 100644 source/match_data_summary/match_data_summary.rst create mode 100644 source/matches/matches.rst create mode 100644 source/players/players.rst create mode 100644 source/receivingresponses/receivingresponses.rst create mode 100644 source/samples/samples.rst create mode 100644 source/teams/teams.rst create mode 100644 source/telemetry/telemetry.rst create mode 100644 source/titles/titles.rst (limited to 'source') diff --git a/source/.DS_Store b/source/.DS_Store new file mode 100644 index 0000000..1992832 Binary files /dev/null and b/source/.DS_Store differ diff --git a/source/_static/.DS_Store b/source/_static/.DS_Store new file mode 100644 index 0000000..fd6e6b4 Binary files /dev/null and b/source/_static/.DS_Store differ diff --git a/source/_static/css/vainglory.css b/source/_static/css/vainglory.css new file mode 100644 index 0000000..661f039 --- /dev/null +++ b/source/_static/css/vainglory.css @@ -0,0 +1,586 @@ +@import url("../better.css"); + +html { + -webkit-box-sizing: border-box; + box-sizing: border-box; } + +input[type=search] { + -webkit-box-sizing: border-box; + box-sizing: border-box; } + +body { + color: #afb7b9; + font-size: 14px; + position: relative; + overflow-x: hidden; + background-color: #161819; + background-size: cover; + background-attachment: fixed; + background-repeat: no-repeat; + background-position: 50% 0%; +} + +h1, +h2, +h3, +h4, +h5, +h6, +p, +address, +blockquote, +pre, +table { + margin-top: 0; + font-weight: 300; + line-height: 1.4em; + color: #e3e3e3; } + .vainglory h1, .vainglory + h2, .vainglory + h3, .vainglory + h4, .vainglory + h5, .vainglory + h6, .vainglory + p, .vainglory + address, .vainglory + blockquote, .vainglory + pre, .vainglory + table { + margin-bottom: 1em; + color: #afb7b9; } + +h1, +h2, +h3, +h4, +h5, +h6, +blockquote { + font-weight: 100; + text-transform: uppercase; + font-family: "Open Sans Condensed", sans-serif; + color: #eaa900; + letter-spacing: 0.1em; } + +h1 { + margin-top: 1.09em; + margin-bottom: .55em; + font-size: 27px; + color: #f79d02; } + @media (max-width: 950px) { + h1 { + font-size: 24px;} } + +h2 { + margin-bottom: .8em; + font-size: 20px; + font-weight: 300; + color: #ffffff; + letter-spacing: 0.1em; } + @media (max-width: 950px) { + h2 { + font-size: 20px; } } + +h3 { + font-size: 26.91px; + margin-bottom: .8em; + letter-spacing: 0.1em; + font-size: 24px; +} + @media (max-width: 950px) { + h3 { + font-size: 19px; } } + +h4 { + font-size: 22px; + letter-spacing: 0.01em; } + @media (max-width: 950px) { + h4 { + font-size: 17px;} } + +h5 { + font-size: 14px; + font-family: "Roboto", sans-serif; + letter-spacing: 0em; + margin-bottom: 1.2em; } + @media (max-width: 950px) { + h5 { + font-size: 14px;} } + +h6 { + font-size: 14px; +} +@media (max-width: 950px) { + h6 { + font-size: 14px;} } + +header { + z-index: 25; + position: relative; + width: 100%; + background-color: #1d191e; +} + +#site-logo { + display: block; + margin: 0; + max-width: 100%; + float: left; + background-image: url(../images/logo.png); + background-repeat: no-repeat; + height: 38px; + width: 73px; + background-size: 73px 38px; + margin-top: 14px; + margin-bottom: 14px; } + @media (max-width: 950px) { + #site-logo { + margin-top: 13px; + margin-bottom: 13px; } } + #site-logo img { + display: block; + width: 100%; + height: auto; + margin-left: 0; } + + +#mainMenu { +float: left; +margin-left: 28px; } +@media (max-width: 950px) { + #mainMenu { + margin-left: 0; + background-color: #1d191e; } } +@media (max-width: 950px) { + #mainMenu { + overflow: hidden; + max-height: 0; + margin-left: 0; + width: 100%; + -webkit-transition: .25s; + -o-transition: .25s; + transition: .25s; } + .menu-open #mainMenu { + max-height: 1000px; + -webkit-transition: .5s; + -o-transition: .5s; + transition: .5s; } } + +.main-menu { +margin: 0 auto; +padding: 0; +font-size: 0px; + } +.main-menu li { + font-size: 14px; + line-height: 1em; + list-style-type: none; + position: relative; + margin-bottom: 0; + display: inline-block; + zoom: 1; + *display: inline; } + @media (max-width: 950px) { + .main-menu li { + display: block; } } + .main-menu li:hover > a, .main-menu li:focus > a { + color: #f79d02; + text-decoration: none; } + .main-menu li > a { + display: block; + vertical-align: middle; + padding: 0; + line-height: 1.2em; + text-decoration: none; + position: relative; + text-align: center; + text-transform: uppercase; + font-family: "Ubuntu", sans-serif; + padding: 26px 10px; + font-size: 14.848px; + font-weight: 400; + color: white; + letter-spacing: .03em; } + @media (max-width: 950px) { + .main-menu li > a { + padding: 15px 5px; + font-size: 14px; + } } + .main-menu li > a.active, .main-menu li > a:hover, .main-menu li > a:focus { + color: #f79d02; + text-decoration: none; } + +main-wrapper:after, +.pakery-grid:after, +.gform_fields:after, +.clearfix:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; } + +* html .clearfix { + height: 1%; } + +.main-wrapper, +.pakery-grid, +.gform_fields, +.clearfix { + display: block; } + + .wrapper { + margin: 0 auto; + width: 95.5%; + padding-bottom: 0; + max-width: 1190px; + position: relative; + clear: both; } + .wrapper-outer, .wrapper-inner { + margin: 0 auto; + width: 95.5%; + padding-top: 0px; + padding-bottom: 0px; + position: relative; } + @media (max-width: 768px) { + .wrapper-outer.mob-wide, .wrapper-inner.mob-wide { + width: 100%; } } + .wrapper-outer { + width: 100%; + padding-top: 0; + padding-bottom: 0; + max-width: 100%; } + .wrapper-inner { + max-width: 1108px; } + @media (max-width: 768px) { + .wrapper.mob-wide { + width: 100%; } } + + .menu-top-outer { + margin: 0; + position: relative; + z-index: 1; } + .menu-top-outer .wrapper { + padding-top: 0; + padding-bottom: 0; + max-width: 95.5%; + width: 100%; + max-width: 1190px; + width: 95.5%; } + .menu-top-outer .btn, .menu-top-outer *[type="submit"] { + float: right; + min-width: 0; + letter-spacing: 0.065em; + margin-right: -.7%; + margin-top: 13px; + margin-bottom: 13px; } + @media (max-width: 950px) { + .menu-top-outer .btn, .menu-top-outer *[type="submit"] { + font-size: 14px; + font-size: 1.4rem; + margin-top: 13px; + margin-bottom: 13px; } } + .menu-top-outer .user-drop { + float: right; + margin-top: 26px; + position: relative; } + @media (max-width: 950px) { + .menu-top-outer .user-drop { + margin-top: 24px; } } + .menu-top-outer .user-drop.open .name { + background-image: url(../images/vainglory/yellow-arrow-up.svg); + background-repeat: no-repeat; } + .lt-ie9 .menu-top-outer .user-drop.open .name { + background-image: url(../images/vainglory/yellow-arrow-up.png); } + .no-svg .menu-top-outer .user-drop.open .name { + background-image: url(../images/vainglory/yellow-arrow-up.png); } + .menu-top-outer .user-drop.open ul { + display: block; } + .menu-top-outer .user-drop .name { + color: #f79d02; + padding-right: 18px; + background-position: 100% 50%; + letter-spacing: 0.02em; + font-weight: 400; + cursor: pointer; + text-transform: uppercase; + background-image: url(../images/vainglory/yellow-arrow.svg); + background-repeat: no-repeat; + background-size: 9px 7px; + font-size: 14.848px; + font-size: 1.4848rem; } + .lt-ie9 .menu-top-outer .user-drop .name { + background-image: url(../images/vainglory/yellow-arrow.png); } + .no-svg .menu-top-outer .user-drop .name { + background-image: url(../images/vainglory/yellow-arrow.png); } + .menu-top-outer .user-drop ul { + display: none; + position: absolute; + right: 0; + top: 100%; + padding: 0 0 4px !important; + min-width: 100%; + background-color: #1d191e; } + .menu-top-outer .user-drop ul li { + list-style: none; + display: block; } + .menu-top-outer .user-drop ul li > a { + display: block; + vertical-align: middle; + padding: 0; + line-height: 1.2em; + text-decoration: none; + position: relative; + text-align: right; + text-transform: uppercase; + font-family: "Ubuntu", sans-serif; + padding: 15px 18px 15px 4px; + font-size: 14.848px; + font-size: 1.4848rem; + font-weight: 400; + color: white; + letter-spacing: 0.02em; } + @media (max-width: 950px) { + .menu-top-outer .user-drop ul li > a { + padding: 15px 18px 15px 4px; + font-size: 14px; + font-size: 1.4rem; } } + .menu-top-outer .user-drop ul li > a:hover, .menu-top-outer .user-drop ul li > a:focus { + color: #f79d02; + text-decoration: none; } + + + + /* stuff like float-left, clear-right, align-center */ + button:focus, + .btn:focus, + [type="submit"]:focus { + outline: none; } + + .btn, *[type="submit"] { + display: inline-block; + zoom: 1; + *display: inline; + text-decoration: none !important; + line-height: 1.5em; + background-color: transparent; + color: white !important; + border-radius: 0; + font-weight: 400; + position: relative; + width: auto; + min-width: 0; + text-align: center; + -webkit-transition: .15s; + -o-transition: .15s; + transition: .15s; + cursor: pointer; + -webkit-box-shadow: none; + box-shadow: none; + text-transform: uppercase; + background-size: 100% 100%; + min-width: 240px; + max-width: 100%; + background-image: url(../images/vainglory/btn-1.png); + border: none; + font-family: "Ubuntu", sans-serif; + font-size: 16px; + padding: 9px 17px; + letter-spacing: 0.19em; } + .btn:hover, [type="submit"]:hover, .btn:focus, [type="submit"]:focus { + border-color: transparent; + color: #0c9590 !important; + outline: none; } + .btn + .btn, *[type="submit"] + .btn, .btn + *[type="submit"], *[type="submit"] + *[type="submit"] { + margin-left: 4.9%; } + @media (max-width: 950px) { + .btn, *[type="submit"] { + font-size: 14px !important; + } + } + @media (max-width: 950px) { + .btn, *[type="submit"] { + padding: 7px 7px; + font-size: 14px; + font-size: 1.4rem; + min-width: 136px; } } + .btn.alt, .alt[type="submit"] { + background-image: url(../images/vainglory/btn-2.png); } + .btn.alt:hover, .alt[type="submit"]:hover, .btn.alt:focus, .alt[type="submit"]:focus { + color: #7e1a01 !important; } + + ::-webkit-input-placeholder { + font-size: 16px; + font-size: 1.6rem; + color: #191a1b; + font-family: "PT Serif", serif; + font-weight: 700; } + @media (max-width: 950px) { + ::-webkit-input-placeholder { + font-size: 14px; + font-size: 1.4rem; } } + + :-moz-placeholder { + /* Firefox 18- */ + font-size: 16px; + font-size: 1.6rem; + color: #191a1b; + font-family: "PT Serif", serif; + font-weight: 700; } + @media (max-width: 950px) { + :-moz-placeholder { + font-size: 14px; + font-size: 1.4rem; } } + + ::-moz-placeholder { + /* Firefox 19+ */ + font-size: 16px; + font-size: 1.6rem; + color: #191a1b; + font-family: "PT Serif", serif; + font-weight: 700; } + @media (max-width: 950px) { + ::-moz-placeholder { + font-size: 14px; + font-size: 1.4rem; } } + + :-ms-input-placeholder { + font-size: 16px; + font-size: 1.6rem; + color: #191a1b; + font-family: "PT Serif", serif; + font-weight: 700; } + @media (max-width: 950px) { + :-ms-input-placeholder { + font-size: 14px; + font-size: 1.4rem; } } + + + + +header#pageheader, footer#pagefooter, .related, .document { + width: 100%; + max-width: 1190px; + margin: auto; +} + +p { + font-size: 14px; + margin-bottom: 1.95em; + font-weight: 500; +} + +.bodywrapper { + margin: 0 0 0 22rem; +} + +.sphinxsidebar { + width: 20rem; +} + +div.sphinxsidebarwrapper { + padding: 2rem 1rem 0 0; +} + +.sphinxsidebarwrapper ul { + padding: 2rem 1rem 0 0; +} + +.sphinxsidebarwrapper h3 { + display: none; +} + +.sphinxsidebarwrapper ul li { + list-style: none; + margin-bottom: -2px; + padding: 0; + border: 1.5px solid #1f1e20; +} + +.sphinxsidebarwrapper ul li.current > a { + color: #eaa900; + border-left: 2px solid #eaa900; +} + +.sphinxsidebarwrapper ul li.current { + padding: 0px 0 0px; + margin-bottom: 0; + background-color: #1f1e20; +} + +.sphinxsidebarwrapper ul li ul { + margin-bottom: 0; + padding-top: 4px; + padding-bottom: 25px; +} + +.sphinxsidebarwrapper ul li ul li { + border: none; + padding: 5.5px 0 5.5px; +} + +.sphinxsidebarwrapper ul li ul li a { + text-transform: none; + padding: 0px 5px 0 29px; + font-size: 12px; +} + +.sphinxsidebarwrapper ul li a { + display: block; + text-transform: uppercase; + font-size: 12px; + color: white; + letter-spacing: .07em; + padding: 9px 10px 8px 17px; + font-family: "Roboto", sans-serif; + font-weight: 300; +} + +.sphinxsidebarwrapper ul li a:hover, ul.aside-menu li a:focus { + text-decoration: none; + color: #eaa900; +} + +.breadcrumbs { + border:none; +} + +a { + color: #eaa900; +} + +a:visited { + color: #eaa900; +} + + +.highlight pre{ + background-color: #1e1e1e; +} + +.highlight .go { + color: white; +} + +.pre { + background-color: #1e1e1e; +} + +table { + margin-bottom: 20px; +} + +table.docutils th { + padding:10px; + border:1px solid #afb7b9; +} + +thead { + background-color: #1d191e; +} + +table.docutils td { + padding:10px; + border:1px solid #afb7b9; +} diff --git a/source/_static/images/logo.png b/source/_static/images/logo.png new file mode 100644 index 0000000..84db6cf Binary files /dev/null and b/source/_static/images/logo.png differ diff --git a/source/_static/images/vainglory.ico b/source/_static/images/vainglory.ico new file mode 100644 index 0000000..56ffebd Binary files /dev/null and b/source/_static/images/vainglory.ico differ diff --git a/source/_static/images/vainglory/btn-1.png b/source/_static/images/vainglory/btn-1.png new file mode 100644 index 0000000..a41cc54 Binary files /dev/null and b/source/_static/images/vainglory/btn-1.png differ diff --git a/source/_static/images/vainglory/main-bg.jpg b/source/_static/images/vainglory/main-bg.jpg new file mode 100644 index 0000000..284943d Binary files /dev/null and b/source/_static/images/vainglory/main-bg.jpg differ diff --git a/source/_templates/layout.html b/source/_templates/layout.html new file mode 100644 index 0000000..c6a61a1 --- /dev/null +++ b/source/_templates/layout.html @@ -0,0 +1,22 @@ +{% extends '!layout.html' %} + +{% block header %} + +{% endblock %} + +{% block footer %} +{% endblock %} diff --git a/source/authorization/authorization.rst b/source/authorization/authorization.rst new file mode 100644 index 0000000..5e381a6 --- /dev/null +++ b/source/authorization/authorization.rst @@ -0,0 +1,68 @@ +.. _authorization: + +Authorization +============= + +We require a JSON Web Token `JWT `_. be sent along with your request via the Authorization header. +JWTs are passed as bearer tokens in the Authorization header, and look like the following: + +``Authorization: `` + +There's no need to create JWTs manually, they will be created for you when you register for the API - `Register Here! `_. In some cases an ``X-API-KEY`` will give you more access to information, and in all cases it means that you are operating under a per-token rate limit. + +To specify the Headers, use this code: + +**Shell** + +.. code-block:: shell + + + # With shell, you can just pass the correct header with each request + curl "" \ + -H "Authorization: " + -H "Accept: application/vnd.api+json" + +**Java:** + +.. code-block:: java + + import java.io.*; + import java.net.*; + + URL url = new URL(""); + HttpURLConnection conn = (HttpURLConnection) url.openConnection(); + conn.setRequestMethod("GET"); + conn.setRequestProperty("Authorization",""); + conn.setRequestProperty("Accept", "application/vnd.api+json"); + + conn.getInputStream() + +**Python:** + +.. code-block:: python + + import requests + + url = "" + + header = { + "Authorization": "", + "Accept": "application/vnd.api+json" + } + + r = requests.get(url, headers=header) + +**Go:** + +.. code-block:: go + + import "net/http" + + client := &http.Client{} + req, _ := http.NewRequest("GET","",nil) + req.Header.Set("Authorization", "") + req.Header.Set("Accept", "application/vnd.api+json") + res, _ := client.Do(req) + +.. toctree:: + :maxdepth: 2 diff --git a/source/changelog/changelog.rst b/source/changelog/changelog.rst new file mode 100644 index 0000000..1e679d6 --- /dev/null +++ b/source/changelog/changelog.rst @@ -0,0 +1,9 @@ +.. _changelog: + +Changelog +========== + +`Read the Changlog `_. + +.. toctree:: + :maxdepth: 2 diff --git a/source/community_sdks/community_sdks.rst b/source/community_sdks/community_sdks.rst new file mode 100644 index 0000000..07d89d9 --- /dev/null +++ b/source/community_sdks/community_sdks.rst @@ -0,0 +1,46 @@ +.. _community_sdks: + +Community SDKs +=============== + +Community contributions are welcome and rewarded with good karma (and swag!) If you are currently working on an API, let us know on the Discord server and we will add a link! + +Java +--------------------------- + +A Java adaptation of the Vainglory API - `DominicGunn/flicker `_. + + +Python +--------------------------- + +Python 3 wrapper for the Gamelocker API - `schneefux/python-gamelocker `_. +Python 3 wrapper for the Gamelocker API - `ClarkThyLord/madglory-ezl `_. + + +JavaScript +--------------------------- + +A JavaScript API client - `seripap/vainglory `_. + + +R +--------------------------- + +A project providing R6 classes (for the R language) for accessing the API - `madglory/vainglory-go-client `_. + + +Go +--------------------------- + +A proof of concept go client for the Vainglory Developer API - `madglory/vainglory-go-client `_. + + +Ruby +--------------------------- + +A Ruby gem wrapper for the Vainglory Developer API - `Ruby Gem `_. || `Github `_. + + +.. toctree:: + :maxdepth: 2 diff --git a/source/conf.py b/source/conf.py new file mode 100644 index 0000000..ad39378 --- /dev/null +++ b/source/conf.py @@ -0,0 +1,175 @@ +from better import better_theme_path +# -*- coding: utf-8 -*- +# +# Vainglory documentation build configuration file, created by +# sphinx-quickstart on Mon Oct 23 11:59:26 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'Vainglory' +copyright = u'2017, MadGlory' +author = u'MadGlory' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = u'0.2' +# The full version, including alpha/beta/rc tags. +release = u'0.2' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'monokai' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme_path = [better_theme_path] +html_theme = 'better' +#html_theme = 'nature' +html_style = "css/vainglory.css" +# html_logo = "_static/images/logo.png" + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] +html_favicon = 'vainglory.ico' + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# This is required for the alabaster theme +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +# html_sidebars = { +# '**': [ +# 'relations.html', # needs 'show_related': True theme option to display +# 'searchbox.html', +# ] +# } + +html_sidebars = { + '**': [ + 'globaltoc.html' + ] +} + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = 'Vainglorydoc' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'Vainglory.tex', u'Vainglory Documentation 1', + u'MadGlory', 'manual'), +] + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'vainglory', u'Vainglory Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'Vainglory', u'Vainglory Documentation', + author, 'Vainglory', 'One line description of project.', + 'Miscellaneous'), +] diff --git a/source/datacenters/datacenters.rst b/source/datacenters/datacenters.rst new file mode 100644 index 0000000..7855cfc --- /dev/null +++ b/source/datacenters/datacenters.rst @@ -0,0 +1,9 @@ +.. _datacenters: + +Datacenters +=========== + +We operate several Datacenters around the world. Each datacenter holds all information for one or more Regions of the game. Currently all data is located in DC01, but this may change in the future. Users will be notified prior to the change and an API endpoint will be made available to provide metadata describing where each regions data can be found. + +.. toctree:: + :maxdepth: 2 diff --git a/source/errors/errors.rst b/source/errors/errors.rst new file mode 100644 index 0000000..ee45b56 --- /dev/null +++ b/source/errors/errors.rst @@ -0,0 +1,32 @@ +.. _errors: + +Errors +======= + +The server will stop processing if a problem is encountered and return the correct HTTP error status code. Errors may additionally include error objects, which are returned as an array keyed by errors in the top level of a JSON API document. + +An error objects have the following members: + +* ``title:`` (Required) the HTTP status code applicable to this problem, expressed as a string value. +* ``description:`` (Optional) a short summary of the problem + +The Server uses the following error codes: + +=========================== =================================================================================================================== +Error Code Meaning +=========================== =================================================================================================================== +400 Bad Request -- Your request sucks +401 Unauthorized -- Your API key is wrong +403 Forbidden -- The object requested is hidden for administrators only +404 Not Found -- The specified object could not be found +405 Method Not Allowed -- You tried to access a object with an invalid method +406 Not Acceptable -- You requested a format that isn't JSON +410 Gone -- The object requested has been removed from our servers +418 I'm a teapot +429 Too Many Requests -- You're requesting too much data! Slow down! +500 Internal Server Error -- We had a problem with our server. Try again later. +503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later. +=========================== =================================================================================================================== + +.. toctree:: + :maxdepth: 2 diff --git a/source/index.rst b/source/index.rst new file mode 100644 index 0000000..bbab77e --- /dev/null +++ b/source/index.rst @@ -0,0 +1,22 @@ +Gamelocker Documentation +================================= + +.. toctree:: + :maxdepth: 2 + + introduction + datacenters/datacenters + authorization/authorization + titles/titles + makingrequests/makingrequests + receivingresponses/receivingresponses + matches/matches + match_data_summary/match_data_summary + players/players + samples/samples + telemetry/telemetry + teams/teams + links/links + community_sdks/community_sdks + errors/errors + changelog/changelog diff --git a/source/introduction.rst b/source/introduction.rst new file mode 100644 index 0000000..e417d23 --- /dev/null +++ b/source/introduction.rst @@ -0,0 +1,24 @@ +Introduction +================== + +The first version of the Vainglory Game Data Service is an exciting step forward towards making it easier for users to have open access to in-game data. + +Build something great! + +At the moment this Service is in Alpha Preview mode. You can see sample data, test the interface, and provide feedback to our development team. + +While we initially took a different approach, based on community feedback the Server now makes every attempt to implement the required features of the `JSON-API `_. specification. + +We show example language bindings using CURL and plan to add libraries for Ruby, NodeJS, Java, Python and more. Community contributions are welcome and rewarded with good karma (and swag!) You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right. + + +Versioning +----------- + +We following `SEMVER `_. standards, using a MAJOR.MINOR.PATCH versioning scheme. This means that we will increment versioning in the following way: + +* MAJOR version when we make incompatible API changes, +* MINOR version when we add functionality in a backwards-compatible manner, +* PATCH version when we make backwards-compatible bug fixes. + +You can see the current version and deploy date by viewing the Status endpoint. diff --git a/source/links/links.rst b/source/links/links.rst new file mode 100644 index 0000000..6ed57ef --- /dev/null +++ b/source/links/links.rst @@ -0,0 +1,67 @@ +.. _links: + +Links +====== + +Get a Link +--------------------------- + +This endpoint checks to see if a link object exists for a given code. + +**HTTP Request:** + +| ``GET https://api.dc01.gamelockerapp.com/link`` + +**Shell:** + +.. code-block:: shell + + curl "https://api.dc01.gamelockerapp.com/shards/na/link/{id}" \ + -H "Authorization: Bearer " \ + -H "Accept: application/vnd.api+json" + + + +Post a Link +--------------------------- + +This endpoint creates a PlayerLink object if the verification code matches the one provided by the game. + +**HTTP Request:** + +| ``POST https://api.dc01.gamelockerapp.com/link/{player_id}`` + + +**Query Parameters:** + +| ``Parameter: Code`` + +**Shell:** + +.. code-block:: shell + + curl -XPOST "https://api.dc01.gamelockerapp.com/shards/na/link/{player_id}" \ + -H "Authorization: Bearer " \ + -H "Accept: application/vnd.api+json" + + + +Player Link +--------------------------- + +**Shell:** + +.. code-block:: shell + + { + "attributes": { + "playerId": "fb374a7b-78be-4fcc-83ed-6a532a8a6f55", + "shardId": "na", + "titleId": "semc-vainglory" + }, + "id": "2454e5ac-0a69-4468-ad12-8616f066e817", + "type": "playerLink" + } + +.. toctree:: + :maxdepth: 2 diff --git a/source/makingrequests/makingrequests.rst b/source/makingrequests/makingrequests.rst new file mode 100644 index 0000000..c3b5c6e --- /dev/null +++ b/source/makingrequests/makingrequests.rst @@ -0,0 +1,187 @@ +.. _makingrequests: + +Making Requests +=============== + +Content Negotiation +--------------------------- + +Clients using the api should specify that they accept responses using the ``application/vnd.api+json`` format, for convenience we will also accept ``application/json`` since it is the default for many popular client libraries. + +The Server will respond with a ``Content-Type`` header that mirrors the format requested by the Client. + +Regions +--------------------------- + +The Vainglory Game Data Service currently supports the following regions: + +*General Region Shards:* To find data regarding live servers, where all data is found, please use the following shards. + +* **North America:** ``na`` +* **Europe:** ``eu`` +* **South America:** ``sa`` +* **East Asia:** ``ea`` +* **Southeast Asia (SEA):** ``sg`` + +*Tournament Region Shards:* To find data regarding professional eSport, which take place on the private client only, please use the following shards. + +* **North America Tournaments:** ``tournament-na`` +* **Europe Tournaments:** ``tournament-eu`` +* **South America Tournaments:** ``tournament-sa`` +* **East Asia Tournaments:** ``tournament-ea`` +* **Southeast Asia Tournaments:** ``tournament-sg`` + +*Please note: Choosing a specific region is currently required* + +**Javascript:** + +.. code-block:: javascript + + To specify a region, use this code: + + "...gamelockerapp.com/shards//..." + + + +GZIP +--------------------------- + +Clients can specify the header ``Accept-Encoding: gzip`` and the server will compress responses. +Responses will be returns with ``Content-Encoding: gzip``. + +Given the size of matches, this can have significant performance benefits. + +**Shell:** + +.. code-block:: javascript + + To specify the header Accept-Encoding, use this code: + + -H "Accept-Encoding: gzip" + + +**Java:** + +.. code-block:: java + + + To specify the header Accept-Encoding, use this code: + + conn.setRequestProperty("Accept-Encoding","gzip"); + + +**Python:** + +.. code-block:: python + + + To specify the header Accept-Encoding, use this code: + + header = {"Accept-Encoding":"gzip"} + + +**Go:** + +.. code-block:: go + + + To specify the header Accept-Encoding, use this code: + + req.Header.Set("Accept-Encoding", "gzip") + + + +Pagination +--------------------------- + +Where applicable, the server allows requests to limit the number of results returned via pagination. To paginate the primary data, supply pagination information to the query portion of the request using the limit and offset parameters. To fetch items 2 through 10 you would specify a limit of 8 and an offset of 2: + +If not specified, the server will default for matches to ``limit=5`` and ``offset=0``, and for players/samples to ``limit=50`` and ``offset=0`` + + *Important - Currently the server will not allow responses with over 50 primary data objects* + + + +Search Time +--------------------------- + + +**Defaults:** + +* Data retention period: 120 days. +* The max search time span between createdAt-start and createdAt-end: 28 days. +* If you don't specify createdAt-start, the default is now - 28 days. +* If you don't specify createdAt-end, the default is now. +* If you search for a time > now, the default is now. +* If you search for a time before the retention period, the default is the retention period (now - 120 days). +* If createdAt-start >= createdAt-end, you will receive an error. + + +Sorting +--------------------------- + +The default sort order is always ascending. Ascending corresponds to the standard order of numbers and letters, i.e. A to Z, 0 to 9). For dates and times, ascending means that earlier values precede later ones e.g. 1/1/2000 will sort ahead of 1/1/2001. + +All resource collections have a default sort order. In addition, some resources provide the ability to sort according to one or more criteria ("sort fields"). + +If sort fields are is prefixed with a minus, the order will be changed to descending. + +**Javascript** + +.. code-block:: javascript + + + //The example below will return the oldest articles first: + ".../matches?sort=createdAt" + + //The example below will return the newest articles first: + ".../matches?sort=-createdAt" + + + +JSON-P Callbacks +--------------------------- + +You can send a ``?callback`` parameter to any GET call to have the results wrapped in a JSON function. This is typically used when browsers want to embed content in web pages by getting around cross domain issues. The response includes the same data output as the regular API, plus the relevant HTTP Header information. + +**Shell:** + +.. code-block:: shell + + curl -g "https://api.dc01.gamelockerapp.com/status?callback=foo" + + + + +Cross Origin Resource Sharing +----------------------------- + +This is what the CORS preflight request looks like. The API supports Cross Origin Resource Sharing (CORS) for AJAX requests from any origin. You can read the CORS W3C Recommendation, or this intro from the HTML 5 Security Guide. + +Here's a sample request sent from a browser hitting http://example.com: + +**Shell:** + +.. code-block:: shell + + curl -i https://api.dc01.gamelockerapp.com/status -H "Origin: http://example.com" + HTTP/1.1 200 OK + ... + Access-Control-Allow-Origin: * + Access-Control-Expose-Headers: Content-Length + + This is what the CORS preflight request looks like: + + curl -i https://api.dc01.gamelockerapp.com/status -H "Origin: http://example.com" -X OPTIONS + HTTP/1.1 200 OK + ... + Access-Control-Allow-Headers: Origin,X-Title-Id,Authorization + Access-Control-Allow-Methods: GET,POST,OPTIONS + Access-Control-Allow-Origin: * + Access-Control-Max-Age: 86400 + + + + +.. toctree:: + :maxdepth: 2 diff --git a/source/match_data_summary/match_data_summary.rst b/source/match_data_summary/match_data_summary.rst new file mode 100644 index 0000000..a87682e --- /dev/null +++ b/source/match_data_summary/match_data_summary.rst @@ -0,0 +1,163 @@ +.. _match_data_summary: + +Match Data Summary +================== + +Special thanks to Kashz for helping to create this! GitHub: iAm-Kashif + +Match Object +--------------------------- + +================= ============== =========================== +Variable Type Description +================= ============== =========================== +Type str Match +ID str Match ID +createdAt str (iso8601) Time of Match Played +duration int Time of match in seconds +gameMode str Game Mode +patchVersion str Version of API +shardID str Match Shard +stats map See Match.stats +assets obj See Match.assets +rosters obj See Rosters +================= ============== =========================== + + +**Match.stats (End of game statistics)** + +================= ============== =========================== +Variable Type Description +================= ============== =========================== +endGameReason str "Victory" or "Defeat" +queue str Game Mode +================= ============== =========================== + + +**Match.assets (Telemetry Data)** + +================= ============== =========================== +Variable Type Description +================= ============== =========================== +Type string asset +createdAt str (iso8601) Time of Telemtry creation +description str " " +filename str telemetry.json +id str ID of Asset +contentType str application/json +name map telemetry +url obj Link to Telemetry.json file +================= ============== =========================== + + +Rosters Object +--------------------------- + +================= ============== =========================== +Variable Type Description +================= ============== =========================== +id str ID of Roster +type str Roster +participants obj See Participants +stats obj See Rosters.stats +team obj See Rosters.team +================= ============== =========================== + + +**Rosters.stats** + +================= ======================================= +Variable Type +================= ======================================= +acesEarned int +gold int +heroKills int +krakenCaptures int +side Either "right/red" or "left/blue" +turretKills int +turretRemaining int +================= ======================================= + + +**Rosters.team** + +================= ============== =========================== +Variable Type Description +================= ============== =========================== +id str ID of Team or None +name str Name of Team or None +type str team +================= ============== =========================== + +Participants Object +--------------------------- + +================= ============== =========================== +Variable Type Description +================= ============== =========================== +actor str Hero +id str Same as ID of Roster +player obj See Participants.player +stats map See Paticipants.stats +type str participants +================= ============== =========================== + +**Participants.player** + +================= ============== =========================== +Variable Type Description +================= ============== =========================== +id str UID of player +name str IGN of player +stats map See Participants.player.stats +type str palyer +================= ============== =========================== + +**Particpants.stats** + +====================== ================================= +Variable Type +====================== ================================= +assists int +crystalMineCaptures int +deaths int +farm int +firstAfkTime int: -1 for no AFK +goldMineCaptures int +itemGrants map of {itemsBought : int} +itemSells map of {itemsSold : int} +itemUses map of {itemsUsed : int} +items list of final build (Len: 6) +jungleKills int +karmaLevel int +kills int +krakenCaptures int +level int +minionKills int +nonJungleMinionKills int +skillTier int +skinKey str +turretCaptures int +wentAfk bool +winner bool +====================== ================================= + + +**Particpants.player.stats** + +====================== ================================= +Variable Type +====================== ================================= +level int +lifetimeGold float +lossStreak int +played int +played_ranked int +winStreak int +wins int +xp int +====================== ================================= + + +.. toctree:: + :maxdepth: 2 diff --git a/source/matches/matches.rst b/source/matches/matches.rst new file mode 100644 index 0000000..ef71a91 --- /dev/null +++ b/source/matches/matches.rst @@ -0,0 +1,348 @@ +.. _matches: + +Matches +======= + +Matches records are created every time players complete a game session. Each Match contains high level information about the game session, including info like duration, gameMode, and more. Each Match has two Rosters. + + +Rosters +---------------------- + +Rosters track the scores of each opposing group of Participants. If players entered matchmaking as a team, the Roster will have a related Team. Rosters have many Participants objects, one for each member of the Roster. Roster objects are only meaningful within the context of a Match and are not exposed as a standalone resource. + +**Javascript:** + +.. code-block:: javascript + + { + "type": "roster", + "id": "eca49808-d510-11e6-bf26-cec0c932ce01", + "attributes": { + "stats": { + "acesEarned": 2, + "gold": 32344, + "etc..." + } + }, + "relationships": { + "team": { + "data": { + "type": "team", + "id": "753d464c-d511-11e6-bf26-cec0c932ce01" + } + }, + "participants": { + "data": [ + { + "type": "participant", + "id": "eca49a7e-d510-11e6-bf26-cec0c932ce01" + }, + "etc..." + ] + } + } + } + + + +Participants +--------------------------- + +Participant objects track each member in a Roster. Participants may be anonymous Players, registered Players, or bots. In the case where the Participant is a registered Player, the Participant will have a single Player relationship. Participant objects are only meaningful within the context of a Match and are not exposed as a standalone resource. + +**Javascript:** + +.. code-block:: javascript + + { + "type": "participant", + "id": "ea77c3a7-d44e-11e6-8f77-0242ac130004", + "attributes": { + "actor": "*Hero009*", + "stats": { + "assists": 4, + "crystalMineCaptures": 1, + "deaths": 2, + "farm": 49.25, + "etc..." + } + } + } + + + +Get a Collection of Matches +--------------------------- + +This endpoint retrieves data from matches. Bulk scraping matches is prohibited. + +**HTTP Request** +| ``GET https://api.dc01.gamelockerapp.com/shards/na/matches`` + +=========================== ================ =================================================================================================================== +Parameter Default Description +=========================== ================ =================================================================================================================== +page[offset] 0 Allows paging over results +page[limit ] 50 The default (and current maximum) is 50.Values less than 50 and great than 2 are supported. +sort createdAt By default, Matches are sorted by creation time ascending. +filter[createdAt-start] 3hrs ago Must occur before end time. Format is iso8601 Usage: filter[createdAt-start]=2017-01-01T08:25:30Z +filter[createdAt-end] Now Queries search the last 3 hrs. Format is iso8601 i.e.filter[createdAt-end]=2017-01-01T13:25:30Z +filter[playerNames] none Filters by player name. Usage: filter[playerNames]=player1,player2,... +filter[playerIds] none Filters by player Id. Usage:filter[playerIds]=playerId,playerId,... +filter[teamNames] none Filters by team names. Team names are the same as the in game team tags. Usage: filter[teamNames]=TSM,team2,... +filter[gameMode] none Filter by gameMode Usage: filter[gameMode]=casual,ranked,... +=========================== ================ =================================================================================================================== + +*Remember — a happy match is an authenticated match!* + +**Shell:** + +.. code-block:: shell + + curl -g "https://api.dc01.gamelockerapp.com/shards/na/matches?sort=createdAt&page[limit]=3&filter[createdAt-start]=2017-02-27T13:25:30Z&filter[playerNames]=" \ + -H "Authorization: Bearer " \ + -H "Accept: application/vnd.api+json" + + //The above command returns JSON structured like this: + + { + "data": [ + { + "type": "match", + "id": "02b90214-c64d-11e6-9f6b-062445d3d668", + "attributes": { + "createdAt": "2017-01-06T20:30:08Z", + "duration": 1482195372, + "gameMode": "casual", + "patchVersion": "1.0.0", + "shardId": "na", + "stats": "acesEarned: 3, etc..." + }, + "relationships": { + "rosters": { + "data": [{ + "type": "roster", + "id": "ea77c2eb-d44e-11e6-8f77-0242ac130004" + }, { + "type": "roster", + "id": "dc2c14b4-d50c-11e6-bf26-cec0c932ce01" + }] + } + } + } + ] + } + +**Java:** + +.. code-block:: java + + //*There are a variety of Java HTTP libraries that support query-parameters. + + //The above command returns JSON structured like this: + + { + "data": [ + { + "type": "match", + "id": "02b90214-c64d-11e6-9f6b-062445d3d668", + "attributes": { + "createdAt": "2017-01-06T20:30:08Z", + "duration": 1482195372, + "gameMode": "casual", + "patchVersion": "1.0.0", + "shardId": "na", + "stats": "acesEarned: 3, etc..." + }, + "relationships": { + "rosters": { + "data": [{ + "type": "roster", + "id": "ea77c2eb-d44e-11e6-8f77-0242ac130004" + }, { + "type": "roster", + "id": "dc2c14b4-d50c-11e6-bf26-cec0c932ce01" + }] + } + } + } + ] + } + +**Python:** + +.. code-block:: python + + import requests + + url = "https://api.dc01.gamelockerapp.com/shards/na/matches" + + header = { + "Authorization": "", + "Accept": "application/vnd.api+json" + } + + query = { + "sort": "createdAt", + "filter[playerNames]": "", + "filter[createdAt-start]": "2017-02-28T13:25:30Z", + "page[limit]": "3" + } + + r = requests.get(url, headers=header, params=query) + + //The above command returns JSON structured like this: + + { + "data": [ + { + "type": "match", + "id": "02b90214-c64d-11e6-9f6b-062445d3d668", + "attributes": { + "createdAt": "2017-01-06T20:30:08Z", + "duration": 1482195372, + "gameMode": "casual", + "patchVersion": "1.0.0", + "shardId": "na", + "stats": "acesEarned: 3, etc..." + }, + "relationships": { + "rosters": { + "data": [{ + "type": "roster", + "id": "ea77c2eb-d44e-11e6-8f77-0242ac130004" + }, { + "type": "roster", + "id": "dc2c14b4-d50c-11e6-bf26-cec0c932ce01" + }] + } + } + } + ] + } + +**Go:** + +.. code-block:: go + + q := req.URL.Query() + q.Add("sort", "createdAt") + q.Add("filter[playerNames]", "") + q.Add("filter[createdAt-start]", "2017-02-27T13:25:30Z") + q.Add("page[limit]", "3") + req.URL.RawQuery = q.Encode() + res, _ := client.Do(req) + + //The above command returns JSON structured like this: + + { + "data": [ + { + "type": "match", + "id": "02b90214-c64d-11e6-9f6b-062445d3d668", + "attributes": { + "createdAt": "2017-01-06T20:30:08Z", + "duration": 1482195372, + "gameMode": "casual", + "patchVersion": "1.0.0", + "shardId": "na", + "stats": "acesEarned: 3, etc..." + }, + "relationships": { + "rosters": { + "data": [{ + "type": "roster", + "id": "ea77c2eb-d44e-11e6-8f77-0242ac130004" + }, { + "type": "roster", + "id": "dc2c14b4-d50c-11e6-bf26-cec0c932ce01" + }] + } + } + } + ] + } + +Get a Single Match +--------------------------- + +This endpoint retrieves a specific match. + +**HTTP Request** +| ``GET https://api.dc01.gamelockerapp.com/shards/na/matches/`` + +**URL Parameters** +| Parameter: ``ID`` +| Description: ``The ID of the match to retrieve`` + +**Shell:** + +.. code-block:: shell + + curl "https://api.dc01.gamelockerapp.com/shards/na/matches/" \ + -H "Authorization: Bearer " \ + -H "Accept: application/vnd.api+json" + + //The above command returns JSON structured like this: + + { + "data": { + "type": "match", + "id": "02b90214-c64d-11e6-9f6b-062445d3d668", + "attributes": { + "createdAt": "2017-01-06T20:30:08Z", + "duration": 1482195372, + "gameMode": "casual", + "patchVersion": "1.0.0", + "shardId": "na", + "stats": "acesEarned: 3, etc..." + }, + "relationships": { + "rosters": { + "data": [{ + "type": "roster", + "id": "ea77c2eb-d44e-11e6-8f77-0242ac130004" + }, { + "type": "roster", + "id": "dc2c14b4-d50c-11e6-bf26-cec0c932ce01" + }] + } + } + } + } + +**Javascript:** + +.. code-block:: Javascript + + //There are a variety of Java HTTP libraries that support URL parameters + + { + "data": { + "type": "match", + "id": "02b90214-c64d-11e6-9f6b-062445d3d668", + "attributes": { + "createdAt": "2017-01-06T20:30:08Z", + "duration": 1482195372, + "gameMode": "casual", + "patchVersion": "1.0.0", + "shardId": "na", + "stats": "acesEarned: 3, etc..." + }, + "relationships": { + "rosters": { + "data": [{ + "type": "roster", + "id": "ea77c2eb-d44e-11e6-8f77-0242ac130004" + }, { + "type": "roster", + "id": "dc2c14b4-d50c-11e6-bf26-cec0c932ce01" + }] + } + } + } + } + +.. toctree:: + :maxdepth: 2 diff --git a/source/players/players.rst b/source/players/players.rst new file mode 100644 index 0000000..a8df6ba --- /dev/null +++ b/source/players/players.rst @@ -0,0 +1,105 @@ +.. _players: + +Players +======= + +Player objects contain aggregated lifetime information about each Player. At this time Players are fairly sparse, but there are plans to add much richer data as it becomes available. + + + +Get a Single Player +-------------------- + +This endpoint retrieves a specific player. + +*Please Note: Changes Coming! - Player resources are not fully defined at this point, but are included so that consumers can get basic info (name, etc.) This object will have additional data added over the next few months, and may change slightly as data moves from the ``attributes.stats`` object to the main `attributes` object.* + +**HTTP Request** + +| ``GET https://api.dc01.gamelockerapp.com/shards/na/players/`` + + +**URL Parameters** + +| Parameter: ID +| Description: The ID of the player to retrieve + + +**Shell:** + +.. code-block:: shell + + curl "https://api.dc01.gamelockerapp.com/shards/na/players/" \ + -H "Authorization: Bearer " \ + -H "Accept: application/vnd.api+json" + + **The above command returns JSON structured like this:** + + {{ + "data": { + "attributes": { + "stats": { + "lossStreak": 1, + "winStreak": 0, + "lifetimeGold": 10536.0 + }, + "name": "boombastic04" + }, + "type": "player", + "id": "6abb30de-7cb8-11e4-8bd3-06eb725f8a76" + } + } + + +**Javascript:** + +.. code-block:: javascript + + //There are a variety of Java HTTP libraries that support query-parameters. + + **The above command returns JSON structured like this:** + + {{ + "data": { + "attributes": { + "stats": { + "lossStreak": 1, + "winStreak": 0, + "lifetimeGold": 10536.0 + }, + "name": "boombastic04" + }, + "type": "player", + "id": "6abb30de-7cb8-11e4-8bd3-06eb725f8a76" + } + } + + +Get a Collection of Players +--------------------------- + +This endpoint retrieves a collection of up to 6 players, filtered by name. Player names are specific to each region. If a player has changed names, it is possible that there are multiple ID's for a single player name. + +**HTTP Request** + +| ``GET https://api.dc01.gamelockerapp.com/shards/na/players`` + + +**Query Parameters** + +| Parameter: filter[playerNames] +| Default: None +| Description: Filters by player names. Usage: filter[playerNames]=player1,player2 + + +**Shell:** + +.. code-block:: shell + + curl "https://api.dc01.gamelockerapp.com/shards/na/players?filter[playerNames]=player1,player2" \ + -H "Authorization: Bearer " \ + -H "Accept: application/vnd.api+json" + } + +.. toctree:: + :maxdepth: 2 diff --git a/source/receivingresponses/receivingresponses.rst b/source/receivingresponses/receivingresponses.rst new file mode 100644 index 0000000..cf190a8 --- /dev/null +++ b/source/receivingresponses/receivingresponses.rst @@ -0,0 +1,76 @@ +.. _receivingresponses: + +Receiving Responses +==================== + +Payload +-------- + +All Server responses contain a root JSON object. + +A response will contain at least one of the following top-level members: + +* ``data`` : The response's “primary data” +* ``errors`` : An array of error objects + +A response may contain any of these top-level members: + +* ``links``: A links object related to the primary data. +* ``included``: An array of resource objects that are related to the primary data and/or each other (“included resources”). + +If a document does not contain a top-level data key, the included member will not be present either. + +Primary data will be either: + +* a single [resource object][resource objects], a single [resource identifier object], or ``null`` +* an array of [resource objects], an array of [resource identifier objects][resource identifier object], or an empty array ``([])`` + +For example, the following primary data is a single resource object. It's primary data is a single [resource identifier object] that references the same resource. A logical collection of resources will always be represented as an array, even if it only contains one item or is empty. + +**Javascript:** + +.. code-block:: javascript + + { + "data": { + "type": "match", + "id": "skarn", + "attributes": { + // ... this matches attributes + }, + "relationships": { + // ... this matches relationships + } + } + } + { + "data": { + "type": "match", + "id": "1" + } + } + + + +Rate Limits +--------------------------- + +Be nice. If you're sending too many requests too quickly, we'll send back a ``429`` error code (server unavailable). + +**Please note: Free for non-commercial use for up to 10 requests per minute! To increase your rate limit, log into your admin dashboard, find the app you would like a higher rate limit for, and click "request a higher rate limit"** + +**Shell:** + +.. code-block:: shell + + The rate limit headers are defined as follows: + + X-RateLimit-Limit - Request limit per day / per minute + X-RateLimit-Remaining - The number of requests left for the time window + X-RateLimit-Reset - The remaining window before the rate limit is refilled in UTC epoch nanoseconds. + + * Limit tokens are incrementally filled by 60(sec)/ rate limit. ex: 60(sec)/10(rate) gets rate token every 6 seconds up to max rate limit. + + +.. toctree:: + :maxdepth: 2 diff --git a/source/samples/samples.rst b/source/samples/samples.rst new file mode 100644 index 0000000..4187535 --- /dev/null +++ b/source/samples/samples.rst @@ -0,0 +1,90 @@ +.. _samples: + +Samples +======= + +The samples endpoint provides an easy way to access hourly batches of random match data to aggregate stats. + + +Get a Collection of Samples +--------------------------- + +This endpoint retrieves a collection of randomly selected matches. + +**HTTP Request** + +| ``GET https://api.dc01.gamelockerapp.com/shards/na/samples`` + +**Query Parameters** + + +=========================== ================ =================================================================================================================== +Parameter Default Description +=========================== ================ =================================================================================================================== +page[offset] 0 Allows paging over results +page[limit ] 50 The default (and current maximum) is 50.Values less than 50 and great than 2 are supported. +sort createdAt By default, Matches are sorted by creation time ascending. +filter[createdAt-start] none Must occur before end time. Format is iso8601 Usage: filter[createdAt-start]=2017-01-01T08:25:30Z +filter[createdAt-end] none Queries search the last 3 hrs. Format is iso8601 i.e.filter[createdAt-end]=2017-01-01T13:25:30Z +=========================== ================ =================================================================================================================== + +**Python:** + +.. code-block:: python + + curl "https://api.dc01.gamelockerapp.com/shards/na/samples" \ + -H "Authorization: Bearer " \ + -H "Accept: application/vnd.api+json" + + //The above command returns JSON structured like this: + + { + "type": "sample", + "id": "sample-na-2017-02-28T07:15:30Z", + "attributes": { + "URL": "URL of Sample Matches", + "createdAt": "2017-02-28T07:15:30Z", + "shardId": "na", + "t0": "2017-02-28T07:15:30Z", + "t1": "2017-02-28T08:15:30Z", + "titleId": "semc-vainglory" + }, + "relationships": { + "assets": { + "data": [] + } + } + } + +**Javascript:** + +.. code-block:: javascript + + //There are a variety of Java HTTP libraries that support query-parameters. + + curl "https://api.dc01.gamelockerapp.com/shards/na/samples" \ + -H "Authorization: Bearer " \ + -H "Accept: application/vnd.api+json" + + //The above command returns JSON structured like this: + + { + "type": "sample", + "id": "sample-na-2017-02-28T07:15:30Z", + "attributes": { + "URL": "URL of Sample Matches", + "createdAt": "2017-02-28T07:15:30Z", + "shardId": "na", + "t0": "2017-02-28T07:15:30Z", + "t1": "2017-02-28T08:15:30Z", + "titleId": "semc-vainglory" + }, + "relationships": { + "assets": { + "data": [] + } + } + } + +.. toctree:: + :maxdepth: 2 diff --git a/source/teams/teams.rst b/source/teams/teams.rst new file mode 100644 index 0000000..c0fa39d --- /dev/null +++ b/source/teams/teams.rst @@ -0,0 +1,127 @@ +.. _teams: + +Teams +===== + +Team objects contain aggregated lifetime information about each Team. + +Get a collection of Teams +--------------------------- + +This endpoint retrieves a collection of up to 6 teams. + +*Important - Team resources are not yet available in the API.* + +**HTTP Request** + +| ``GET https://api.dc01.gamelockerapp.com/teams`` + +**URL Parameters** + +================= ============== ============================================================= +Parameter Default Description +================= ============== ============================================================= +filter[teamNames] none Filters by team name. Usage: filter[teamNames]=team1 +filter[teamIds] none Filter by team id. Usage: filter[teamIds]=12345 +================= ============== ============================================================= + +**Shell:** + +.. code-block:: shell + + curl "https://api.dc01.gamelockerapp.com/shards/na/teams?filter[teamNames]=team1" \ + -H "Authorization: Bearer " \ + -H "Accept: application/vnd.api+json" + + + +Get a Single Team +--------------------------- + +This endpoint retrieves a specific team. + +**HTTP Request** + +| ``GET https://api.dc01.gamelockerapp.com/teams/`` + +**URL Parameters** + +| Parameter: ID +| Description: The ID of the team to retrieve + + +**Javascript:** + +.. code-block:: javascript + + curl "https://api.dc01.gamelockerapp.com/teams/" \ + -H "Authorization: Bearer " \ + -H "Accept: application/vnd.api+json" + + The above command returns JSON structured like this: + + { + "id": 2, + "name": "Max", + "breed": "unknown", + "fluffiness": 5, + "cuteness": 10 + } + + +Links (Coming Soon!) +--------------------------- + +This endpoint checks to see if a link object exists for a given code. + +**HTTP Request** + +| ``GET https://api.dc01.gamelockerapp.com/link`` + +**Javascript:** + +.. code-block:: javascript + + curl -XPOST "https://api.dc01.gamelockerapp.com/shards/na/link/{player_id}" \ + -H "Authorization: Bearer " \ + -H "Accept: application/vnd.api+json" + + + +Post a Link +--------------------------- + +This endpoint creates a PlayerLink object if the verification code matches the one provided by the game. + +**HTTP Request** + +| ``POST https://api.dc01.gamelockerapp.com/link/{player_id}`` + +**Javascript:** + +.. code-block:: javascript + + curl -XPOST "https://api.dc01.gamelockerapp.com/shards/na/link/{player_id}" \ + -H "Authorization: Bearer " \ + -H "Accept: application/vnd.api+json" + + +Player Link +---------------- + +**Javascript:** + +.. code-block:: javascript + + { + "attributes": { + "playerId": "fb374a7b-78be-4fcc-83ed-6a532a8a6f55", + "shardId": "na", + "titleId": "semc-vainglory" + }, + "id": "2454e5ac-0a69-4468-ad12-8616f066e817", + "type": "playerLink" + } + +.. toctree:: + :maxdepth: 2 diff --git a/source/telemetry/telemetry.rst b/source/telemetry/telemetry.rst new file mode 100644 index 0000000..e7bc4d6 --- /dev/null +++ b/source/telemetry/telemetry.rst @@ -0,0 +1,233 @@ +.. _telemetry: + +Telemetry +========= + +The telemtry provides us insights into the match. It gives us details of various events that happened in the match alongwith the time when they happened. Some of the events also have location which can be plotted on a Vainglory Game map. Telemetry is very useful to generate a timeline visualtions of how the match went for replays, or create heatmaps of where a certin hero or ability is most useful. These are just some of the exmaples of where Telemtry can be used. + + +To get Telemetry Data +--------------------------- + + +You start by pulling a list of matches using the matches endopoint. + +**HTTP Request** + +| ``GET https://api.dc01.gamelockerapp.com/shards/na/matches`` + +**Shell:** + +.. code-block:: shell + + curl "https://api.dc01.gamelockerapp.com/shards/na/matches" \ + -H "Authorization: Bearer " \ + -H "Accept: application/vnd.api+json" + + //The above command returns JSON structured like this: + + "data": [ + { + "type": "match", + "id": "f5373c40-0aa9-11e7-bcff-0667892d829e", + "attributes": { + "createdAt": "2017-03-17T00:38:00Z", + "duration": 259, + "gameMode": "blitz_pvp_ranked", + "patchVersion": "", + "shardId": "na", + "stats": { + "endGameReason": "victory", + "queue": "blitz_pvp_ranked" + }, + "titleId": "semc-vainglory" + }, + "relationships": { + "assets": { + "data": [ + { + "type": "asset", + "id": "b900c179-0aaa-11e7-bb12-0242ac110005" + } + ] + }, + "rosters": { + "data": [ + { + "type": "roster", + "id": "b8f6640a-0aaa-11e7-bb12-0242ac110005" + }, + { + "type": "roster", + "id": "b8f65271-0aaa-11e7-bb12-0242ac110005" + } + ] + }, + "rounds": { + "data": [] + } + } + }, + + //You need to look for Assets JSON node which points to telemetry. Check for the following in the response: + + "relationships": { + "assets": { + "data": [ + { + "type": "asset", + "id": "b900c179-0aaa-11e7-bb12-0242ac110005" + } + ] + }, + + //Once you have located this ID, you now have to search for the following JSON segment in the response object. The following response object will provide you a link to the Telemtry data + + { + "type": "asset", + "id": "b900c179-0aaa-11e7-bb12-0242ac110005", + "attributes": { + "URL": "https://gl-prod-us-east-1.s3.amazonaws.com/assets/semc-vainglory/na/2017/03/17/00/43/b900c179-0aaa-11e7-bb12-0242ac110005-telemetry.json", + "contentType": "application/json", + "createdAt": "2017-03-17T00:43:22Z", + "description": "", + "filename": "telemetry.json", + "name": "telemetry" + } + }, + + //You can download the data with following commands. Please note that you do not need API Key to get this data. + + curl "https://gl-prod-us-east-1.s3.amazonaws.com/assets/semc-vainglory/na/2017/03/17/00/43/b900c179-0aaa-11e7-bb12-0242ac110005-telemetry.json" \ + -H "Accept: application/vnd.api+json" + + //This request will return you a response as follows: + + { "time": "2017-02-18T06:37:15+0000", + "type": "DealDamage", + "payload": { + "Team": "Left", + "Actor": "*Ringo*", + "Target": "*Turret*", + "Source": "Unknown", + "Damage": 405, + "Delt": 613, + "IsHero": 1, + "TargetIsHero": 0 + } + } + +Event Data Dictionary +--------------------------- + +Telemetry data is classified into several event of interest. Following is a list of every event type with an example. + +**PlayerFirstSpawn:** + +At the start of the game when players spawn. + + +**Level Up:** + +When a player gains a level in the game. In game types Brawl, you will find 9 events at the exact same time. + + +**BuyItem:** + +When a player buys an item. + + +**SellItem:** + +When a player sells an item. ``json { "time": "2017-03-31T02:49:37+0000", "type": "SellItem", "payload": { "Team": "Left", "Actor": "*Lyra*", "Item": "Flare", "Cost": 15 } }`` + + +**LearnAbility:** + +When a player puts a point into one of the abilities. Please note there can be a time difference between when a player gains a level and learns an ability ``json { "time": "2017-03-17T00:38:52+0000", "type": "LearnAbility", "payload": { "Team": "Right", "Actor": "*Sayoc*", "Ability": "HERO_ABILITY_SAYOC_C", "Level": 1 } },`` + + +**UseAbility:** + +This event is recorded when a player uses an ability and it will hold information about the hero who used it together with the co-ordinates for the map. ``json { "time": "2017-03-17T00:39:08+0000", "type": "UseAbility", "payload": { "Team": "Right", "Actor": "*Kestrel*", "Ability": "HERO_ABILITY_KESTREL_A_NAME", "Position": [ 39.39, 0.01, 27.26 ] } },`` + + +**UseItemAbility:** + +This event is recorded when a player uses an activatable item or a charm/taunt. ``json { "time": "2017-03-31T03:10:17+0000", "type": "UseItemAbility", "payload": { "Team": "Left", "Actor": "*Lyra*", "Ability": "Travel Boots", "Position": [ -17.51, 0.01, 41.63 ], "TargetActor": "None", "TargetPosition": [ -17.51, 0.01, 41.63 ] } }`` + + +**EarnXP:** + +This event is recorded when a player gains XP from any source. it could be killing a minion, miner or a hero. ``json { "time": "2017-03-17T00:39:09+0000", "type": "EarnXP", "payload": { "Team": "Left", "Actor": "*Koshka*", "Source": "*JungleMinion_TreeEnt*", "Amount": 67, "Shared With": 1 } },`` + + +**DealDamage:** + +This event is recorded when any actor (player, turret, minion, etc.) deals damage to any other. ``json { "time": "2017-03-31T02:47:34+0000", "type": "DealDamage", "payload": { "Team": "Left", "Actor": "*Skaarf*", "Target": "*Vox*", "Source": "Unknown", "Damage": 105, "Delt": 80, "IsHero": 1, "TargetIsHero": 1 } }`` + + +**KillActor:** + +This event is recorded when a player kills anything in game. it could be a a minion, miner or a hero. You will generally see EarnXP and KillActor events come at the sme time. + + +**NPCkillNPC:** + +When one non-player actor kills another, such as the Kraken or a minion killing a turret. ``json { "time": "2017-03-31T03:07:21+0000", "type": "NPCkillNPC", "payload": { "Team": "Left", "Actor": "*Kraken_Captured*", "Killed": "*Turret*", "KilledTeam": "Right", "Gold": "300", "IsHero": 0, "TargetIsHero": 0, "Position": [ 54, 0, 2.92 ] } }`` + + +**GoldFromTowerKill:** + +When a player earns gold from the destruction of a turret belonging to the enemy team. ``json { "time": "2017-03-31T02:57:02+0000", "type": "GoldFromTowerKill", "payload": { "Team": "Left", "Actor": "*Idris*", "Amount": 300 } }`` + + +**GoldFromGoldMine:** + +When a player earns gold from his or her team capturing the gold miner. ``json { "time": "2017-03-31T03:00:43+0000", "type": "GoldFromGoldMine", "payload": { "Team": "Left", "Actor": "*Idris*", "Amount": 300 } }`` + + +**GoldFromKrakenKill:** + +When a player earns gold from his or her team killing a Kraken released by the enemy team. ``json { "time": "2017-03-31T03:07:43+0000", "type": "GoldFromKrakenKill", "payload": { "Team": "Right", "Actor": "*Kestrel*", "Amount": 500 } }`` + + + +**Javascript:** + +.. code-block:: Javascript + + { + "time": "2017-03-17T00:38:32+0000", + "type": "PlayerFirstSpawn", + "payload": { + "Team": "Right", + "Actor": "*Alpha*" + } + } + + { + "time": "2017-03-17T00:38:32+0000", + "type": "LevelUp", + "payload": { + "Team": "Right", + "Actor": "*Alpha*", + "Level": 1, + "LifetimeGold": 0 + } + } + + { + "time": "2017-03-17T00:38:45+0000", + "type": "BuyItem", + "payload": { + "Team": "Left", + "Actor": "*Vox*", + "Item": "Breaking Point", + "Cost": 2600 + } + } + + +.. toctree:: + :maxdepth: 2 diff --git a/source/titles/titles.rst b/source/titles/titles.rst new file mode 100644 index 0000000..ce79bd6 --- /dev/null +++ b/source/titles/titles.rst @@ -0,0 +1,9 @@ +.. _titles: + +Titles +====== + +The TitleID for a request is determined by the JWT in the Authorization header automatically and may appear in responses. No,this isn't a hint at more Super Evil game titles. The Vainglory Game Data Service uses a platform called Gamelocker which system itself can store multiple titles. + +.. toctree:: + :maxdepth: 2 -- cgit v1.3.1