From d4a6a3a344e642672fd3107943bf8899326e9ee1 Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Wed, 9 May 2012 18:19:13 +0200 Subject: [PATCH] Fix urls for git objects --- .../description.000.human_readable.json | 30 +++++++++++++++---- .../description.001.normalized.json | 22 +++++++------- github/GithubObjects/Repository.py | 20 ++++++------- 3 files changed, 46 insertions(+), 26 deletions(-) diff --git a/JsonDescriptionOfGithubApiV3/description.000.human_readable.json b/JsonDescriptionOfGithubApiV3/description.000.human_readable.json index ef391291..3cd91314 100644 --- a/JsonDescriptionOfGithubApiV3/description.000.human_readable.json +++ b/JsonDescriptionOfGithubApiV3/description.000.human_readable.json @@ -1301,7 +1301,11 @@ { "name": "content", "type": "@todo" }, { "name": "encoding", "type": "@todo" } ] - } + }, + "url": [ + { "type": "attribute", "value": [ "url" ] }, + { "type": "constant", "value": "/git/blobs" } + ] }, { "name": "git_commits", @@ -1320,7 +1324,11 @@ { "name": "author", "type": "@todo" }, { "name": "committer", "type": "@todo" } ] - } + }, + "url": [ + { "type": "attribute", "value": [ "url" ] }, + { "type": "constant", "value": "/git/commits" } + ] }, { "name": "git_refs", @@ -1335,7 +1343,11 @@ }, "getElement": { "parameter": { "name": "ref", "type": "@todo" } - } + }, + "url": [ + { "type": "attribute", "value": [ "url" ] }, + { "type": "constant", "value": "/git/refs" } + ] }, { "name": "git_tags", @@ -1354,7 +1366,11 @@ }, "getElement": { "parameter": { "name": "sha", "type": "@todo" } - } + }, + "url": [ + { "type": "attribute", "value": [ "url" ] }, + { "type": "constant", "value": "/git/tags" } + ] }, { "name": "git_trees", @@ -1373,7 +1389,11 @@ "optionalParameters": [ { "name": "recursive", "type": "bool" } ] - } + }, + "url": [ + { "type": "attribute", "value": [ "url" ] }, + { "type": "constant", "value": "/git/trees" } + ] }, { "name": "hooks", diff --git a/JsonDescriptionOfGithubApiV3/description.001.normalized.json b/JsonDescriptionOfGithubApiV3/description.001.normalized.json index 3d5ffe90..15bd91e5 100644 --- a/JsonDescriptionOfGithubApiV3/description.001.normalized.json +++ b/JsonDescriptionOfGithubApiV3/description.001.normalized.json @@ -7827,7 +7827,7 @@ }, { "type": "constant", - "value": "/git_blobs" + "value": "/git/blobs" } ], "information": "status", @@ -7868,7 +7868,7 @@ }, { "type": "constant", - "value": "/git_blobs" + "value": "/git/blobs" }, { "type": "constant", @@ -7934,7 +7934,7 @@ }, { "type": "constant", - "value": "/git_commits" + "value": "/git/commits" } ], "information": "status", @@ -7992,7 +7992,7 @@ }, { "type": "constant", - "value": "/git_commits" + "value": "/git/commits" }, { "type": "constant", @@ -8050,7 +8050,7 @@ }, { "type": "constant", - "value": "/git_refs" + "value": "/git/refs" } ], "information": "status", @@ -8091,7 +8091,7 @@ }, { "type": "constant", - "value": "/git_refs" + "value": "/git/refs" }, { "type": "constant", @@ -8132,7 +8132,7 @@ }, { "type": "constant", - "value": "/git_refs" + "value": "/git/refs" } ], "information": "data", @@ -8196,7 +8196,7 @@ }, { "type": "constant", - "value": "/git_tags" + "value": "/git/tags" } ], "information": "status", @@ -8246,7 +8246,7 @@ }, { "type": "constant", - "value": "/git_tags" + "value": "/git/tags" }, { "type": "constant", @@ -8296,7 +8296,7 @@ }, { "type": "constant", - "value": "/git_trees" + "value": "/git/trees" } ], "information": "status", @@ -8346,7 +8346,7 @@ }, { "type": "constant", - "value": "/git_trees" + "value": "/git/trees" }, { "type": "constant", diff --git a/github/GithubObjects/Repository.py b/github/GithubObjects/Repository.py index 3878dfe6..31dbde2d 100644 --- a/github/GithubObjects/Repository.py +++ b/github/GithubObjects/Repository.py @@ -229,7 +229,7 @@ class Repository( object ): } status, headers, data = self.__requester.request( "POST", - str( self.url ) + "/git_blobs", + str( self.url ) + "/git/blobs", None, post_parameters ) @@ -247,7 +247,7 @@ class Repository( object ): post_parameters[ "committer" ] = committer status, headers, data = self.__requester.request( "POST", - str( self.url ) + "/git_commits", + str( self.url ) + "/git/commits", None, post_parameters ) @@ -260,7 +260,7 @@ class Repository( object ): } status, headers, data = self.__requester.request( "POST", - str( self.url ) + "/git_refs", + str( self.url ) + "/git/refs", None, post_parameters ) @@ -277,7 +277,7 @@ class Repository( object ): post_parameters[ "tagger" ] = tagger status, headers, data = self.__requester.request( "POST", - str( self.url ) + "/git_tags", + str( self.url ) + "/git/tags", None, post_parameters ) @@ -291,7 +291,7 @@ class Repository( object ): post_parameters[ "base_tree" ] = base_tree status, headers, data = self.__requester.request( "POST", - str( self.url ) + "/git_trees", + str( self.url ) + "/git/trees", None, post_parameters ) @@ -544,7 +544,7 @@ class Repository( object ): def get_git_blob( self, sha ): status, headers, data = self.__requester.request( "GET", - str( self.url ) + "/git_blobs" + "/" + str( sha ), + str( self.url ) + "/git/blobs" + "/" + str( sha ), None, None ) @@ -553,7 +553,7 @@ class Repository( object ): def get_git_commit( self, sha ): status, headers, data = self.__requester.request( "GET", - str( self.url ) + "/git_commits" + "/" + str( sha ), + str( self.url ) + "/git/commits" + "/" + str( sha ), None, None ) @@ -562,7 +562,7 @@ class Repository( object ): def get_git_ref( self, ref ): status, headers, data = self.__requester.request( "GET", - str( self.url ) + "/git_refs" + "/" + str( ref ), + str( self.url ) + "/git/refs" + "/" + str( ref ), None, None ) @@ -571,7 +571,7 @@ class Repository( object ): def get_git_refs( self ): status, headers, data = self.__requester.request( "GET", - str( self.url ) + "/git_refs", + str( self.url ) + "/git/refs", None, None ) @@ -585,7 +585,7 @@ class Repository( object ): def get_git_tag( self, sha ): status, headers, data = self.__requester.request( "GET", - str( self.url ) + "/git_tags" + "/" + str( sha ), + str( self.url ) + "/git/tags" + "/" + str( sha ), None, None )