Skip to content

Commit 5be496f

Browse files
committed
Docs:
- Modify index page - Jira module docs moved from index page to jira page - Add Confluence docs - Update license
1 parent 5fe818e commit 5be496f

File tree

4 files changed

+322
-161
lines changed

4 files changed

+322
-161
lines changed

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
# -- Project information -----------------------------------------------------
2121

2222
project = 'Atlassian Python API'
23-
copyright = '2018, SLRover'
23+
copyright = 'APACHE LICENSE, VERSION 2.0'
2424
author = 'SLRover'
2525

2626
# The short X.Y version
2727
version = ''
2828
# The full version, including alpha/beta/rc tags
29-
release = '1.10.0'
29+
release = '1.10.2'
3030

3131

3232
# -- General configuration ---------------------------------------------------

docs/confluence.rst

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
Confluence module
2+
=================
3+
4+
Get page info
5+
-------------
6+
7+
.. code-block:: python
8+
9+
# Check page exists
10+
confluence.page_exists(space, title)
11+
12+
# Provide content by type (page, blog, comment)
13+
confluence.get_page_child_by_type(page_id, type='page', start=None, limit=None)
14+
15+
# Provide content id from search result by title and space
16+
confluence.get_page_id(space, title)
17+
18+
# Provide space key from content id
19+
confluence.get_page_space(page_id)
20+
21+
# Returns the list of labels on a piece of Content
22+
confluence.get_page_by_title(space, title, start=None, limit=None)
23+
24+
# Get page by ID
25+
confluence.get_page_by_id(page_id, expand=None)
26+
27+
# The list of labels on a piece of Content
28+
confluence.get_page_labels(page_id, prefix=None, start=None, limit=None)
29+
30+
# Get draft page by ID
31+
confluence.get_draft_page_by_id(page_id, status='draft')
32+
33+
# Get all page by label
34+
confluence.get_all_pages_by_label(label, start=0, limit=50)
35+
36+
# Get all pages from Space
37+
confluence.get_all_pages_from_space(space, start=0, limit=500)
38+
39+
# Get list of pages from trash
40+
confluence.get_all_pages_from_space_trash(space, start=0, limit=500, status='trashed')
41+
42+
# Get list of draft pages from space
43+
# Use case is cleanup old drafts from Confluence
44+
confluence.get_all_draft_pages_from_space(space, start=0, limit=500, status='draft')
45+
46+
# Search list of draft pages by space key
47+
# Use case is cleanup old drafts from Confluence
48+
confluence.get_all_draft_pages_from_space_through_cql(space, start=0, limit=500, status='draft')
49+
50+
# Info about all restrictions by operation
51+
confluence.get_all_restictions_for_content(content_id)
52+
53+
Page actions
54+
------------
55+
56+
.. code-block:: python
57+
58+
# Create page from scratch
59+
confluence.create_page(space, title, body, parent_id=None, type='page')
60+
61+
# Remove page
62+
confluence.remove_page(page_id, status=None)
63+
64+
# Remove page from trash
65+
confluence.remove_page_from_trash(page_id)
66+
67+
# Remove page as draft
68+
confluence.remove_page_as_draft(page_id)
69+
70+
# Update page if already exist
71+
confluence.update_page(parent_id, page_id, title, body, type='page')
72+
73+
# Update page or create page if it is not exists
74+
confluence.update_or_create(parent_id, title, body)
75+
76+
# Set the page (content) property e.g. add hash parameters
77+
confluence.set_page_property(page_id, data)
78+
79+
# Delete the page (content) property e.g. delete key of hash
80+
confluence.delete_page_property(page_id, page_property)
81+
82+
# Get the page (content) property e.g. get key of hash
83+
confluence.get_page_property(page_id, page_property_key)
84+
85+
# Get the page (content) properties
86+
confluence.get_page_properties(page_id)
87+
88+
# Get page ancestors
89+
confluence.get_page_ancestors(page_id)
90+
91+
# Attach (upload) a file to a page, if it exists it will update the
92+
# automatically version the new file and keep the old one
93+
confluence.attach_file(filename, page_id=None, title=None, space=None, comment=None)
94+
95+
Get spaces info
96+
---------------
97+
98+
.. code-block:: python
99+
100+
# Get all spaces with provided limit
101+
confluence.get_all_spaces(start=0, limit=500)
102+
103+
# Get information about a space through space key
104+
confluence.get_space(space_key, expand='description.plain,homepage')
105+
106+
Users and Groups
107+
----------------
108+
109+
.. code-block:: python
110+
111+
# Get all groups from Confluence User management
112+
confluence.get_all_groups(start=0, limit=1000)
113+
114+
# Get a paginated collection of users in the given group
115+
confluence.get_group_members(group_name='confluence-users', start=0, limit=1000)
116+
117+
# Get information about a user through username
118+
confluence.get_user_details_by_username(username, expand=None)
119+
120+
# Get information about a user through user key
121+
confluence.get_user_details_by_userkey(userkey, expand=None)
122+
123+
CQL
124+
---
125+
126+
.. code-block:: python
127+
128+
# Get results from cql search result with all related fields
129+
confluence.cql(cql, start=0, limit=None)
130+
131+
Other actions
132+
-------------
133+
134+
.. code-block:: python
135+
136+
# Clean all caches from cache management
137+
confluence.clean_all_caches()
138+
139+
# Clean caches from cache management
140+
# e.g.
141+
# com.gliffy.cache.gon
142+
# org.hibernate.cache.internal.StandardQueryCache_v5
143+
confluence.clean_package_cache(cache_name='com.gliffy.cache.gon')
144+
145+
# Convert to Confluence XHTML format from wiki style
146+
confluence.convert_wiki_to_storage(wiki)
147+
148+
# Get page history
149+
confluence.history(page_id)
150+
151+
# Compare content and check is already updated or not
152+
confluence.is_page_content_is_already_updated(page_id, body)
153+

