Extended API
[resolved] Usage (6 posts)

  1. meira
    Posted 4 years ago #

    Works like a charm.

    Usage in Python :

    # Fetch november 2010 posts
     import xmlrpclib
     wp_site = 'http://my-wp-site.com/xmlrpc.php'
     server = xmlrpclib.ServerProxy( wp_site )
     loginname = 'myusername'
     password = 'mypass'
     arg =['numberposts=100&offset=0&year=2010&monthnum=11']
     posts = server.extapi.callWpMethod(loginname,password,method,arg)
     print 'Find',len(posts),'posts:'
     for post in posts:  # get posts dictionaries list
        for k in post:  # get dict
           print k,":",post[k]  # print keys and contents

    Thist code fetch 100 posts in 10 seconds.

  2. michaelgrosser
    Plugin Author

    Posted 4 years ago #

    Glad to hear it! Please feel free to let me know if you have any suggestions for improvement.

  3. meira
    Posted 4 years ago #

    Access to $wpdb class would be fine, to make remote SQL requests...

  4. michaelgrosser
    Plugin Author

    Posted 4 years ago #

    That's a good idea, though it's significantly more involved than accessing the procedural functionals.

    I'll look into it for a future update for sure, as it would definitely open up things to outside access even further.

  5. mmtrav
    Posted 4 years ago #

    Is this offering what you want, Meira?


  6. StErMi
    Posted 3 years ago #

    Got an error using wp_signon

    someone know why?

    This is code: http://pastebin.com/wrJePTdJ

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Extended API
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic