gdata.spreadsheets.client | index /usr/lib/python2.7/dist-packages/gdata/spreadsheets/client.py

`Contains a client to communicate with the Google Spreadsheets servers.
For documentation on the Spreadsheets API, see:
http://code.google.com/apis/spreadsheets/`

Modules

``

atom | gdata |  |

Classes

``

gdata.client.GDClient(atom.client.AtomPubClient)
  SpreadsheetsClient
gdata.client.Query(__builtin__.object)
  CellQuery
  ListQuery
    TableQuery
  SpreadsheetQuery
    WorksheetQuery

class CellQuery(gdata.client.Query)

``

Method resolution order:
  CellQuery
  gdata.client.Query
  __builtin__.object

Methods defined here:

ModifyRequest = modify_request(self, http_request)

__init__(self, min_row=None, max_row=None, min_col=None, max_col=None, range=None, return_empty=None, **kwargs)
  `Adds Cells-feed specific query parameters to a request.
  Args:
  min_row: str or int Positional number of minimum row returned in query.
  max_row: str or int Positional number of maximum row returned in query.
  min_col: str or int Positional number of minimum column returned in query.
  max_col: str or int Positional number of maximum column returned in query.
  range: str A single cell or a range of cells. Use standard spreadsheet
  cell-range notations, using a colon to separate start and end of
  range. Examples:
  - 'A1' and 'R1C1' both specify only cell A1.
  - 'D1:F3' and 'R1C4:R3C6' both specify the rectangle of cells with
  corners at D1 and F3.
  return_empty: str If 'true' then empty cells will be returned in the feed.
  If omitted, the default is 'false'.`

modify_request(self, http_request)

Methods inherited from gdata.client.Query:

AddCustomParameter = add_custom_parameter(self, key, value)

add_custom_parameter(self, key, value)

Data descriptors inherited from gdata.client.Query:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

class ListQuery(gdata.client.Query)

``

Method resolution order:
  ListQuery
  gdata.client.Query
  __builtin__.object

Methods defined here:

ModifyRequest = modify_request(self, http_request)

__init__(self, order_by=None, reverse=None, sq=None, **kwargs)
  `Adds List-feed specific query parameters to a request.
  Args:
  order_by: str Specifies what column to use in ordering the entries in
  the feed. By position (the default): 'position' returns
  rows in the order in which they appear in the GUI. Row 1, then
  row 2, then row 3, and so on. By column:
  'column:columnName' sorts rows in ascending order based on the
  values in the column with the given columnName, where
  columnName is the value in the header row for that column.
  reverse: str Specifies whether to sort in descending or ascending order.
  Reverses default sort order: 'true' results in a descending
  sort; 'false' (the default) results in an ascending sort.
  sq: str Structured query on the full text in the worksheet.
  [columnName][binaryOperator][value]
  Supported binaryOperators are:
  - (), for overriding order of operations
  - = or ==, for strict equality
  - <> or !=, for strict inequality
  - and or &&, for boolean and
  - or or ||, for boolean or`

modify_request(self, http_request)

Methods inherited from gdata.client.Query:

AddCustomParameter = add_custom_parameter(self, key, value)

add_custom_parameter(self, key, value)

Data descriptors inherited from gdata.client.Query:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

class SpreadsheetQuery(gdata.client.Query)

``

Method resolution order:
  SpreadsheetQuery
  gdata.client.Query
  __builtin__.object

Methods defined here:

ModifyRequest = modify_request(self, http_request)

__init__(self, title=None, title_exact=None, **kwargs)
  `Adds Spreadsheets feed query parameters to a request.
  Args:
  title: str Specifies the search terms for the title of a document.
  This parameter used without title-exact will only submit partial
  queries, not exact queries.
  title_exact: str Specifies whether the title query should be taken as an
  exact string. Meaningless without title. Possible values are
  'true' and 'false'.`

modify_request(self, http_request)

Methods inherited from gdata.client.Query:

AddCustomParameter = add_custom_parameter(self, key, value)

add_custom_parameter(self, key, value)

Data descriptors inherited from gdata.client.Query:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

class SpreadsheetsClient(gdata.client.GDClient)

``

Method resolution order:
  SpreadsheetsClient
  gdata.client.GDClient
  atom.client.AtomPubClient
  __builtin__.object

Methods defined here:

AddListEntry = add_list_entry(self, list_entry, spreadsheet_key, worksheet_id, auth_token=None, **kwargs)

AddRecord = add_record(self, spreadsheet_key, table_id, fields, title=None, auth_token=None, **kwargs)

AddTable = add_table(self, spreadsheet_key, title, summary, worksheet_name, header_row, num_rows, start_row, insertion_mode, column_headers, auth_token=None, **kwargs)

AddWorksheet = add_worksheet(self, spreadsheet_key, title, rows, cols, auth_token=None, **kwargs)

GetCell = get_cell(self, spreadsheet_key, worksheet_id, row_num, col_num, desired_class=<class 'gdata.spreadsheets.data.CellEntry'>, auth_token=None, **kwargs)

GetCells = get_cells(self, spreadsheet_key, worksheet_id, desired_class=<class 'gdata.spreadsheets.data.CellsFeed'>, auth_token=None, **kwargs)

GetListFeed = get_list_feed(self, spreadsheet_key, worksheet_id, desired_class=<class 'gdata.spreadsheets.data.ListsFeed'>, auth_token=None, **kwargs)

GetRecord = get_record(self, spreadsheet_key, table_id, record_id, desired_class=<class 'gdata.spreadsheets.data.Record'>, auth_token=None, **kwargs)

