src/pds_doi_service/core/actions/list.py
def transaction_for_doi(self, doi):
        """
        Returns the latest transaction record for the provided DOI.

        Parameters
        ----------
        doi : str
            The DOI to search for.

        Returns
        -------
        record : dict
            Latest transaction database record for the given identifier.

        Raises
        ------
        UnknownDoiException
            If no entry can be found in the transaction database for the
            provided identifier.

        """
        list_kwargs = {"doi": doi}
        list_results = json.loads(self.run(**list_kwargs))

        if not list_results:
            raise UnknownDoiException(f"No record(s) could be found for DOI {doi}.")

        # Latest record should be the only one returned
        record = list_results[0]

        return record

        Returns the latest transaction record for the provided DOI.

        Parameters
        ----------
        doi : str
            The DOI to search for.

        Returns
        -------
        record : dict
            Latest transaction database record for the given identifier.

        Raises
        ------
        UnknownDoiException
            If no entry can be found in the transaction database for the
            provided identifier.

        
Returns the latest transaction record for the provided DOI.
Parameters

doi : str
The DOI to search for.

Returns

record : dict
Latest transaction database record for the given identifier.

Raises

UnknownDoiException
If no entry can be found in the transaction database for the
provided identifier.
Returns the latest transaction record for the provided DOI . Parameters doi : str The DOI to search for . Returns record : dict Latest transaction database record for the given identifier . Raises UnknownDoiException If no entry can be found in the transaction database for the provided identifier .
def transaction_for_doi(self, doi):
        list_kwargs = {"doi": doi}
        list_results = json.loads(self.run(**list_kwargs))
        if not list_results:
            raise UnknownDoiException(f"No record(s) could be found for DOI {doi}.")
        record = list_results[0]
        return record
def transaction_for_doi ( self , doi ) : list_kwargs = { "doi" : doi } list_results = json . loads ( self . run ( ** list_kwargs ) ) if not list_results : raise UnknownDoiException ( f"No record(s) could be found for DOI {doi}." ) record = list_results [ 0 ] return record
Returns the latest transaction record for the provided DOI.
Returns the latest transaction record for the provided DOI .
"""
        Returns the latest transaction record for the provided DOI.

        Parameters
        ----------
        doi : str
            The DOI to search for.

        Returns
        -------
        record : dict
            Latest transaction database record for the given identifier.

        Raises
        ------
        UnknownDoiException
            If no entry can be found in the transaction database for the
            provided identifier.

        """ # Latest record should be the only one returned
self
doi