You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
What exactly does the parameter 'self' in the function
mean? How am I supposed to call this function?
The code on line 1617 and on on this page https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/confluence.py is not much of a help.
once you've created your Conflunce object, you can call append page like this:
result = conf.append_page(433343488, 'my title', '<p>some more text</p>', 212477418, type='page')
where conf is my confluence object
433343488 is the page id of the page you want to append to and 212477418 is the parent-page ID.
you can get the page-ID by calling get_page('my title')
@Alexander Fedotov : did you manage to solve this? because I am facing same issue with the example not helping.
As for your question: 'self' parameter in python refers to the class you are using and usually is not passed at all. simply pretend it is not there.
once you have created your connection with conf = confluence(url,user, pwd), your variable conf points at an object with all capabilities of the AtlassianConfluenceAPI class. in the definitions of the methods, 'self' is being used as an (internally) passed, but as the user you never have to give that param as it is passed in the background automatically (because it is a class's method).
Welcome to the Atlassian Community!
In Confluence-speak, "self" almost always means "the current page". You'll need to trace that back through the code you are looking at (Sorry, I've not worked with this library, I've always coded my own direct calls, so I know this is not much help. Hopefully it gets you on the right path though)