Make a couple utility functions public. Reviewed in http://codereview.appspot.com/6301053/.
diff --git a/apiclient/discovery.py b/apiclient/discovery.py
index 3d46758..c54b57f 100644
--- a/apiclient/discovery.py
+++ b/apiclient/discovery.py
@@ -19,7 +19,10 @@
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
__all__ = [
- 'build', 'build_from_document'
+ 'build',
+ 'build_from_document'
+ 'fix_method_name',
+ 'key2param'
]
import copy
@@ -73,7 +76,7 @@
'pass', 'print', 'raise', 'return', 'try', 'while' ]
-def _fix_method_name(name):
+def fix_method_name(name):
"""Fix method names to avoid reserved word conflicts.
Args:
@@ -349,7 +352,7 @@
describes the method.
rootDesc: object, the entire deserialized discovery document.
"""
- methodName = _fix_method_name(methodName)
+ methodName = fix_method_name(methodName)
pathUrl = methodDesc['path']
httpMethod = methodDesc['httpMethod']
methodId = methodDesc['id']
@@ -631,7 +634,7 @@
describes the method.
rootDesc: object, the entire deserialized discovery document.
"""
- methodName = _fix_method_name(methodName)
+ methodName = fix_method_name(methodName)
methodId = methodDesc['id'] + '.next'
def methodNext(self, previous_request, previous_response):
@@ -689,7 +692,7 @@
describes the method.
rootDesc: object, the entire deserialized discovery document.
"""
- methodName = _fix_method_name(methodName)
+ methodName = fix_method_name(methodName)
def methodResource(self):
return createResource(self._http, self._baseUrl, self._model,