API Documentation

class pybunpro.UserInformation(username, grammar_point_count, ghost_review_count, creation_date)

A Bunpro user’s account information

class pybunpro.GrammarPoint(grammar_point, created_at_date, updated_at_date)

A single grammar point in Bunpro

class pybunpro.StudyQueue(reviews_available, next_review_date, reviews_available_next_hour, reviews_available_next_day)

A Bunpro user’s study queue

class pybunpro.BunproClient(api_key=None)

Bunpro REST API Client

Parameters

api_key (Optional[str]) – The Bunpro API key to use

recent_items(limit=None, api_key=None)

Gets the recently added grammer

Parameters
  • limit (Optional[int]) – The maximum number of items to return. 1 to 50 inclusive.

  • api_key (Optional[str]) – The API key to use

Return type

Tuple[UserInformation, List[GrammarPoint]]

Returns

The user information and recent grammar points

Raises
study_queue(api_key=None)

Gets the user’s study queue :type api_key: Optional[str] :param api_key: The API key to use

Return type

Tuple[UserInformation, StudyQueue]

Returns

The user info and study queue

Raises
exception pybunpro.SchemaError(message, error)

Raised when there is an error with a schema

Parameters
  • message (str) – The error message to use

  • error (dict) – A dictionary with errors

exception pybunpro.BunproAPIError(error)

Raised when there is an error returned from the Bunpro API

Parameters

error (HTTPError) – The original HTTPError

errors

The error messages returned form the Bunpro API

Return type

List[str]

status_code

The status code of the error response

Return type

int