Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
75
fork

Configure Feed

Select the types of activity you want to include in your feed.

add blue.microcosm xrpc aliases

authored by

phil and committed by tangled.org 45f8dba8 ac6d48c1

+47 -1
+1 -1
slingshot/src/record.rs
··· 83 83 pub fn new(identity: Identity) -> Self { 84 84 let client = Client::builder() 85 85 .user_agent(format!( 86 - "microcosm slingshot v{} (dev: @bad-example.com)", 86 + "microcosm slingshot v{} (contact: @bad-example.com)", 87 87 env!("CARGO_PKG_VERSION") 88 88 )) 89 89 .no_proxy()
+46
slingshot/src/server.rs
··· 288 288 self.get_record_impl(repo, collection, rkey, cid).await 289 289 } 290 290 291 + /// blue.microcosm.repo.getRecordByUri 292 + /// 293 + /// alias of `com.bad-example.repo.getUriRecord` with intention to stabilize under this name 294 + #[oai( 295 + path = "/blue.microcosm.repo.getRecordByUri", 296 + method = "get", 297 + tag = "ApiTags::Custom" 298 + )] 299 + async fn get_record_by_uri( 300 + &self, 301 + /// The at-uri of the record 302 + /// 303 + /// The identifier can be a DID or an atproto handle, and the collection 304 + /// and rkey segments must be present. 305 + #[oai(example = "example_uri")] 306 + Query(at_uri): Query<String>, 307 + /// Optional: the CID of the version of the record. 308 + /// 309 + /// If not specified, then return the most recent version. 310 + /// 311 + /// > [!tip] 312 + /// > If specified and a newer version of the record exists, returns 404 not 313 + /// > found. That is: slingshot only retains the most recent version of a 314 + /// > record. 315 + Query(cid): Query<Option<String>>, 316 + ) -> GetRecordResponse { 317 + self.get_uri_record(Query(at_uri), Query(cid)).await 318 + } 319 + 291 320 /// com.bad-example.repo.getUriRecord 292 321 /// 293 322 /// Ergonomic complement to [`com.atproto.repo.getRecord`](https://docs.bsky.app/docs/api/com-atproto-repo-get-record) ··· 411 440 JustDidResponse::Ok(Json(FoundDidResponseObject { 412 441 did: alleged_did.to_string(), 413 442 })) 443 + } 444 + 445 + /// blue.microcosm.identity.resolveMiniDoc 446 + /// 447 + /// alias of `com.bad-example.identity.resolveMiniDoc` with intention to stabilize under this name 448 + #[oai( 449 + path = "/blue.microcosm.identity.resolveMiniDoc", 450 + method = "get", 451 + tag = "ApiTags::Custom" 452 + )] 453 + async fn resolve_mini_doc( 454 + &self, 455 + /// Handle or DID to resolve 456 + #[oai(example = "example_handle")] 457 + Query(identifier): Query<String>, 458 + ) -> ResolveMiniIDResponse { 459 + self.resolve_mini_id(Query(identifier)).await 414 460 } 415 461 416 462 /// com.bad-example.identity.resolveMiniDoc