Giter Site home page Giter Site logo

atnd4r's Introduction

atnd4r

ATND WebAPI wrapper for Ruby.

Developers

Features/Problems

  • Ruby 1.8.7 での動作確認を行っています

Synopsis

使用例

require 'rubygems'
require 'atnd4r'

入力データについて

検索用メソッドとして、下記の二つを用意しています。

  • Atnd4r.get_event_list

  • Atnd4r.get_user_list

引数は、検索条件を Hash で渡せば良いです。例えば、 event_id が 1 の情報を調べる為には、

irb(main):002:0> Atnd4r.get_event_list({:event_id => 1})

のような形式になります。一つの KEY に対して、複数の値を渡す場合は配列に入れて渡してください。

irb(main):003:0> Atnd4r.get_event_list({:event_id => [1,2]})

詳細な検索の仕様はATND API の公式ページ をご覧ください。なお、ATND API における、format パラメータのみ、XML固定となっていますので、format パラメータを Atnd4R へ渡しても無視されます。

出力データについて

受け取ったデータは以下の形式のAtnd4r::AtndAPIというオブジェクトでラッピングされて返却されます。

基本的には XML データを Ruby 用のオブジェクトに変換したものですので、XMLのプロパティなどはほぼそのままです(ただし、ハイフンの名前のものはアンダースコアにしています)。

また、各プロパティは XML の属性にしたがったオブジェクトに変換されています。例えば、Integer とあれば Fixnum 型のように。

Atnd4Rの戻り値のオブジェクトについて

XMLに記載されている属性に従い、 String や Fixnum のようなRubyの型になっています。詳細はAtnd4R解説エントリ をご覧ください。

Author

sugamasao <[email protected]>

License

Ruby’s

atnd4r's People

Contributors

sugamasao avatar

Stargazers

Tatsuya Arai avatar Hizuru avatar Shingo Kawamura avatar Ryo Takaishi avatar  avatar  avatar koduki avatar Masafumi Fujiwara avatar Hiroshi SHIBATA avatar

Watchers

 avatar James Cloos avatar ShaoYang avatar  avatar

Forkers

koduki

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.