projects
Project
Bases: BitbucketCloudBase
Source code in server/vendor/atlassian/bitbucket/cloud/workspaces/projects.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
|
created_on
property
The project creation time
description
property
writable
The project description
is_private
property
writable
The project private flag
key
property
writable
The project key
name
property
writable
The project name
repositories
property
The project repositories
updated_on
property
The project last update time
delete()
Delete the project.
:return: The response on success
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/workspaces/%7Bworkspace%7D/projects/%7Bproject_key%7D#delete
Source code in server/vendor/atlassian/bitbucket/cloud/workspaces/projects.py
145 146 147 148 149 150 151 152 153 154 155 156 |
|
get_avatar()
The project avatar
Source code in server/vendor/atlassian/bitbucket/cloud/workspaces/projects.py
208 209 210 |
|
update(**kwargs)
Update the project properties. Fields not present in the request body are ignored.
:param kwargs: dict: The data to update.
:return: The updated project
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/workspaces/%7Bworkspace%7D/projects/%7Bproject_key%7D#put
Source code in server/vendor/atlassian/bitbucket/cloud/workspaces/projects.py
133 134 135 136 137 138 139 140 141 142 143 |
|
Projects
Bases: BitbucketCloudBase
Source code in server/vendor/atlassian/bitbucket/cloud/workspaces/projects.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
create(name, key, description, is_private=True, avatar=None)
Creates a new project with the given values
Note that the avatar has to be embedded as either a data-url or a URL to an external image as shown in the examples below:
w.projects.create( "Mars Project", "MARS", "Software for colonizing mars.",
avatar="data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/...",
is_private=False
)
w.projects.create( "Mars Project", "MARS", "Software for colonizing mars.",
avatar="http://i.imgur.com/72tRx4w.gif",
is_private=False
)
:param name: string: The name of the project. :param key: string: The key of the project. :param description: string: The description of the project. :param is_private: bool (default is True): True if it is a private project. :param avatar: string (default is None): The avatar of the project.
:return: The created project object
API docs
https://developer.atlassian.com/bitbucket/api/2/reference/resource/workspaces/%7Bworkspace%7D/projects#post
Source code in server/vendor/atlassian/bitbucket/cloud/workspaces/projects.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
each(q=None, sort=None)
Get all projects in the workspace matching the criteria. :param q: string (default is None): Query string to narrow down the response. See for details: https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering :param sort: string (default is None): Name of a response property to sort results. See for details: https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering :return: A generator for the project objects
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/workspaces/%7Bworkspace%7D/projects#get
Source code in server/vendor/atlassian/bitbucket/cloud/workspaces/projects.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
exists(project, by='key')
Check if project exist.
:param project: string: The requested project. :param by: string (default is "key"): How to interpret project, can be 'key' or 'name'.
:return: True if the project exists
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/workspaces/%7Bworkspace%7D/projects/%7Bproject_key%7D#get
Source code in server/vendor/atlassian/bitbucket/cloud/workspaces/projects.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
get(project, by='key')
Returns the requested project
:param project: string: The requested project. :param by: string (default is "key"): How to interpret project, can be 'key' or 'name'.
:return: The requested Project object
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/workspaces/%7Bworkspace%7D/projects/%7Bproject_key%7D#get
Source code in server/vendor/atlassian/bitbucket/cloud/workspaces/projects.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|