Skip to content

Commit 0ad087d

Browse files
authored
Merge pull request #29 from gitFurious/dev
v1.6.0.0
2 parents 592e05e + 4a3d14e commit 0ad087d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3060
-94
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ A Nuget package is available at [www.nuget.org/packages/HaloSharp](https://www.n
5656

5757
### Changelog ###
5858

59+
###### v.1.6.0.0 (2016-09-03)
60+
61+
1. User Generated Content (UGC) Endpoints.
62+
* List Game Variants
63+
* Get Game Variant
64+
* List Map Variants
65+
* Get Map Variant
66+
5967
###### v.1.5.6.0 (2016-07-28)
6068

6169
1. Updated XpInfo model.

Source/HaloSharp.Test/Config.cs

+10
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,15 @@ public static class Config
6969

7070
public const string LeaderboardJsonPath = "JSON/Stats/leaderboard.json";
7171
public const string LeaderboardJsonSchemaPath = "JSON/Stats/leaderboard.schema.json";
72+
73+
public const string UserGeneratedContentGameVariantsJsonPath = "JSON/UserGeneratedContent/game-variants.json";
74+
public const string UserGeneratedContentGameVariantsJsonSchemaPath = "JSON/UserGeneratedContent/game-variants.schema.json";
75+
public const string UserGeneratedContentMapVariantsJsonPath = "JSON/UserGeneratedContent/map-variants.json";
76+
public const string UserGeneratedContentMapVariantsJsonSchemaPath = "JSON/UserGeneratedContent/map-variants.schema.json";
77+
78+
public const string UserGeneratedContentGameVariantJsonPath = "JSON/UserGeneratedContent/game-variant.json";
79+
public const string UserGeneratedContentGameVariantJsonSchemaPath = "JSON/UserGeneratedContent/game-variant.schema.json";
80+
public const string UserGeneratedContentMapVariantJsonPath = "JSON/UserGeneratedContent/map-variant.json";
81+
public const string UserGeneratedContentMapVariantJsonSchemaPath = "JSON/UserGeneratedContent/map-variant.schema.json";
7282
}
7383
}

Source/HaloSharp.Test/HaloSharp.Test.csproj

+35-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@
9292
<Compile Include="Query\Stats\Lifetime\GetCampaignServiceRecordTests.cs" />
9393
<Compile Include="Query\Stats\Lifetime\GetCustomServiceRecordTests.cs" />
9494
<Compile Include="Query\Stats\Lifetime\GetWarzoneServiceRecordTests.cs" />
95+
<Compile Include="Query\UserGeneratedContent\ListMapVariantsTests.cs" />
96+
<Compile Include="Query\UserGeneratedContent\ListGameVariantsTests.cs" />
97+
<Compile Include="Query\UserGeneratedContent\GetMapVariantTests.cs" />
98+
<Compile Include="Query\UserGeneratedContent\GetGameVariantTests.cs" />
9599
<Compile Include="Schema\SchemaTests.cs" />
96100
<Compile Include="Serialization\SerializationTests.cs" />
97101
<Compile Include="Utility\SchemaUtility.cs" />
@@ -103,6 +107,9 @@
103107
</ItemGroup>
104108
<ItemGroup>
105109
<None Include="app.config" />
110+
<None Include="JSON\Common\iso-8061.schema.json">
111+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
112+
</None>
106113
<None Include="JSON\Metadata\seasons.json">
107114
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
108115
</None>
@@ -286,7 +293,7 @@
286293
<None Include="JSON\Stats\CarnageReport\arena-match.schema.json">
287294
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
288295
</None>
289-
<None Include="JSON\Stats\Common\variant.schema.json">
296+
<None Include="JSON\Common\variant.schema.json">
290297
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
291298
</None>
292299
<None Include="JSON\Stats\Common\base-stat.schema.json">
@@ -346,6 +353,33 @@
346353
<None Include="JSON\Stats\matches.schema.json">
347354
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
348355
</None>
356+
<None Include="JSON\UserGeneratedContent\Common\stats.schema.json">
357+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
358+
</None>
359+
<None Include="JSON\UserGeneratedContent\game-variants.json">
360+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
361+
</None>
362+
<None Include="JSON\UserGeneratedContent\map-variants.json">
363+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
364+
</None>
365+
<None Include="JSON\UserGeneratedContent\map-variant.json">
366+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
367+
</None>
368+
<None Include="JSON\UserGeneratedContent\game-variant.json">
369+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
370+
</None>
371+
<None Include="JSON\UserGeneratedContent\game-variants.schema.json">
372+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
373+
</None>
374+
<None Include="JSON\UserGeneratedContent\map-variants.schema.json">
375+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
376+
</None>
377+
<None Include="JSON\UserGeneratedContent\map-variant.schema.json">
378+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
379+
</None>
380+
<None Include="JSON\UserGeneratedContent\game-variant.schema.json">
381+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
382+
</None>
349383
<None Include="packages.config" />
350384
</ItemGroup>
351385
<ItemGroup>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"type": "object",
3+
"additionalProperties": false,
4+
"properties": {
5+
"ISO8601Date": {
6+
"type": "string"
7+
}
8+
},
9+
"required": [
10+
"ISO8601Date"
11+
]
12+
}