GetRecords = get_records(self, spreadsheet_key, table_id, desired_class=<class 'gdata.spreadsheets.data.RecordsFeed'>, auth_token=None, **kwargs)

GetSpreadsheets = get_spreadsheets(self, auth_token=None, desired_class=<class 'gdata.spreadsheets.data.SpreadsheetsFeed'>, **kwargs)

GetTables = get_tables(self, spreadsheet_key, desired_class=<class 'gdata.spreadsheets.data.TablesFeed'>, auth_token=None, **kwargs)

GetWorksheet = get_worksheet(self, spreadsheet_key, worksheet_id, desired_class=<class 'gdata.spreadsheets.data.WorksheetEntry'>, auth_token=None, **kwargs)

GetWorksheets = get_worksheets(self, spreadsheet_key, auth_token=None, desired_class=<class 'gdata.spreadsheets.data.WorksheetsFeed'>, **kwargs)

add_list_entry(self, list_entry, spreadsheet_key, worksheet_id, auth_token=None, **kwargs)
  `Adds a new row to the worksheet's list feed.
  Args:
  list_entry: gdata.spreadsheets.data.ListsEntry An entry which contains
  the values which should be set for the columns in this
  record.
  spreadsheet_key: str, The unique ID of this containing spreadsheet. This
  can be the ID from the URL or as provided in a
  Spreadsheet entry.
  worksheet_id: str, The unique ID of the worksheet in this spreadsheet
  whose cells we want. This can be obtained using
  WorksheetEntry's get_worksheet_id method.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others. Represents the current user. Defaults to None
  and if None, this method will look for a value in the
  auth_token member of SpreadsheetsClient.`

add_record(self, spreadsheet_key, table_id, fields, title=None, auth_token=None, **kwargs)
  `Adds a new row to the table.
  Args:
  spreadsheet_key: str, The unique ID of this containing spreadsheet. This
  can be the ID from the URL or as provided in a
  Spreadsheet entry.
  table_id: str, The ID of the table within the worksheet which should
  receive this new record. The table ID can be found using the
  get_table_id method of a gdata.spreadsheets.data.Table.
  fields: dict of strings mapping column names to values.
  title: str, optional The title for this row.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others. Represents the current user. Defaults to None
  and if None, this method will look for a value in the
  auth_token member of SpreadsheetsClient.`

add_table(self, spreadsheet_key, title, summary, worksheet_name, header_row, num_rows, start_row, insertion_mode, column_headers, auth_token=None, **kwargs)
  `Creates a new table within the worksheet.
  Args:
  spreadsheet_key: str, The unique ID of this containing spreadsheet. This
  can be the ID from the URL or as provided in a
  Spreadsheet entry.
  title: str, The title for the new table within a worksheet.
  summary: str, A description of the table.
  worksheet_name: str The name of the worksheet in which this table
  should live.
  header_row: int or str, The number of the row in the worksheet which
  will contain the column names for the data in this table.
  num_rows: int or str, The number of adjacent rows in this table.
  start_row: int or str, The number of the row at which the data begins.
  insertion_mode: str
  column_headers: dict of strings, maps the column letters (A, B, C) to
  the desired name which will be viewable in the
  worksheet.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others. Represents the current user. Defaults to None
  and if None, this method will look for a value in the
  auth_token member of SpreadsheetsClient.`

add_worksheet(self, spreadsheet_key, title, rows, cols, auth_token=None, **kwargs)
  `Creates a new worksheet entry in the spreadsheet.
  Args:
  spreadsheet_key: str, The unique ID of this containing spreadsheet. This
  can be the ID from the URL or as provided in a
  Spreadsheet entry.
  title: str, The title to be used in for the worksheet.
  rows: str or int, The number of rows this worksheet should start with.
  cols: str or int, The number of columns this worksheet should start with.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others. Represents the current user. Defaults to None
  and if None, this method will look for a value in the
  auth_token member of SpreadsheetsClient.`

get_cell(self, spreadsheet_key, worksheet_id, row_num, col_num, desired_class=<class 'gdata.spreadsheets.data.CellEntry'>, auth_token=None, **kwargs)
  `Retrieves a single cell from the worksheet.
  Indexes are 1 based so the first cell in the worksheet is 1, 1.
  Args:
  spreadsheet_key: str, The unique ID of this containing spreadsheet. This
  can be the ID from the URL or as provided in a
  Spreadsheet entry.
  worksheet_id: str, The unique ID of the worksheet in this spreadsheet
  whose cells we want. This can be obtained using
  WorksheetEntry's get_worksheet_id method.
  row_num: int, The row of the cell that we want. Numbering starts with 1.
  col_num: int, The column of the cell we want. Numbering starts with 1.
  desired_class: class descended from atom.core.XmlElement to which a
  successful response should be converted. If there is no
  converter function specified (converter=None) then the
  desired_class will be used in calling the
  atom.core.parse function. If neither
  the desired_class nor the converter is specified, an
  HTTP reponse object will be returned. Defaults to
  gdata.spreadsheets.data.CellEntry.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others. Represents the current user. Defaults to None
  and if None, this method will look for a value in the
  auth_token member of SpreadsheetsClient.`

