| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,7 @@ There's no easier way to kick the tires than through [cURL][curl]. | |||
| 19 | 19 | ### Hello World | |
| 20 | 20 | ||
| 21 | 21 | Let's start by testing our setup. Open up a command prompt and enter the | |
| 22 | - following command (without the `$`): | ||
| 22 | + following command: | ||
| 23 | 23 | ||
| 24 | 24 | ``` command-line | |
| 25 | 25 | $ curl https://api.github.com/zen | |
@@ -101,9 +101,9 @@ The easiest way to authenticate with the GitHub API is by simply using your GitH | |||
| 101 | 101 | username and password via Basic Authentication. | |
| 102 | 102 | ||
| 103 | 103 | ``` command-line | |
| 104 | - $ curl -i -u <your_username> https://api.github.com/users/defunkt | ||
| 104 | + $ curl -i -u <em>your_username</em> https://api.github.com/users/defunkt | ||
| 105 | 105 | ||
| 106 | - > Enter host password for user '<your_username>': | ||
| 106 | + > Enter host password for user <em>your_username</em>: | ||
| 107 | 107 | ``` | |
| 108 | 108 | ||
| 109 | 109 | The `-u` flag sets the username, and cURL will prompt you for the password. You | |
@@ -121,9 +121,9 @@ If you have [two-factor authentication][2fa] enabled, the API will return a | |||
| 121 | 121 | `401 Unauthorized` error code for the above request (and every other API request): | |
| 122 | 122 | ||
| 123 | 123 | ``` command-line | |
| 124 | - $ curl -i -u <your_username> https://api.github.com/users/defunkt | ||
| 124 | + $ curl -i -u <em>your_username</em> https://api.github.com/users/defunkt | ||
| 125 | 125 | ||
| 126 | - > Enter host password for user '<your_username>': | ||
| 126 | + > Enter host password for user <em>your_username</em>: | ||
| 127 | 127 | ||
| 128 | 128 | > HTTP/1.1 401 Unauthorized | |
| 129 | 129 | > X-GitHub-OTP: required; :2fa-type | |
@@ -145,7 +145,7 @@ associated with your GitHub account. For example, try getting | |||
| 145 | 145 | [your own user profile][auth user api]: | |
| 146 | 146 | ||
| 147 | 147 | ``` command-line | |
| 148 | - $ curl -i -u <your_username> https://api.github.com/user | ||
| 148 | + $ curl -i -u <em>your_username</em> https://api.github.com/user | ||
| 149 | 149 | ||
| 150 | 150 | > { | |
| 151 | 151 | > ... | |
@@ -195,7 +195,7 @@ Also, the [**Authorizations API**][authorizations api] makes it simple to use Ba | |||
| 195 | 195 | to create an OAuth token. Try pasting and running the following command: | |
| 196 | 196 | ||
| 197 | 197 | ``` command-line | |
| 198 | - $ curl -i -u <your_username> -d '{"scopes": ["repo", "user"], "note": "getting-started"}' \ | ||
| 198 | + $ curl -i -u <em>your_username</em> -d '{"scopes": ["repo", "user"], "note": "getting-started"}' \ | ||
| 199 | 199 | $ https://api.github.com/authorizations | |
| 200 | 200 | ||
| 201 | 201 | > HTTP/1.1 201 Created | |
@@ -244,7 +244,7 @@ for the above request. You can get around that error by providing a 2FA OTP code | |||
| 244 | 244 | in the [X-GitHub-OTP request header][2fa header]: | |
| 245 | 245 | ||
| 246 | 246 | ``` command-line | |
| 247 | - $ curl -i -u <your_username> -H "X-GitHub-OTP: <your_2fa_OTP_code>" \ | ||
| 247 | + $ curl -i -u <em>your_username</em> -H "X-GitHub-OTP: <em>your_2fa_OTP_code</em>" \ | ||
| 248 | 248 | -d '{"scopes": ["repo", "user"], "note": "getting-started"}' \ | |
| 249 | 249 | https://api.github.com/authorizations | |
| 250 | 250 | ``` | |
@@ -404,8 +404,9 @@ $ curl -i https://api.github.com/repos/rails/rails/issues | |||
| 404 | 404 | ||
| 405 | 405 | > HTTP/1.1 200 OK | |
| 406 | 406 | ||
| 407 | - > Link: <https://api.github.com/repos/rails/rails/issues?page=2>; rel="next", | ||
| 408 | - > <https://api.github.com/repos/rails/rails/issues?page=14>; rel="last" | ||
| 407 | + > ... | ||
| 408 | + > Link: <https://api.github.com/repositories/8514/issues?page=2>; rel="next", <https://api.github.com/repositories/8514/issues?page=30>; rel="last" | ||
| 409 | + > ... | ||
| 409 | 410 | ``` | |
| 410 | 411 | ||
| 411 | 412 | The [`Link` header][link-header] provides a way for a response to link to | |
| Back | FazBrowse Home | New Git URL |
0 commit comments