11 changed files with 881 additions and 32 deletions
@ -0,0 +1,164 @@
|
||||
namespace MatrixDotNetLib |
||||
{ |
||||
public class MatrixApiEntities |
||||
{ |
||||
public string DeviceId { get; set; } |
||||
public string EventId { get; set; } |
||||
public string EventType { get; set; } |
||||
public string Filename { get; set; } |
||||
public string FilterId { get; set; } |
||||
public string Kind { get; set; } |
||||
public string MediaId { get; set; } |
||||
public string NetworkId { get; set; } |
||||
public string ReceiptType { get; set; } |
||||
public string RoomAlias { get; set; } |
||||
public string RoomId { get; set; } |
||||
public string RoomIdOrAlias { get; set; } |
||||
public string RuleId { get; set; } |
||||
public string Scope { get; set; } |
||||
public string ServerName { get; set; } |
||||
public string StateKey { get; set; } |
||||
public string Tags { get; set; } |
||||
public string TxnId { get; set; } |
||||
public string Type { get; set; } |
||||
public string UserId { get; set; } |
||||
} |
||||
|
||||
//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/{userId}" }, |
||||
// { "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/unstable/org.matrix.msc2432/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}" } |
||||
//}; |
||||
|
||||
//public Dictionary<string, string> Entities = new Dictionary<string, string>() |
||||
//{ |
||||
// { "deviceId", "" }, |
||||
// { "eventId", "" }, |
||||
// { "eventType", "" }, |
||||
// { "fileName", "" }, |
||||
// { "filterId", "" }, |
||||
// { "kind", "" }, |
||||
// { "mediaId", "" }, |
||||
// { "networkId", "" }, |
||||
// { "receiptType", "" }, |
||||
// { "roomAlias", "" }, |
||||
// { "roomId", "" }, |
||||
// { "roomIdOrAlias", "" }, |
||||
// { "ruleId", "" }, |
||||
// { "scope", "" }, |
||||
// { "serverName", "" }, |
||||
// { "stateKey", "" }, |
||||
// { "tags", "" }, |
||||
// { "txnId", "" }, |
||||
// { "type", "" }, |
||||
// { "userId", "" } |
||||
//}; |
||||
} |
@ -0,0 +1,191 @@
|
||||
[ |
||||
{ |
||||
"enabled": true, |
||||
"updateUrl": null, |
||||
"md5Url": null, |
||||
"url": null, |
||||
"originalMd5": null, |
||||
"installDate": 1591921634962, |
||||
"name": "matrix.org", |
||||
"sections": [ |
||||
{ |
||||
"code": ".description {\n margin-bottom: 15px;\n}\n\n.description > DIV {\n margin: 1em 0;\n margin-right: 10px;\n}\n\n.description > DIV > SPAN.propDesc {\n display: block;\n margin-top: .25em;\n margin-left: 1em;\n}\n\n.swagger-section .swagger-ui-wrap .content PRE {\n margin-top: 0px;\n}\n\nLI.resource.active > DIV > UL.options,\nINPUT.submit {\n display: none !important;\n}\n\nDIV.description[style] {\n display: block !important;\n}\n\n.signature-container {\n overflow: hidden;\n}\n\n.signature-container DIV.description {\n background: #aacc3333;\n padding: 1em;\n}\n\n.signature-container DIV.description {\n float: left;\n width: 48%;\n}\n\n.signature-container DIV.snippet {\n float: right;\n width: 48%;\n}\n\nTD[width=\"50%\"] .signature-container > DIV {\n width: 100%;\n}\n\n.fullwidth.parameters > THEAD > TR > TH:nth-child(5) {\n display: none;\n}\n\n.operation-params > TR > TD:nth-child(5) {\n float: left;\n clear: both;\n margin-top: 60px;\n margin-left: -740px;\n margin-bottom: 2em;\n width: 1025px;\n}\n\n.operation-params .body-textarea {\n display: none;\n}\n\n.response-content-type {\n clear: both;\n}\n\n.model-signature PRE {\n height: unset !important;\n}\n\n@media only screen and (max-width: 980px)\n{\n .operation-params > TR > TD:nth-child(5) {\n margin-left: -670px;\n width: 660px;\n }\n .signature-container DIV.description,\n .signature-container DIV.snippet {\n width: 47%;\n }\n .signature-container DIV.description {\n float: left;\n }\n\n .signature-container DIV.snippet {\n float: right;\n }\n}", |
||||
"urlPrefixes": [ |
||||
"https://matrix.org/docs/api" |
||||
] |
||||
} |
||||
], |
||||
"updateDate": 1591935819656, |
||||
"_id": "78c1d175-a540-4e3e-9939-829237f53a9b", |
||||
"_rev": 1591935819656, |
||||
"id": 4 |
||||
}, |
||||
{ |
||||
"enabled": false, |
||||
"updateUrl": null, |
||||
"md5Url": null, |
||||
"url": null, |
||||
"originalMd5": null, |
||||
"installDate": 1591933721024, |
||||
"name": "matrix.org (show most, hide nav)", |
||||
"sections": [ |
||||
{ |
||||
"code": "HEADER#main-header, DIV#message-bar {\n display: none;\n}\n\nDIV#page-container[style] {\n padding-top: 0px !important;\n}\n\n#document {\n margin-top: 0px;\n}\n\nDIV.content[style] {\n display: block !important;\n}", |
||||
"urlPrefixes": [ |
||||
"https://matrix.org/docs/api" |
||||
] |
||||
} |
||||
], |
||||
"updateDate": 1592011124949, |
||||
"_id": "48c11d9a-061f-4eca-8674-900156a6b187", |
||||
"_rev": 1592433818401, |
||||
"id": 5 |
||||
}, |
||||
{ |
||||
"enabled": false, |
||||
"updateUrl": null, |
||||
"md5Url": null, |
||||
"url": null, |
||||
"originalMd5": null, |
||||
"installDate": 1591936252379, |
||||
"name": "matrix.org (show all)", |
||||
"sections": [ |
||||
{ |
||||
"code": "UL.endpoints[style] {\n display: block !important;\n}", |
||||
"urlPrefixes": [ |
||||
"https://matrix.org/docs/api" |
||||
] |
||||
} |
||||
], |
||||
"updateDate": 1592011114678, |
||||
"_id": "8f05634d-071a-483f-99ae-48a58043a662", |
||||
"_rev": 1592433747949, |
||||
"id": 6 |
||||
}, |
||||
{ |
||||
"enabled": true, |
||||
"updateUrl": null, |
||||
"md5Url": null, |
||||
"url": null, |
||||
"originalMd5": null, |
||||
"installDate": 1592357694067, |
||||
"name": "matrix.org (show lists)", |
||||
"sections": [ |
||||
{ |
||||
"code": ".endpoints[style]\n{\n display: block !important;\n}", |
||||
"urlPrefixes": [ |
||||
"https://matrix.org/docs/api/" |
||||
] |
||||
} |
||||
], |
||||
"updateDate": 1592358199296, |
||||
"_id": "c4cc45dd-4c0f-42c3-b13b-190c81683518", |
||||
"_rev": 1592433745119, |
||||
"id": 7 |
||||
}, |
||||
{ |
||||
"enabled": false, |
||||
"updateUrl": null, |
||||
"md5Url": null, |
||||
"url": null, |
||||
"originalMd5": null, |
||||
"installDate": 1592357832873, |
||||
"name": "matrix.org (hide DELETE)", |
||||
"sections": [ |
||||
{ |
||||
"code": ".operations .delete.operation\n{\n display: none !important;\n}", |
||||
"urlPrefixes": [ |
||||
"https://matrix.org/docs/api/" |
||||
] |
||||
} |
||||
], |
||||
"updateDate": 1592357849841, |
||||
"_id": "0a76f07e-ca21-4d3e-8880-981941ec0756", |
||||
"_rev": 1592358183506, |
||||
"id": 8 |
||||
}, |
||||
{ |
||||
"enabled": false, |
||||
"updateUrl": null, |
||||
"md5Url": null, |
||||
"url": null, |
||||
"originalMd5": null, |
||||
"installDate": 1592357881387, |
||||
"name": "matrix.org (hide GET)", |
||||
"sections": [ |
||||
{ |
||||
"code": ".operations .get.operation\n{\n display: none !important;\n}", |
||||
"urlPrefixes": [ |
||||
"https://matrix.org/docs/api/" |
||||
] |
||||
} |
||||
], |
||||
"updateDate": 1592357901640, |
||||
"_id": "e5fea56f-376b-4f1a-b827-346d17e705e7", |
||||
"_rev": 1592358181378, |
||||
"id": 9 |
||||
}, |
||||
{ |
||||
"enabled": false, |
||||
"updateUrl": null, |
||||
"md5Url": null, |
||||
"url": null, |
||||
"originalMd5": null, |
||||
"installDate": 1592357963432, |
||||
"name": "matrix.org (hide POST)", |
||||
"sections": [ |
||||
{ |
||||
"code": ".operations .post.operation\n{\n display: none !important;\n}", |
||||
"urlPrefixes": [ |
||||
"https://matrix.org/docs/api/" |
||||
] |
||||
} |
||||
], |
||||
"updateDate": 1592357963432, |
||||
"_id": "620abd07-519e-4ac4-8367-e71a2f06d5fb", |
||||
"_rev": 1592358023907, |
||||
"id": 10 |
||||
}, |
||||
{ |
||||
"enabled": false, |
||||
"updateUrl": null, |
||||
"md5Url": null, |
||||
"url": null, |
||||
"originalMd5": null, |
||||
"installDate": 1592358008867, |
||||
"name": "matrix.org (hide PUT)", |
||||
"sections": [ |
||||
{ |
||||
"code": ".operations .put.operation\n{\n display: none !important;\n}", |
||||
"urlPrefixes": [ |
||||
"https://matrix.org/docs/api/" |
||||
] |
||||
} |
||||
], |
||||
"updateDate": 1592358008867, |
||||
"_id": "c453ff85-f36c-4e05-913c-27ba1f021ba2", |
||||
"_rev": 1592358179527, |
||||
"id": 11 |
||||
}, |
||||
{ |
||||
"enabled": true, |
||||
"updateUrl": null, |
||||
"md5Url": null, |
||||
"url": null, |
||||
"originalMd5": null, |
||||
"installDate": 1592433579958, |
||||
"name": "matrix.org (hide deprecated)", |
||||
"sections": [ |
||||
{ |
||||
"code": "#Room32participation_getEvents,\n#Room32participation_getOneEvent,\n#Room32participation_initialSync,\n#Room32participation_roomInitialSync\n{\n display: none !important;\n}", |
||||
"urlPrefixes": [ |
||||
"https://matrix.org/docs/api/" |
||||
] |
||||
} |
||||
], |
||||
"updateDate": 1592434969286, |
||||
"_id": "f1f1a6db-7ed8-4cdc-9e97-148860429acd", |
||||
"_rev": 1592434969286, |
||||
"id": 12 |
||||
} |
||||
] |
@ -1,3 +1,7 @@
|
||||
# MatrixDotNetLib |
||||
|
||||
A native .NET C# library for developing Matrix clients. |
||||
A native .NET C# library for developing Matrix clients. |
||||
|
||||
## Other Resources |
||||
|
||||
There's a JSON file in there you can import into Stylus, the non-spyware version of Stylish. This makes it a little easier to use the [Swagger API documentation](https://matrix.org/docs/api/client-server/). |
@ -0,0 +1,25 @@
|
||||
{ |
||||
// Use IntelliSense to learn about possible attributes. |
||||
// Hover to view descriptions of existing attributes. |
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 |
||||
"version": "0.2.0", |
||||
"configurations": [ |
||||
{ |
||||
"name": ".NET Core Launch (console)", |
||||
"type": "coreclr", |
||||
"request": "launch", |
||||
"preLaunchTask": "build", |
||||
"program": "${workspaceFolder}/ParseTest/bin/Debug/netcoreapp3.1/ParseTest.dll", |
||||
"args": [], |
||||
"cwd": "${workspaceFolder}/ParseTest", |
||||
"console": "internalConsole", |
||||
"stopAtEntry": false |
||||
}, |
||||
{ |
||||
"name": ".NET Core Attach", |
||||
"type": "coreclr", |
||||
"request": "attach", |
||||
"processId": "${command:pickProcess}" |
||||
} |
||||
] |
||||
} |
@ -0,0 +1,42 @@
|
||||
{ |
||||
"version": "2.0.0", |
||||
"tasks": [ |
||||
{ |
||||
"label": "build", |
||||
"command": "dotnet", |
||||
"type": "process", |
||||
"args": [ |
||||
"build", |
||||
"${workspaceFolder}/ParseTest/ParseTest.csproj", |
||||
"/property:GenerateFullPaths=true", |
||||
"/consoleloggerparameters:NoSummary" |
||||
], |
||||
"problemMatcher": "$msCompile" |
||||
}, |
||||
{ |
||||
"label": "publish", |
||||
"command": "dotnet", |
||||
"type": "process", |
||||
"args": [ |
||||
"publish", |
||||
"${workspaceFolder}/ParseTest/ParseTest.csproj", |
||||
"/property:GenerateFullPaths=true", |
||||
"/consoleloggerparameters:NoSummary" |
||||
], |
||||
"problemMatcher": "$msCompile" |
||||
}, |
||||
{ |
||||
"label": "watch", |
||||
"command": "dotnet", |
||||
"type": "process", |
||||
"args": [ |
||||
"watch", |
||||
"run", |
||||
"${workspaceFolder}/ParseTest/ParseTest.csproj", |
||||
"/property:GenerateFullPaths=true", |
||||
"/consoleloggerparameters:NoSummary" |
||||
], |
||||
"problemMatcher": "$msCompile" |
||||
} |
||||
] |
||||
} |
@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk"> |
||||
|
||||
<PropertyGroup> |
||||
<OutputType>Exe</OutputType> |
||||
<TargetFramework>netcoreapp3.1</TargetFramework> |
||||
</PropertyGroup> |
||||
|
||||
<ItemGroup> |
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> |
||||
</ItemGroup> |
||||
|
||||
</Project> |
diff.file_suppressed_line_too_long
diff.file_suppressed_line_too_long
Loading…
issues.context.reference_issue