get_cells(self, spreadsheet_key, worksheet_id, desired_class=<class 'gdata.spreadsheets.data.CellsFeed'>, auth_token=None, **kwargs)
  `Retrieves the cells which have values in this spreadsheet.
  Blank cells are not included.
  Args:
  spreadsheet_key: str, The unique ID of this containing spreadsheet. This
  can be the ID from the URL or as provided in a
  Spreadsheet entry.
  worksheet_id: str, The unique ID of the worksheet in this spreadsheet
  whose cells we want. This can be obtained using
  WorksheetEntry's get_worksheet_id method.
  desired_class: class descended from atom.core.XmlElement to which a
  successful response should be converted. If there is no
  converter function specified (converter=None) then the
  desired_class will be used in calling the
  atom.core.parse function. If neither
  the desired_class nor the converter is specified, an
  HTTP reponse object will be returned. Defaults to
  gdata.spreadsheets.data.CellsFeed.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others. Represents the current user. Defaults to None
  and if None, this method will look for a value in the
  auth_token member of SpreadsheetsClient.`

get_list_feed(self, spreadsheet_key, worksheet_id, desired_class=<class 'gdata.spreadsheets.data.ListsFeed'>, auth_token=None, **kwargs)
  `Retrieves the value rows from the worksheet's list feed.
  The list feed is a view of the spreadsheet in which the first row is used
  for column names and subsequent rows up to the first blank line are
  records.
  Args:
  spreadsheet_key: str, The unique ID of this containing spreadsheet. This
  can be the ID from the URL or as provided in a
  Spreadsheet entry.
  worksheet_id: str, The unique ID of the worksheet in this spreadsheet
  whose cells we want. This can be obtained using
  WorksheetEntry's get_worksheet_id method.
  desired_class: class descended from atom.core.XmlElement to which a
  successful response should be converted. If there is no
  converter function specified (converter=None) then the
  desired_class will be used in calling the
  atom.core.parse function. If neither
  the desired_class nor the converter is specified, an
  HTTP reponse object will be returned. Defaults to
  gdata.spreadsheets.data.ListsFeed.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others. Represents the current user. Defaults to None
  and if None, this method will look for a value in the
  auth_token member of SpreadsheetsClient.`

get_record(self, spreadsheet_key, table_id, record_id, desired_class=<class 'gdata.spreadsheets.data.Record'>, auth_token=None, **kwargs)
  `Retrieves a single record from the table.
  Args:
  spreadsheet_key: str, The unique ID of this containing spreadsheet. This
  can be the ID from the URL or as provided in a
  Spreadsheet entry.
  table_id: str, The ID of the table within the worksheet whose records
  we would like to fetch. The table ID can be found using the
  get_table_id method of a gdata.spreadsheets.data.Table.
  record_id: str, The ID of the record within this table which we want to
  fetch. You can find the record ID using get_record_id() on
  an instance of the gdata.spreadsheets.data.Record class.
  desired_class: class descended from atom.core.XmlElement to which a
  successful response should be converted. If there is no
  converter function specified (converter=None) then the
  desired_class will be used in calling the
  atom.core.parse function. If neither
  the desired_class nor the converter is specified, an
  HTTP reponse object will be returned. Defaults to
  gdata.spreadsheets.data.RecordsFeed.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others. Represents the current user. Defaults to None
  and if None, this method will look for a value in the
  auth_token member of SpreadsheetsClient.`

get_records(self, spreadsheet_key, table_id, desired_class=<class 'gdata.spreadsheets.data.RecordsFeed'>, auth_token=None, **kwargs)
  `Retrieves the records in a table.
  Args:
  spreadsheet_key: str, The unique ID of this containing spreadsheet. This
  can be the ID from the URL or as provided in a
  Spreadsheet entry.
  table_id: str, The ID of the table within the worksheet whose records
  we would like to fetch. The table ID can be found using the
  get_table_id method of a gdata.spreadsheets.data.Table.
  desired_class: class descended from atom.core.XmlElement to which a
  successful response should be converted. If there is no
  converter function specified (converter=None) then the
  desired_class will be used in calling the
  atom.core.parse function. If neither
  the desired_class nor the converter is specified, an
  HTTP reponse object will be returned. Defaults to
  gdata.spreadsheets.data.RecordsFeed.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others. Represents the current user. Defaults to None
  and if None, this method will look for a value in the
  auth_token member of SpreadsheetsClient.`

get_spreadsheets(self, auth_token=None, desired_class=<class 'gdata.spreadsheets.data.SpreadsheetsFeed'>, **kwargs)
  `Obtains a feed with the spreadsheets belonging to the current user.
  Args:
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others. Represents the current user. Defaults to None
  and if None, this method will look for a value in the
  auth_token member of SpreadsheetsClient.
  desired_class: class descended from atom.core.XmlElement to which a
  successful response should be converted. If there is no
  converter function specified (converter=None) then the
  desired_class will be used in calling the
  atom.core.parse function. If neither
  the desired_class nor the converter is specified, an
  HTTP reponse object will be returned. Defaults to
  gdata.spreadsheets.data.SpreadsheetsFeed.`

get_tables(self, spreadsheet_key, desired_class=<class 'gdata.spreadsheets.data.TablesFeed'>, auth_token=None, **kwargs)
  `Retrieves a feed listing the tables in this spreadsheet.
  Args:
  spreadsheet_key: str, The unique ID of this containing spreadsheet. This
  can be the ID from the URL or as provided in a
  Spreadsheet entry.
  desired_class: class descended from atom.core.XmlElement to which a
  successful response should be converted. If there is no
  converter function specified (converter=None) then the
  desired_class will be used in calling the
  atom.core.parse function. If neither
  the desired_class nor the converter is specified, an
  HTTP reponse object will be returned. Defaults to
  gdata.spreadsheets.data.TablesFeed.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others. Represents the current user. Defaults to None
  and if None, this method will look for a value in the
  auth_token member of SpreadsheetsClient.`

get_worksheet(self, spreadsheet_key, worksheet_id, desired_class=<class 'gdata.spreadsheets.data.WorksheetEntry'>, auth_token=None, **kwargs)
  `Retrieves a single worksheet.
  Args:
  spreadsheet_key: str, The unique ID of this containing spreadsheet. This
  can be the ID from the URL or as provided in a
  Spreadsheet entry.
  worksheet_id: str, The unique ID for the worksheet withing the desired
  spreadsheet.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others. Represents the current user. Defaults to None
  and if None, this method will look for a value in the
  auth_token member of SpreadsheetsClient.
  desired_class: class descended from atom.core.XmlElement to which a
  successful response should be converted. If there is no
  converter function specified (converter=None) then the
  desired_class will be used in calling the
  atom.core.parse function. If neither
  the desired_class nor the converter is specified, an
  HTTP reponse object will be returned. Defaults to
  gdata.spreadsheets.data.WorksheetEntry.`

get_worksheets(self, spreadsheet_key, auth_token=None, desired_class=<class 'gdata.spreadsheets.data.WorksheetsFeed'>, **kwargs)
  `Finds the worksheets within a given spreadsheet.
  Args:
  spreadsheet_key: str, The unique ID of this containing spreadsheet. This
  can be the ID from the URL or as provided in a
  Spreadsheet entry.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others. Represents the current user. Defaults to None
  and if None, this method will look for a value in the
  auth_token member of SpreadsheetsClient.
  desired_class: class descended from atom.core.XmlElement to which a
  successful response should be converted. If there is no
  converter function specified (converter=None) then the
  desired_class will be used in calling the
  atom.core.parse function. If neither
  the desired_class nor the converter is specified, an
  HTTP reponse object will be returned. Defaults to
  gdata.spreadsheets.data.WorksheetsFeed.`

Data and other attributes defined here:

api_version = '3'

auth_scopes = ('https://spreadsheets.google.com/feeds/',)

auth_service = 'wise'

ssl = True

Methods inherited from gdata.client.GDClient:

Batch = batch(self, feed, uri=None, force=False, auth_token=None, **kwargs)
  `Sends a batch request to the server to execute operation entries.
  Args:
  feed: A batch feed containing batch entries, each is an operation.
  uri: (optional) The uri to which the batch request feed should be POSTed.
  If none is provided, then the feed's edit link will be used.
  force: (optional) boolean set to True if you want the batch update to
  clobber all data. If False, the version in the information in the
  feed object will cause the server to check to see that no changes
  intervened between when you fetched the data and when you sent the
  changes.
  auth_token: (optional) An object which sets the Authorization HTTP header
  in its modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others.`

ClientLogin = client_login(self, email, password, source, service=None, account_type='HOSTED_OR_GOOGLE', auth_url=<atom.http_core.Uri object>, captcha_token=None, captcha_response=None)
  `Performs an auth request using the user's email address and password.
  In order to modify user specific data and read user private data, your
  application must be authorized by the user. One way to demonstrage
  authorization is by including a Client Login token in the Authorization
  HTTP header of all requests. This method requests the Client Login token
  by sending the user's email address, password, the name of the
  application, and the service code for the service which will be accessed
  by the application. If the username and password are correct, the server
  will respond with the client login code and a new ClientLoginToken
  object will be set in the client's auth_token member. With the auth_token
  set, future requests from this client will include the Client Login
  token.
  For a list of service names, see
  http://code.google.com/apis/gdata/faq.html#clientlogin
  For more information on Client Login, see:
  http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html
  Args:
  email: str The user's email address or username.
  password: str The password for the user's account.
  source: str The name of your application. This can be anything you
  like but should should give some indication of which app is
  making the request.
  service: str The service code for the service you would like to access.
  For example, 'cp' for contacts, 'cl' for calendar. For a full
  list see
  http://code.google.com/apis/gdata/faq.html#clientlogin
  If you are using a subclass of the gdata.client.GDClient, the
  service will usually be filled in for you so you do not need
  to specify it. For example see BloggerClient,
  SpreadsheetsClient, etc.
  account_type: str (optional) The type of account which is being
  authenticated. This can be either 'GOOGLE' for a Google
  Account, 'HOSTED' for a Google Apps Account, or the
  default 'HOSTED_OR_GOOGLE' which will select the Google
  Apps Account if the same email address is used for both
  a Google Account and a Google Apps Account.
  auth_url: str (optional) The URL to which the login request should be
  sent.
  captcha_token: str (optional) If a previous login attempt was reponded
  to with a CAPTCHA challenge, this is the token which
  identifies the challenge (from the CAPTCHA's URL).
  captcha_response: str (optional) If a previous login attempt was
  reponded to with a CAPTCHA challenge, this is the
  response text which was contained in the challenge.
  Returns:
  Generated token, which is also stored in this object.
  Raises:
  A RequestError or one of its suclasses: BadAuthentication,
  BadAuthenticationServiceURL, ClientLoginFailed,
  ClientLoginTokenMissing, or CaptchaChallenge`

Delete = delete(self, entry_or_uri, auth_token=None, force=False, **kwargs)

GetAccessToken = get_access_token(self, request_token, url='https://www.google.com/accounts/OAuthGetAccessToken')
  `Exchanges an authorized OAuth request token for an access token.
  Contacts the Google OAuth server to upgrade a previously authorized
  request token. Once the request token is upgraded to an access token,
  the access token may be used to access the user's data.
  For more details, see the Google Accounts OAuth documentation:
  http://code.google.com/apis/accounts/docs/OAuth.html#AccessToken
  Args:
  request_token: An OAuth token which has been authorized by the user.
  url: (optional) The URL to which the upgrade request should be sent.
  Defaults to: https://www.google.com/accounts/OAuthAuthorizeToken`

GetEntry = get_entry(self, uri, auth_token=None, converter=None, desired_class=<class 'gdata.data.GDEntry'>, etag=None, **kwargs)

GetFeed = get_feed(self, uri, auth_token=None, converter=None, desired_class=<class 'gdata.data.GDFeed'>, **kwargs)

GetNext = get_next(self, feed, auth_token=None, converter=None, desired_class=None, **kwargs)
  `Fetches the next set of results from the feed.
  When requesting a feed, the number of entries returned is capped at a
  service specific default limit (often 25 entries). You can specify your
  own entry-count cap using the max-results URL query parameter. If there
  are more results than could fit under max-results, the feed will contain
  a next link. This method performs a GET against this next results URL.
  Returns:
  A new feed object containing the next set of entries in this feed.`

GetOAuthToken = get_oauth_token(self, scopes, next, consumer_key, consumer_secret=None, rsa_private_key=None, url='https://www.google.com/accounts/OAuthGetRequestToken')
  `Obtains an OAuth request token to allow the user to authorize this app.
  Once this client has a request token, the user can authorize the request
  token by visiting the authorization URL in their browser. After being
  redirected back to this app at the 'next' URL, this app can then exchange
  the authorized request token for an access token.
  For more information see the documentation on Google Accounts with OAuth:
  http://code.google.com/apis/accounts/docs/OAuth.html#AuthProcess
  Args:
  scopes: list of strings or atom.http_core.Uri objects which specify the
  URL prefixes which this app will be accessing. For example, to access
  the Google Calendar API, you would want to use scopes:
  ['https://www.google.com/calendar/feeds/',
  'http://www.google.com/calendar/feeds/']
  next: str or atom.http_core.Uri object, The URL which the user's browser
  should be sent to after they authorize access to their data. This
  should be a URL in your application which will read the token
  information from the URL and upgrade the request token to an access
  token.
  consumer_key: str This is the identifier for this application which you
  should have received when you registered your application with Google
  to use OAuth.
  consumer_secret: str (optional) The shared secret between your app and
  Google which provides evidence that this request is coming from you
  application and not another app. If present, this libraries assumes
  you want to use an HMAC signature to verify requests. Keep this data
  a secret.
  rsa_private_key: str (optional) The RSA private key which is used to
  generate a digital signature which is checked by Google's server. If
  present, this library assumes that you want to use an RSA signature
  to verify requests. Keep this data a secret.
  url: The URL to which a request for a token should be made. The default
  is Google's OAuth request token provider.`

ModifyRequest = modify_request(self, http_request)
  `Adds or changes request before making the HTTP request.
  This client will add the API version if it is specified.
  Subclasses may override this method to add their own request
  modifications before the request is made.`

Post = post(self, entry, uri, auth_token=None, converter=None, desired_class=None, **kwargs)

Request = request(self, method=None, uri=None, auth_token=None, http_request=None, converter=None, desired_class=None, redirects_remaining=4, **kwargs)
  `Make an HTTP request to the server.
  See also documentation for atom.client.AtomPubClient.request.
  If a 302 redirect is sent from the server to the client, this client
  assumes that the redirect is in the form used by the Google Calendar API.
  The same request URI and method will be used as in the original request,
  but a gsessionid URL parameter will be added to the request URI with
  the value provided in the server's 302 redirect response. If the 302
  redirect is not in the format specified by the Google Calendar API, a
  RedirectError will be raised containing the body of the server's
  response.
  The method calls the client's modify_request method to make any changes
  required by the client before the request is made. For example, a
  version 2 client could add a GData-Version: 2 header to the request in
  its modify_request method.
  Args:
  method: str The HTTP verb for this request, usually 'GET', 'POST',
  'PUT', or 'DELETE'
  uri: atom.http_core.Uri, str, or unicode The URL being requested.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others.
  http_request: (optional) atom.http_core.HttpRequest
  converter: function which takes the body of the response as its only
  argument and returns the desired object.
  desired_class: class descended from atom.core.XmlElement to which a
  successful response should be converted. If there is no
  converter function specified (converter=None) then the
  desired_class will be used in calling the
  atom.core.parse function. If neither
  the desired_class nor the converter is specified, an
  HTTP reponse object will be returned.
  redirects_remaining: (optional) int, if this number is 0 and the
  server sends a 302 redirect, the request method
  will raise an exception. This parameter is used in
  recursive request calls to avoid an infinite loop.
  Any additional arguments are passed through to
  atom.client.AtomPubClient.request.
  Returns:
  An HTTP response object (see atom.http_core.HttpResponse for a
  description of the object's interface) if no converter was
  specified and no desired_class was specified. If a converter function
  was provided, the results of calling the converter are returned. If no
  converter was specified but a desired_class was provided, the response
  body will be converted to the class using
  atom.core.parse.`

RequestClientLoginToken = request_client_login_token(self, email, password, source, service=None, account_type='HOSTED_OR_GOOGLE', auth_url=<atom.http_core.Uri object>, captcha_token=None, captcha_response=None)

RevokeToken = revoke_token(self, token=None, url=<atom.http_core.Uri object>)
  `Requests that the token be invalidated.
  This method can be used for both AuthSub and OAuth tokens (to invalidate
  a ClientLogin token, the user must change their password).
  Returns:
  True if the server responded with a 200.
  Raises:
  A RequestError if the server responds with a non-200 status.`

Update = update(self, entry, auth_token=None, force=False, uri=None, **kwargs)
  `Edits the entry on the server by sending the XML for this entry.
  Performs a PUT and converts the response to a new entry object with a
  matching class to the entry passed in.
  Args:
  entry:
  auth_token:
  force: boolean stating whether an update should be forced. Defaults to
  False. Normally, if a change has been made since the passed in
  entry was obtained, the server will not overwrite the entry since
  the changes were based on an obsolete version of the entry.
  Setting force to True will cause the update to silently
  overwrite whatever version is present.
  uri: The uri to put to. If provided, this uri is PUT to rather than the
  inferred uri from the entry's edit link.
  Returns:
  A new Entry object of a matching type to the entry which was passed in.`

UpgradeToken = upgrade_token(self, token=None, url=<atom.http_core.Uri object>)
  `Asks the Google auth server for a multi-use AuthSub token.
  For details on AuthSub, see:
  http://code.google.com/apis/accounts/docs/AuthSub.html
  Args:
  token: gdata.gauth.AuthSubToken or gdata.gauth.SecureAuthSubToken
  (optional) If no token is passed in, the client's auth_token member
  is used to request the new token. The token object will be modified
  to contain the new session token string.
  url: str or atom.http_core.Uri (optional) The URL to which the token
  upgrade request should be sent. Defaults to:
  https://www.google.com/accounts/AuthSubSessionToken
  Returns:
  The upgraded gdata.gauth.AuthSubToken object.`

batch(self, feed, uri=None, force=False, auth_token=None, **kwargs)
  `Sends a batch request to the server to execute operation entries.
  Args:
  feed: A batch feed containing batch entries, each is an operation.
  uri: (optional) The uri to which the batch request feed should be POSTed.
  If none is provided, then the feed's edit link will be used.
  force: (optional) boolean set to True if you want the batch update to
  clobber all data. If False, the version in the information in the
  feed object will cause the server to check to see that no changes
  intervened between when you fetched the data and when you sent the
  changes.
  auth_token: (optional) An object which sets the Authorization HTTP header
  in its modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others.`

client_login(self, email, password, source, service=None, account_type='HOSTED_OR_GOOGLE', auth_url=<atom.http_core.Uri object>, captcha_token=None, captcha_response=None)
  `Performs an auth request using the user's email address and password.
  In order to modify user specific data and read user private data, your
  application must be authorized by the user. One way to demonstrage
  authorization is by including a Client Login token in the Authorization
  HTTP header of all requests. This method requests the Client Login token
  by sending the user's email address, password, the name of the
  application, and the service code for the service which will be accessed
  by the application. If the username and password are correct, the server
  will respond with the client login code and a new ClientLoginToken
  object will be set in the client's auth_token member. With the auth_token
  set, future requests from this client will include the Client Login
  token.
  For a list of service names, see
  http://code.google.com/apis/gdata/faq.html#clientlogin
  For more information on Client Login, see:
  http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html
  Args:
  email: str The user's email address or username.
  password: str The password for the user's account.
  source: str The name of your application. This can be anything you
  like but should should give some indication of which app is
  making the request.
  service: str The service code for the service you would like to access.
  For example, 'cp' for contacts, 'cl' for calendar. For a full
  list see
  http://code.google.com/apis/gdata/faq.html#clientlogin
  If you are using a subclass of the gdata.client.GDClient, the
  service will usually be filled in for you so you do not need
  to specify it. For example see BloggerClient,
  SpreadsheetsClient, etc.
  account_type: str (optional) The type of account which is being
  authenticated. This can be either 'GOOGLE' for a Google
  Account, 'HOSTED' for a Google Apps Account, or the
  default 'HOSTED_OR_GOOGLE' which will select the Google
  Apps Account if the same email address is used for both
  a Google Account and a Google Apps Account.
  auth_url: str (optional) The URL to which the login request should be
  sent.
  captcha_token: str (optional) If a previous login attempt was reponded
  to with a CAPTCHA challenge, this is the token which
  identifies the challenge (from the CAPTCHA's URL).
  captcha_response: str (optional) If a previous login attempt was
  reponded to with a CAPTCHA challenge, this is the
  response text which was contained in the challenge.
  Returns:
  Generated token, which is also stored in this object.
  Raises:
  A RequestError or one of its suclasses: BadAuthentication,
  BadAuthenticationServiceURL, ClientLoginFailed,
  ClientLoginTokenMissing, or CaptchaChallenge`

delete(self, entry_or_uri, auth_token=None, force=False, **kwargs)

get_access_token(self, request_token, url='https://www.google.com/accounts/OAuthGetAccessToken')
  `Exchanges an authorized OAuth request token for an access token.
  Contacts the Google OAuth server to upgrade a previously authorized
  request token. Once the request token is upgraded to an access token,
  the access token may be used to access the user's data.
  For more details, see the Google Accounts OAuth documentation:
  http://code.google.com/apis/accounts/docs/OAuth.html#AccessToken
  Args:
  request_token: An OAuth token which has been authorized by the user.
  url: (optional) The URL to which the upgrade request should be sent.
  Defaults to: https://www.google.com/accounts/OAuthAuthorizeToken`

get_entry(self, uri, auth_token=None, converter=None, desired_class=<class 'gdata.data.GDEntry'>, etag=None, **kwargs)

get_feed(self, uri, auth_token=None, converter=None, desired_class=<class 'gdata.data.GDFeed'>, **kwargs)

get_next(self, feed, auth_token=None, converter=None, desired_class=None, **kwargs)
  `Fetches the next set of results from the feed.
  When requesting a feed, the number of entries returned is capped at a
  service specific default limit (often 25 entries). You can specify your
  own entry-count cap using the max-results URL query parameter. If there
  are more results than could fit under max-results, the feed will contain
  a next link. This method performs a GET against this next results URL.
  Returns:
  A new feed object containing the next set of entries in this feed.`

get_oauth_token(self, scopes, next, consumer_key, consumer_secret=None, rsa_private_key=None, url='https://www.google.com/accounts/OAuthGetRequestToken')
  `Obtains an OAuth request token to allow the user to authorize this app.
  Once this client has a request token, the user can authorize the request
  token by visiting the authorization URL in their browser. After being
  redirected back to this app at the 'next' URL, this app can then exchange
  the authorized request token for an access token.
  For more information see the documentation on Google Accounts with OAuth:
  http://code.google.com/apis/accounts/docs/OAuth.html#AuthProcess
  Args:
  scopes: list of strings or atom.http_core.Uri objects which specify the
  URL prefixes which this app will be accessing. For example, to access
  the Google Calendar API, you would want to use scopes:
  ['https://www.google.com/calendar/feeds/',
  'http://www.google.com/calendar/feeds/']
  next: str or atom.http_core.Uri object, The URL which the user's browser
  should be sent to after they authorize access to their data. This
  should be a URL in your application which will read the token
  information from the URL and upgrade the request token to an access
  token.
  consumer_key: str This is the identifier for this application which you
  should have received when you registered your application with Google
  to use OAuth.
  consumer_secret: str (optional) The shared secret between your app and
  Google which provides evidence that this request is coming from you
  application and not another app. If present, this libraries assumes
  you want to use an HMAC signature to verify requests. Keep this data
  a secret.
  rsa_private_key: str (optional) The RSA private key which is used to
  generate a digital signature which is checked by Google's server. If
  present, this library assumes that you want to use an RSA signature
  to verify requests. Keep this data a secret.
  url: The URL to which a request for a token should be made. The default
  is Google's OAuth request token provider.`

modify_request(self, http_request)
  `Adds or changes request before making the HTTP request.
  This client will add the API version if it is specified.
  Subclasses may override this method to add their own request
  modifications before the request is made.`

post(self, entry, uri, auth_token=None, converter=None, desired_class=None, **kwargs)

request(self, method=None, uri=None, auth_token=None, http_request=None, converter=None, desired_class=None, redirects_remaining=4, **kwargs)
  `Make an HTTP request to the server.
  See also documentation for atom.client.AtomPubClient.request.
  If a 302 redirect is sent from the server to the client, this client
  assumes that the redirect is in the form used by the Google Calendar API.
  The same request URI and method will be used as in the original request,
  but a gsessionid URL parameter will be added to the request URI with
  the value provided in the server's 302 redirect response. If the 302
  redirect is not in the format specified by the Google Calendar API, a
  RedirectError will be raised containing the body of the server's
  response.
  The method calls the client's modify_request method to make any changes
  required by the client before the request is made. For example, a
  version 2 client could add a GData-Version: 2 header to the request in
  its modify_request method.
  Args:
  method: str The HTTP verb for this request, usually 'GET', 'POST',
  'PUT', or 'DELETE'
  uri: atom.http_core.Uri, str, or unicode The URL being requested.
  auth_token: An object which sets the Authorization HTTP header in its
  modify_request method. Recommended classes include
  gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
  among others.
  http_request: (optional) atom.http_core.HttpRequest
  converter: function which takes the body of the response as its only
  argument and returns the desired object.
  desired_class: class descended from atom.core.XmlElement to which a
  successful response should be converted. If there is no
  converter function specified (converter=None) then the
  desired_class will be used in calling the
  atom.core.parse function. If neither
  the desired_class nor the converter is specified, an
  HTTP reponse object will be returned.
  redirects_remaining: (optional) int, if this number is 0 and the
  server sends a 302 redirect, the request method
  will raise an exception. This parameter is used in
  recursive request calls to avoid an infinite loop.
  Any additional arguments are passed through to
  atom.client.AtomPubClient.request.
  Returns:
  An HTTP response object (see atom.http_core.HttpResponse for a
  description of the object's interface) if no converter was
  specified and no desired_class was specified. If a converter function
  was provided, the results of calling the converter are returned. If no
  converter was specified but a desired_class was provided, the response
  body will be converted to the class using
  atom.core.parse.`

request_client_login_token(self, email, password, source, service=None, account_type='HOSTED_OR_GOOGLE', auth_url=<atom.http_core.Uri object>, captcha_token=None, captcha_response=None)

revoke_token(self, token=None, url=<atom.http_core.Uri object>)
  `Requests that the token be invalidated.
  This method can be used for both AuthSub and OAuth tokens (to invalidate
  a ClientLogin token, the user must change their password).
  Returns:
  True if the server responded with a 200.
  Raises:
  A RequestError if the server responds with a non-200 status.`

update(self, entry, auth_token=None, force=False, uri=None, **kwargs)
  `Edits the entry on the server by sending the XML for this entry.
  Performs a PUT and converts the response to a new entry object with a
  matching class to the entry passed in.
  Args:
  entry:
  auth_token:
  force: boolean stating whether an update should be forced. Defaults to
  False. Normally, if a change has been made since the passed in
  entry was obtained, the server will not overwrite the entry since
  the changes were based on an obsolete version of the entry.
  Setting force to True will cause the update to silently
  overwrite whatever version is present.
  uri: The uri to put to. If provided, this uri is PUT to rather than the
  inferred uri from the entry's edit link.
  Returns:
  A new Entry object of a matching type to the entry which was passed in.`

