Closed ssaraswati closed 2 years ago
Hmm, any reasons why you'd want this done on every call? Are you using md2cf's MinimalConfluence
as part of a larger script? I'm curious :)
@iamjackg I didn't actually indent to set this on all requests and have pushed up a change that should ensure expansions are optional by default. My intention with adding them to all title based gets was to avoid the secondary lookup by page id to get a full page object.
My motivation for the change was to look at what functionality was missing in the MinimalConfluence api to be able to support https://github.com/pawelsikora/mkdocs-with-confluence/issues/5. The ability to get a page's Ancestors seemed to be the only thing that would be required to use MinimalConfluence.
Ah, yeah, the _links
change does break another PR I just merged: #30 uses the base
field to build a full URL to the page. We could fake it by putting the base
field back in the page object, but I don't love that. I'd rather revert to the double lookup if that's okay.
Sure, have reverted those changes and made this solely focused on adding the optional additional expands.
Update MinimalConfluence get_page to support additional expansions so that page ancestors can be retrieved.
Set default expansions of version, history and space so that a search by title/space returns a mostly identical result to get by page id. (The links sections of api response differs slightly, happy to revert the behavior of this to a double lookup if you would like to maintain the same behavior)