C# Class GoodReadsSharp.GoodReadsClient

Show file Open project: AnalogJ/GoodReadsSharp

Private Properties

Property Type Description
AuthMethods IAuthenticator
LoadClient void
PublicMethods IAuthenticator

Public Methods

Method Description
AccountInfo ( ) : AuthUser
AddBookToShelf ( String shelfName, String bookId ) : Shelf

Add a book to a shelf using OAuth. This method can also be used to remove from shelf. You'll need to register your app (required).

AddShelf ( String shelfName ) : void
AddToOwnedBooks ( String bookId ) : AddToOwnedBooks
BookIdForIsbn ( String isbn, System.Boolean &success ) : Book
BuildAuthorizeUrl ( string callbackUrl = null ) : String
DeleteShelf ( String shelfId ) : void
GetAccessToken ( ) : UserLogin
GetToken ( ) : UserLogin

Gets a token from goodreads.com (Token cant be used until authorized!)

GetTokenAndBuildUrl ( string callback = null ) : String
GoodReadsClient ( string apiKey, string appSecret ) : System

Default Constructor for the DropboxClient

GoodReadsClient ( string apiKey, string appSecret, string userToken, string userSecret ) : System

Creates an instance of the DropNetClient given an API Key/Secret and a User Token/Secret Make sure to call AccountInfo() Method first, without the _userToken.ID field populated the api wont work.

ListBooksOnShelf ( String shelfName, Int32 page = 1 ) : ListBooksOnShelf

Lists the books on shelf.

ListOwnedBooks ( Int32 page = 1 ) : ListOwnedBooks

Returns a list of books owned by the user.

ListShelves ( Int32 page = 1 ) : ListShelves

Lists shelves for a user

RemoveBookFromShelf ( String shelfName, String bookId ) : Hash
ReviewCountsForIsbns ( List isbns ) : ReviewCountsForIsbns

Reviews the counts for isbns. Only populates the Id, Isbn and Isbn13 fields

Private Methods

Method Description
AuthMethods ( ) : IAuthenticator
LoadClient ( ) : void
PublicMethods ( ) : IAuthenticator

Method Details

AccountInfo() public method

public AccountInfo ( ) : AuthUser
return AuthUser

AddBookToShelf() public method

Add a book to a shelf using OAuth. This method can also be used to remove from shelf. You'll need to register your app (required).
public AddBookToShelf ( String shelfName, String bookId ) : Shelf
shelfName String
bookId String
return GoodReadsSharp.Models.Shelf

AddShelf() public method

public AddShelf ( String shelfName ) : void
shelfName String
return void

AddToOwnedBooks() public method

public AddToOwnedBooks ( String bookId ) : AddToOwnedBooks
bookId String
return AddToOwnedBooks

BookIdForIsbn() public method

public BookIdForIsbn ( String isbn, System.Boolean &success ) : Book
isbn String
success System.Boolean
return GoodReadsSharp.Models.Book

BuildAuthorizeUrl() public method

public BuildAuthorizeUrl ( string callbackUrl = null ) : String
callbackUrl string
return String

DeleteShelf() public method

public DeleteShelf ( String shelfId ) : void
shelfId String
return void

GetAccessToken() public method

public GetAccessToken ( ) : UserLogin
return GoodReadsSharp.Models.UserLogin

GetToken() public method

Gets a token from goodreads.com (Token cant be used until authorized!)
public GetToken ( ) : UserLogin
return GoodReadsSharp.Models.UserLogin

GetTokenAndBuildUrl() public method

public GetTokenAndBuildUrl ( string callback = null ) : String
callback string
return String

GoodReadsClient() public method

Default Constructor for the DropboxClient
public GoodReadsClient ( string apiKey, string appSecret ) : System
apiKey string The Api Key to use for the Dropbox Requests
appSecret string The Api Secret to use for the Dropbox Requests
return System

GoodReadsClient() public method

Creates an instance of the DropNetClient given an API Key/Secret and a User Token/Secret Make sure to call AccountInfo() Method first, without the _userToken.ID field populated the api wont work.
public GoodReadsClient ( string apiKey, string appSecret, string userToken, string userSecret ) : System
apiKey string The Api Key to use for the Dropbox Requests
appSecret string The Api Secret to use for the Dropbox Requests
userToken string The User authentication token
userSecret string The Users matching secret
return System

ListBooksOnShelf() public method

Lists the books on shelf.
public ListBooksOnShelf ( String shelfName, Int32 page = 1 ) : ListBooksOnShelf
shelfName String Name of the shelf.
page System.Int32 The page.
return ListBooksOnShelf

ListOwnedBooks() public method

Returns a list of books owned by the user.
public ListOwnedBooks ( Int32 page = 1 ) : ListOwnedBooks
page System.Int32
return ListOwnedBooks

ListShelves() public method

Lists shelves for a user
public ListShelves ( Int32 page = 1 ) : ListShelves
page System.Int32 The page.
return ListShelves

RemoveBookFromShelf() public method

public RemoveBookFromShelf ( String shelfName, String bookId ) : Hash
shelfName String
bookId String
return GoodReadsSharp.Models.Hash

ReviewCountsForIsbns() public method

Reviews the counts for isbns. Only populates the Id, Isbn and Isbn13 fields
public ReviewCountsForIsbns ( List isbns ) : ReviewCountsForIsbns
isbns List The isbns.
return ReviewCountsForIsbns