diff --git a/shared/challenges_markdown/two/part_two.md b/shared/challenges_markdown/two/part_two.md index 619cec7..0e0c220 100644 --- a/shared/challenges_markdown/two/part_two.md +++ b/shared/challenges_markdown/two/part_two.md @@ -1,14 +1,12 @@ -Great! You now know where to find records, now it's time to learn how to write records. When writing atproto records you -can use 3 methods for this: +Great! Now it's time to **write a record**. There are three different APIs on a PDS for writing: -- [com.atproto.repo.createRecord](https://docs.bsky.app/docs/api/com-atproto-repo-create-record) Creates a new atproto - record, errors if it has the same record key already in the collection -- [com.atproto.repo.putRecord](https://docs.bsky.app/docs/api/com-atproto-repo-put-record) Updates an existing - atproto record if a record exists with the same record key, if not creates a new record -- [com.atproto.repo.applyWrites](https://docs.bsky.app/docs/api/com-atproto-repo-apply-writes) Batch endpoint for writes - that allows you to create, update, or delete multiple records. +- [`com.atproto.repo.createRecord`](https://docs.bsky.app/docs/api/com-atproto-repo-create-record) Creates a new atproto record, errors if it has the same record key already in the collection -Like the previous record you found at `{{at_uri}}`, you will write your own `codes.advent.challenge.day` record in your +- [`com.atproto.repo.putRecord`](https://docs.bsky.app/docs/api/com-atproto-repo-put-record) Updates an existing atproto record if a record exists with the same record key, if not creates a new record ("upsert") + +- [`com.atproto.repo.applyWrites`](https://docs.bsky.app/docs/api/com-atproto-repo-apply-writes) Batch endpoint for writes that allows you to create, update, or delete multiple records atomically. + +For this challenge, you will write your a `codes.advent.challenge.day` record in your own repository at the record key `2` and set the property `partTwo` to `{{code}}`. The contents of the record would look about like this: