예제 #1
0
 def list(self,
          datasetId,
          projectId,
          prettyPrint=None,
          fields=None,
          quotaUser=None,
          oauth_token=None,
          key=None,
          userIp=None,
          alt=None,
          pageToken=None,
          maxResults=None):
     '''Lists all tables in the specified dataset.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables',
         'method': 'GET',
         'resultType': 'TableList',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'pageToken': pageToken,
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
             'maxResults': maxResults,
             'projectId': urlibQuoteEncode(projectId, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #2
0
 def delete(self,
            userId,
            id,
            prettyPrint=None,
            fields=None,
            quotaUser=None,
            oauth_token=None,
            key=None,
            userIp=None,
            alt=None):
     '''Immediately and permanently deletes the specified thread. This operation cannot be undone. Prefer threads.trash instead.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/gmail/v1/users/{userId}/threads/{id}',
         'method': 'DELETE',
         'resultType': 'empty',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #3
0
파일: gmail_.py 프로젝트: runt18/txGoogle
 def patch(self, userId, id, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, name=None, messagesTotal=None, messageListVisibility=None, messagesUnread=None, threadsTotal=None, labelListVisibility=None, threadsUnread=None, type=None, id_=None):
     '''Updates the specified label. This method supports patch semantics.'''
     queryParams = {
         'url': 'https://www.googleapis.com/gmail/v1/users/{userId}/labels/{id}',
         'method': 'PATCH',
         'resultType': 'Label',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {
             'name': name,
             'messagesTotal': messagesTotal,
             'type': type,
             'threadsUnread': threadsUnread,
             'threadsTotal': threadsTotal,
             'labelListVisibility': labelListVisibility,
             'messagesUnread': messagesUnread,
             'messageListVisibility': messageListVisibility,
             'id': id_,
         },
     }
     return self._request(queryParams)
예제 #4
0
 def delete(self,
            datasetId,
            projectId,
            prettyPrint=None,
            fields=None,
            quotaUser=None,
            oauth_token=None,
            key=None,
            userIp=None,
            alt=None,
            deleteContents=None):
     '''Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}',
         'method': 'DELETE',
         'resultType': 'empty',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'deleteContents': deleteContents,
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
             'projectId': urlibQuoteEncode(projectId, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #5
0
 def get(self,
         projectId,
         tableId,
         datasetId,
         prettyPrint=None,
         fields=None,
         quotaUser=None,
         oauth_token=None,
         key=None,
         userIp=None,
         alt=None):
     '''Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}',
         'method': 'GET',
         'resultType': 'Table',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'tableId': urlibQuoteEncode(tableId, safe=''),
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #6
0
 def delete(self,
            projectId,
            tableId,
            datasetId,
            prettyPrint=None,
            fields=None,
            quotaUser=None,
            oauth_token=None,
            key=None,
            userIp=None,
            alt=None):
     '''Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}',
         'method': 'DELETE',
         'resultType': 'empty',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'tableId': urlibQuoteEncode(tableId, safe=''),
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #7
0
 def get(self,
         projectId,
         jobId,
         prettyPrint=None,
         fields=None,
         quotaUser=None,
         oauth_token=None,
         key=None,
         userIp=None,
         alt=None):
     '''Retrieves the specified job by ID.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/bigquery/v2/projects/{projectId}/jobs/{jobId}',
         'method': 'GET',
         'resultType': 'Job',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'jobId': urlibQuoteEncode(jobId, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #8
0
 def get(self,
         userId,
         id,
         prettyPrint=None,
         fields=None,
         quotaUser=None,
         oauth_token=None,
         key=None,
         userIp=None,
         alt=None,
         format=None):
     '''Gets the specified draft.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/gmail/v1/users/{userId}/drafts/{id}',
         'method': 'GET',
         'resultType': 'Draft',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
             'format': format,
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #9
0
 def insert(self, projectId, datasetId, tableId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, expirationTime=None, description=None, friendlyName=None, schema_fields=None, query=None):
     '''Creates a new, empty table in the dataset.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables',
         'method': 'POST',
         'resultType': 'Table',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {
             'description': description,
             'friendlyName': friendlyName,
             'expirationTime': expirationTime,
             'schema': {
                 'fields': schema_fields,
             },
             'tableReference': {
                 'projectId': projectId,
                 'tableId': tableId,
                 'datasetId': datasetId,
             },
             'view': {
                 'query': query,
             },
         },
     }
     return self._request(queryParams)
예제 #10
0
 def list(self, project, metric, youngest, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, count=None, timespan=None, labels=None, pageToken=None, oldest=None, kind=None):
     '''List the descriptors of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.'''
     queryParams = {
         'url': 'https://www.googleapis.com/cloudmonitoring/v2beta1/projects/{project}/timeseriesDescriptors/{metric}',
         'method': 'GET',
         'resultType': 'ListTimeseriesDescriptorsResponse',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'count': count,
             'project': urlibQuoteEncode(project, safe=''),
             'timespan': timespan,
             'metric': urlibQuoteEncode(metric, safe=''),
             'labels': labels,
             'youngest': youngest,
             'pageToken': pageToken,
             'oldest': oldest,
         },
         'httpBodyParams': {
             'kind': kind,
         },
     }
     return self._request(queryParams)
예제 #11
0
 def modify(self,
            userId,
            id,
            prettyPrint=None,
            fields=None,
            quotaUser=None,
            oauth_token=None,
            key=None,
            userIp=None,
            alt=None,
            addLabelIds=None,
            removeLabelIds=None):
     '''Modifies the labels applied to the thread. This applies to all messages in the thread.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/gmail/v1/users/{userId}/threads/{id}/modify',
         'method': 'POST',
         'resultType': 'Thread',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {
             'removeLabelIds': removeLabelIds,
             'addLabelIds': addLabelIds,
         },
     }
     return self._request(queryParams)
예제 #12
0
 def delete(self,
            userId,
            id,
            prettyPrint=None,
            fields=None,
            quotaUser=None,
            oauth_token=None,
            key=None,
            userIp=None,
            alt=None):
     '''Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/gmail/v1/users/{userId}/labels/{id}',
         'method': 'DELETE',
         'resultType': 'empty',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #13
0
 def trash(self,
           userId,
           id,
           prettyPrint=None,
           fields=None,
           quotaUser=None,
           oauth_token=None,
           key=None,
           userIp=None,
           alt=None):
     '''Moves the specified thread to the trash.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/gmail/v1/users/{userId}/threads/{id}/trash',
         'method': 'POST',
         'resultType': 'Thread',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #14
0
 def list(self, projectId, tableId, datasetId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, maxResults=None, pageToken=None, startIndex=None):
     '''Retrieves table data from a specified set of rows.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data',
         'method': 'GET',
         'resultType': 'TableDataList',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'maxResults': maxResults,
             'pageToken': pageToken,
             'startIndex': startIndex,
             'tableId': urlibQuoteEncode(tableId, safe=''),
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #15
0
 def patch(self, projectId, datasetId, datasetId_, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, description=None, projectId_=None, access=None, friendlyName=None):
     '''Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports patch semantics.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}',
         'method': 'PATCH',
         'resultType': 'Dataset',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {
             'access': access,
             'friendlyName': friendlyName,
             'description': description,
             'datasetReference': {
                 'projectId': projectId_,
                 'datasetId': datasetId_,
             },
         },
     }
     return self._request(queryParams)
예제 #16
0
 def getQueryResults(self, projectId, jobId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, timeoutMs=None, maxResults=None, pageToken=None, startIndex=None):
     '''Retrieves the results of a query job.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/queries/{jobId}',
         'method': 'GET',
         'resultType': 'GetQueryResultsResponse',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'timeoutMs': timeoutMs,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'maxResults': maxResults,
             'jobId': urlibQuoteEncode(jobId, safe=''),
             'pageToken': pageToken,
             'startIndex': startIndex,
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #17
0
 def patch(self,
           projectId,
           tableId,
           datasetId,
           projectId_,
           tableId_,
           datasetId_,
           prettyPrint=None,
           fields=None,
           quotaUser=None,
           oauth_token=None,
           key=None,
           userIp=None,
           alt=None,
           expirationTime=None,
           description=None,
           friendlyName=None,
           schema_fields=None,
           query=None):
     '''Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}',
         'method': 'PATCH',
         'resultType': 'Table',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'tableId': urlibQuoteEncode(tableId, safe=''),
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {
             'description': description,
             'friendlyName': friendlyName,
             'expirationTime': expirationTime,
             'schema': {
                 'fields': schema_fields,
             },
             'tableReference': {
                 'projectId': projectId_,
                 'tableId': tableId_,
                 'datasetId': datasetId_,
             },
             'view': {
                 'query': query,
             },
         },
     }
     return self._request(queryParams)
예제 #18
0
 def insert(self,
            projectId,
            datasetId,
            tableId,
            prettyPrint=None,
            fields=None,
            quotaUser=None,
            oauth_token=None,
            key=None,
            userIp=None,
            alt=None,
            expirationTime=None,
            description=None,
            friendlyName=None,
            schema_fields=None,
            query=None):
     '''Creates a new, empty table in the dataset.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables',
         'method': 'POST',
         'resultType': 'Table',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {
             'description': description,
             'friendlyName': friendlyName,
             'expirationTime': expirationTime,
             'schema': {
                 'fields': schema_fields,
             },
             'tableReference': {
                 'projectId': projectId,
                 'tableId': tableId,
                 'datasetId': datasetId,
             },
             'view': {
                 'query': query,
             },
         },
     }
     return self._request(queryParams)
