Skip to content

Commit

Permalink
Merge branch 'release/v0.18.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ja573 committed Feb 24, 2023
2 parents 0f6480e + 2c88a4d commit 78c6be6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -9,7 +9,7 @@ Install is either via pip or cloning the repository.

From pip:
```sh
python3 -m pip install thothlibrary==0.17.0
python3 -m pip install thothlibrary==0.18.0
```

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

__version__ = "0.17.0"
__version__ = "0.18.0"
__author__ = "Javier Arias <javi@openbookpublishers.com>"
__copyright__ = "Copyright (c) 2020 Open Book Publishers"
__license__ = "Apache 2.0"
Expand Down
4 changes: 4 additions & 0 deletions thothlibrary/client.py
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_institution(self, institution):
"""Construct and trigger a mutation to update an institution object"""
return self.mutation("updateInstitution", institution)

@staticmethod
def supported_versions():
"""
Expand Down
12 changes: 11 additions & 1 deletion thothlibrary/mutation.py
Expand Up @@ -229,7 +229,7 @@ class ThothMutation():
("articleTitle", True),
("seriesTitle", True),
("volumeTitle", True),
("edition", True),
("edition", False),
("author", True),
("volume", True),
("issue", True),
Expand Down Expand Up @@ -280,6 +280,16 @@ class ThothMutation():
("pageInterval", True)
],
"return_value": "workId"
},
"updateInstitution": {
"fields": [
("institutionId", True),
("institutionName", True),
("institutionDoi", True),
("ror", True),
("countryCode", False)
],
"return_value": "institutionId"
}
}

Expand Down

0 comments on commit 78c6be6

Please sign in to comment.