docs/index.rst

Lines changed: 0 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -37,165 +37,6 @@ Add a connection:
3737
username='admin',
3838
password='admin')
3939
40-
Jira
41-
----
42-
43-
* Get issues from jql search result with all related fields:
44-
45-
.. code-block:: python
46-
47-
jql_request = 'project = DEMO AND status NOT IN (Closed, Resolved) ORDER BY issuekey'
48-
issues = jira.jql(jql_request)
49-
print(issues)
50-
51-
* Reindex Jira
52-
53-
.. code-block:: python
54-
55-
# Reindexing Jira
56-
jira.reindex()
57-
58-
# Reindex status
59-
jira.reindex_status()
60-
61-
# Reindex type
62-
jira.reindex_with_type(indexing_type="BACKGROUND_PREFERRED")
63-
"""
64-
FOREGROUND - runs a lock/full reindexing
65-
BACKGROUND - runs a background reindexing.
66-
If JIRA fails to finish the background reindexing, respond with 409 Conflict (error message).
67-
BACKGROUND_PREFERRED - If possible do a background reindexing.
68-
If it's not possible (due to an inconsistent index), do a foreground reindexing.
69-
"""
70-
71-
* Manage users
72-
73-
.. code-block:: python
74-
75-
# Get user
76-
jira.user(username)
77-
78-
# Remove user
79-
jira.user_remove(username)
80-
81-
# Deactivate user
82-
jira.user_deactivate(username)
83-
84-
# Get web sudo cookies using normal http request
85-
jira.user_get_websudo()
86-
87-
# Fuzzy search using username and display name
88-
jira.user_find_by_user_string(username, start=0, limit=50, include_inactive_users=False)
89-
90-
# Get all users from group
91-
jira.get_all_users_from_group(group, include_inactive_users=False, start=0, limit=50)
92-
93-
* Manage projects
94-
95-
.. code-block:: python
96-
97-
# Get all projects
98-
jira.projects()
99-
100-
# Get project
101-
jira.project(key)
102-
103-
# Get project components using project key
104-
jira.get_project_components(key)
105-
106-
# Get a full representation of a the specified project's versions
107-
jira.get_project_versions(key, expand=None)
108-
109-
# Returns all versions for the specified project. Results are paginated.
110-
# Results can be ordered by the following fields: sequence, name, startDate, releaseDate.
111-
jira.get_project_versions_paginated(key, start=None, limit=None, order_by=None, expand=None)
112-
113-
# Get project leaders
114-
jira.project_leaders()
115-
116-
# Get last project issuekey
117-
jira.get_project_issuekey_last(project)
118-
119-
# Get all project issue keys
120-
jira.get_project_issuekey_all(project)
121-
122-
# Get project issues count
123-
jira.get_project_issues_count(project)
124-
125-
# Get all project issues
126-
jira.get_all_project_issues(project, fields='*all')
127-
128-
# Get all assignable users for project
129-
jira.get_all_assignable_users_for_project(project_key, start=0, limit=50)
130-
131-
* Manage issues
132-
133-
.. code-block:: python
134-
135-
# Get issue by key
136-
jira.issue(key)
137-
138-
# Get issue field value
139-
jira.issue_field_value(key, field)
140-
141-
# Update issue field
142-
fields = {'summary': 'New summary'}
143-
jira.update_issue_field(key, fields)
144-
145-
# Rename sprint
146-
jira.rename_sprint(sprint_id, name, start_date, end_date)
147-
148-
# Check issue exists
149-
jira.issue_exists(issue_key)
150-
151-
# Check issue deleted
152-
jira.issue_deleted(issue_key)
153-
154-
# Update issue
155-
jira.issue_update(issue_key, fields)
156-
157-
# Create issue
158-
jira.issue_create(fields)
159-
160-
# Issue create or update
161-
jira.issue_create_or_update(fields)
162-
163-
# Get issue transitions
164-
jira.get_issue_transitions(issue_key)
165-
166-
# Get status ID from name
167-
jira.get_status_id_from_name(status_name)
168-
169-
# Get transition id to status name
170-
jira.get_transition_id_to_status_name(issue_key, status_name)
171-
172-
# Transition issue
173-
jira.issue_transition(issue_key, status)
174-
175-
# Set issue status
176-
jira.set_issue_status(issue_key, status_name)
177-
178-
# Get issue status
179-
jira.get_issue_status(issue_key)
180-
181-
* Manage components
182-
183-
.. code-block:: python
184-
185-
# Get component
186-
jira.component(component_id)
187-
188-
# Create component
189-
jira.create_component(component)
190-
191-
# Delete component
192-
jira.delete_component(component_id)
193-
194-
* Upload Jira plugin
195-
196-
.. code-block:: python
197-
198-
upload_plugin(plugin_path)
19940
20041
20142
.. |Build Status| image:: https://travis-ci.org/AstroMatt/atlassian-python-api.svg?branch=master

0 commit comments

Comments
 (0)