def __init__(self, author_id, refresh=False):
        """Class to represent a Scopus Author query by the scopus-id.

        Parameters
        ----------
        author_id : str or int
            The ID of the author to search for.  Optionally expressed
            as an Elsevier EID (i.e., in the form 9-s2.0-nnnnnnnn).

        refresh : bool (optional, default=False)
            Whether to refresh the cached file (if it exists) or not.

        Notes
        -----
        The files are cached in ~/.scopus/author_retrieval/{author_id} (without
        eventually leading '9-s2.0-').
        """
        # Load json
        self._id = str(int(str(author_id).split('-')[-1]))
        Retrieval.__init__(self, identifier=self._id, api='AuthorRetrieval',
                           refresh=refresh)
        self._json = self._json['author-retrieval-response']
        # Checks
        try:
            self._json = self._json[0]
        except KeyError:  # Incomplete forward
            alias_json = listify(self._json['alias']['prism:url'])
            alias = ', '.join([d['$'].split(':')[-1] for d in alias_json])
            text = 'Author profile with ID {} has been merged and the main '\
                   'profile is now one of {}.  Please update your records '\
                   'manually.  Functionality of this object is '\
                   'reduced.'.format(author_id, alias)
            warn(text, UserWarning)
def __init__ ( self , author_id , refresh = False ) : self . _id = str ( int ( str ( author_id ) . split ( '-' ) [ - 1 ] ) ) Retrieval . __init__ ( self , identifier = self . _id , api = 'AuthorRetrieval' , refresh = refresh ) self . _json = self . _json [ 'author-retrieval-response' ] try : self . _json = self . _json [ 0 ] except KeyError : alias_json = listify ( self . _json [ 'alias' ] [ 'prism:url' ] ) alias = ', ' . join ( [ d [ '$' ] . split ( ':' ) [ - 1 ] for d in alias_json ] ) text = 'Author profile with ID {} has been merged and the main ' 'profile is now one of {}.  Please update your records ' 'manually.  Functionality of this object is ' 'reduced.' . format ( author_id , alias ) warn ( text , UserWarning )
Class to represent a Scopus Author query by the scopus-id.

        Parameters
        ----------
        author_id : str or int
            The ID of the author to search for.  Optionally expressed
            as an Elsevier EID (i.e., in the form 9-s2.0-nnnnnnnn).

        refresh : bool (optional, default=False)
            Whether to refresh the cached file (if it exists) or not.

        Notes
        -----
        The files are cached in ~/.scopus/author_retrieval/{author_id} (without
        eventually leading '9-s2.0-').