Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.64 KB

Authors API.md

File metadata and controls

33 lines (26 loc) · 1.64 KB

Authors API

The Authors API serves to get information pertaining to an author and their body of work.

For more usage examples of this API, see AuthorAPIExamples.


OLAuthor serves to combine storage of the various requests supported by the authors API.

It contains data about the author and a collection of their works.

Get a populated instance of OLAuthor using OpenLibraryClient and a valid author's OLID (be aware this will make multiple requests):

OpenLibraryClient client = new OpenLibraryClient();
OLAuthor author = await client.GetAuthorAsync("OL7715527A", 10);

Alternatively, you can make individual requests using the OpenLibraryClient

var parameters = new List<KeyValuePair<string, string>>() { ... };

OLAuthorData authorData = await client.Author.GetDataAsync("OL7715527A");
OLWorkData[] works = await client.Author.GetWorksAsync("OL7715527A", parameters);

or using the static OLAuthorLoader class.

OLAuthorData authorData = await OLAuthorLoader.GetDataAsync("OL7715527A");
OLWorkData[] works = await OLAuthorLoader.GetWorksAsync("OL7715527A", parameters);

For valid parameters, see the link above. Alternatively, see OpenLibraryUtility's Maps.