diff --git a/pyotrs/lib.py b/pyotrs/lib.py index a1c8b21a5969713ddda09984d84c957c34c96b6e..8f152411dde3bed97b1ed69ffddf4f4a722b5b16 100644 --- a/pyotrs/lib.py +++ b/pyotrs/lib.py @@ -474,7 +474,7 @@ class Ticket(object): """dummy data (for testing) Returns: - Ticket: + **Ticket**: A Ticket object. """ return Ticket.create_basic(Queue=u"Raw", @@ -485,10 +485,10 @@ class Ticket(object): @staticmethod def datetime_to_pending_time_text(datetime_object=None): - """datetime_to_pending_time_str + """datetime_to_pending_time_text Args: - datetime_object (Datetime): + datetime_object (Datetime) Returns: **str**: The pending time in the format required for OTRS REST interface. @@ -727,12 +727,10 @@ class Client(object): """ GenericInterface::Operation::Session::SessionCreate - Methods (public): * session_check_is_valid * session_create * session_restore_or_set_up_new # try to get session_id from a (json) file on filesystem """ - def session_check_is_valid(self, session_id=None): """check whether session_id is currently valid @@ -830,10 +828,8 @@ class Client(object): """ GenericInterface::Operation::Ticket::TicketCreate - Methods (public): * ticket_create """ - def ticket_create(self, ticket=None, article=None, @@ -886,12 +882,11 @@ class Client(object): """ GenericInterface::Operation::Ticket::TicketGet - Methods (public): + * ticket_get_by_id * ticket_get_by_list * ticket_get_by_number """ - def ticket_get_by_id(self, ticket_id, articles=False, @@ -1016,11 +1011,9 @@ class Client(object): """ GenericInterface::Operation::Ticket::TicketSearch - Methods (public): * ticket_search * ticket_search_full_text """ - def ticket_search(self, **kwargs): """Wrapper for search ticket @@ -1032,10 +1025,8 @@ class Client(object): .. note:: If value of kwargs is a datetime object then this object will be - converted to the appropriate string format for REST API. + converted to the appropriate string format for OTRS API. - .. note:: - tickets that were found as list of **str** stored self.ticket_search_result_list """ if not self.session_id_store.value: raise SessionNotCreated("Call session_create() or " @@ -1060,7 +1051,7 @@ class Client(object): """Wrapper for search ticket for full text search Args: - pattern (str): Search pattern (a % will be added to from and end automatically) + pattern (str): Search pattern (a '%' will be added to front and end automatically) Returns: **list** or **False**: The search result (as list) if successful, otherwise **False**. @@ -1070,6 +1061,7 @@ class Client(object): .. note:: Waiting for progress on OTRS Bug: http://bugs.otrs.org/show_bug.cgi?id=11981 + """ self.operation = "TicketSearch" pattern_wildcard = "%{0}%".format(pattern) @@ -1081,11 +1073,9 @@ class Client(object): """ GenericInterface::Operation::Ticket::TicketUpdate - Methods (public): * ticket_update * ticket_update_set_pending """ - def ticket_update(self, ticket_id, article=None,