Class: WCKBAPI::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/wckbapi/entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeEntry

Returns a new instance of Entry.



6
7
# File 'lib/wckbapi/entry.rb', line 6

def initialize()
end

Instance Attribute Details

#authorObject

Returns the value of attribute author.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def author
  @author
end

#bkeyObject

Returns the value of attribute bkey.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def bkey
  @bkey
end

#collection_nameObject

Returns the value of attribute collection_name.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def collection_name
  @collection_name
end

#collection_uidObject

Returns the value of attribute collection_uid.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def collection_uid
  @collection_uid
end

#coverageObject

Returns the value of attribute coverage.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def coverage
  @coverage
end

#entry_statusObject

Returns the value of attribute entry_status.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def entry_status
  @entry_status
end

#entry_uidObject

Returns the value of attribute entry_uid.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def entry_uid
  @entry_uid
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def id
  @id
end

#isbnObject

Returns the value of attribute isbn.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def isbn
  @isbn
end

#oclcnumObject

Returns the value of attribute oclcnum.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def oclcnum
  @oclcnum
end

#provider_nameObject

Returns the value of attribute provider_name.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def provider_name
  @provider_name
end

#provider_uidObject

Returns the value of attribute provider_uid.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def provider_uid
  @provider_uid
end

#publisherObject

Returns the value of attribute publisher.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def publisher
  @publisher
end

#titleObject

Returns the value of attribute title.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def title
  @title
end

#uriObject

Returns the value of attribute uri.



4
5
6
# File 'lib/wckbapi/entry.rb', line 4

def uri
  @uri
end

Instance Method Details

#load(item) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/wckbapi/entry.rb', line 8

def load(item)
	@id = item['id']
@title = item['title']
	@entry_uid = item['entry_uid']
	@entry_status = item['entry_status']
	@bkey = item['bkey']
	@collection_name = item['kb:collection_name']
	@collection_uid = item['kb:collection_uid']
 	@provider_uid = item['kb:provider_uid']
	@provider_name = item['kb:provider_name']
	@oclcnum = item['kb:oclcnum']
	@author = item['kb:author']
	@isbn = item['kb:isbn']
	@publisher = item['kb:publisher']
	@coverage = item['kb:coverage']
  	item['links'].each {|t|
if t['rel'] == 'via'
  @uri = t['href']
end 
	}
end