KKTIX API Gem
kktix_api is a gem that gets event information of an organization from KKTIX
Installation
If you are working on a project, add this to your Gemfile: gem 'kktix_api'
For ad hoc installation from command line:
$ gem install kktix_apiUsage
Execute kktix of an organization with specific organization_id; Otherwise, get latest published events.
$ kktix [org_id]API
Require kktix_api gem in your code:
require 'kktix_api'Get information using domain class Organization, you can get attributes like name, uri, and all the events held by the organization.
organization = KktixEvent::Organization.find('<organization_id>')List events information from an Organization, including url, published, title, summary, content, and author.
organization.events.each do |event|
puts "#{event.title} (#{event.published})"
puts event.url
puts event.content
puts
endSee the following example code for more usage details:
oid = 'nthuion'
acts = KktixEvent::KktixApi.events(oid)
puts acts
organization = KktixEvent::Organization.find(oid)
puts organization.name, organization.uri
organization.events.each do |event|
puts event.title, event.published
end