You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
132 lines
6.4 KiB
132 lines
6.4 KiB
using System; |
|
using System.Collections.Generic; |
|
using System.Text; |
|
|
|
namespace MatrixDotNetLib |
|
{ |
|
public class MatrixApis |
|
{ |
|
public static Dictionary<string, string> Server = new Dictionary<string, string>() |
|
{ |
|
{ "discovery", "/.well-known/matrix/client" }, |
|
{ "versions", "/_matrix/client/versions" }, |
|
{ "capabilities", "/_matrix/client/r0/capabilities" }, |
|
{ "whois", "/_matrix/client/r0/admin/whois/{uid}" }, |
|
{ "search", "/_matrix/client/r0/search" }, |
|
{ "usersearch", "/_matrix/client/r0/user_directory/search" }, |
|
{ "roomlist", "/_matrix/client/r0/publicRooms" }, |
|
{ "managerooms", "/_matrix/client/r0/directory/list/appservice/{networkId}/{roomId}" }, |
|
{ "upgraderoom", "/_matrix/client/r0/rooms/{roomId}/upgrade" }, |
|
{ "openid", "/_matrix/client/r0/user/{userId}/openid/request_token" }, |
|
{ "voip", "/_matrix/client/r0/voip/turnServer" } |
|
}; |
|
|
|
public static Dictionary<string, string> Key = new Dictionary<string, string>() |
|
{ |
|
{ "latest", "/_matrix/client/r0/keys/changes" }, |
|
{ "claim", "/_matrix/client/r0/keys/claim" }, |
|
{ "download", "/_matrix/client/r0/keys/query" }, |
|
{ "upload", "/_matrix/client/r0/keys/upload" } |
|
}; |
|
|
|
public static Dictionary<string, string> Device = new Dictionary<string, string>() |
|
{ |
|
{ "manage", "/_matrix/client/r0/devices" }, |
|
{ "multidelete", "/_matrix/client/r0/delete_devices" }, |
|
{ "send", "/_matrix/client/r0/sendToDevice/{eventType}/{txnId}" } |
|
}; |
|
|
|
public static Dictionary<string, string> Media = new Dictionary<string, string>() |
|
{ |
|
{ "config", "/_matrix/media/r0/config" }, |
|
{ "save", "/_matrix/media/r0/download/{serverName}/{mediaId}" }, |
|
{ "saveas", "/_matrix/media/r0/download/{serverName}/{mediaId}/{fileName}" }, |
|
{ "preview", "/_matrix/media/r0/preview_url" }, |
|
{ "thumb", "/_matrix/media/r0/thumbnail/{serverName}/{mediaId}" }, |
|
{ "upload", "/_matrix/media/r0/upload" } |
|
}; |
|
|
|
public static Dictionary<string, string> Notifier = new Dictionary<string, string>() |
|
{ |
|
{ "notifiers", "/_matrix/client/r0/notifications" }, |
|
{ "pushers", "/_matrix/client/r0/pushers" }, |
|
{ "set", "/_matrix/client/r0/pushers/set" }, |
|
{ "rules", "/_matrix/client/r0/pushrules/" } |
|
}; |
|
|
|
public static Dictionary<string, string> NotifierRule = new Dictionary<string, string>() |
|
{ |
|
{ "manage", "/_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}" }, |
|
{ "actions", "/_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}/actions" }, |
|
{ "toggle", "/_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}/enabled" } |
|
}; |
|
|
|
public static Dictionary<string, string> User = new Dictionary<string, string>() |
|
{ |
|
{ "thirdparty", "/_matrix/client/r0/account/3pid" }, |
|
{ "deactivate", "/_matrix/client/r0/account/deactivate" }, |
|
{ "password", "/_matrix/client/r0/account/password" }, |
|
{ "register", "/_matrix/client/r0/register" }, |
|
{ "whoami", "/_matrix/client/r0/account/whoami" }, |
|
{ "profile", "/_matrix/client/r0/profile/{userId}" }, |
|
{ "avatar", "/_matrix/client/r0/profile/{userId}/avtatar_url" }, |
|
{ "displayname", "/_matrix/client/r0/profile/{userId}/displayname" }, |
|
{ "extrainfo", "/_matrix/client/r0/user/{userId}/account_data/{type}" }, |
|
{ "eventfilter", "/_matrix/client/r0/user/{userId}/filter" }, |
|
{ "rooms", "/_matrix/client/r0/joined_rooms" }, |
|
{ "login", "/_matrix/client/r0/login" }, |
|
{ "logout", "/_matrix/client/r0/logout" }, |
|
{ "status", "/_matrix/client/r0/presence/{userId}/status" } |
|
}; |
|
|
|
public static Dictionary<string, string> UserRoom = new Dictionary<string, string>() |
|
{ |
|
{ "extrainfo", "/_matrix/client/r0/user/{userId}/rooms/{roomId}/account_data/{type}" }, |
|
{ "tags", "/_matrix/client/r0/user/{userId}/rooms/{roomId}/tags" } |
|
}; |
|
|
|
public static Dictionary<string, string> Room = new Dictionary<string, string>() |
|
{ |
|
{ "create", "/_matrix/client/r0/createRoom" }, |
|
{ "aliases", "/_matrix/client/r0/rooms/{roomId}/aliases" }, |
|
{ "active", "/_matrix/client/r0/rooms/{roomId}/joined_members" }, |
|
{ "members", "/_matrix/client/r0/rooms/{roomId}/members" }, |
|
{ "messages", "/_matrix/client/r0/rooms/{roomId}/messages" }, |
|
{ "join", "/_matrix/client/r0/join/{roomIdOrAlias}" }, |
|
{ "ban", "/_matrix/client/r0/rooms/{roomId}/ban" }, |
|
{ "forget", "/_matrix/client/r0/rooms/{roomId}/forget" }, |
|
{ "invite", "/_matrix/client/r0/rooms/{roomId}/invite" }, |
|
{ "idjoin", "/_matrix/client/r0/rooms/{roomId}/join" }, |
|
{ "kick", "/_matrix/client/r0/rooms/{roomId}/kick" }, |
|
{ "leave", "/_matrix/client/r0/rooms/{roomId}/leave" }, |
|
{ "unban", "/_matrix/client/r0/rooms/{roomId}/unban" }, |
|
{ "marker", "/_matrix/client/r0/rooms/{roomId}/read_markers" } |
|
}; |
|
|
|
public static Dictionary<string, string> RoomEvent = new Dictionary<string, string>() |
|
{ |
|
{ "context", "/_matrix/client/r0/rooms/{roomId}/context/{eventId}" }, |
|
{ "event", "/_matrix/client/r0/rooms/{roomId}/event/{eventId}" }, |
|
{ "receipt", "/_matrix/client/r0/rooms/{roomId}/receipt/{receiptType}/{eventId}" }, |
|
{ "redact", "/_matrix/client/r0/rooms/{roomId}/redact/{eventId}/{txnId}" }, |
|
{ "send", "/_matrix/client/r0/rooms/{roomId}/send/{eventType}/{txnId}" }, |
|
{ "typing", "/_matrix/client/r0/rooms/{roomId}/typing/{userId}" }, |
|
{ "flag", "/_matrix/client/r0/rooms/{roomId}/report/{eventId}" } |
|
}; |
|
|
|
public static Dictionary<string, string> RoomState = new Dictionary<string, string>() |
|
{ |
|
{ "list", "/_matrix/client/r0/rooms/{roomId}/state" }, |
|
{ "state", "/_matrix/client/r0/rooms/{roomId}/state/{eventType}/{stateKey}" } |
|
}; |
|
} |
|
|
|
class HotDamn |
|
{ |
|
public void testfunc() |
|
{ |
|
// the avatar |
|
string Avatar = MatrixApis.User["avatar"]; |
|
} |
|
} |
|
}
|
|
|