Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

document the new branches/:branch endpoint #119

Merged
merged 1 commit into from almost 2 years ago

2 participants

Jake Douglas Wynn Netherland
Jake Douglas
Owner

/cc @pengwynn

Wynn Netherland pengwynn merged commit d7f834c into from June 26, 2012
Wynn Netherland pengwynn closed this June 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jun 25, 2012
Jake Douglas document the new branches/:branch endpoint 3164fd1
This page is out of date. Refresh to see the latest.
11  content/v3/repos.md
Source Rendered
@@ -222,7 +222,16 @@ in results.
222 222
 ### Response
223 223
 
224 224
 <%= headers 200 %>
225  
-<%= json(:branch) { |h| [h] }%>
  225
+<%= json(:branches) %>
  226
+
  227
+## Get Branch
  228
+
  229
+    GET /repos/:user/:repo/branches/:branch
  230
+
  231
+### Response
  232
+
  233
+<%= headers 200 %>
  234
+<%= json(:branch) %>
226 235
 
227 236
 ## Delete a Repository
228 237
 
61  lib/resources.rb
@@ -152,13 +152,62 @@ def json(key)
152 152
       "tarball_url" => "https://github.com/octocat/Hello-World/tarball/v0.1",
153 153
     }
154 154
 
155  
-    BRANCH = {
156  
-      "name"       => "master",
157  
-      "commit" => {
158  
-          "sha"   => "6dcb09b5b57875f334f61aebed695e2e4193db5e",
159  
-          "url"   => "https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc"
  155
+    BRANCHES = [
  156
+      {
  157
+        "name"   => "master",
  158
+        "commit" => {
  159
+          "sha" => "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  160
+          "url" => "https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc"
  161
+        }
160 162
       }
161  
-    }
  163
+    ]
  164
+
  165
+    BRANCH = {"name"=>"master",
  166
+ "commit"=>
  167
+  {"sha"=>"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d",
  168
+   "commit"=>
  169
+    {"author"=>
  170
+      {"name"=>"The Octocat",
  171
+       "date"=>"2012-03-06T15:06:50-08:00",
  172
+       "email"=>"octocat@nowhere.com"},
  173
+     "url"=>
  174
+      "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d",
  175
+     "message"=>
  176
+      "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.",
  177
+     "tree"=>
  178
+      {"sha"=>"b4eecafa9be2f2006ce1b709d6857b07069b4608",
  179
+       "url"=>
  180
+        "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608"},
  181
+     "committer"=>
  182
+      {"name"=>"The Octocat",
  183
+       "date"=>"2012-03-06T15:06:50-08:00",
  184
+       "email"=>"octocat@nowhere.com"}},
  185
+   "author"=>
  186
+    {"gravatar_id"=>"7ad39074b0584bc555d0417ae3e7d974",
  187
+     "avatar_url"=>
  188
+      "https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
  189
+     "url"=>"https://api.github.com/users/octocat",
  190
+     "id"=>583231,
  191
+     "login"=>"octocat"},
  192
+   "parents"=>
  193
+    [{"sha"=>"553c2077f0edc3d5dc5d17262f6aa498e69d6f8e",
  194
+      "url"=>
  195
+       "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e"},
  196
+     {"sha"=>"762941318ee16e59dabbacb1b4049eec22f0d303",
  197
+      "url"=>
  198
+       "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303"}],
  199
+   "url"=>
  200
+    "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d",
  201
+   "committer"=>
  202
+    {"gravatar_id"=>"7ad39074b0584bc555d0417ae3e7d974",
  203
+     "avatar_url"=>
  204
+      "https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
  205
+     "url"=>"https://api.github.com/users/octocat",
  206
+     "id"=>583231,
  207
+     "login"=>"octocat"}},
  208
+ "_links"=>
  209
+  {"html"=>"https://github.com/octocat/Hello-World/tree/master",
  210
+   "self"=>"https://api.github.com/repos/octocat/Hello-World/branches/master"}}
162 211
 
163 212
     PULL = {
164 213
       "url"        => "https://api.github.com/octocat/Hello-World/pulls/1",
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.