-
Notifications
You must be signed in to change notification settings - Fork 709
Expand file tree
/
Copy path__init__.py
More file actions
24 lines (19 loc) · 797 Bytes
/
__init__.py
File metadata and controls
24 lines (19 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# coding=utf-8
from .base import BitbucketCloudBase
from .repositories import Repositories
from .workspaces import Workspaces
class Cloud(BitbucketCloudBase):
def __init__(self, url="https://api.bitbucket.org/", *args, **kwargs):
kwargs["cloud"] = True
kwargs["api_root"] = None
kwargs["api_version"] = "2.0"
url = url.strip("/") + f"/{kwargs['api_version']}"
super(Cloud, self).__init__(url, *args, **kwargs)
self.__workspaces = Workspaces(f"{self.url}/workspaces", **self._new_session_args)
self.__repositories = Repositories(f"{self.url}/repositories", **self._new_session_args)
@property
def workspaces(self):
return self.__workspaces
@property
def repositories(self):
return self.__repositories