Sha256: 3b6b836a13f96b66045f87422bd70d2c8d7de1dd26da094f49ee428621f6ddc1
Contents?: true
Size: 620 Bytes
Versions: 1
Compression:
Stored size: 620 Bytes
Contents
# frozen_string_literal: true require "dotenv/load" require_relative "../lib/rubyoctopus" # Set these values in your .env client = RubyOctopus::OctopusClient.new(ENV["OCTOPUS_URL"], ENV["OCTOPUS_API_KEY"]) # Gets the first page of environments from the server response = client.connection.get("Environments") puts "Received a #{response.status} response from server" environments = if response.status == 200 response.body["Items"].map { |item| RubyOctopus::Model::EnvironmentResource.new(item) } end environments.each { |environment| puts "#{environment.id}: #{environment.name}" }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubyoctopus-0.1.0 | samples/get_environments.rb |