Class: LibraryThing::Work

Inherits:
Resource show all
Defined in:
lib/librarything/work.rb

Overview

Provides access to the LT Work API Works can be loaded by id, isbn, lccn, oclc or name

# work = LibraryThing::Work.get(:id => 1060)
# work = LibraryThing::Work.get(:isbn => '0765356155')
# work = LibraryThing::Work.get(:lccn => 'PR6103.L375J65')
# work = LibraryThing::Work.get(:oclc => '185392674')
work = LibraryThing::Work.get(:name => 'Jonathon Strange')
work['url]
=> "http://www.librarything.com/work/1060"

Note: lccn amd oclc access wasn’t working while I was testing. (13-Mar-2010)

Instance Attribute Summary

Attributes inherited from Resource

#document, #item_node, #xml

Method Summary

Methods inherited from Resource

#[], get, get_method, #initialize

Constructor Details

This class inherits a constructor from LibraryThing::Resource