Sha256: 92374182f6d00768b47d723343785cdc0f3007e8552a1fcbc3f0d8842114e037
Contents?: true
Size: 638 Bytes
Versions: 24
Compression:
Stored size: 638 Bytes
Contents
# typed: strict # frozen_string_literal: true module ShopifyAPI module Auth extend T::Sig class << self extend T::Sig sig { params(host: T.nilable(String)).returns(String) } def embedded_app_url(host) unless Context.setup? raise Errors::ContextNotSetupError, "ShopifyAPI::Context not setup, please call ShopifyAPI::Context.setup" end unless host raise Errors::MissingRequiredArgumentError, "host argument is required" end decoded_host = Base64.decode64(host) "https://#{decoded_host}/apps/#{Context.api_key}" end end end end
Version data entries
24 entries across 24 versions & 1 rubygems