brynq-sdk-jira 1.0.0__tar.gz → 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq_sdk_jira
3
- Version: 1.0.0
3
+ Version: 1.1.0
4
4
  Summary: JIRA wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -97,3 +97,19 @@ class Jira(BrynQ):
97
97
 
98
98
  return df
99
99
 
100
+ def get_versions(self, project_key: str) -> pd.DataFrame:
101
+ """
102
+ This method retrieves versions for a given project from Jira.
103
+ :param project_key: The key of the project for which versions are to be retrieved.
104
+ :return: A dataframe with the versions.
105
+ """
106
+ url = f"{self.base_url}rest/api/latest/project/{project_key}/versions"
107
+ response = requests.get(url=url, headers=self.headers)
108
+ if response.status_code == 200:
109
+ response_json = response.json()
110
+ df = pd.json_normalize(response_json)
111
+ if self.debug:
112
+ print(f"Received {len(df)} versions for project {project_key}")
113
+ return df
114
+ else:
115
+ raise ConnectionError(f"Error getting versions from Jira with message: {response.status_code, response.text}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq-sdk-jira
3
- Version: 1.0.0
3
+ Version: 1.1.0
4
4
  Summary: JIRA wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -3,7 +3,7 @@ from setuptools import setup
3
3
 
4
4
  setup(
5
5
  name='brynq_sdk_jira',
6
- version='1.0.0',
6
+ version='1.1.0',
7
7
  description='JIRA wrapper from BrynQ',
8
8
  long_description='JIRA wrapper from BrynQ',
9
9
  author='BrynQ',
File without changes