From a71e2a64ae4e039c0e72748b98b7e4780740a304 Mon Sep 17 00:00:00 2001 From: "Luis M. Rodriguez-R" Date: Thu, 2 May 2024 18:32:52 +0200 Subject: [PATCH] Update SeqCode API endpoint to `v1` --- lib/miga/cli/action/download/seqcode.rb | 4 ++-- lib/miga/remote_dataset/base.rb | 2 +- lib/miga/version.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/miga/cli/action/download/seqcode.rb b/lib/miga/cli/action/download/seqcode.rb index 087f505..bea1352 100644 --- a/lib/miga/cli/action/download/seqcode.rb +++ b/lib/miga/cli/action/download/seqcode.rb @@ -32,8 +32,8 @@ def remote_list :seqcode, :'type-genomes', nil, :json, nil, page: current_page ) doc = MiGA::Json.parse(json, contents: true) - current_page = doc[:current_page] + 1 - total_pages = doc[:total_pages] + current_page = doc.dig(:response, :current_page) + 1 + total_pages = doc.dig(:response, :total_pages) doc[:values].each do |name| next unless name[:type_material] diff --git a/lib/miga/remote_dataset/base.rb b/lib/miga/remote_dataset/base.rb index 0e22122..3e243e0 100644 --- a/lib/miga/remote_dataset/base.rb +++ b/lib/miga/remote_dataset/base.rb @@ -22,7 +22,7 @@ module MiGA::RemoteDataset::Base @@_EUTILS = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/' @@_EBI_API = 'https://www.ebi.ac.uk/Tools/' @@_GTDB_API = 'https://gtdb-api.ecogenomic.org/' - @@_SEQCODE_API = 'https://disc-genomics.uibk.ac.at/seqcode/' + @@_SEQCODE_API = 'https://api.seqco.de/v1/' @@_EUTILS_BUILD = lambda { |service, q| q[:api_key] = ENV['NCBI_API_KEY'] if ENV['NCBI_API_KEY'] uri_safe_join(@@_EUTILS, "#{service}.fcgi") diff --git a/lib/miga/version.rb b/lib/miga/version.rb index e753d09..ab92e7e 100644 --- a/lib/miga/version.rb +++ b/lib/miga/version.rb @@ -12,7 +12,7 @@ module MiGA # - String indicating release status: # - rc* release candidate, not released as gem # - [0-9]+ stable release, released as gem - VERSION = [1.3, 14, 7].freeze + VERSION = [1.3, 15, 0].freeze ## # Nickname for the current major.minor version. @@ -20,7 +20,7 @@ module MiGA ## # Date of the current gem relese. - VERSION_DATE = Date.new(2024, 4, 24) + VERSION_DATE = Date.new(2024, 5, 2) ## # References of MiGA