Skip to content

Commit

Permalink
Merge branch 'release/v0.23.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ja573 committed Jan 16, 2024
2 parents 2f49f3a + 82b9a1c commit 7971da3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Install is either via pip or cloning the repository.

From pip:
```sh
python3 -m pip install thothlibrary==0.22.0
python3 -m pip install thothlibrary==0.23.0
```

Or from the repo:
Expand Down
2 changes: 1 addition & 1 deletion thothlibrary/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""GraphQL client for Thoth"""

__version__ = "0.22.0"
__version__ = "0.23.0"
__author__ = "Javier Arias <[email protected]>"
__copyright__ = "Copyright (c) 2020 Open Book Publishers"
__license__ = "Apache 2.0"
Expand Down
4 changes: 4 additions & 0 deletions thothlibrary/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ def update_work(self, work):
"""Construct and trigger a mutation to update a work object"""
return self.mutation("updateWork", work)

def update_contributor(self, contributor):
"""Construct and trigger a mutation to update a contributor object"""
return self.mutation("updateContributor", contributor)

def update_institution(self, institution):
"""Construct and trigger a mutation to update an institution object"""
return self.mutation("updateInstitution", institution)
Expand Down
11 changes: 11 additions & 0 deletions thothlibrary/mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,17 @@ class ThothMutation():
],
"return_value": "institutionId"
},
"updateContributor": {
"fields": [
("contributorId", True),
("firstName", True),
("lastName", True),
("fullName", True),
("orcid", True),
("website", True)
],
"return_value": "contributorId"
},
"deleteLocation": {
"fields": [
("locationId", True),
Expand Down

0 comments on commit 7971da3

Please sign in to comment.