ebsco / edsapi-ruby

A Ruby interface to the EBSCO Discovery Services API
MIT License
7 stars 10 forks source link

Add best_fulltext_link method #26

Open bmckinney opened 7 years ago

bmckinney commented 7 years ago

see: https://github.com/ebsco/ebsco-discovery-service-api-gem/blob/4f13127cfc037c0f2271c5a59987a2256fabb075/lib/ebsco-discovery-service-api.rb#L578

make configurable so that users can specify an order of link types to fall back on

example: best_fulltext_link: ['html', 'pdf', 'epub', 'custom']

sandbergja commented 4 years ago

This would be very helpful for us!

Right now, I am iterating through an article's eds_fulltext_links until I find one where

  1. the link's [:url] != 'detail', and
  2. the link's [:type] != 'cataloglink'

Just because those are the two that have been problematic for us in the past. But there could be other entries in that eds_fulltext_links array that are also problematic, and we just haven't discovered the problem yet. Having a somewhat opinionated best_fulltext_link method that protects us from those eds_fulltext_links that aren't actually fulltext links would be very helpful.

sandbergja commented 4 years ago

Another note: we are de-prioritizing Full Text Finder links (link[:label] != 'Full Text Finder') when there is another link available, with the hope that this leads to fewer steps for patrons before they actually get to the full text.