Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,673
Community Members
 
Community Events
176
Community Groups

How to call the confluence.append_page() function of the python-api?

Edited

What exactly does the parameter 'self' in the function

confluence.append_page(self, ...)

on this page https://atlassian-python-api.readthedocs.io/confluence.html

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.

 

3 answers

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')

 

HTH

@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).

I did. It was a question to a person responsible for the documentation of the SDK.

0 votes

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)

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events