Sha256: 96d87c3b94435887bda3f6f7cc92049a06117db7ad935975c019c1519018824e
Contents?: true
Size: 757 Bytes
Versions: 31
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
31 entries across 31 versions & 1 rubygems