upgrade_token(self, token=None, url=<atom.http_core.Uri object>)
  `Asks the Google auth server for a multi-use AuthSub token.
  For details on AuthSub, see:
  http://code.google.com/apis/accounts/docs/AuthSub.html
  Args:
  token: gdata.gauth.AuthSubToken or gdata.gauth.SecureAuthSubToken
  (optional) If no token is passed in, the client's auth_token member
  is used to request the new token. The token object will be modified
  to contain the new session token string.
  url: str or atom.http_core.Uri (optional) The URL to which the token
  upgrade request should be sent. Defaults to:
  https://www.google.com/accounts/AuthSubSessionToken
  Returns:
  The upgraded gdata.gauth.AuthSubToken object.`

Data and other attributes inherited from gdata.client.GDClient:

alt_auth_service = None

Methods inherited from atom.client.AtomPubClient:

Get = get(self, uri=None, auth_token=None, http_request=None, **kwargs)
  `Performs a request using the GET method, returns an HTTP response.`

Put = put(self, uri=None, data=None, auth_token=None, http_request=None, **kwargs)
  `Sends data using the PUT method, returns an HTTP response.`

__init__(self, http_client=None, host=None, auth_token=None, source=None, xoauth_requestor_id=None, **kwargs)
  `Creates a new AtomPubClient instance.
  Args:
  source: The name of your application.
  http_client: An object capable of performing HTTP requests through a
  request method. This object is used to perform the request
  when the AtomPubClient's request method is called. Used to
  allow HTTP requests to be directed to a mock server, or use
  an alternate library instead of the default of httplib to
  make HTTP requests.
  host: str The default host name to use if a host is not specified in the
  requested URI.
  auth_token: An object which sets the HTTP Authorization header when its
  modify_request method is called.`

get(self, uri=None, auth_token=None, http_request=None, **kwargs)
  `Performs a request using the GET method, returns an HTTP response.`

put(self, uri=None, data=None, auth_token=None, http_request=None, **kwargs)
  `Sends data using the PUT method, returns an HTTP response.`

Data descriptors inherited from atom.client.AtomPubClient:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

Data and other attributes inherited from atom.client.AtomPubClient:

auth_token = None

host = None

xoauth_requestor_id = None

class TableQuery(ListQuery)

``

Method resolution order:
  TableQuery
  ListQuery
  gdata.client.Query
  __builtin__.object

Methods inherited from ListQuery:

ModifyRequest = modify_request(self, http_request)

__init__(self, order_by=None, reverse=None, sq=None, **kwargs)
  `Adds List-feed specific query parameters to a request.
  Args:
  order_by: str Specifies what column to use in ordering the entries in
  the feed. By position (the default): 'position' returns
  rows in the order in which they appear in the GUI. Row 1, then
  row 2, then row 3, and so on. By column:
  'column:columnName' sorts rows in ascending order based on the
  values in the column with the given columnName, where
  columnName is the value in the header row for that column.
  reverse: str Specifies whether to sort in descending or ascending order.
  Reverses default sort order: 'true' results in a descending
  sort; 'false' (the default) results in an ascending sort.
  sq: str Structured query on the full text in the worksheet.
  [columnName][binaryOperator][value]
  Supported binaryOperators are:
  - (), for overriding order of operations
  - = or ==, for strict equality
  - <> or !=, for strict inequality
  - and or &&, for boolean and
  - or or ||, for boolean or`

modify_request(self, http_request)

Methods inherited from gdata.client.Query:

AddCustomParameter = add_custom_parameter(self, key, value)

add_custom_parameter(self, key, value)

Data descriptors inherited from gdata.client.Query:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

class WorksheetQuery(SpreadsheetQuery)

``

Method resolution order:
  WorksheetQuery
  SpreadsheetQuery
  gdata.client.Query
  __builtin__.object

Methods inherited from SpreadsheetQuery:

ModifyRequest = modify_request(self, http_request)

__init__(self, title=None, title_exact=None, **kwargs)
  `Adds Spreadsheets feed query parameters to a request.
  Args:
  title: str Specifies the search terms for the title of a document.
  This parameter used without title-exact will only submit partial
  queries, not exact queries.
  title_exact: str Specifies whether the title query should be taken as an
  exact string. Meaningless without title. Possible values are
  'true' and 'false'.`

modify_request(self, http_request)

Methods inherited from gdata.client.Query:

AddCustomParameter = add_custom_parameter(self, key, value)

add_custom_parameter(self, key, value)

Data descriptors inherited from gdata.client.Query:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

Data

``

CELLS_URL = 'https://spreadsheets.google.com/feeds/cells/%s/%s/private/full'
CELL_URL = 'https://spreadsheets.google.com/feeds/cells/%s/%s/private/full/R%sC%s'
LISTS_URL = 'https://spreadsheets.google.com/feeds/list/%s/%s/private/full'
RECORDS_URL = 'https://spreadsheets.google.com/feeds/%s/records/%s'
RECORD_URL = 'https://spreadsheets.google.com/feeds/%s/records/%s/%s'
SPREADSHEETS_URL = 'https://spreadsheets.google.com/feeds/spreadsheets/private/full'
TABLES_URL = 'https://spreadsheets.google.com/feeds/%s/tables'
WORKSHEETS_URL = 'https://spreadsheets.google.com/feeds/worksheets/%s/private/full'
WORKSHEET_URL = 'https://spreadsheets.google.com/feeds/worksheets/%s/private/full/%s'
__author__ = 'j.s@google.com (Jeff Scudder)'

Author
`` |  | j.s@google.com (Jeff Scudder)