Package: qbreader
QBreader Python API wrapper moduleAccessing the QBreader API with a python wrapper module.DocumentationGet a list of sets from the QBreader databaseset_list()This function gets a list of sets from the QBreader database.Search the QBreader databasequery()This function searches the QBreader database for questions that match the parameters specified.ParameterTypeValuesDescriptionquestionTypestringtossup,bonus,allThe type of question to search for. Defaults to "all". If one of the three is not set, returns a 400 Bad Request.searchTypestringquestion,answerThe type of search to perform. Defaults to "all". If one of the three is not set, returns a 400 Bad Request.queryStringstringAny string.The string to search for. Defaults to "".regexboolTrue,FalseWhether or not to use regular expressions for the queryString. Defaults to "False".randomizeboolTrue,FalseWhether or not to randomize the order of the results. Defaults to "False".setNamestringAny stringThe difficulties to search for. Defaults to []. Leave as an empty list to search all. Must be a list of ints from 1 to 10.difficultieslist[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]The string to search for. Defaults to "".categorieslistSeehttps://pastebin.com/McVDGDXgfor a full list.The categories to search for. Defaults to []. Leave as an empty list to search all.subcategorieslistSeehttps://pastebin.com/McVDGDXgfor a full list.The subcategories to search for. Defaults to []. Leave as an empty list to search all.maxQueryReturnLengthintAny integer.The maximum number of questions to return. Defaults to None. Leave blank to return 50. Anything over 200 will not work.Get a random question from the QBreader databaserandom_question()This function gets a random question from the QBreader database.ParameterTypeValuesDescriptionquestionTypestringtossup,bonusThe type of question to search for (tossup or bonus). If one of the two is not set, returns a 400 Bad Request.difficultieslist[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]The string to search for. Defaults to "".categorieslistSeehttps://pastebin.com/McVDGDXgfor a full list.The categories to search for. Defaults to []. Leave as an empty list to search all.subcategorieslistSeehttps://pastebin.com/McVDGDXgfor a full list.The subcategories to search for. Defaults to []. Leave as an empty list to search all.numberintAny integer.The number of questions to return. Defaults to None. Leave blank to return 1.Generate a random namerandom_question()This function Generates an adjective-noun pair (used in multiplayer lobbies)Get questions from a packet from the QBreader databasepacket()This function gets questions from a packet from the QBreader database.ParameterTypeValuesDescriptionsetNamestringNames of sets can be obtained by running set_list()The name of the set to search. Can be obtained from set_list().packetNumberintAny integer that corresponds to a packet number, usually from 1-11.The number of the packet to search for.Get a packet's tossups from the QBreader databasepacket_tossups()This function gets a packet's tossups from the QBreader database. Twice as fast as using packet().ParameterTypeValuesDescriptionsetNamestringNames of sets can be obtained by running set_list()The name of the set to search. Can be obtained from set_list().packetNumberintAny integer that corresponds to a packet number, usually from 1-11.The number of the packet to search for.Get a packet's bonuses from the QBreader databasepacket_bonuses()This function gets a packet's bonuses from the QBreader database. Twice as fast as using packet().ParameterTypeValuesDescriptionsetNamestringNames of sets can be obtained by running set_list()The name of the set to search. Can be obtained from set_list().packetNumberintAny integer that corresponds to a packet number, usually from 1-11.The number of the packet to search for.Get the number of packets in a set from the QBreader databasepacket_bonuses()This function gets the number of packets in a set from the QBreader databaseParameterTypeValuesDescriptionsetNamestringNames of sets can be obtained by running set_list()The name of the set to search. Can be obtained from set_list().Report a question from the QBreader databasereport_question()This function reports a question from the QBreader database.ParameterTypeValuesDescription_idstringCan be obtained from thequery(),random_question,packet(),packet_bonuses, orpacket_tossups.The ID of the question to report.reasonstringN/AThe reason for reporting the question. Defaults to None.descriptionstringN/AA description of the reason for reporting the question. Defaults to None.Get a list of rooms from the QBreader databaseroom_list()This function gets a list of rooms from the QBreader database.