Skip to content

Commit bbfbd5f

Browse files
committed
Improve getAffiliation docstring to follow numpy/scipy documentation
1 parent feff576 commit bbfbd5f

1 file changed

Lines changed: 24 additions & 6 deletions

File tree

odm2api/ODM2/services/readService.py

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -544,12 +544,30 @@ def getPeople(self, ids=None, firstname=None, lastname=None):
544544

545545
def getAffiliations(self, ids=None, personfirst=None, personlast=None, orgcode=None):
546546
"""
547-
getAffiliations(self, ids=None, personfirst=None, personlast=None, orgcode=None)
548-
* Pass nothing - returns a list of all Affiliation objects
549-
* Pass a list of AffiliationID - returns a single Affiliation object
550-
* Pass a First Name - returns a single Affiliation object
551-
* Pass a Last Name - returns a single Affiliation object
552-
* Pass an OrganizationCode - returns a Affiliation object
547+
Retrieve a list of ODM2 Affiliation objects.
548+
549+
Parameters
550+
----------
551+
ids: list, default None
552+
List of AffiliationIDs
553+
personfirst: str, default None
554+
Person First Name
555+
personlast: str, default None
556+
Person Last Name
557+
orgcode: str, default None
558+
Organization Code
559+
560+
Returns
561+
-------
562+
List of Affiliation objects
563+
564+
Examples
565+
--------
566+
>>> read.getAffiliations(ids=[39,40])
567+
>>> read.getAffiliations(personfirst='Anthony',
568+
... personlast='Aufdenkampe')
569+
>>> read.getAffiliations(orgcode='LimnoTech')
570+
553571
"""
554572
q = self._session.query(Affiliations)
555573

0 commit comments

Comments
 (0)