![]() ![]() Returns integer value of total number of comments under a submission. Get_submission_comment_count( submission_dict) Returns submission type: "url" or "content". Returns integer value of submission or comment ID. Returns date and time submission or comment was posted. Returns (int, int) tuple of upvotes/downvotes for submission or comment. Returns integer value of current score for submission or comment. Returns name of subverse submission or comment is posted to. If ignore_links = True and voat_dict is a link submission, returns None. Returns content of submission or comment. Get_content( voat_dict, ignore_links=False) For example, get_submission_type() will never return a result when passed a comment dictionary just as get_parent_id() will never return a result when passed a submission dictionary. As a result, some VAPy dictionary methods will only return data when passed a specific content dictionary type. Some keys are shared between submission and comment dicts while others are unique to only one. Returns values from (or calculated from) Voat content dictionaries. Accepts a submission dict, or submission id and subverse. Get_comments_by_submission( submission, subverse=None) Returns a list of url submission dictionaries. Returns a list of content submission dictionaries. Returns a list of submission dictionaries. Get_submission_by_id( subverse, submissionID) This is the Python dict corresponding to the json data of the API response to a GET query for a submission or comment. Most VAPy functions take a voat content dicitonary as an argument. Where does VAPy store information on my computer?īoth of the VAPy persistence services, Profiles and Records, create SQLite databases in the following locations by default: Operating System VAPy can be used without the Profiles component by directly calling the set_headers() method:Īfter setting the headers attribute, VAPy functions will work regardless of the use of Profiles. Load_profile() will retreive the profile named and create a working headers attribute. This attribute must contain a current Voat API key and token or communication with the Voat API will not be possible. Voat passwords are not stored within the local database.Īll VAPy methods are available to any instance of VAPy with a properly initialized self.headers attribute. As a Voat password is required for Voat API token generation, that same Voat password is used as the encryption passphrase to eliminate the need for two passwords per profile. ![]() Voat usernames and API keys and tokens are encrytped in a locally persistent database. Creating a profile will simplify proper initialization of a VAPy instance, but this step is optional.Īfter creating a profile, VAPy can handle OAuth2 authentication with the Voat API. Select "add" and provide a profile name, Voat login credentials, and API key when prompted. It is recommended that you first create a profile by running Profiles as a standalone applicaiton: To use VAPy you need a valid login and api key. VAPy includes Vapp, a Voat application framework designed to make it even easier to implement simple applications using VAPy. The Voat password is not stored in the database. Profiles encrypts the voat username, API key, and API token with the Voat password. This gives users a "setup and ignore" approach to OAuth2 authentication. Profiles can be used with VAPy applications, providing secure local persistence and renewal for API tokens. VAPy provides a Profiles class, which can be run as a standalone application providing a simple user agent and API key management system. While Python wrappers for other APIs are typically centered around Submission and Comment classes, VAPy encourages a somewhat more functional approach and consists largely of simple functions and designed to be chained together or used with filter() to produce useful behavior. VAPy is intended to provide a simple, highly explicit Python interface to the Voat API. VAPy #The Voat API wrapper for Python3 #IN PROGRESS - SUBJECT TO FREQUENT AND RADICAL CHANGES ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |