Skip to content

Commit

Permalink
Add halo profile API, refs APIs-guru#343
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRalphson committed Nov 27, 2017
1 parent 093efbe commit 1bb4850
Show file tree
Hide file tree
Showing 2 changed files with 163 additions and 0 deletions.
156 changes: 156 additions & 0 deletions APIs/haloapi.com/profile/1.0/swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
swagger: '2.0'
schemes:
- https
host: www.haloapi.com
basePath: /profile
info:
contact:
x-twitter: halo
description: API that provides Profile information about Players.
title: Profile
version: '1.0'
x-apisguru-categories:
- entertainment
x-logo:
url: 'https://twitter.com/halo/profile_image?size=original'
x-origin:
- format: swagger
url: 'https://developer.haloapi.com/docs/services/58acdc2e21091812784ce8c2/export?DocumentFormat=Swagger'
version: '2.0'
x-providerName: haloapi.com
x-serviceName: profile
securityDefinitions:
apiKeyHeader:
in: header
name: Ocp-Apim-Subscription-Key
type: apiKey
apiKeyQuery:
in: query
name: subscription-key
type: apiKey
security:
- apiKeyHeader: []
- apiKeyQuery: []
paths:
'/h5/profiles/{player}/appearance':
get:
description: |
<p>This Endpoint retrieves appearance information for a player.</p>
<p>If the player is a member of a Company, the Company's ID and Name will be provided. Additional Company information is available via the Stats API.</p>
<br />
<h4>Changelog</h4>
<div class="panel-body">
<p><strong>July 14, 2017:</strong></p>
<ul>
<li>Added Endpoint.</li>
</ul>
</div>
operationId: Halo 5 - Player Appearance
parameters:
- description: The Player's Gamertag
in: path
name: player
required: true
type: string
produces:
- application/json
responses:
'200':
description: The response body will contain the Metadata for the Player-created Game Variant.
examples:
application/json:
Company:
Id: guid
Name: string
FirstModifiedUtc:
ISO8601Date: string
Gamertag: string
LastModifiedUtc:
ISO8601Date: string
ServiceTag: string
'404':
description: Specified Player was not found.
'500':
description: Internal Server Error.
'/h5/profiles/{player}/emblem':
get:
description: |
<p>This Endpoint returns an HTTP Redirect (302 Found) response to the caller with the URL of an image of the Player's Emblem. The initial request to this API that returns the HTTP Redirect is throttled and requires a Subscription Key. However, the image itself (at hostname "image.halocdn.com") is not throttled and does not require a Subscription Key. Note that if the Player later changes their Emblem, the image itself is not refreshed and will need to be refreshed via a new request to this API.</p>
<br />
<h4>Changelog</h4>
<div class="panel-body">
<p><strong>July 14, 2017:</strong></p>
<ul>
<li>Renamed Endpoint from "Halo 5 - Emblem Image" to "Halo 5 - Player Emblem Image".</li>
</ul>
<p><strong>February 21, 2017:</strong></p>
<ul>
<li>Renamed Endpoint from "Emblem Image" to "Halo 5 - Emblem Image".</li>
<li>Removed "{title}" Request Parameter.</li>
</ul>
</div>
operationId: Halo 5 - Player Emblem Image
parameters:
- description: The Player's Gamertag.
in: path
name: player
required: true
type: string
- description: 'An optional size (specified in pixels) of the image requested. When specified, this value must be one of the following values: 95, 128, 190, 256, 512. If a value is specified that is not in this list, the API returns HTTP 400 ("Bad Request"). If the size is empty or missing, the API will use 256.'
in: query
name: size
type: number
produces:
- image/png
responses:
'302':
description: Golden Path. The Location header should point at the corresponding Emblem image.
'400':
description: An unsupported value was provided for a query string parameter.
'404':
description: Specified Player was not found.
'500':
description: Internal Server Error.
'/h5/profiles/{player}/spartan':
get:
description: |
<p>This Endpoint returns an HTTP Redirect (302 Found) response to the caller with the URL of an image of the Player's Spartan's appearance. The initial request to this API that returns the HTTP Redirect is throttled and requires a Subscription Key. However, the image itself (at hostname "image.halocdn.com") is not throttled and does not require a Subscription Key. Note that if the Player later changes their Spartan's appearance, the image itself is not refreshed and will need to be refreshed via a new request to this API.</p>
<br />
<h4>Changelog</h4>
<div class="panel-body">
<p><strong>July 14, 2017:</strong></p>
<ul>
<li>Renamed Endpoint from "Halo 5 - Spartan Image" to "Halo 5 - Player Spartan Image".</li>
</ul>
<p><strong>February 21, 2017:</strong></p>
<ul>
<li>Renamed Endpoint from "Spartan Image" to "Halo 5 - Spartan Image".</li>
<li>Removed "{title}" Request Parameter.</li>
</ul>
</div>
operationId: Halo 5 - Player Spartan Image
parameters:
- description: The Player's Gamertag.
in: path
name: player
required: true
type: string
- description: 'An optional size (specified in pixels) of the image requested. When specified, this value must be one of the following values: 95, 128, 190, 256, 512. If a value is specified that is not in this list, the API returns HTTP 400 ("Bad Request"). If the size is empty or missing, the API will use 256.'
in: query
name: size
type: number
- description: 'An optional crop that will be used to determine what portion of the Spartan is returned in the image. The value must be either "full" or "portrait". If no value is specified "full" is used. If an unsupported value is provided, the API returns HTTP 400 ("Bad Request").'
in: query
name: crop
type: string
produces:
- image/png
responses:
'302':
description: Golden Path. The Location header should point at the corresponding Spartan image.
'400':
description: An unsupported value was provided for a query string parameter.
'404':
description: Specified Player was not found.
'500':
description: Internal Server Error.
7 changes: 7 additions & 0 deletions APIs/haloapi.com/profile/patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
info:
x-apisguru-categories:
- entertainment
contact:
x-twitter: halo
x-logo:
url: 'https://twitter.com/halo/profile_image?size=original'

0 comments on commit 1bb4850

Please sign in to comment.