~ubuntu-branches/debian/experimental/lazr.restfulclient/experimental

« back to all changes in this revision

Viewing changes to src/lazr/restfulclient/docs/entries.txt

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2010-04-29 21:42:36 UTC
  • mfrom: (1.2.1 upstream) (9.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100429214236-vnuw5dmm2evm982u
Tags: 0.9.14-1
* New upstream release.
* debian/control:
  - Remove Conflicts/Replaces with python-lazr-restfulclient, they were
    useful for Ubuntu Lucid only.

Show diffs side-by-side

added added

removed removed

Lines of Context:
444
444
    >>> recipe.lp_save()
445
445
    >>> recipe == recipe_2
446
446
    False
 
447
 
 
448
Server-side permissions
 
449
-----------------------
 
450
 
 
451
The server may hide some data from you because you lack the permission
 
452
to see it. To avoid objects that are mysteriously missing fields, the
 
453
server will serve a special "redacted" value that lets you know you
 
454
don't have permission to see the data.
 
455
 
 
456
    >>> from lazr.restfulclient.tests.example import CookbookWebServiceClient
 
457
    >>> service = CookbookWebServiceClient()
 
458
 
 
459
    >>> cookbook = service.recipes[1].cookbook
 
460
    >>> print cookbook.confirmed
 
461
    tag:launchpad.net:2008:redacted
 
462
 
 
463
If you try to make an HTTP request for the "redacted" value (usually
 
464
by following a link that you don't know is redacted), you'll get a
 
465
helpful error.
 
466
 
 
467
    >>> service.load("tag:launchpad.net:2008:redacted")
 
468
    Traceback (most recent call last):
 
469
    ...
 
470
    ValueError: You tried to access a resource that you don't have the
 
471
    server-side permission to see.