예제 #19
0
 def patch(self,
           userId,
           id,
           prettyPrint=None,
           fields=None,
           quotaUser=None,
           oauth_token=None,
           key=None,
           userIp=None,
           alt=None,
           name=None,
           messagesTotal=None,
           messageListVisibility=None,
           messagesUnread=None,
           threadsTotal=None,
           labelListVisibility=None,
           threadsUnread=None,
           type=None,
           id_=None):
     '''Updates the specified label. This method supports patch semantics.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/gmail/v1/users/{userId}/labels/{id}',
         'method': 'PATCH',
         'resultType': 'Label',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {
             'name': name,
             'messagesTotal': messagesTotal,
             'type': type,
             'threadsUnread': threadsUnread,
             'threadsTotal': threadsTotal,
             'labelListVisibility': labelListVisibility,
             'messagesUnread': messagesUnread,
             'messageListVisibility': messageListVisibility,
             'id': id_,
         },
     }
     return self._request(queryParams)
예제 #20
0
 def delete(self,
            subscription,
            prettyPrint=None,
            fields=None,
            quotaUser=None,
            oauth_token=None,
            key=None,
            userIp=None,
            alt=None):
     '''Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/pubsub/v1beta1/subscriptions/{+subscription}',
         'method': 'DELETE',
         'resultType': 'empty',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'subscription': urlibQuoteEncode(subscription, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #21
0
 def get(self,
         subscription,
         prettyPrint=None,
         fields=None,
         quotaUser=None,
         oauth_token=None,
         key=None,
         userIp=None,
         alt=None):
     '''Gets the configuration details of a subscription.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/pubsub/v1beta1/subscriptions/{+subscription}',
         'method': 'GET',
         'resultType': 'Subscription',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'subscription': urlibQuoteEncode(subscription, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #22
0
 def insert(self, projectId, datasetId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, description=None, projectId_=None, access=None, friendlyName=None):
     '''Creates a new empty dataset.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets',
         'method': 'POST',
         'resultType': 'Dataset',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
         },
         'httpBodyParams': {
             'access': access,
             'friendlyName': friendlyName,
             'description': description,
             'datasetReference': {
                 'projectId': projectId_,
                 'datasetId': datasetId,
             },
         },
     }
     return self._request(queryParams)
