API methods - adamkrogh/goodreads-dotnet GitHub Wiki

Authors endpoints

Unauthorized client
// Get the author information for the given Id.
var author = await client.Authors.GetByAuthorId(authorId);

// Get the author id by specified name
var author = await client.Authors.GetAuthorIdByName(authorName);

AuthorsFollowing endpoints

Authorized client
// Follow an author.
var authorFollowing = await client.AuthorsFollowing.Follow(authorId);

// Unfollow an author.
await client.AuthorsFollowing.Unfollow(authorFollowingId);

// Show author following information.
var authorFollowing = await client.AuthorsFollowing.Show(authorFollowingId);

Books endpoints

Unauthorized client
// Get book information by ISBN.
var book= await client.Books.GetByIsbn(isbn);

// Get book information by Goodreads book id.
var book = await client.Books.GetByBookId(bookId);

// Get book information by book title & author name (for increased accuracy).
var book = await client.Books.GetByTitle(title, authorName);

// Search Goodreads for books.
var bookWorks = await client.Books.Search(searchTerm, page, searchField);

// Gets a single Goodreads book id for the given ISBN10 or ISBN13.
var bookId = await client.Books.GetBookIdForIsbn(isbn);

// Gets Goodreads book ids for the given ISBN10 or ISBN13.
var bookIds = await client.Books.GetBookIdsForIsbns(isbns);

// Gets work ids for the given bookIds.
var workIds = await client.Books.GetWorkIdsForBookIds(bookIds);

// Get review statistics for a list of books by ISBN10 or ISBN13.
var reviewStats = await client.Books.GetReviewStatsForIsbns(isbns);
Authorized client
// Gets a paginated list of books written by the given author.
var books = await client.Books.GetListByAuthorId(authorId, page);

Comments endpoints

Unauthorized client

// Get list of comments.
var comments = await client.Comments.Get(resourceId, type, page)
Authorized client
// Create a comment.
await client.Comments.Create(resourceId, type, comment);

Events endpoints

Unauthorized client

// Shows events nearby the authenticating user or you can get a list of events near a location by passing latitude/longitude, country code or postal code coordinates.
var events = await client.Events.GetEvents(latitude, longitude, countryCode, postalCode);

Followers endpoints

Authorized client

// Follow an user.
var userFollowing = await client.Followers.Follow(userId);

// Unfollow an user
await client.Followers.Unfollow(userId);

Friends endpoints

Authorized client

// Sends a friend request to a user
await client.Friends.AddFriend(userId);

// Get the current user's friend requests.
var requests = await client.Friends.GetFriendRequests(page);

// Confirm or decline a friend request.
await client.Friends.ConfirmRequest(friendRequestId, response);

Groups endpoints

Unuthorized client

// Get a list of groups the user specified.
var groups = await client.Groups.GetListByUser(userId, sortProperty);

// Search group by specified titles and descriptions.
var groups = await client.Groups.GetGroups(search, page);

// Get info about a group by specified id.
await client.Groups.GetInfo(groupId, sortProperty, orderInfo);

// Get list of members of the specified group.
await client.Groups.GetMembers(groupId, names, page, sortProperty);

Authorized client

// Join the current user to a given group.
await client.Groups.Join(groupId);

Notifications endpoints

Authorized client

// Get any new notifications for the current user.
var notifications = await client.Notifications.GetNotifications(userId);

Owned books endpoints

Authorized client

// Get a list of owned books for the specified user.
var books = await client.OwnedBooks.GetOwnedBooks(userId, page);

// Get an owned book, including the current owner's user id.
var book = await client.OwnedBooks.GetOwnedBookInfo(ownedBookId);

// Get an owned book, including the current owner's user id.
var book = await client.OwnedBooks.AddOwnedBook(bookId, code, description, purchaseDate, purchaseLocation, bcid);

// Deletes a book a user owns.
await client.OwnedBooks.DeleteOwnedBook(ownedBookId);

Quotes endpoints

Authorized client

// Add a quote.
await client.Quotes.Add(authorId, authorName, quote, bookId, isbn);

ReadStatuses endpoints

Unauthorized client

