Skip to content

Commit

Permalink
updates to harvest from orcid
Browse files Browse the repository at this point in the history
  • Loading branch information
peetucket committed Mar 11, 2022
1 parent db25b83 commit aa46592
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/orcid/publication_type_mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def self.to_pub_type(work_type)
PUB_TYPE_TO_WORK_TYPE.invert[work_type]
end

# @return [String] true if a valid mapped work type.
# @return [String] true if valid mapped work type (from ORCID to sul-pub).
def self.work_type?(work_type)
PUB_TYPE_TO_WORK_TYPE.value?(work_type)
end
Expand Down
5 changes: 5 additions & 0 deletions lib/orcid/work_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ def put_code
@put_code ||= work_response['put-code']
end

# the name of the source that provided the work to ORCID (e.g. "Crossref")
def work_source
@work_source ||= work_response.dig('source','source-name','value')
end

def work_type
@work_type ||= work_response['type']
end
Expand Down

0 comments on commit aa46592

Please sign in to comment.