this repo has no description
0
fork

Configure Feed

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

various text changes

+34 -12
+2
shared/challenges_markdown/one/part_one.md
··· 16 16 turn on developer mode for the more advance options. 17 17 - [various sdks](https://atproto.com/sdks) - atproto.com has a list of various sdks if you'd like to write the code to 18 18 solve these challenges. 19 + - [http ref](https://docs.bsky.app/docs/category/http-reference) - You can also make calls directly to the PDS via HTTP 20 + endpoints. You will find most SDks match the naming conventions of the endpoints listed in the http ref. 19 21 20 22 We are going to start simple. Everyone knows they have a handle, but `did` you know you also have a unique id called a 21 23 [did](https://atproto.com/specs/did)? This is a unique identifier for your identity that never changes. This comes in
+11 -1
shared/challenges_markdown/two/part_one.md
··· 17 17 } 18 18 ``` 19 19 20 + This is what makes up the public data on the atmosphere. All of your account's Bluesky 21 + posts, [tangled](https://tangled.org/) repos, 22 + [standard.site](https://standard.site/) docs, everything like that is stored publicly on your repo as an atproto record. 23 + 20 24 The records are stored in collections and have record keys. This is usually expressed by an at-uri like 21 25 `at://did:plc:rnpkyqnmsw4ipey6eotbdnnf/app.bsky.feed.like/3mhbs2cnrl22r`. 22 26 ··· 26 30 - `app.bsky.feed.like` is the collection 27 31 - `3mhbs2cnrl22r` is the record key 28 32 29 - Using what you learned from day 1 find the following record `{{at_uri}}` and enter the verification code 33 + You will also notice that the record has a `$type` field, `app.bsky.feed.like` for the above record. This is 34 + the [lexicon schema](https://atproto.com/specs/lexicon) for the record. There will be more on this later, but for now 35 + it's important to know it's a [NSID](https://atproto.com/guides/glossary#nsid-namespaced-id) of the atproto app and 36 + shows how the record should look. 37 + 38 + Using what you learned from day 1 about finding the users PDS and their repo, find the following record `{{at_uri}}` and 39 + enter the verification code 30 40 found in the record 31 41 for it below
+10
shared/challenges_markdown/two/part_two.md
··· 1 + Great! You now know where to find records, now it's time to learn how to write records. When writing atproto records you 2 + can use 3 methods for this: 3 + 4 + - [com.atproto.repo.createRecord](https://docs.bsky.app/docs/api/com-atproto-repo-create-record) Creates a new atproto 5 + record, errors if it has the same record key already in the collection 6 + - [com.atproto.repo.putRecord](https://docs.bsky.app/docs/api/com-atproto-repo-put-record) Updates an existing 7 + atproto record if a record exists with the same record key, if not creates a new record 8 + - [com.atproto.repo.applyWrites](https://docs.bsky.app/docs/api/com-atproto-repo-apply-writes) Batch endpoint for writes 9 + that allows you to create, update, or delete multiple records. 10 + 1 11 Great job beating Part 1! Now onto Part 2. 2 12 3 13 Keeping it simple proof of concept, blah, blah will have a real one here another time. Add a new field `partTwo` to the
+11 -11
shared/src/advent/challenges/day_two.rs
··· 33 33 true 34 34 } 35 35 36 + fn requires_manual_verification_part_two(&self) -> bool { 37 + true 38 + } 39 + 36 40 /// Create a record via the challenge agent and return the at_uri as additional context 37 41 async fn build_additional_context( 38 42 &self, ··· 112 116 )); 113 117 }; 114 118 115 - let expected_code = 116 - challenge 117 - .verification_code_one 118 - .ok_or(AdventError::ShouldNotHappen( 119 - "no verification code for day 2 challenge".to_string(), 120 - ))?; 119 + let expected_code = challenge 120 + .verification_code_one 121 + .ok_or(AdventError::ShouldNotHappen( 122 + "no verification code for day 2 challenge".to_string(), 123 + ))?; 121 124 122 125 Ok(if submitted_code == expected_code { 123 126 ChallengeCheckResponse::Correct 124 127 } else { 125 - ChallengeCheckResponse::Incorrect(format!( 126 - "The code {} is incorrect", 127 - submitted_code 128 - )) 128 + ChallengeCheckResponse::Incorrect(format!("The code {} is incorrect", submitted_code)) 129 129 }) 130 130 } 131 131 ··· 150 150 cid: None, 151 151 collection: advent::challenge::Day::NSID.parse().unwrap(), 152 152 repo: did.parse().unwrap(), 153 - rkey: "1".parse().unwrap(), 153 + rkey: "2".parse().unwrap(), 154 154 } 155 155 .into(), 156 156 )