mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 08:13:10 +08:00
Implement GetSpotlightsRequest
This commit is contained in:
parent
f745d74666
commit
f65f030e79
13
osu.Game/Online/API/Requests/GetSpotlightsRequest.cs
Normal file
13
osu.Game/Online/API/Requests/GetSpotlightsRequest.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
|
|
||||||
|
namespace osu.Game.Online.API.Requests
|
||||||
|
{
|
||||||
|
public class GetSpotlightsRequest : APIRequest<List<APISpotlight>>
|
||||||
|
{
|
||||||
|
protected override string Target => "spotlights";
|
||||||
|
}
|
||||||
|
}
|
34
osu.Game/Online/API/Requests/Responses/APISpotlight.cs
Normal file
34
osu.Game/Online/API/Requests/Responses/APISpotlight.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace osu.Game.Online.API.Requests.Responses
|
||||||
|
{
|
||||||
|
public class APISpotlight
|
||||||
|
{
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public int Id;
|
||||||
|
|
||||||
|
[JsonProperty("name")]
|
||||||
|
public string Name;
|
||||||
|
|
||||||
|
[JsonProperty("type")]
|
||||||
|
public string Type;
|
||||||
|
|
||||||
|
[JsonProperty("mode_specific")]
|
||||||
|
public bool ModeSpecific;
|
||||||
|
|
||||||
|
[JsonProperty(@"start_date")]
|
||||||
|
public DateTimeOffset StartDate;
|
||||||
|
|
||||||
|
[JsonProperty(@"end_date")]
|
||||||
|
public DateTimeOffset EndDate;
|
||||||
|
|
||||||
|
[JsonProperty(@"participant_count")]
|
||||||
|
public int? ParticipiantCount;
|
||||||
|
|
||||||
|
public override string ToString() => Name;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user