Sha256: eeee5e2bf6b2b29eaea6a2524087e0e103bd7ad29d38f8073c9d23175b75281f
Contents?: true
Size: 757 Bytes
Versions: 20
Compression:
Stored size: 757 Bytes
Contents
# frozen_string_literal: true require "shopify_cli" module Extension module Tasks class GetApps < ShopifyCli::Task def call(context:) organizations = ShopifyCli::PartnersAPI::Organizations.fetch_with_app(context) apps_from_organizations(organizations) end private def apps_from_organizations(organizations) organizations.flat_map do |organization| apps_owned_by_organization(organization) end end def apps_owned_by_organization(organization) return [] unless organization.key?("apps") && organization["apps"].any? organization["apps"].map do |app| Converters::AppConverter.from_hash(app, organization) end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems