fix docs on authenticated Launchpad creation

Bug #1460738 reported by Sheila Miguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpadlib
New
Undecided
Unassigned

Bug Description

The docs on Launchpad authentication Specify:

https://help.launchpad.net/API/launchpadlib#Authenticated_access_for_website_integration
```
Once exchange_request_token_for_access_token() successfully executes, an authorized access token will be present in credentials.access_token. You can then pass the Credentials object into the Launchpad constructor.

    from launchpadlib.launchpad import Launchpad
    launchpad = Launchpad(credentials, service_root="production")
```

The signature in the docs is inaccurate. Here is what happens when I use it:

```
creds = Credentials.load_from_path('/path/to/credentials')
Launchpad(creds, service_root='production')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-39-36a74f311bb7> in <module>()
----> 1 Launchpad(creds, service_root='production')

TypeError: __init__() takes at least 4 arguments (3 given)
```

I am able to use the Launchpad.login_with method with my credentials, and have not dived in to the lp code to fix the docs.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.