E-Log Service¶
elog_client.py
Elog API client for posting entries and fetching user and logbook information.
            get_user()
¶
    Fetches the user information from the ELOG API. Also used to verify the API key. :return: A tuple containing the status code and the user data or exception.
Source code in trace/services/elog_client.py
              21 22 23 24 25 26 27 28 29 30 31 32 33 34  |  | 
            post_entry(title, body, logbooks, image_bytes, config_file_path=None)
¶
    Posts a new entry with image to the ELOG API.
:param title: The title of the entry. :param body: The body of the entry. :param logbooks: A list of logbook names to post the entry to. :param image_bytes: Bytes of the image to be attached to the entry. :param config_file: Optional, path of config file to attach. :return: A tuple containing the status code and the response data or exception.
Source code in trace/services/elog_client.py
              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  |  | 
            get_logbooks()
¶
    Fetches the list of logbooks from the ELOG API.
:return: A tuple containing the status code and a list of logbook names or an exception.
Source code in trace/services/elog_client.py
              77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92  |  |