예제 #23
0
파일: bigQuery.py 프로젝트: runt18/txGoogle
 def insert(self, projectId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, load=None, dryRun=None, link=None, copy=None, extract=None, jobId=None):
     '''Starts a new asynchronous job.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/jobs',
         'method': 'POST',
         'resultType': 'Job',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
         },
         'httpBodyParams': {
             'configuration': {
                 'load': load,
                 'dryRun': dryRun,
                 'link': link,
                 'copy': copy,
                 'extract': extract,
             }
         },
     }
     return self._request(queryParams)
예제 #24
0
 def delete(self,
            topic,
            prettyPrint=None,
            fields=None,
            quotaUser=None,
            oauth_token=None,
            key=None,
            userIp=None,
            alt=None):
     '''Deletes the topic with the given name. All subscriptions to this topic are also deleted. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name.'''
     queryParams = {
         'url': 'https://www.googleapis.com/pubsub/v1beta1/topics/{+topic}',
         'method': 'DELETE',
         'resultType': 'empty',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'topic': urlibQuoteEncode(topic, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #25
0
 def lookup(self, datasetId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, keys=None, transaction=None, readConsistency=None):
     '''Look up some entities by key.'''
     queryParams = {
         'url': 'https://www.googleapis.com/datastore/v1beta2/datasets/{datasetId}/lookup',
         'method': 'POST',
         'resultType': 'LookupResponse',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {
             'keys': keys,
             'readOptions': {
                 'transaction': transaction,
                 'readConsistency': readConsistency,
             },
         },
     }
     return self._request(queryParams)
예제 #26
0
 def get(self,
         topic,
         prettyPrint=None,
         fields=None,
         quotaUser=None,
         oauth_token=None,
         key=None,
         userIp=None,
         alt=None):
     '''Gets the configuration of a topic. Since the topic only has the name attribute, this method is only useful to check the existence of a topic. If other attributes are added in the future, they will be returned here.'''
     queryParams = {
         'url': 'https://www.googleapis.com/pubsub/v1beta1/topics/{+topic}',
         'method': 'GET',
         'resultType': 'Topic',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'topic': urlibQuoteEncode(topic, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #27
0
 def list(self,
          userId,
          prettyPrint=None,
          fields=None,
          quotaUser=None,
          oauth_token=None,
          key=None,
          userIp=None,
          alt=None):
     '''Lists all labels in the user's mailbox.'''
     queryParams = {
         'url': 'https://www.googleapis.com/gmail/v1/users/{userId}/labels',
         'method': 'GET',
         'resultType': 'ListLabelsResponse',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #28
0
 def list(self, projectId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, projection=None, stateFilter=None, allUsers=None, maxResults=None, pageToken=None):
     '''Lists all the Jobs in the specified project that were started by the user. The job list returns in reverse chronological order of when the jobs were created, starting with the most recent job created.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/jobs',
         'method': 'GET',
         'resultType': 'JobList',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projection': projection,
             'stateFilter': stateFilter,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'allUsers': allUsers,
             'maxResults': maxResults,
             'pageToken': pageToken,
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #29
0
파일: gmail_.py 프로젝트: runt18/txGoogle
 def list(self, userId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, maxResults=None, q=None, pageToken=None, includeSpamTrash=None, labelIds=None):
     '''Lists the threads in the user's mailbox.'''
     queryParams = {
         'url': 'https://www.googleapis.com/gmail/v1/users/{userId}/threads',
         'method': 'GET',
         'resultType': 'ListThreadsResponse',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'maxResults': maxResults,
             'q': q,
             'pageToken': pageToken,
             'includeSpamTrash': includeSpamTrash,
             'labelIds': labelIds,
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #30
0
 def getProfile(self,
                userId,
                prettyPrint=None,
                fields=None,
                quotaUser=None,
                oauth_token=None,
                key=None,
                userIp=None,
                alt=None):
     '''Gets the current user's Gmail profile.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/gmail/v1/users/{userId}/profile',
         'method': 'GET',
         'resultType': 'Profile',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #31
0
 def query(self, projectId, query, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, timeoutMs=None, kind=None, dryRun=None, useQueryCache=None, projectId_=None, datasetId=None, maxResults=None, preserveNulls=None):
     '''Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/queries',
         'method': 'POST',
         'resultType': 'QueryResponse',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
         },
         'httpBodyParams': {
             'timeoutMs': timeoutMs,
             'kind': kind,
             'dryRun': dryRun,
             'useQueryCache': useQueryCache,
             'defaultDataset': {
                 'projectId': projectId_,
                 'datasetId': datasetId,
             },
             'maxResults': maxResults,
             'query': query,
             'preserveNulls': preserveNulls,
         },
     }
     return self._request(queryParams)
