Revert "Remove one argument of Requester.request"

We will need it soon for all url parameters not yet used

This reverts commit 9fa4e8ff5e.

Conflicts:

	codegen/templates/GithubObject.MethodBody.DoRequest.py
		src/github/Organization.py
This commit is contained in:
Vincent Jacques
2012-05-29 18:10:12 +02:00
parent 7daa81e226
commit eaa1bbe268
29 changed files with 237 additions and 14 deletions
@@ -1087,8 +1087,10 @@
{ "type": "argument", "value": [ "repo", "owner", "login" ] },
{ "type": "constant", "value": "/" },
{ "type": "argument", "value": [ "repo", "name" ] },
{ "type": "constant", "value": "/forks?org=" },
{ "type": "attribute", "value": [ "login" ] }
{ "type": "constant", "value": "/forks" }
],
"url_parameters": [
{ "name": "org", "value": [ { "type": "attribute", "value": [ "login" ] } ] }
],
"information": "status"
}
@@ -6340,17 +6340,24 @@
},
{
"type": "constant",
"value": "/forks?org="
},
"value": "/forks"
}
],
"url_parameters": [
{
"type": "attribute",
"name": "org",
"value": [
"login"
{
"type": "attribute",
"value": [
"login"
]
}
]
}
],
"information": "status",
"verb": "POST"
"verb": "POST",
"information": "status"
},
"isMutation": false,
"optionalParameters": [],
@@ -111,9 +111,22 @@
{% endif %}
{% endif %}
{% if method.request.url_parameters %}
url_parameters = {
{% for parameter in method.request.url_parameters %}
"{{ parameter.name }}": {% include "GithubObject.Concatenation.py" with concatenation=parameter.value only %},
{% endfor %}
}
{% endif %}
status, headers, data = self.__requester.request(
"{{ method.request.verb }}",
{% include "GithubObject.Concatenation.py" with concatenation=method.request.url only %},
{% if method.request.url_parameters %}
url_parameters,
{% else %}
None,
{% endif %}
{% if method.request.postParameters %}
post_parameters
{% else %}
+1
View File
@@ -59,6 +59,7 @@ class {{ class.name }}( object ):
status, headers, data = self.__requester.request(
"GET",
self.__url,
None,
None
)
self.__useAttributes( data )