Source/HaloSharp.Test/JSON/Stats/Common/variant.schema.json Source/HaloSharp.Test/JSON/Common/variant.schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"type": "integer"
1313
},
1414
"Owner": {
15-
"type": "string"
15+
"type": [ "string", "null" ]
1616
}
1717
},
1818
"required": [

Source/HaloSharp.Test/JSON/Stats/CarnageReport/arena-match.schema.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,10 @@
292292
"type": [ "string", "null" ]
293293
},
294294
"GameVariantResourceId": {
295-
"$ref": "../common/variant.schema.json"
295+
"$ref": "../../common/variant.schema.json"
296296
},
297297
"MapVariantResourceId": {
298-
"$ref": "../common/variant.schema.json"
298+
"$ref": "../../common/variant.schema.json"
299299
},
300300

301301
"PlayerStats": {

Source/HaloSharp.Test/JSON/Stats/CarnageReport/campaign-match.schema.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,10 @@
245245
"type": [ "string", "null" ]
246246
},
247247
"GameVariantResourceId": {
248-
"$ref": "../common/variant.schema.json"
248+
"$ref": "../../common/variant.schema.json"
249249
},
250250
"MapVariantResourceId": {
251-
"$ref": "../common/variant.schema.json"
251+
"$ref": "../../common/variant.schema.json"
252252
},
253253

254254
"PlayerStats": {

Source/HaloSharp.Test/JSON/Stats/CarnageReport/custom-match.schema.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,10 @@
247247
"type": [ "string", "null" ]
248248
},
249249
"GameVariantResourceId": {
250-
"$ref": "../common/variant.schema.json"
250+
"$ref": "../../common/variant.schema.json"
251251
},
252252
"MapVariantResourceId": {
253-
"$ref": "../common/variant.schema.json"
253+
"$ref": "../../common/variant.schema.json"
254254
},
255255

