nabeta / enju_worldcat

a plugin to access worldcat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EnjuWorldcat
=========

OCLCのWorldCatのレコードを取得するためのプラグインです。

a plugin to search and get WorldCat record.

Example
=======

include 'enju_worldcat' to your ActiveRecord model.

app/models/manifestation.rb
-----
class Manifestation < ActiveRecord::Base
  enju_worldcat
end
-----

>> isbn = '4797336617'
=>
>> Manifestation.get_record_by_isbn(isbn)[:title]
=> "Tanoshii rubī :"
>> Manifestation.get_record_by_isbn(isbn)[:link]
=> "http://www.worldcat.org/oclc/169991343"

>> m = Manifestation.find_by_isbn(isbn)
=> #<Manifestation id: 2727, original_title: "たのしいRuby 第2版 Rubyではじめる気軽?...", created_at: "2007-11-19 17:55:41", updated_at: "2009-03-08 20:52:12", isbn: "4797336617">
>> m.isbn
=> "4797336617"
>> m.worldcat_record
=>
>> m.worldcat_location
>> m.worldcat_citation

Copyright (c) 2009 Kosuke Tanabe, released under the MIT license

About

a plugin to access worldcat


Languages

Language:Ruby 100.0%