~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/lp_api.py

Merge 2.2 into 2.3 including fixes for bug #583667 and bug #681885

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    raise errors.DependencyNotPresent('launchpadlib', e)
45
45
 
46
46
from launchpadlib.launchpad import (
47
 
    EDGE_SERVICE_ROOT,
48
47
    STAGING_SERVICE_ROOT,
49
48
    Launchpad,
50
49
    )
81
80
 
82
81
LAUNCHPAD_API_URLS = {
83
82
    'production': LPNET_SERVICE_ROOT,
84
 
    'edge': EDGE_SERVICE_ROOT,
85
83
    'staging': STAGING_SERVICE_ROOT,
86
84
    'dev': 'https://api.launchpad.dev/beta/',
87
85
    }
90
88
def _get_api_url(service):
91
89
    """Return the root URL of the Launchpad API.
92
90
 
93
 
    e.g. For the 'edge' Launchpad service, this function returns
94
 
    launchpadlib.launchpad.EDGE_SERVICE_ROOT.
 
91
    e.g. For the 'staging' Launchpad service, this function returns
 
92
    launchpadlib.launchpad.STAGING_SERVICE_ROOT.
95
93
 
96
94
    :param service: A `LaunchpadService` object.
97
95
    :return: A URL as a string.