WordPress extended XML-RPC MetaWeblog API

XML-RPC MetaWeblog API ? WordPress Codex

WordPress.org
WordPress.org

Get WordPress

Codex tools:Log in

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

WordPress supports the metaWeblog XML-RPC API, augmented with additional WordPress-specific functionality (denoted by ?) . This support was added in WordPress 1.5.0.

  • 1 metaWeblog.getPost
    • 1.1 Parameters
    • 1.2 Return Values
    • 1.3 Errors
  • 2 metaWeblog.getRecentPosts
    • 2.1 Parameters
    • 2.2 Return Values
    • 2.3 Errors
  • 3 metaWeblog.newPost
    • 3.1 Parameters
    • 3.2 Return Values
    • 3.3 Errors
  • 4 metaWeblog.editPost
    • 4.1 Parameters
    • 4.2 Return Values
    • 4.3 Errors
  • 5 metaWeblog.deletePost
    • 5.1 Parameters
    • 5.2 Return Values
    • 5.3 Errors
  • 6 metaWeblog.getCategories
    • 6.1 Parameters
    • 6.2 Return Values
    • 6.3 Errors
  • 7 metaWeblog.newMediaObject
    • 7.1 Parameters
    • 7.2 Return Values
    • 7.3 Errors
  • 8 metaWeblog.getUsersBlogs
    • 8.1 Parameters
    • 8.2 Return Values
  • 9 metaWeblog.getTemplate
  • 10 metaWeblog.setTemplate

Retrieve a post.

Parameters

  • int postid
  • string username
  • string password

Return Values

  • struct
    • int postid?
    • string title
    • string description: Post content.
    • string link: Post URL.
    • string userid?: ID of post author.
    • datetime dateCreated?
    • datetime date_created_gmt?
    • datetime date_modified? (Added in WordPress 3.4)
    • datetime date_modified_gmt? (Added in WordPress 3.4)
    • string wp_post_thumbnail?
    • string permaLink?: Post URL, equivalent to link.
    • array categories: Names of categories assigned to the post.
    • string mt_keywords: Names of tags assigned to the post.
    • string mt_excerpt
    • string mt_text_more: Post Read more text.
    • string wp_more_text
    • int mt_allow_comments
    • int mt_allow_pings
    • string wp_slug?
    • string wp_password?
    • string wp_author_id?
    • string wp_author_display_name?
    • string post_status?
    • string wp_post_format? (Added in WordPress 3.1)
    • bool sticky? (Added in WordPress 2.7.1)
    • array custom_fields? (Added in WordPress 2.3.2)
      • struct
        • string id
        • string key
        • string value
    • struct enclosure: Only set if post has an enclosure. (Added in WordPress 2.6.3)
      • string url
      • int length
      • string type

Errors

  • 401
    • If the user does not have permission to edit this post.
  • 404
    • If no post with that postid exists.

Retrieve a list of recent posts.

Parameters

  • int blogid: Not applicable for WordPress, can be any value and will be ignored.
  • string username
  • string password
  • int numberOfPosts: Optional.

Return Values

  • array
    • struct: see #metaWeblog.getPost for fields. enclosure will not be included. Note that the returned postid is string instead of an integer.

Errors

  • If a user cannot edit a post that would be included in the result set, it will be omitted from the response. Therefore, the total number of posts returned may be less than the requested quantity.

Create a new post.

Parameters

  • int blogid: Not applicable for WordPress, can be any value and will be ignored.
  • string username
  • string password
  • struct content
    • string title
    • string description: Post content.
    • string post_type: post or page
    • datetime dateCreated?
    • datetime date_created_gmt?: If specified, takes precedence over dateCreated.
    • array categories: Names of categories assigned to the post.
    • array mt_keywords: Names of tags assigned to the post.
    • string mt_excerpt
    • string mt_text_more: Post Read more text.
    • string mt_allow_comments: open or closed
    • string mt_allow_pings: open or closed
    • string wp_slug?
    • string wp_password?
    • string wp_author_id?
    • string wp_author_display_name?
    • string post_status?
    • string wp_post_format? (Added in WordPress 3.1)
    • bool sticky? (Added in WordPress 2.7.1)
    • array custom_fields? (Added in WordPress 2.3.2)
      • struct
        • string id: Optional.
        • string key
        • string value
    • struct enclosure: Only set if post has an enclosure. (Added in WordPress 2.6.3)
      • string url
      • int length
      • string type
  • bool publish: Whether to publish the post upon creation or leave it as a draft.

Return Values

  • string postid

Errors

  • 401
    • If user does not have permission to edit or publish posts of the specified type.
    • If user does not have permission to edit other users posts but wp_author_id is specified.
  • 404
    • If invalid post format is specified.

