34 lines
697 B
C#
34 lines
697 B
C#
|
|
|
|
|
|
namespace Discord.REST
|
|
{
|
|
public static class Routes
|
|
{
|
|
private static string Route(string path)
|
|
{
|
|
return $"https://discord.com/api/v10{path}";
|
|
}
|
|
|
|
public static string User(string id)
|
|
{
|
|
return Route($"/users/{id}");
|
|
}
|
|
|
|
internal static string Channel(string id)
|
|
{
|
|
return Route($"/channels/{id}");
|
|
}
|
|
|
|
internal static string Messages(string channelId)
|
|
{
|
|
return $"{Channel(channelId)}/messages";
|
|
}
|
|
|
|
internal static string Message(string channelId, string id)
|
|
{
|
|
return $"{Messages(channelId)}/{id}";
|
|
}
|
|
}
|
|
}
|