~vila/bzr/2.2-integration

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-12-02 14:12:29 UTC
  • mfrom: (5113.1.2 2.2.3-dev)
  • Revision ID: pqm@pqm.ubuntu.com-20101202141229-wymlgvcy2q6l9zo8
(vila) Merge 2.1 into 2.2 including fix for bug #583667 (Vincent
        Ladeuil)

Show diffs side-by-side

added added

removed removed

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