summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/orcid.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-24 16:04:53 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-24 16:15:36 -0800
commit457c1612e29730e5b9ee2820c3ea813a1d2dd405 (patch)
tree1f3bd14dd0872bd2db752142b1f35cb0296635ae /python/fatcat_tools/importers/orcid.py
parentb86e007b7469ebb22a806d38aca0bccf9078e80d (diff)
downloadfatcat-457c1612e29730e5b9ee2820c3ea813a1d2dd405.tar.gz
fatcat-457c1612e29730e5b9ee2820c3ea813a1d2dd405.zip
python impl of API ident harmonization
Diffstat (limited to 'python/fatcat_tools/importers/orcid.py')
-rw-r--r--python/fatcat_tools/importers/orcid.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/fatcat_tools/importers/orcid.py b/python/fatcat_tools/importers/orcid.py
index 9e4767f9..fc4562d0 100644
--- a/python/fatcat_tools/importers/orcid.py
+++ b/python/fatcat_tools/importers/orcid.py
@@ -57,17 +57,17 @@ class OrcidImporter(FatcatImporter):
extra=extra)
return ce
- def create_row(self, row, editgroup=None):
+ def create_row(self, row, editgroup_id=None):
obj = json.loads(row)
ce = self.parse_orcid_dict(obj)
if ce is not None:
- self.api.create_creator(ce, editgroup=editgroup)
+ self.api.create_creator(ce, editgroup_id=editgroup_id)
self.counts['insert'] += 1
- def create_batch(self, batch, editgroup=None):
+ def create_batch(self, batch, editgroup_id=None):
"""Reads and processes in batches (not API-call-per-line)"""
objects = [self.parse_orcid_dict(json.loads(l))
for l in batch if l != None]
objects = [o for o in objects if o != None]
- self.api.create_creator_batch(objects, autoaccept="true", editgroup=editgroup)
+ self.api.create_creator_batch(objects, autoaccept="true", editgroup_id=editgroup_id)
self.counts['insert'] += len(objects)