@@ -33,14 +33,24 @@ cases you'll need to make very few changes to one of these
35Still, it's worth seeing one or two built from the ground up.
35Still, it's worth seeing one or two built from the ground up.
36−Here, we'll build a connector for the Github API v3. The
36+Here, we'll build a connector for the Github API v3. (It's already in `/sec/com/github.hoon` if you want to see it.)
37simplest way to interact with the Github API is to just fetch
39simplest way to interact with the Github API is to just fetch
38−https://api.github.com from the dojo:
40+https://api.github.com from the dojo. First, run this:
43+> |init-auth-basic /com/github
46+Input your Github username and password as directed. Next:
41~your-urbit:dojo> +https://api.github.com
49~your-urbit:dojo> +https://api.github.com
52+> Note: the current version of this API is outdated, so you'll get a 403 message at this point. We need to update this so you can follow along with the examples. We're sorry!
44Github exposes a few endpoints to the general web, and the root
54Github exposes a few endpoints to the general web, and the root
45endpoint is one of them. This gives you a textual representation
55endpoint is one of them. This gives you a textual representation
46of a JSON object that contains a bunch of urls to other parts of
56of a JSON object that contains a bunch of urls to other parts of
@@ -91,7 +101,7 @@ you're logged in as.
91You can similarly POST:
101You can similarly POST:
94−~your-urbit:dojo> +https://api.github.com/gists &json _(cork poja need) '{"files":{"file1.txt":{"content":"can\'t stop the signal"}}}'
104+~your-urbit:dojo> +https://api.github.com/gists &json _(cork de-json:html need) '{"files":{"file1.txt":{"content":"can\'t stop the signal"}}}'
97This creates a gist, go to `https://gist.github.com/<username>` to
107This creates a gist, go to `https://gist.github.com/<username>` to