Documentation ¶
Index ¶
- type AuthData
- type Client
- func (c *Client) GetCurrentUserData(ctx context.Context) (*CurrentUserDataResponse, error)
- func (c *Client) GetCurrentUserShelves(ctx context.Context) (*CurrentUserShelvesResponse, error)
- func (c *Client) GetReviews(ctx context.Context, shelfName string) (*ReviewsResponse, error)
- func (c *Client) Register(ctx context.Context, email, password string) (*RegisterResponse, error)
- func (c *Client) Token(ctx context.Context) (*TokenResponse, error)
- func (c *Client) UpdateUserStatus(ctx context.Context, bookId, page, percent, body string) error
- type Cookies
- type CurrentUserDataResponse
- type CurrentUserShelvesResponse
- type RegisterRequest
- type RegisterResponse
- type RegistrationData
- type ReviewsResponse
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetCurrentUserData ¶
func (c *Client) GetCurrentUserData(ctx context.Context) (*CurrentUserDataResponse, error)
func (*Client) GetCurrentUserShelves ¶
func (c *Client) GetCurrentUserShelves(ctx context.Context) (*CurrentUserShelvesResponse, error)
func (*Client) GetReviews ¶
type CurrentUserDataResponse ¶
type CurrentUserDataResponse struct { XMLName xml.Name `xml:"GoodreadsResponse"` CurrentUser struct { User struct { ID string `xml:"id"` } `xml:"user"` CurrentlyReading []struct { Title string `xml:"title"` Authors []struct { Name string `xml:"name"` } `xml:"authors>author"` } `xml:"currently_reading>book"` } `xml:"current_user"` }
type RegisterRequest ¶
type RegisterRequest struct { RequestedExtensions []string `json:"requested_extensions"` Cookies Cookies `json:"cookies"` RegistrationData RegistrationData `json:"registration_data"` AuthData AuthData `json:"auth_data"` UserContextMap struct { Frc string `json:"frc"` } `json:"user_context_map"` RequestedTokenType []string `json:"requested_token_type"` }
type RegisterResponse ¶
type RegistrationData ¶
type RegistrationData struct { Domain string `json:"domain"` AppVersion string `json:"app_version"` DeviceType string `json:"device_type"` OsVersion string `json:"os_version"` DeviceSerial string `json:"device_serial"` DeviceModel string `json:"device_model"` AppName string `json:"app_name"` SoftwareVersion string `json:"software_version"` }
type ReviewsResponse ¶
type ReviewsResponse struct { XMLName xml.Name `xml:"GoodreadsResponse"` Reviews []struct { ID string `xml:"id"` Book struct { Title string `xml:"title"` PublicationYear string `xml:"publication_year"` Authors []struct { Name string `xml:"name"` } `xml:"authors>author"` } `xml:"book"` } `xml:"reviews>review"` }
type TokenResponse ¶
Click to show internal directories.
Click to hide internal directories.