Sha256: 1daf38fc4db98a0685fa6ebedcb43d54c10d089fa03d6f59d3ffb86c2ed9a7fd

Contents?: true

Size: 549 Bytes

Versions: 1

Compression:

Stored size: 549 Bytes

Contents

# typed: true
require "psych"

module Mangadex
  module Api
    VERSION = -> do
      version = Psych.load(
        RestClient.get(
          'https://api.mangadex.org/api.yaml',
        ).body,
      ).dig('info', 'version')

      if version != Mangadex::VERSION
        warn(
          "[Warning] This gem is compatible with #{Mangadex::VERSION} but it looks like Mangadex is at #{version}",
          "[Warning] Check out #{Mangadex::Internal::Request::BASE_URI} for more information.",
        )
      end

      version
    end.call
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mangadex-5.3.1.1 lib/mangadex/api/version.rb