feat(apiv2): stubs
This commit is contained in:
58
PluralKit.API/Controllers/v2/GuildControllerV2.cs
Normal file
58
PluralKit.API/Controllers/v2/GuildControllerV2.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
using PluralKit.Core;
|
||||
|
||||
namespace PluralKit.API
|
||||
{
|
||||
[ApiController]
|
||||
[ApiVersion("2.0")]
|
||||
[Route("v{version:apiVersion}")]
|
||||
public class GuildControllerV2: PKControllerBase
|
||||
{
|
||||
public GuildControllerV2(IServiceProvider svc) : base(svc) { }
|
||||
|
||||
|
||||
[HttpGet("systems/{system}/guilds/{guild_id}")]
|
||||
public async Task<IActionResult> SystemGuildGet(string system, ulong guild_id)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
[HttpPatch("systems/{system}/guilds/{guild_id}")]
|
||||
public async Task<IActionResult> SystemGuildPatch(string system, ulong guild_id, [FromBody] JObject data)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
[HttpGet("members/{member}/guilds/{guild_id}")]
|
||||
public async Task<IActionResult> MemberGuildGet(string member, ulong guild_id)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
[HttpPatch("members/{member}/guilds/{guild_id}")]
|
||||
public async Task<IActionResult> MemberGuildPatch(string member, ulong guild_id, [FromBody] JObject data)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
67
PluralKit.API/Controllers/v2/MemberControllerV2.cs
Normal file
67
PluralKit.API/Controllers/v2/MemberControllerV2.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
using PluralKit.Core;
|
||||
|
||||
namespace PluralKit.API
|
||||
{
|
||||
[ApiController]
|
||||
[ApiVersion("2.0")]
|
||||
[Route("v{version:apiVersion}")]
|
||||
public class MemberControllerV2: PKControllerBase
|
||||
{
|
||||
public MemberControllerV2(IServiceProvider svc) : base(svc) { }
|
||||
|
||||
|
||||
[HttpGet("systems/{system}/members")]
|
||||
public async Task<IActionResult> GetSystemMembers(string system)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
[HttpPost("members")]
|
||||
public async Task<IActionResult> MemberCreate([FromBody] JObject data)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
[HttpGet("members/{member}")]
|
||||
public async Task<IActionResult> MemberGet(string member)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
[HttpPatch("members/{member}")]
|
||||
public async Task<IActionResult> MemberPatch(string member, [FromBody] JObject data)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
[HttpDelete("members/{member}")]
|
||||
public async Task<IActionResult> MemberDelete(string member)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
40
PluralKit.API/Controllers/v2/MiscControllerV2.cs
Normal file
40
PluralKit.API/Controllers/v2/MiscControllerV2.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
using PluralKit.Core;
|
||||
|
||||
namespace PluralKit.API
|
||||
{
|
||||
[ApiController]
|
||||
[ApiVersion("2.0")]
|
||||
[Route("v{version:apiVersion}")]
|
||||
public class MetaControllerV2: PKControllerBase
|
||||
{
|
||||
public MetaControllerV2(IServiceProvider svc) : base(svc) { }
|
||||
|
||||
[HttpGet("meta")]
|
||||
public async Task<ActionResult<JObject>> Meta()
|
||||
{
|
||||
await using var conn = await _db.Obtain();
|
||||
var shards = await _repo.GetShards(conn);
|
||||
|
||||
var o = new JObject();
|
||||
o.Add("shards", shards.ToJSON());
|
||||
|
||||
return Ok(o);
|
||||
}
|
||||
|
||||
[HttpGet("messages/{message_id}")]
|
||||
public async Task<IActionResult> MessageGet(ulong message_id)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
77
PluralKit.API/Controllers/v2/SwitchControllerV2.cs
Normal file
77
PluralKit.API/Controllers/v2/SwitchControllerV2.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
using PluralKit.Core;
|
||||
|
||||
namespace PluralKit.API
|
||||
{
|
||||
[ApiController]
|
||||
[ApiVersion("2.0")]
|
||||
[Route("v{version:apiVersion}")]
|
||||
public class SwitchControllerV2: PKControllerBase
|
||||
{
|
||||
public SwitchControllerV2(IServiceProvider svc) : base(svc) { }
|
||||
|
||||
|
||||
[HttpGet("systems/{system}/switches")]
|
||||
public async Task<IActionResult> GetSystemSwitches(string system)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
[HttpGet("systems/{system}/fronters")]
|
||||
public async Task<IActionResult> GetSystemFronters(string system)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
[HttpPost("systems/{system}/switches")]
|
||||
public async Task<IActionResult> SwitchCreate(string system, [FromBody] JObject data)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("systems/{system}/switches/{switch_id}")]
|
||||
public async Task<IActionResult> SwitchGet(string system, string switch_id)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
[HttpPatch("systems/{system}/switches/{switch_id}")]
|
||||
public async Task<IActionResult> SwitchPatch(string system, [FromBody] JObject data)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
[HttpDelete("systems/{system}/switches/{switch_id}")]
|
||||
public async Task<IActionResult> SwitchDelete(string system, string switch_id)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
37
PluralKit.API/Controllers/v2/SystemControllerV2.cs
Normal file
37
PluralKit.API/Controllers/v2/SystemControllerV2.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
using PluralKit.Core;
|
||||
|
||||
namespace PluralKit.API
|
||||
{
|
||||
[ApiController]
|
||||
[ApiVersion("2.0")]
|
||||
[Route("v{version:apiVersion}/systems")]
|
||||
public class SystemControllerV2: PKControllerBase
|
||||
{
|
||||
public SystemControllerV2(IServiceProvider svc) : base(svc) { }
|
||||
|
||||
[HttpGet("{system}")]
|
||||
public async Task<IActionResult> SystemGet(string system)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
|
||||
[HttpPatch("{system}")]
|
||||
public async Task<IActionResult> SystemPatch(string system, [FromBody] JObject data)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user