Smithsonian¶
The Smithsonian Service provides access to the Smithsonan open-access EDAN database, containing catalogued information on millions of historical items.
RPCS¶
-
Smithsonian.
getImage
(id: String)¶ Get an image associated with the given object, if available. This requires the
id
of the object, as provided bySmithsonian.search()
orSmithsonian.searchImageContent()
.Arguments:
id: String
(String) - id of the object
Returns:
Image
(Image) - an image of the object
-
Smithsonian.
search
(term: String, count: BoundedNumber<1, 1000>?, skip: BoundedNumber<0>?)¶ Search and return a list of up to
count
items that match the searchterm
. Because there may be a large number of matching items, you can also provide a number of items toskip
.Each item in the returned array is structured data about that matching item. The fields for this data include:
id
- the id of the matching item, needed bySmithsonian.getImage()
.title
- the title/name of the matching itemtypes
- a list of categories the item falls under (e.g.,Vases
,Paintings
)authors
- a list of authors/creators of the item or digitized versiontopics
- a list of topic names for the item (e.g.,Anthropology
,Ethnology
)notes
- a list of extra notes about the object, in no particular organizationphysicalDescription
- a list of pairs of[label, content]
regarding the physical description of the objectsources
- a list of pairs of[label, content]
describing the source of the item or digitizationhasImage
-true
if the image is listed as having image content in the database. Only items with this field beingtrue
can expectSmithsonian.getImage()
to succeed.
If you would like to search for only items which have image content available, you can perform manual filtering on the
hasImage
field of the results, or you can useSmithsonian.searchImageContent()
, which does the same thing for you.Arguments:
term: String
(String) - Term to search forcount: BoundedNumber<1, 1000>?
(BoundedNumber) - Maximum number of items to return (default 100)skip: BoundedNumber<0>?
(BoundedNumber) - Number of items to skip from beginning
Returns:
List
(List) - Up to count matches
-
Smithsonian.
searchImageContent
(term: String, count: BoundedNumber<1, 1000>?, skip: BoundedNumber<0>?)¶ Equivalent to
Smithsonian.search()
except that only images with image content (hasImage = true
) are returned.The filtering of returned matches is done after pulling data from the database. Thus, you should treat
count
as the max number of unfiltered items to return, and similarlyskip
as the number of unfiltered items to skip.Arguments:
term: String
(String) - Term to search forcount: BoundedNumber<1, 1000>?
(BoundedNumber) - Maximum number of items to returnskip: BoundedNumber<0>?
(BoundedNumber) - Number of items to skip from beginning
Returns:
List
(List) - Up to count matches