OLD | NEW |
(Empty) | |
| 1 # |
| 2 # Copyright 2015 Google Inc. |
| 3 # |
| 4 # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 # you may not use this file except in compliance with the License. |
| 6 # You may obtain a copy of the License at |
| 7 # |
| 8 # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 # |
| 10 # Unless required by applicable law or agreed to in writing, software |
| 11 # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 # See the License for the specific language governing permissions and |
| 14 # limitations under the License. |
| 15 |
| 16 """Modified generated client library for fusiontables version v1. |
| 17 |
| 18 This is a hand-customized and pruned version of the fusiontables v1 |
| 19 client, designed for use in testing. |
| 20 |
| 21 """ |
| 22 |
| 23 from apitools.base.py import base_api |
| 24 from apitools.base.py.testing.testclient import fusiontables_v1_messages |
| 25 |
| 26 |
| 27 class FusiontablesV1(base_api.BaseApiClient): |
| 28 |
| 29 """Generated client library for service fusiontables version v1.""" |
| 30 |
| 31 MESSAGES_MODULE = fusiontables_v1_messages |
| 32 |
| 33 _PACKAGE = u'fusiontables' |
| 34 _SCOPES = [u'https://www.googleapis.com/auth/fusiontables', |
| 35 u'https://www.googleapis.com/auth/fusiontables.readonly'] |
| 36 _VERSION = u'v1' |
| 37 _CLIENT_ID = '1042881264118.apps.googleusercontent.com' |
| 38 _CLIENT_SECRET = 'x_Tw5K8nnjoRAqULM9PFAC2b' |
| 39 _USER_AGENT = '' |
| 40 _CLIENT_CLASS_NAME = u'FusiontablesV1' |
| 41 _URL_VERSION = u'v1' |
| 42 |
| 43 def __init__(self, url='', credentials=None, |
| 44 get_credentials=True, http=None, model=None, |
| 45 log_request=False, log_response=False, |
| 46 credentials_args=None, default_global_params=None, |
| 47 additional_http_headers=None): |
| 48 """Create a new fusiontables handle.""" |
| 49 url = url or u'https://www.googleapis.com/fusiontables/v1/' |
| 50 super(FusiontablesV1, self).__init__( |
| 51 url, credentials=credentials, |
| 52 get_credentials=get_credentials, http=http, model=model, |
| 53 log_request=log_request, log_response=log_response, |
| 54 credentials_args=credentials_args, |
| 55 default_global_params=default_global_params, |
| 56 additional_http_headers=additional_http_headers) |
| 57 self.column = self.ColumnService(self) |
| 58 self.columnalternate = self.ColumnAlternateService(self) |
| 59 |
| 60 class ColumnService(base_api.BaseApiService): |
| 61 |
| 62 """Service class for the column resource.""" |
| 63 |
| 64 _NAME = u'column' |
| 65 |
| 66 def __init__(self, client): |
| 67 super(FusiontablesV1.ColumnService, self).__init__(client) |
| 68 self._method_configs = { |
| 69 'List': base_api.ApiMethodInfo( |
| 70 http_method=u'GET', |
| 71 method_id=u'fusiontables.column.list', |
| 72 ordered_params=[u'tableId'], |
| 73 path_params=[u'tableId'], |
| 74 query_params=[u'maxResults', u'pageToken'], |
| 75 relative_path=u'tables/{tableId}/columns', |
| 76 request_field='', |
| 77 request_type_name=u'FusiontablesColumnListRequest', |
| 78 response_type_name=u'ColumnList', |
| 79 supports_download=False, |
| 80 ), |
| 81 } |
| 82 |
| 83 self._upload_configs = { |
| 84 } |
| 85 |
| 86 def List(self, request, global_params=None): |
| 87 """Retrieves a list of columns. |
| 88 |
| 89 Args: |
| 90 request: (FusiontablesColumnListRequest) input message |
| 91 global_params: (StandardQueryParameters, default: None) global |
| 92 arguments |
| 93 Returns: |
| 94 (ColumnList) The response message. |
| 95 """ |
| 96 config = self.GetMethodConfig('List') |
| 97 return self._RunMethod( |
| 98 config, request, global_params=global_params) |
| 99 |
| 100 class ColumnAlternateService(base_api.BaseApiService): |
| 101 |
| 102 """Service class for the column resource.""" |
| 103 |
| 104 _NAME = u'columnalternate' |
| 105 |
| 106 def __init__(self, client): |
| 107 super(FusiontablesV1.ColumnAlternateService, self).__init__(client) |
| 108 self._method_configs = { |
| 109 'List': base_api.ApiMethodInfo( |
| 110 http_method=u'GET', |
| 111 method_id=u'fusiontables.column.listalternate', |
| 112 ordered_params=[u'tableId'], |
| 113 path_params=[u'tableId'], |
| 114 query_params=[u'maxResults', u'pageToken'], |
| 115 relative_path=u'tables/{tableId}/columns', |
| 116 request_field='', |
| 117 request_type_name=( |
| 118 u'FusiontablesColumnListAlternateRequest'), |
| 119 response_type_name=u'ColumnListAlternate', |
| 120 supports_download=False, |
| 121 ), |
| 122 } |
| 123 |
| 124 self._upload_configs = { |
| 125 } |
| 126 |
| 127 def List(self, request, global_params=None): |
| 128 """Retrieves a list of columns. |
| 129 |
| 130 Args: |
| 131 request: (FusiontablesColumnListRequest) input message |
| 132 global_params: (StandardQueryParameters, default: None) global |
| 133 arguments |
| 134 Returns: |
| 135 (ColumnList) The response message. |
| 136 """ |
| 137 config = self.GetMethodConfig('List') |
| 138 return self._RunMethod( |
| 139 config, request, global_params=global_params) |
OLD | NEW |