Open drasticactions opened 11 months ago
Is this still worth pursuing? My current level of understanding of ATproto is that everything requires either the whole 3 part DID string or just the rkey (is rkey the official name for that last part?) Looking to contribute somewhere but just want to make sure it's useful.
https://github.com/drasticactions/FishyFlip/blob/main/src/FishyFlip/Models/ATUri.cs#L74-L87
https://github.com/drasticactions/FishyFlip/blob/main/src/FishyFlip/Models/ATUri.cs#L108-L120
I added a TryCreate and some helper properties for getting those values. I'm not sure if we need anything more specific beyond that now, but there could be more tests exercising the parsing code specifically to make sure it doesn't blow up when given a valid ATUri (or does blow up with a FormatException if given an invalid one). I should probably write some docs for how the tests work...
When using
ATDid
for ATProtocol Methods, it may not be obvious what each part of thedid
does and where it can go. For exampleGetRecords
takes anrkey
, which is the last element of thedid
URL. Having a parser or extending ATDid to allow getting each element and validating them could help expose these fields.