Edit an existing post.

Parameters

  • int postid
  • string username
  • string password
  • struct content: See #metaWeblog.newPost for fields.
  • bool publish

Return Values

  • bool true

Errors

  • 401
    • If user does not have permission to edit this post.
    • If user does not have permission to edit other users posts but wp_author_id is specified.
  • 404
    • If no post with that postid exists.
    • If invalid post format is specified.

Delete an existing post. Equivalent to blogger.deletePost.

Parameters

  • string appkey: Not applicable for WordPress, can be any value and will be ignored.
  • int postid
  • string username
  • string password
  • bool publish: Will be ignored.

Return Values

  • bool true

Errors

  • 401
    • If the user does not have permission to delete this post.
  • 404
    • If no post with that postid exists.

Retrieve list of categories.

Parameters

  • int blogid
  • string username
  • string password

Return Values

  • array
    • struct
      • string categoryId
      • string parentId
      • string categoryName
      • string categoryDescription
      • string description: Name of the category, equivalent to categoryName.
      • string htmlUrl
      • string rssUrl

Errors

  • 401
    • If the user does not have the edit_posts cap.

Upload a media file.

Parameters

  • int blogid
  • string username
  • string password
  • struct data
    • string name: Filename.
    • string type: File MIME type.
    • string bits: base64-encoded binary data.
    • bool overwrite: Optional. Overwrite an existing attachment of the same name. (Added in WordPress 2.2)

Return Values

  • struct
    • string id (Added in WordPress 3.4)
    • string file: Filename.
    • string url
    • string type

Errors

  • 401
    • If the user does not have the upload_files cap.
  • 500
    • File upload failure.

Returns information about all the blogs a given user is a member of. Equivalent to blogger.getUsersBlogs.

Parameters

  • string appkey: Not applicable for WordPress, can be any value and will be ignored.
  • string username
  • string password

Return Values

  • array
    • struct
      • string blogid
      • string url: Homepage URL for this blog.
      • string blogName
      • bool isAdmin?
      • string xmlrpc?: URL endpoint to use for XML-RPC requests on this blog.

Not supported. Please use the theme editor to manage your templates.

Not supported. Please use the theme editor to manage your templates.

Retrieved from https://codex.wordpress.org/index.php?title=XML-RPC_MetaWeblog_API&oldid=158715Categories:

  • Advanced Topics
  • WordPress Development
  • Feeds
  • Home Page
  • WordPress Lessons
  • Getting Started
  • Working with WordPress
  • Design and Layout
  • Advanced Topics
  • Troubleshooting
  • Developer Docs
  • About WordPress

Codex Resources

  • Community portal
  • Current events
  • Recent changes
  • Random page
  • Help
WordPress.org
WordPress.org
  • Visit our Facebook page
  • Visit our Twitter account
聲明:所有內容來自互聯網搜索結果,不保證100%準確性,僅供參考。如若本站內容侵犯了原著者的合法權益,可聯系我們進行處理。
發表評論
更多 網友評論0 條評論)
暫無評論

返回頂部

主站蜘蛛池模板: 动漫人物将机机插曲3d版视频| 成人合集大片bd高清在线观看| 国产欧美在线观看一区二区 | 97精品免费视频| 精品爆乳一区二区三区无码av| 日本三级黄视频| 国产一卡二卡≡卡四卡免费乱码| 久久亚洲免费视频| 野花香高清在线观看视频播放免费 | 国产av午夜精品一区二区入口| 久久国产精品无码网站| 韩国三级在线视频| 日本换爱交换乱理伦片| 国产乱码精品一区二区三区中文| 久久人妻av无码中文专区| 青青操国产在线| 无码办公室丝袜OL中文字幕| 国产一区二区三区不卡在线观看| 中文字幕第五页| 精品无码三级在线观看视频| 差差漫画在线登录入口弹窗页面| 免费黄色在线网址| ass亚洲**毛茸茸pics| 欧美黑人乱大交| 国产精品爆乳奶水无码视频| 亚洲人配人种jizz| 久久五月天综合网| 日本猛妇色xxxxx在线| 国产99久久精品一区二区| 一二三四在线观看免费中文动漫版 | 日产精品一卡2卡三卡4乱码久久| 国产一卡2卡3卡4卡网站免费| 中文字幕在线有码高清视频| 福利一区二区在线| 国内精品videofree720| 亚洲乱妇老熟女爽到高潮的片| 黄瓜视频芭乐视频app下载| 无翼乌全彩里番蛇姬本子| 免费被靠视频动漫| 97在线观看中心| 最近最好最新2018中文字幕免费|