Formatter Module

Contains function that manipulate the API returns for easier data manipulation.


Return a list with recent pastes ids

Parameters:archive_html (string) – raw html of the archive url
Returns:a list containing paste ids
Return type:list

Input an xml list and return a list of paste objects.

Parameters:xml_paste – An xml formatted response containing Paste information
Returns:a list of Paste objects parsed from the input xml formatted string
Return type:list(Paste)

Return user dictionary from an xml format string

Parameters:user_xml_string (string) – xml formatted string containing user information
Returns:A dictionary containing the user info
Return type:User