summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-eztdx.spec229
-rw-r--r--sources1
3 files changed, 231 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..b1a4505 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/EzTDX-2021.11.16.tar.gz
diff --git a/python-eztdx.spec b/python-eztdx.spec
new file mode 100644
index 0000000..383b3b7
--- /dev/null
+++ b/python-eztdx.spec
@@ -0,0 +1,229 @@
+%global _empty_manifest_terminate_build 0
+Name: python-EzTDX
+Version: 2021.11.16
+Release: 1
+Summary: A Python interface to the TeamDynamix REST APIs
+License: GPLv3+
+URL: https://github.com/cgarrett/eztdx
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ce/25/b6fd435d5a6a78aaecc9d7e3c563f00bedf37ecba7b72f1bdcf2a0138951/EzTDX-2021.11.16.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+
+%description
+## Current Functionality
+### **Initialization**
+```EzTDX(BEID, WebServicesKey, APP_ID, Sandbox)```
+- **BEID, WebServicesKey, and APP_ID**: If this is going to be used as part of a UC4 project, these should come from environment variables.
+- **Sandbox**: Boolean value to point to either the test or production environment. *defaults to True so in order to use PROD, you must put False in it's place*
+### **Get a single person**
+```EzTDX.get_person(user_id)```
+- **user_id**: The GUID of the user you would like information for.
+> Returns a dictionary of a single person.
+### **Get groups a person belongs to**
+```EzTDX.get_people_groups(user_id)```
+- **user_id**: The GUID of the user you would like information for.
+> Returns a list of dictionary objects relating to the groups a person belongs to
+### **Get a Single Ticket**
+```EzTDX.get_ticket_by_id(ticket_id)```
+- **ticket_id**: Ticket ID of the ticket you want to retrieve
+> Returns a dictionary of a single ticket.
+### **Get time types**
+```EzTDX.get_time_types()```
+> Returns a list of time types
+### **Get single time type**
+```EzTDX.get_time_type(time_type_id)```
+- **time_type_id**: ID of the type of time you would like information for
+> Returns dictionary with information on the type of time you requested.
+### **Get Ticket Description**
+```EzTDX.get_ticket_description(self, ticket_id: str)```
+- **ticket_id**: ID of ticket to get the description of
+> Returns the description field of the ticket.
+### **Search People**
+```EzTDX.search_people(search_by, max_results)```
+- **search_by**: Searches last name, first name, user name, etc...
+- **max_results**: Limit search to number of possible matches (default: 10)
+> Returns a dictionary of person data
+### **Search Tickets**
+```EzTDX.search_tickets(search_str, ticket_status, max_results)```
+- **search_str**: Search string * *required*
+- **ticket_status**: List of ticket statuses you want to filter by (ex: ['New', 'Open', 'In Progress']) * *defaults to ['New']*
+- **max_results**: How many tickets to be returned. *defaults to 5*
+> Returns a list of tickets.
+### **Search time entries**
+```EzTDX.search_time_entries(entry_from_date, entry_to_date, person_ids, max_results)```
+- **entry_from_date**: Start date in 2021-06-02T00:00:00Z format
+- **entry_to_date**: End date in 2021-06-02T00:00:00Z format
+- **person_ids**: List of GUIDS to search time entries for *defaults to empty list or everyone*
+- **max_results**: How many entries to return *defaults to 1000*
+> Returns a list of time entry dictionaries
+### **Update a Ticket**
+```EzTDX.update_ticket(ticket_id, comment, new_status, is_private)```
+- **ticket_id**: ID of ticket to be updated * *required*
+- **comment**: Comment to add to the feed * *required*
+- **new_status**: Change the status of the ticket *defaults to None for no change*
+- **is_private**: Mark the comment as private *defaults to False*
+> Returns a success or failure message.
+
+%package -n python3-EzTDX
+Summary: A Python interface to the TeamDynamix REST APIs
+Provides: python-EzTDX
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-EzTDX
+## Current Functionality
+### **Initialization**
+```EzTDX(BEID, WebServicesKey, APP_ID, Sandbox)```
+- **BEID, WebServicesKey, and APP_ID**: If this is going to be used as part of a UC4 project, these should come from environment variables.
+- **Sandbox**: Boolean value to point to either the test or production environment. *defaults to True so in order to use PROD, you must put False in it's place*
+### **Get a single person**
+```EzTDX.get_person(user_id)```
+- **user_id**: The GUID of the user you would like information for.
+> Returns a dictionary of a single person.
+### **Get groups a person belongs to**
+```EzTDX.get_people_groups(user_id)```
+- **user_id**: The GUID of the user you would like information for.
+> Returns a list of dictionary objects relating to the groups a person belongs to
+### **Get a Single Ticket**
+```EzTDX.get_ticket_by_id(ticket_id)```
+- **ticket_id**: Ticket ID of the ticket you want to retrieve
+> Returns a dictionary of a single ticket.
+### **Get time types**
+```EzTDX.get_time_types()```
+> Returns a list of time types
+### **Get single time type**
+```EzTDX.get_time_type(time_type_id)```
+- **time_type_id**: ID of the type of time you would like information for
+> Returns dictionary with information on the type of time you requested.
+### **Get Ticket Description**
+```EzTDX.get_ticket_description(self, ticket_id: str)```
+- **ticket_id**: ID of ticket to get the description of
+> Returns the description field of the ticket.
+### **Search People**
+```EzTDX.search_people(search_by, max_results)```
+- **search_by**: Searches last name, first name, user name, etc...
+- **max_results**: Limit search to number of possible matches (default: 10)
+> Returns a dictionary of person data
+### **Search Tickets**
+```EzTDX.search_tickets(search_str, ticket_status, max_results)```
+- **search_str**: Search string * *required*
+- **ticket_status**: List of ticket statuses you want to filter by (ex: ['New', 'Open', 'In Progress']) * *defaults to ['New']*
+- **max_results**: How many tickets to be returned. *defaults to 5*
+> Returns a list of tickets.
+### **Search time entries**
+```EzTDX.search_time_entries(entry_from_date, entry_to_date, person_ids, max_results)```
+- **entry_from_date**: Start date in 2021-06-02T00:00:00Z format
+- **entry_to_date**: End date in 2021-06-02T00:00:00Z format
+- **person_ids**: List of GUIDS to search time entries for *defaults to empty list or everyone*
+- **max_results**: How many entries to return *defaults to 1000*
+> Returns a list of time entry dictionaries
+### **Update a Ticket**
+```EzTDX.update_ticket(ticket_id, comment, new_status, is_private)```
+- **ticket_id**: ID of ticket to be updated * *required*
+- **comment**: Comment to add to the feed * *required*
+- **new_status**: Change the status of the ticket *defaults to None for no change*
+- **is_private**: Mark the comment as private *defaults to False*
+> Returns a success or failure message.
+
+%package help
+Summary: Development documents and examples for EzTDX
+Provides: python3-EzTDX-doc
+%description help
+## Current Functionality
+### **Initialization**
+```EzTDX(BEID, WebServicesKey, APP_ID, Sandbox)```
+- **BEID, WebServicesKey, and APP_ID**: If this is going to be used as part of a UC4 project, these should come from environment variables.
+- **Sandbox**: Boolean value to point to either the test or production environment. *defaults to True so in order to use PROD, you must put False in it's place*
+### **Get a single person**
+```EzTDX.get_person(user_id)```
+- **user_id**: The GUID of the user you would like information for.
+> Returns a dictionary of a single person.
+### **Get groups a person belongs to**
+```EzTDX.get_people_groups(user_id)```
+- **user_id**: The GUID of the user you would like information for.
+> Returns a list of dictionary objects relating to the groups a person belongs to
+### **Get a Single Ticket**
+```EzTDX.get_ticket_by_id(ticket_id)```
+- **ticket_id**: Ticket ID of the ticket you want to retrieve
+> Returns a dictionary of a single ticket.
+### **Get time types**
+```EzTDX.get_time_types()```
+> Returns a list of time types
+### **Get single time type**
+```EzTDX.get_time_type(time_type_id)```
+- **time_type_id**: ID of the type of time you would like information for
+> Returns dictionary with information on the type of time you requested.
+### **Get Ticket Description**
+```EzTDX.get_ticket_description(self, ticket_id: str)```
+- **ticket_id**: ID of ticket to get the description of
+> Returns the description field of the ticket.
+### **Search People**
+```EzTDX.search_people(search_by, max_results)```
+- **search_by**: Searches last name, first name, user name, etc...
+- **max_results**: Limit search to number of possible matches (default: 10)
+> Returns a dictionary of person data
+### **Search Tickets**
+```EzTDX.search_tickets(search_str, ticket_status, max_results)```
+- **search_str**: Search string * *required*
+- **ticket_status**: List of ticket statuses you want to filter by (ex: ['New', 'Open', 'In Progress']) * *defaults to ['New']*
+- **max_results**: How many tickets to be returned. *defaults to 5*
+> Returns a list of tickets.
+### **Search time entries**
+```EzTDX.search_time_entries(entry_from_date, entry_to_date, person_ids, max_results)```
+- **entry_from_date**: Start date in 2021-06-02T00:00:00Z format
+- **entry_to_date**: End date in 2021-06-02T00:00:00Z format
+- **person_ids**: List of GUIDS to search time entries for *defaults to empty list or everyone*
+- **max_results**: How many entries to return *defaults to 1000*
+> Returns a list of time entry dictionaries
+### **Update a Ticket**
+```EzTDX.update_ticket(ticket_id, comment, new_status, is_private)```
+- **ticket_id**: ID of ticket to be updated * *required*
+- **comment**: Comment to add to the feed * *required*
+- **new_status**: Change the status of the ticket *defaults to None for no change*
+- **is_private**: Mark the comment as private *defaults to False*
+> Returns a success or failure message.
+
+%prep
+%autosetup -n EzTDX-2021.11.16
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-EzTDX -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 31 2023 Python_Bot <Python_Bot@openeuler.org> - 2021.11.16-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..03844cf
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+15454da0eb9ac66d84a968338153f8b9 EzTDX-2021.11.16.tar.gz