Usage
Basic usage
Interface
OutlineWiki is a full-featured Python interface that contains an HTTP client and provides access to all the resources and functions of the application API.
You can create the interface with different options.
- The token can be generated in the account settings.
- By default,
OutlineWikiuses URLhttps://app.getoutline.com. However, token MUST be set by the user. - You can set
OUTLINE_URLandOUTLINE_TOKENas environment variables.
Documents
Documents is the central type of resources in Outline.
You can do all kinds of stuff with it using the API.
- Execute the search query
- Look at the results
- Search for the "Welcome" collection to create a new doc there
collection_idis essential argument. It points to the collection where the imported document will be created.- Plain text, markdown, docx, csv, tsv, and html file formats are supported for import.
- You can also pass a file object to the file argument, intended for transmission as part of a
multipart/form-datarequest. You can create such an object yourself, or using the functionoutline_wiki_api.utils.get_file_object_for_import.