// Get information about a read status update.
var status = await client.ReadStatuses.GetReadStatus(readStatusId);

Recommendation endpoints

Authorized client

// Get information about a particular recommendation that one user made for another (include comments and likes).
var recommendation = await client.Recommendations.GetRecommendation(recommendationId);

Reviews endpoint

Unauthorized client

// Get a review by a Goodreads review id with paginated comments.
var reviews = await client.Reviews.GetById(reviewId, commentsPage);

// Get a review for a user and book, and optionally find the review
var reviewDetail = await client.Reviews.GetByUserIdAndBookId(userId, bookId, findReviewOnDifferentEdition);

// Get a list of book reviews on a user's account. Several optional parameters, allow for custom sorting and searching for this list.
var reviews = await client.Reviews.GetListByUser(userId, shelfName, sort, searchQuery, order, page, pagesize);

// Get the most recent reviews that have been posted to Goodreads, for all users.
var reviews = await client.Reviews.GetRecentReviewsForAllMembers();

Authorized client

// Create a review for the authenticated user on the given book with some optional information.
var reviewId = await client.Reviews.Create(bookId, reviewText, rating, dateRead, shelfName);

// Edit a review with the given id.
await client.Reviews.Edit(reviewId, reviewText, rating, dateRead, shelfName);

Series endpoint

Unauthorized client

// Get all the series an author has written.
var series = await client.Series.GetListByAuthorId(authorId);

// Get all the series that the given work is in.
var series = await client.Series.GetListByWorkId(workId);

// Gets detailed information about the series, including all the works that belong to it.
var series = await client.Series.GetById(seriesId);

Shelves endpoint

Unauthorized client

// Add a book to a shelf.
await client.Shelves.AddBookToShelf(shelf, bookId, action);

// Add a list of books to many current user's shelves.
await client.Shelves.AddBooksToShelves(shelves, bookIds);

// Add a user book shelf.
var userShelf = await client.Shelves.AddShelf(shelf, exclusive, sortable, featured);

// Edit a user book shelf.
var userShelf = await client.Shelves.EditShelf(shelfId, shelf, exclusive, sortable, featured);

Topics endpoint

Unauthorized client

// Get a list of topics in a group's folder specified either by folder id or by group id.
var topics = await client.Topics.GetTopics(folderId, groupId, page, sort, order);

Authorized client

// Get info about specified topic.
var topic = await client.Topics.GetInfo(topicId);

// Get a list of topics from a specified group that have comments added since the last time the user viewed the topic.
var topics = await client.Topics.GetUnreadTopics(groupId, viewed, page, sort, order);

//  Create a new topic.
var topic = await client.Topics.CreateTopic(type, subjectId, folderId, title, isQuesion, comment, addToUpdateFeed, needDigest);

Updates endpoint

Authorized client

// Add a book to a shelf.
var updates = await client.Updates.GetFriendsUpdates(type, filter, maxUpdates);

Users endpoint

Unauthorized client

// Gets the public information for a Goodreads user.
var user = await client.Users.GetByUserId(userId);

// Gets the public information for a Goodreads user by username.
var user = await client.Users.GetByUsername(username);

// Gets a paginated list of friends for the given Goodreads user id.
var users = await client.Users.GetListOfFriends(userId, page, sort);

// Get an people the given user is following.
var userFollowngs = await client.Users.GetUserFollowing(userId, page);

// Get an people the given user is following.
var userFollowers = await client.Users.GetUsersFollowers(userId, page);

Authorized client

// Gets the Goodreads user id of the authenticated connection.
var userId = await client.Users.GetAuthenticatedUserId();

// Get stats comparing your books to another member's.
var topics = await client.Users.CompareUserBooks(userId);

User statuses endpoint

Unauthorized client

// Get most recent user statuses on the site.
var statuses = await client.UserStatuses.GetRecentUsersStatuses();

// Get information about a user status update.
var status = await client.UserStatuses.GetUserStatus(userStatusId);

Authorized client

// Create a status updates for members.
var userStatusId = await client.UserStatuses.Create(bookId, page, percent, comment);

// Delete a status update.
var topics = await client.UserStatuses.Delete(userStatusId);