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
BunproAPIError – If there is an error response from the API
SchemaError – If the response cannot be parsed
-
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
BunproAPIError – If there is an error response from the API
SchemaError – If the response cannot be parsed
-
exception
pybunpro.
SchemaError
(message, error)¶ Raised when there is an error with a schema
- Parameters
message (
str
) – The error message to useerror (
dict
) – A dictionary with errors