diff --git a/IntegrationTest.py b/IntegrationTest.py index 4e7a28ae..7ccffe10 100644 --- a/IntegrationTest.py +++ b/IntegrationTest.py @@ -570,21 +570,20 @@ class IntegrationTest: r = self.g.get_user().get_repo( "PyGithub" ) print str( r.compare( "master", "develop" ) )[ :100 ] - # @todo Repository.get_languages - # def testRepositoryDetails( self ): - # r1 = self.g.get_user().get_repo( "PyGithub" ) - # r2 = self.g.get_user().get_repo( "TestPyGithub" ) - # self.printList( "Branches", r1.get_branches(), lambda b: b.name ) - # self.printList( "Comments", r2.get_comments(), lambda c: c.body ) - # r2.get_comment( r2.get_comments()[ 0 ].id ) - # self.printList( "Contributors", r1.get_contributors(), lambda m: m.login ) - # self.printList( "Forks", r2.get_forks(), lambda r: r.owner.login ) - # print "Languages:", r1.get_languages() - # self.printList( "Tags", r1.get_tags(), lambda t: t.name ) - # self.printList( "Watchers", r1.get_watchers(), lambda m: m.login ) + def testRepositoryDetails( self ): + r1 = self.g.get_user().get_repo( "PyGithub" ) + r2 = self.g.get_user().get_repo( "TestPyGithub" ) + self.printList( "Branches", r1.get_branches(), lambda b: b.name ) + self.printList( "Comments", r2.get_comments(), lambda c: c.body ) + r2.get_comment( r2.get_comments()[ 0 ].id ) + self.printList( "Contributors", r1.get_contributors(), lambda m: m.login ) + self.printList( "Forks", r2.get_forks(), lambda r: r.owner.login ) + print "Languages:", r1.get_languages() + self.printList( "Tags", r1.get_tags(), lambda t: t.name ) + self.printList( "Watchers", r1.get_watchers(), lambda m: m.login ) - # r3 = self.g.get_organization( "BeaverSoftware" ).get_repo( "TestPyGithub" ) - # self.printList( "Teams", r3.get_teams(), lambda t: t.name ) + r3 = self.g.get_organization( "BeaverSoftware" ).get_repo( "TestPyGithub" ) + self.printList( "Teams", r3.get_teams(), lambda t: t.name ) # @todo Custom url # def testRepositoryKeys( self ): diff --git a/JsonDescriptionOfGithubApiV3/description.000.human_readable.json b/JsonDescriptionOfGithubApiV3/description.000.human_readable.json index 65d2ef81..0018bfec 100644 --- a/JsonDescriptionOfGithubApiV3/description.000.human_readable.json +++ b/JsonDescriptionOfGithubApiV3/description.000.human_readable.json @@ -1534,7 +1534,14 @@ { "name": [ "get", "languages" ], "type": "@todo", - "group": "languages" + "group": "languages", + "request": { + "verb": "GET", + "url": [ + { "type": "attribute", "value": [ "url" ] }, + { "type": "constant", "value": "/languages" } + ] + } }, { "name": [ "compare" ], diff --git a/JsonDescriptionOfGithubApiV3/description.001.normalized.json b/JsonDescriptionOfGithubApiV3/description.001.normalized.json index ab1a64f7..3255f724 100644 --- a/JsonDescriptionOfGithubApiV3/description.001.normalized.json +++ b/JsonDescriptionOfGithubApiV3/description.001.normalized.json @@ -9465,6 +9465,21 @@ "languages" ], "mandatoryParameters": [], + "request": { + "url": [ + { + "type": "attribute", + "value": [ + "url" + ] + }, + { + "type": "constant", + "value": "/languages" + } + ], + "verb": "GET" + }, "isMutation": false, "optionalParameters": [], "type": { diff --git a/github/GithubObjects/Repository.py b/github/GithubObjects/Repository.py index 50f2aa65..4a95253e 100644 --- a/github/GithubObjects/Repository.py +++ b/github/GithubObjects/Repository.py @@ -716,7 +716,13 @@ class Repository( object ): ) def get_languages( self ): - pass + status, headers, data = self.__requester.request( + "GET", + str( self.url ) + "/languages", + None, + None + ) + return data def get_milestone( self, number ): status, headers, data = self.__requester.request(