title: How to upload documents with new python-gdata (2.0.16)?
body: <p>With python-gdata 2.0.14, I used the following pieces of code to create and upload documents:</p>
  
  <pre><code># To create a document
  import gdata.docs
  import gdata.docs.client
  from gdata.data import MediaSource
  
  gdClient = gdata.docs.client.DocsClient(source="my-app")
  gdClient.ssl = True
  gdClient.ClientLogin("login", "pa$$word", gdClient.source)
  ms = MediaSource(file_path="temp.html", content_type="text/html")
  entry = gdClient.Upload(ms, "document title")
  print "uploaded, url is", entry.GetAlternateLink().href
  </code></pre>
  
  <p>and</p>
  
  <pre><code># To update a document
  entry.title.text = "updated title"
  entry = gdClient.Update(entry, media_source=ms, force=True)
  print "updated, url is", entry.GetAlternateLink().href
  </code></pre>
  
  <p>However, this code does no longer work with python-gdata 2.0.16 because <a href="http://gdata-python-client.googlecode.com/hg/pydocs/gdata.docs.client.html" rel="nofollow"><code>DocsClient</code> class</a> does no more have <code>Upload</code> and <code>Update</code> functions.</p>
  
  <p>I tried to use this</p>
  
  <pre><code># Try to create a document
  gdClient = gdata.docs.client.DocsClient(source="my-app")
  gdClient.ssl = True
  gdClient.ClientLogin("login", "pa$$word", gdClient.source)
  ms = MediaSource(file_path="temp.html", content_type="text/html")
  entry = gdata.docs.data.Resource(type=gdata.docs.data.DOCUMENT_LABEL, title="document title")
  self.resource = gdClient.CreateResource(entry, media=ms)
  </code></pre>
  
  <p>… but I get this error:</p>
  
  <pre><code>gdata.client.Unauthorized: Unauthorized - Server responded with: 401, 'Token invalid'
  </code></pre>
  
  <p>Can anybody tell me where's my mistake and how should I use that new API?</p>
  
  <p>P.S. <a href="http://code.google.com/intl/en-US/apis/documents/docs/3.0/developers_guide_python.html" rel="nofollow">The documentation</a> hasn't been updated and still uses the old-style code.</p>