require_relative 'local_libs' api = Ecoportal::API::GraphQL.new kargs = { includeArchived: false, includeUnpublished: false } trees = api.currentOrganization.locationStructures(**kargs) trees.each_with_index do |tree, idx| puts "#{tree.weight}. '#{tree.name}' (#{tree.id})" end trees.each do |tree| pp tree.treeify end