Sha256: eaa66697ff6b7416a3697771e34096e57e2db2fe1b2060adc7f67678781e1b63

Contents?: true

Size: 602 Bytes

Versions: 1

Compression:

Stored size: 602 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w(.. lib))
require 'kktix_api'

org_id = ARGV[0] || ENV['KKTIX_ORGANIZATION_ID']
# unless org_id
#   puts 'USAGE: kktix [org_id]'
#   exit(1)
# end

organization = KktixEvent::Organization.find(org_id)

unless organization.name.nil?
  puts organization.name
  puts "-" * organization.name.length
end

organization.events.first(3).each.with_index(1) do |event, index|
  print "#{index}: "
  puts "#{event.title} (#{event.published})"
  puts event.summary ? event.summary : event.content
  puts
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kktix_api-0.1.0 bin/kktix