예제 #32
0
 def commit(self, datasetId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, ignoreReadOnly=None, transaction=None, mode=None, insert=None, force=None, insertAutoId=None, update=None, delete=None, upsert=None):
     '''Commit a transaction, optionally creating, deleting or modifying some entities.'''
     queryParams = {
         'url': 'https://www.googleapis.com/datastore/v1beta2/datasets/{datasetId}/commit',
         'method': 'POST',
         'resultType': 'CommitResponse',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {
             'ignoreReadOnly': ignoreReadOnly,
             'transaction': transaction,
             'mode': mode,
             'mutation': {
                 'insert': insert,
                 'force': force,
                 'insertAutoId': insertAutoId,
                 'update': update,
                 'delete': delete,
                 'upsert': upsert,
             },
         },
     }
     return self._request(queryParams)
예제 #33
0
 def list(self,
          projectId,
          prettyPrint=None,
          fields=None,
          quotaUser=None,
          oauth_token=None,
          key=None,
          userIp=None,
          alt=None,
          pageToken=None,
          all=None,
          maxResults=None):
     '''Lists all the datasets in the specified project to which the caller has read access; however, a project owner can list (but not necessarily get) all datasets in his project.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets',
         'method': 'GET',
         'resultType': 'DatasetList',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'pageToken': pageToken,
             'all': all,
             'maxResults': maxResults,
             'projectId': urlibQuoteEncode(projectId, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #34
0
 def insert(self, project, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, storageDataLocation=None, modelType=None, storagePMMLModelLocation=None, sourceModel=None, storagePMMLLocation=None, trainingInstances=None, id=None, utility=None):
     '''Train a Prediction API model.'''
     queryParams = {
         'url': 'https://www.googleapis.com/prediction/v1.6/projects/{project}/trainedmodels',
         'method': 'POST',
         'resultType': 'Insert2',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'project': urlibQuoteEncode(project, safe=''),
         },
         'httpBodyParams': {
             'storageDataLocation': storageDataLocation,
             'modelType': modelType,
             'storagePMMLModelLocation': storagePMMLModelLocation,
             'sourceModel': sourceModel,
             'storagePMMLLocation': storagePMMLLocation,
             'trainingInstances': trainingInstances,
             'id': id,
             'utility': utility,
         },
     }
     return self._request(queryParams)
예제 #35
0
 def update(self,
            projectId,
            datasetId,
            datasetId_,
            prettyPrint=None,
            fields=None,
            quotaUser=None,
            oauth_token=None,
            key=None,
            userIp=None,
            alt=None,
            description=None,
            projectId_=None,
            access=None,
            friendlyName=None):
     '''Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}',
         'method': 'PUT',
         'resultType': 'Dataset',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {
             'access': access,
             'friendlyName': friendlyName,
             'description': description,
             'datasetReference': {
                 'projectId': projectId_,
                 'datasetId': datasetId_,
             },
         },
     }
     return self._request(queryParams)
예제 #36
0
파일: gmail_.py 프로젝트: runt18/txGoogle
 def update(self, userId, id, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, historyId=None, id_=None, snippet=None, raw=None, sizeEstimate=None, threadId=None, labelIds=None, attachmentId=None, data=None, size=None, mimeType=None, partId=None, filename=None, headers=None, parts=None, updateId=None):
     '''Replaces a draft's content.'''
     queryParams = {
         'url': 'https://www.googleapis.com/gmail/v1/users/{userId}/drafts/{id}',
         'method': 'PUT',
         'resultType': 'Draft',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {
             'message': {
                 'historyId': historyId,
                 'payload': {
                     'body': {
                         'data': data,
                         'attachmentId': attachmentId,
                         'size': size,
                     },
                     'mimeType': mimeType,
                     'partId': partId,
                     'filename': filename,
                     'headers': headers,
                     'parts': parts,
                 },
                 'snippet': snippet,
                 'raw': raw,
                 'sizeEstimate': sizeEstimate,
                 'threadId': threadId,
                 'labelIds': labelIds,
                 'id': id_,
             },
             'id': updateId,
         },
     }
     return self._request(queryParams)
예제 #37
0
 def analyze(self, project, id, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None):
     '''Get analysis of the model and the data the model was trained on.'''
     queryParams = {
         'url': 'https://www.googleapis.com/prediction/v1.6/projects/{project}/trainedmodels/{id}/analyze',
         'method': 'GET',
         'resultType': 'Analyze',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'project': urlibQuoteEncode(project, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #38
0
 def get(self, projectId, jobId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None):
     '''Retrieves the specified job by ID.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/jobs/{jobId}',
         'method': 'GET',
         'resultType': 'Job',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'jobId': urlibQuoteEncode(jobId, safe=''),
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #39
0
 def get(self, project, id, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None):
     '''Check training status of your model.'''
     queryParams = {
         'url': 'https://www.googleapis.com/prediction/v1.6/projects/{project}/trainedmodels/{id}',
         'method': 'GET',
         'resultType': 'Insert2',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'project': urlibQuoteEncode(project, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #40
0
파일: gmail_.py 프로젝트: runt18/txGoogle
 def untrash(self, userId, id, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None):
     '''Removes the specified message from the trash.'''
     queryParams = {
         'url': 'https://www.googleapis.com/gmail/v1/users/{userId}/messages/{id}/untrash',
         'method': 'POST',
         'resultType': 'Message',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #41
0
파일: gmail_.py 프로젝트: runt18/txGoogle
 def get(self, userId, id, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None):
     '''Gets the specified label.'''
     queryParams = {
         'url': 'https://www.googleapis.com/gmail/v1/users/{userId}/labels/{id}',
         'method': 'GET',
         'resultType': 'Label',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #42
0
파일: gmail_.py 프로젝트: runt18/txGoogle
 def delete(self, userId, id, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None):
     '''Immediately and permanently deletes the specified draft. Does not simply trash it.'''
     queryParams = {
         'url': 'https://www.googleapis.com/gmail/v1/users/{userId}/drafts/{id}',
         'method': 'DELETE',
         'resultType': 'empty',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #43
0
파일: gmail_.py 프로젝트: runt18/txGoogle
 def delete(self, userId, id, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None):
     '''Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.'''
     queryParams = {
         'url': 'https://www.googleapis.com/gmail/v1/users/{userId}/labels/{id}',
         'method': 'DELETE',
         'resultType': 'empty',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #44
0
 def get(self, projectId, tableId, datasetId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None):
     '''Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}',
         'method': 'GET',
         'resultType': 'Table',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'tableId': urlibQuoteEncode(tableId, safe=''),
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #45
0
 def delete(self, datasetId, projectId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, deleteContents=None):
     '''Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}',
         'method': 'DELETE',
         'resultType': 'empty',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'deleteContents': deleteContents,
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
             'projectId': urlibQuoteEncode(projectId, safe=''),
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #46
0
 def delete(self, projectId, tableId, datasetId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None):
     '''Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}',
         'method': 'DELETE',
         'resultType': 'empty',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'tableId': urlibQuoteEncode(tableId, safe=''),
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #47
0
 def predict(self, project, id, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, input=None):
     '''Submit model id and request a prediction.'''
     queryParams = {
         'url': 'https://www.googleapis.com/prediction/v1.6/projects/{project}/trainedmodels/{id}/predict',
         'method': 'POST',
         'resultType': 'Output',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'project': urlibQuoteEncode(project, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {
             'input': input,
         },
     }
     return self._request(queryParams)
예제 #48
0
 def list(self,
          projectId,
          tableId,
          datasetId,
          prettyPrint=None,
          fields=None,
          quotaUser=None,
          oauth_token=None,
          key=None,
          userIp=None,
          alt=None,
          maxResults=None,
          pageToken=None,
          startIndex=None):
     '''Retrieves table data from a specified set of rows.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data',
         'method': 'GET',
         'resultType': 'TableDataList',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'maxResults': maxResults,
             'pageToken': pageToken,
             'startIndex': startIndex,
             'tableId': urlibQuoteEncode(tableId, safe=''),
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #49
0
 def getQueryResults(self,
                     projectId,
                     jobId,
                     prettyPrint=None,
                     fields=None,
                     quotaUser=None,
                     oauth_token=None,
                     key=None,
                     userIp=None,
                     alt=None,
                     timeoutMs=None,
                     maxResults=None,
                     pageToken=None,
                     startIndex=None):
     '''Retrieves the results of a query job.'''
     queryParams = {
         'url':
         'https://www.googleapis.com/bigquery/v2/projects/{projectId}/queries/{jobId}',
         'method': 'GET',
         'resultType': 'GetQueryResultsResponse',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'timeoutMs': timeoutMs,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'maxResults': maxResults,
             'jobId': urlibQuoteEncode(jobId, safe=''),
             'pageToken': pageToken,
             'startIndex': startIndex,
         },
         'httpBodyParams': {},
     }
     return self._request(queryParams)
예제 #50
0
파일: gmail_.py 프로젝트: runt18/txGoogle
 def modify(self, userId, id, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, addLabelIds=None, removeLabelIds=None):
     '''Modifies the labels applied to the thread. This applies to all messages in the thread.'''
     queryParams = {
         'url': 'https://www.googleapis.com/gmail/v1/users/{userId}/threads/{id}/modify',
         'method': 'POST',
         'resultType': 'Thread',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {
             'removeLabelIds': removeLabelIds,
             'addLabelIds': addLabelIds,
         },
     }
     return self._request(queryParams)
예제 #51
0
 def list(self, datasetId, projectId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, pageToken=None, maxResults=None):
     '''Lists all tables in the specified dataset.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables',
         'method': 'GET',
         'resultType': 'TableList',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'pageToken': pageToken,
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
             'maxResults': maxResults,
             'projectId': urlibQuoteEncode(projectId, safe=''),
         },
         'httpBodyParams': {
         },
     }
     return self._request(queryParams)
예제 #52
0
 def update(self, project, id, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, output=None, csvInstance=None):
     '''Add new data to a trained model.'''
     queryParams = {
         'url': 'https://www.googleapis.com/prediction/v1.6/projects/{project}/trainedmodels/{id}',
         'method': 'PUT',
         'resultType': 'Insert2',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'project': urlibQuoteEncode(project, safe=''),
             'id': urlibQuoteEncode(id, safe=''),
         },
         'httpBodyParams': {
             'output': output,
             'csvInstance': csvInstance,
         },
     }
     return self._request(queryParams)
예제 #53
0
 def update(self, projectId, tableId, datasetId, projectId_, tableId_, datasetId_, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, expirationTime=None, description=None, friendlyName=None, schema_fields=None, query=None):
     '''Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}',
         'method': 'PUT',
         'resultType': 'Table',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'tableId': urlibQuoteEncode(tableId, safe=''),
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {
             'description': description,
             'friendlyName': friendlyName,
             'expirationTime': expirationTime,
             'schema': {
                 'fields': schema_fields,
             },
             'tableReference': {
                 'projectId': projectId_,
                 'tableId': tableId_,
                 'datasetId': datasetId_,
             },
             'view': {
                 'query': query,
             },
         },
     }
     return self._request(queryParams)
예제 #54
0
 def insertAll(self, projectId, tableId, datasetId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, kind=None, rows=None):
     '''Streams data into BigQuery one record at a time without needing to run a load job.'''
     queryParams = {
         'url': 'https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/insertAll',
         'method': 'POST',
         'resultType': 'TableDataInsertAllResponse',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'projectId': urlibQuoteEncode(projectId, safe=''),
             'tableId': urlibQuoteEncode(tableId, safe=''),
             'datasetId': urlibQuoteEncode(datasetId, safe=''),
         },
         'httpBodyParams': {
             'kind': kind,
             'rows': rows,
         },
     }
     return self._request(queryParams)
예제 #55
0
    def runQuery(self, datasetId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, startCursor=None, kinds=None, projection=None, groupBy=None, filters=None, indexed=None, limit=None, offset=None, endCursor=None, order=None, gqlQuery=None, transaction=None, readConsistency=None):
        assert datasetId is not None
        '''Query for entities.'''

        print 'Qry Kinds:{} Filter:{} Projection:{}'.format(kinds, filters, projection)

        if kinds:
            kinds = [checkKindsFormat(kind) for kind in kinds]

        ''''partitionId': {
            'namespace': namespace,
            'datasetId': datasetId,
        },'''
        queryParams = {
            'url': 'https://www.googleapis.com/datastore/v1beta2/datasets/{datasetId}/runQuery',
            'method': 'POST',
            'resultType': 'RunQueryResponse',
            'httpUrlParams': {
                'prettyPrint': prettyPrint,
                'fields': fields,
                'quotaUser': quotaUser,
                'oauth_token': oauth_token,
                'key': key,
                'userIp': userIp,
                'alt': alt,
                'datasetId': urlibQuoteEncode(datasetId, safe=''),
            },
            'httpBodyParams': {
                'query': {
                    'startCursor': startCursor,
                    'kinds': kinds,
                    'projection': projection,
                    'order': order,
                    'filter': filters,
                    'limit': limit,
                    'offset': offset,
                    'endCursor': endCursor,
                    'groupBy': groupBy,
                },
                'gqlQuery': gqlQuery,
                'readOptions': {
                    'transaction': transaction,
                    'readConsistency': readConsistency,
                },
            },
        }
        return self._request(queryParams)
예제 #56
0
파일: gmail_.py 프로젝트: runt18/txGoogle
 def send(self, userId, prettyPrint=None, fields=None, quotaUser=None, oauth_token=None, key=None, userIp=None, alt=None, historyId=None, id=None, snippet=None, raw=None, sizeEstimate=None, threadId=None, labelIds=None, attachmentId=None, data=None, size=None, mimeType=None, partId=None, filename=None, headers=None, parts=None, id_=None):
     '''Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers.'''
     queryParams = {
         'url': 'https://www.googleapis.com/gmail/v1/users/{userId}/drafts/send',
         'method': 'POST',
         'resultType': 'Message',
         'httpUrlParams': {
             'prettyPrint': prettyPrint,
             'fields': fields,
             'quotaUser': quotaUser,
             'oauth_token': oauth_token,
             'key': key,
             'userIp': userIp,
             'alt': alt,
             'userId': urlibQuoteEncode(userId, safe=''),
         },
         'httpBodyParams': {
             'message': {
                 'historyId': historyId,
                 'payload': {
                     'body': {
                         'data': data,
                         'attachmentId': attachmentId,
                         'size': size,
                     },
                     'mimeType': mimeType,
                     'partId': partId,
                     'filename': filename,
                     'headers': headers,
                     'parts': parts,
                 },
                 'snippet': snippet,
                 'raw': raw,
                 'sizeEstimate': sizeEstimate,
                 'threadId': threadId,
                 'labelIds': labelIds,
                 'id': id,
             },
             'id': id_,
         },
     }
     return self._request(queryParams)