@@ -29,15 +29,15 @@ models.
2929Still, it's worth seeing one or two built from the ground up.
3030Here, we'll build a connector for the Github API v3. The
3131simplest way to interact with the Github API is to just fetch
32−https://api.github.com.
32+https://api.github.com from the dojo:
3333
34− +https://api.github.com
34+ ~your-urbit:dojo> +https://api.github.com
3535
3636Github exposes a few endpoints to the general web, and the root
3737endpoint is one of them. This gives you a textual representation
3838of a JSON object that contains a bunch of urls to other parts of
3939Github's API. This is exactly the same response you would get
40−from just running `curl` on UNIX.
40+from just running `curl https://api.github.com` on UNIX.
4141
4242If we don't have a security driver for Github yet, many of the
4343endpoints won't be accessible, or they will only have publicly
@@ -70,7 +70,7 @@ To try this out, we first have to initialize our credentials with
7070`|init-auth-basic`, which prompts for the url of the service
7171(api.github.com), username, and password. It stores this
7272information in a manner that `%eyre` knows how to decode and send
73−put into your bale. Note that `|init-auth-basic` is standard for
73+put into your `bale`. Note that `|init-auth-basic` is standard for
7474basic auth, but other auth schemes (like OAuth) are initialized
7575in other ways.
7676
@@ -80,8 +80,7 @@ you're logged in as.
8080
8181You can similarly POST:
8282
83− +https://api.github.com/gists &json _(cork poja need)
84− '{"files":{"file1.txt":{"content":"can\'t stop the signal"}}}'
83+ ~your-urbit:dojo> +https://api.github.com/gists &json _(cork poja need) '{"files":{"file1.txt":{"content":"can\'t stop the signal"}}}'
8584
8685This creates a gist, go to `https://gist.github.com/<username>` to
8786see it.
@@ -93,22 +92,24 @@ can send data of any mark as long as it has a conversion path to
9392`%mime`.
9493
9594Let's take a look at the code and see if we can figure out what's
96−happening here.
95+happening here:
96+
97+ /+ basic-auth
9798
9899First, we load a library called `basic-auth`. This library
99100exposes two items. `keys` is the type of the basic auth key,
100101which is essentially a base64'd username and password.
101−`standard` accepts a bale and produces a core with everything
102+`standard` accepts a `bale` and produces a core with everything
102103we'll need to implement basic auth.
103104
104105Every security driver needs some amount of state, which is stored
105−in the bale. The bale contains:
106+in `bale`. `bale` contains:
106107
107108- `our`, our urbit name
108109- `now`, the current time
109110- `eny`, 256 bits of entropy
110−- `byk`, the urbit, desk, and case which the security driver is
111− running off
111+- `byk`, the urbit, desk and case which the security driver is
112+ running from
112113- `usr`, the particular identity we're logging in with
113114- `dom`, the site we're accessing
114115- `key`, the secrets required to authenticate requests. The type
@@ -130,7 +131,7 @@ one of:
130131 asking the user to visit the given url to continue the
131132 authentication process.
132133
133−Every request to a Github url will be filtered through
134+Every request to a GitHub url will be filtered through
134135`++filter-request`, and we want to add the authentication header
135136to it. Our `++aut` core contains a function
136137`++out-addding-header`, which does exactly what we want.
@@ -141,7 +142,7 @@ service url, username, and password, and it stores them next to
141142the driver. In our case, that's
142143`/=home=/sec/com/gitub/api/atom`. These keys are stored
143144encrypted, and you don't want to edit them directly. `%eyre`
144−loads them directly into your bale.
145+loads them directly into your `bale`.
145146
146147# OAuth2
147148