C# Class Com.Readmill.Api.BooksClient

Inheritance: ReadmillClientBase
Datei anzeigen Open project: totobogy/ReadmillDotNet

Public Methods

Method Description
BooksClient ( string clientId ) : System

Instantiates a client for the Readmill/Users api

GetBestMatchAsync ( BookMatchOptions options, CancellationToken cancellationToken = default(CancellationToken) ) : Task
GetBookByIdAsync ( string bookId, CancellationToken cancellationToken = default(CancellationToken) ) : Task
GetBookReadingsAsync ( string bookId, ReadingsQueryOptions options = null, string accessToken = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Get readings associated with the specified book

GetBooksAsync ( BooksQueryOptions options = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Retrieves a list of books.

PostBookAsync ( string accessToken, Book newBook ) : Task
PostBookReadingAsync ( string accessToken, string bookId, Reading state, bool isPrivate = false, string closingRemark = null ) : Task

Protected Methods

Method Description
LoadTemplates ( ) : void

Method Details

BooksClient() public method

Instantiates a client for the Readmill/Users api
public BooksClient ( string clientId ) : System
clientId string Client Id of the application, assgined by Readmill when the app is registered
return System

GetBestMatchAsync() public method

public GetBestMatchAsync ( BookMatchOptions options, CancellationToken cancellationToken = default(CancellationToken) ) : Task
options BookMatchOptions
cancellationToken System.Threading.CancellationToken
return Task

GetBookByIdAsync() public method

public GetBookByIdAsync ( string bookId, CancellationToken cancellationToken = default(CancellationToken) ) : Task
bookId string
cancellationToken System.Threading.CancellationToken
return Task

GetBookReadingsAsync() public method

Get readings associated with the specified book
public GetBookReadingsAsync ( string bookId, ReadingsQueryOptions options = null, string accessToken = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
bookId string Readmill Id of the book for which readings need to be retrieved
options ReadingsQueryOptions
accessToken string
cancellationToken System.Threading.CancellationToken
return Task>

GetBooksAsync() public method

Retrieves a list of books.
public GetBooksAsync ( BooksQueryOptions options = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
options BooksQueryOptions Query options for retrieving the books
cancellationToken System.Threading.CancellationToken
return Task>

LoadTemplates() protected method

protected LoadTemplates ( ) : void
return void

PostBookAsync() public method

public PostBookAsync ( string accessToken, Book newBook ) : Task
accessToken string
newBook Com.Readmill.Api.DataContracts.Book
return Task

PostBookReadingAsync() public method

public PostBookReadingAsync ( string accessToken, string bookId, Reading state, bool isPrivate = false, string closingRemark = null ) : Task
accessToken string
bookId string
state Com.Readmill.Api.DataContracts.Reading
isPrivate bool
closingRemark string
return Task