256256
"PlayerStats": {

Source/HaloSharp.Test/JSON/Stats/CarnageReport/warzone-match.schema.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,10 @@
304304
"type": [ "string", "null" ]
305305
},
306306
"GameVariantResourceId": {
307-
"$ref": "../common/variant.schema.json"
307+
"$ref": "../../common/variant.schema.json"
308308
},
309309
"MapVariantResourceId": {
310-
"$ref": "../common/variant.schema.json"
310+
"$ref": "../../common/variant.schema.json"
311311
},
312312
"ObjectivesCompleted": {
313313
"type": [ "integer", "null" ]

Source/HaloSharp.Test/JSON/Stats/matches.schema.json

+2-14
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,7 @@
4141
]
4242
},
4343
"MapVariant": {
44-
"$ref": "./common/variant.schema.json"
45-
},
46-
"MatchCompletedDate": {
47-
"type": "object",
48-
"additionalProperties": false,
49-
"properties": {
50-
"ISO8601Date": {
51-
"type": "string"
52-
}
53-
},
54-
"required": [
55-
"ISO8601Date"
56-
]
44+
"$ref": "../common/variant.schema.json"
5745
},
5846
"Player": {
5947
"type": "object",
@@ -140,7 +128,7 @@
140128
"type": "string"
141129
},
142130
"MatchCompletedDate": {
143-
"$ref": "#/definitions/MatchCompletedDate"
131+
"$ref": "../common/iso-8061.schema.json"
144132
},
145133
"Teams": {
146134
"type": "array",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"type": "object",
3+
"additionalProperties": false,
4+
"properties": {
5+
"BookmarkCount": {
6+
"type": "integer"
7+
},
8+
"HasCallerBookmarked": {
9+
"type": "boolean"
10+
}
11+
},
12+
"required": [
13+
"BookmarkCount",
14+
"HasCallerBookmarked"
15+
]
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"BaseGameEngineType": 1,
3+
"GameType": 1,
4+
"BaseGame": {
5+
"ResourceType": 8,
6+
"ResourceId": "67f7671d-7b81-489a-b9d5-3c652695f2ad",
7+
"OwnerType": 3,
8+
"Owner": null
9+
},
10+
"ScoreToWin": 0,
11+
"NumberOfLives": 0,
12+
"MatchDurationInSeconds": 0,
13+
"NumberOfRounds": 0,
14+
"Name": "Ducain23's Race Gametype",
15+
"Description": "Scubs",
16+
"AccessControl": 0,
17+
"Links": {},
18+
"CreationTimeUtc": {
19+
"ISO8601Date": "2016-04-06T00:00:00Z"
20+
},
21+
"LastModifiedTimeUtc": {
22+
"ISO8601Date": "2016-04-06T00:00:00Z"
23+
},
24+
"Banned": false,
25+
"Identity": {
26+
"ResourceType": 2,
27+
"ResourceId": "05c399ca-78cd-4dca-a0bd-c143f5ecb308",
28+
"OwnerType": 1,
29+
"Owner": "ducain23"
30+
},
31+
"Stats": {
32+
"BookmarkCount": 691,
33+
"HasCallerBookmarked": false
34+
}
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"type": "object",
4+
"properties": {
5+
"BaseGameEngineType": {
6+
"type": "integer"
7+
},
8+
"GameType": {
9+
"type": "integer"
10+
},
11+
"BaseGame": {
12+
"$ref": "../common/variant.schema.json"
13+
},
14+
"ScoreToWin": {
15+
"type": "integer"
16+
},
17+
"NumberOfLives": {
18+
"type": "integer"
19+
},
20+
"MatchDurationInSeconds": {
21+
"type": "integer"
22+
},
23+
"NumberOfRounds": {
24+
"type": "integer"
25+
},
26+
"Name": {
27+
"type": "string"
28+
},
29+
"Description": {
30+
"type": "string"
31+
},
32+
"AccessControl": {
33+
"type": "integer"
34+
},
35+
"Links": {
36+
"type": "object",
37+
"properties": {}
38+
},
39+
"CreationTimeUtc": {
40+
"$ref": "../common/iso-8061.schema.json"
41+
},
42+
"LastModifiedTimeUtc": {
43+
"$ref": "../common/iso-8061.schema.json"
44+
},
45+
"Banned": {
46+
"type": "boolean"
47+
},
48+
"Identity": {
49+
"$ref": "../common/variant.schema.json"
50+
},
51+
"Stats": {
52+
"$ref": "./common/stats.schema.json"
53+
}
54+
},
55+
"required": [
56+
"BaseGameEngineType",
57+
"GameType",
58+
"BaseGame",
59+
"ScoreToWin",
60+
"NumberOfLives",
61+
"MatchDurationInSeconds",
62+
"NumberOfRounds",
63+
"Name",
64+
"Description",
65+
"AccessControl",
66+
"Links",
67+
"CreationTimeUtc",
68+
"LastModifiedTimeUtc",
69+
"Banned",
70+
"Identity",
71+
"Stats"
72+
]
73+
}

0 commit comments

Comments
 (0)