Skip to content

Commit

Permalink
wordpressrxmlrpc.py: test()
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-mbm committed Jul 14, 2015
1 parent 26208fc commit c6626ab
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions paicemana/wordpressrxmlrpc.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
from wordpress_xmlrpc import Client
from wordpress_xmlrpc.methods import posts

client = Client(
'http://www.weeklyosm.eu/xmlrpc.php',
'alexandre', 'SENHA'
)
def test():

posts = client.call(posts.GetPosts())
client = Client(
'http://www.weeklyosm.eu/xmlrpc.php',
'alexandre', 'SENHA'
)

#for post in posts[:1]:
#print(posts[1].id)
#print(posts[1].title)
#print(posts[1].link)
print(posts[0].content)
posts = client.call(posts.GetPosts())

# http://python-wordpress-xmlrpc.readthedocs.org/en/latest
#
# http://codex.wordpress.org/XML-RPC_WordPress_API
# https://github.com/maxcutler/python-wordpress-xmlrpc/
#for post in posts[:1]:
#print(posts[1].id)
#print(posts[1].title)
#print(posts[1].link)
print(posts[0].content)

# http://python-wordpress-xmlrpc.readthedocs.org/en/latest
#
# http://codex.wordpress.org/XML-RPC_WordPress_API
# https://github.com/maxcutler/python-wordpress-xmlrpc/


if __name__ == "__main__":
test()

0 comments on commit c6626ab

Please sign in to comment.