Highly ambitious ATProtocol AppView service and sdks
0
fork

Configure Feed

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

udpate docs with new apis

+48 -27
+38 -16
docs/api-reference.md
··· 23 23 24 24 ### Slice Management 25 25 26 - #### `network.slices.slice.listRecords` 26 + #### `network.slices.slice.getRecords` 27 27 28 - List all slices. 28 + Get all slices. 29 29 30 30 **Method**: GET 31 31 ··· 69 69 70 70 - `uri` (string, required): AT Protocol URI of the slice 71 71 72 - **Response**: Single record object (same structure as listRecords item) 72 + **Response**: Single record object (same structure as getRecords item) 73 73 74 74 #### `network.slices.slice.createRecord` 75 75 ··· 302 302 For each collection in your slice, the following endpoints are automatically 303 303 generated: 304 304 305 - ### `[collection].listRecords` 305 + ### `[collection].getRecords` 306 306 307 - List records in a collection. 307 + Get records in a collection. 308 308 309 309 **Method**: GET 310 310 ··· 328 328 - `slice` (string, required): Slice URI 329 329 - `uri` (string, required): Record URI 330 330 331 - ### `[collection].searchRecords` 331 + ### `[collection].countRecords` 332 332 333 - Search within a collection. 333 + Count records in a collection. 334 334 335 335 **Method**: GET 336 336 337 337 **Parameters**: 338 338 339 339 - `slice` (string, required): Slice URI 340 - - `query` (string, required): Search query 341 - - `field` (string, optional): Specific field to search 342 - - `limit` (number, optional): Maximum results 343 - - `cursor` (string, optional): Pagination cursor 344 - - `sort` (string, optional): Sort specification 340 + - `author` (string, optional): Filter by author DID 341 + - `authors` (string[], optional): Filter by multiple DIDs 342 + - Other filter parameters (no limit/cursor) 343 + 344 + **Response**: 345 + 346 + ```json 347 + { 348 + "count": 150 349 + } 350 + ``` 345 351 346 352 ### `[collection].createRecord` 347 353 ··· 403 409 404 410 ## Lexicon Management 405 411 406 - ### `network.slices.lexicon.listRecords` 412 + ### `network.slices.lexicon.getRecords` 407 413 408 - List lexicons in a slice. 414 + Get lexicons in a slice. 409 415 410 416 **Method**: GET 411 417 412 - **Parameters**: Same as collection.listRecords 418 + **Parameters**: Same as collection.getRecords 419 + 420 + ### `network.slices.lexicon.countRecords` 421 + 422 + Count lexicons in a slice. 423 + 424 + **Method**: GET 425 + 426 + **Parameters**: Same as collection.getRecords (except limit and cursor) 427 + 428 + **Response**: 429 + 430 + ```json 431 + { 432 + "count": 10 433 + } 434 + ``` 413 435 414 436 ### `network.slices.lexicon.createRecord` 415 437 ··· 528 550 ```javascript 529 551 let cursor = undefined; 530 552 do { 531 - const response = await fetch(`/xrpc/collection.listRecords?cursor=${cursor}`); 553 + const response = await fetch(`/xrpc/collection.getRecords?cursor=${cursor}`); 532 554 const data = await response.json(); 533 555 // Process records 534 556 cursor = data.cursor;
+3 -4
docs/concepts.md
··· 91 91 92 92 Both primary and external collections support the same operations: 93 93 94 - - `*.listRecords` - List with pagination and filtering 94 + - `*.getRecords` - Get records with pagination, filtering, and search 95 95 - `*.getRecord` - Get single record by URI 96 96 - `*.createRecord` - Create new record 97 97 - `*.updateRecord` - Update existing record 98 98 - `*.deleteRecord` - Remove record 99 - - `*.searchRecords` - Search within collection 99 + - `*.countRecords` - Count records with filtering 100 100 101 101 The key difference is conceptual: primary collections are "native" to your 102 102 slice's domain, while external collections are imported from other namespaces. ··· 254 254 const client = new AtProtoClient(apiUrl, sliceUri, oauthClient); 255 255 256 256 // Use nested structure matching lexicons 257 - await client.com.example.post.listRecords(); 258 - await client.network.slices.slice.stats(); 257 + await client.com.example.post.getRecords(); 259 258 await client.app.bsky.actor.profile.getRecord({ uri }); 260 259 ``` 261 260
+2 -2
docs/getting-started.md
··· 161 161 "at://did:plc:your-did/network.slices.slice/your-slice-id", 162 162 ); 163 163 164 - // List posts 165 - const posts = await client.com.example.post.listRecords(); 164 + // Get posts 165 + const posts = await client.com.example.post.getRecords(); 166 166 167 167 // Create a post 168 168 const newPost = await client.com.example.post.createRecord({
+5 -5
docs/sdk-usage.md
··· 8 8 project: 9 9 10 10 ```typescript 11 - import { AtProtoClient } from "./generated-client.ts"; 11 + import { AtProtoClient } from "./generated_client.ts"; 12 12 import { OAuthClient } from "@slices/oauth"; 13 13 ``` 14 14 ··· 19 19 ```typescript 20 20 const client = new AtProtoClient( 21 21 "https://api.your-domain.com", 22 - "at://did:plc:abc/network.slices.slice/your-slice-id", 22 + "at://did:plc:abc/network.slices.slice/your-slice-rkey", 23 23 ); 24 24 25 25 // Read operations work without auth ··· 37 37 clientSecret: "your-client-secret", 38 38 authBaseUrl: "https://aip.your-domain.com", 39 39 redirectUri: "https://your-app.com/oauth/callback", 40 - scopes: ["atproto:atproto", "atproto:transition:generic"], 40 + scopes: ["atproto", "transition:generic"], 41 41 }); 42 42 43 43 // Initialize API client with OAuth 44 44 const client = new AtProtoClient( 45 45 "https://api.your-domain.com", 46 - "at://did:plc:abc/network.slices.slice/your-slice-id", 46 + "at://did:plc:abc/network.slices.slice/your-slice-rekey", 47 47 oauthClient, 48 48 ); 49 49 ``` ··· 640 640 let cursor: string | undefined; 641 641 642 642 do { 643 - const batch = await client.com.example.post.listRecords({ 643 + const batch = await client.com.example.post.getRecords({ 644 644 limit: 100, 645 645 cursor, 646 646 });