Giter Site home page Giter Site logo

kktix-api's Introduction

KKTIX API Gem

Gem Version Build Status

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_api
C:\Users\ytlGift>gem install kktix_api
Fetching nokogiri-1.16.3-x64-mingw-ucrt.gem
Fetching http_parser.rb-0.6.0.gem
Fetching http-form_data-1.0.3.gem
Fetching domain_name-0.6.20240107.gem
Fetching http-cookie-1.0.5.gem
Fetching public_suffix-5.0.5.gem
Fetching addressable-2.8.6.gem
Fetching http-2.2.2.gem
Fetching kktix_api-1.0.0.gem
Successfully installed nokogiri-1.16.3-x64-mingw-ucrt
Building native extensions. This could take a while...
Successfully installed http_parser.rb-0.6.0
Successfully installed http-form_data-1.0.3
Successfully installed domain_name-0.6.20240107
Successfully installed http-cookie-1.0.5
Successfully installed public_suffix-5.0.5
Successfully installed addressable-2.8.6
Successfully installed http-2.2.2
Successfully installed kktix_api-1.0.0
Parsing documentation for nokogiri-1.16.3-x64-mingw-ucrt
Installing ri documentation for nokogiri-1.16.3-x64-mingw-ucrt
Parsing documentation for http_parser.rb-0.6.0
unknown encoding name "chunked\r\n\r\n25" for ext/ruby_http_parser/vendor/http-parser-java/tools/parse_tests.rb, skipping
Installing ri documentation for http_parser.rb-0.6.0
Parsing documentation for http-form_data-1.0.3
Installing ri documentation for http-form_data-1.0.3
Parsing documentation for domain_name-0.6.20240107
Installing ri documentation for domain_name-0.6.20240107
Parsing documentation for http-cookie-1.0.5
Installing ri documentation for http-cookie-1.0.5
Parsing documentation for public_suffix-5.0.5
Installing ri documentation for public_suffix-5.0.5
Parsing documentation for addressable-2.8.6
Installing ri documentation for addressable-2.8.6
Parsing documentation for http-2.2.2
Installing ri documentation for http-2.2.2
Parsing documentation for kktix_api-1.0.0
Installing ri documentation for kktix_api-1.0.0
Done installing documentation for nokogiri, http_parser.rb, http-form_data, domain_name, http-cookie, public_suffix, addressable, http, kktix_api after 6 seconds
9 gems installed

A new release of RubyGems is available: 3.4.19 → 3.5.7!
Run `gem update --system 3.5.7` to update your installation.

Usage

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
end

See 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

kktix-api's People

Contributors

dspp779 avatar coolcircle avatar shannywu avatar ytl0623 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.