API:Move/ja

From MediaWiki.org
< API:Move(Redirected from API:Edit - Move/ja)
Jump to: navigation, search
Tools clipart.png このページは MediaWiki API ドキュメントの一部です。
言語: English  • Deutsch • 日本語
MediaWiki API


MediaWiki バージョン: 1.12

Contents

トークン [edit]

ページを移動させるために、moveトークンが必要です。このトークンはeditトークンと等しくすべてのページに対して同じですが、すべてのログインで変わります。moveトークンは次のように取得できます:

ページを移動する [edit]

ページはaction=moveで移動できます。

パラメータ [edit]

  • from: 移動させたいページのタイトル。Cannot be used together with fromid
  • fromid: Page ID of the page you want to move. Cannot be used together with from
  • to: ページを移動させた後の新しいタイトル
  • token: 以前のリクエストで取得されたトークン。urlencodeで'+'を'%2B'に符号化することに注意
  • reason: 移動する理由(オプション)
  • movetalk: 可能であるなら、トークページを移動する
  • movesubpages: Move subpages, if applicable
  • noredirect: 古いタイトルから新しいものへのリダイレクトを作らない。Requires the suppressredirect right, which by default is granted only to group Bots; even admins don't have it!
  • watch: Add the page and the redirect to your watchlist
  • unwatch: Remove the page and the redirect from your watchlist
  • ignorewarnings: Ignore any warnings while moving

[edit]

Note: In this example, all parameters are passed in a GET request just for the sake of simplicity. However, action=move requires POST requests; GET requests will cause an error.

起こり得るエラー [edit]

すべてのエラーは次のように整形されます:

<error code="code" info="info">
  • code: nofrom
    • info: fromパラメータを設定しなければなりません
  • code: noto
    • info: toパラメータを設定しなければなりません
  • code: notoken
    • info: tokenパラメータを設定しなければなりません
  • code: cantmove-anon
    • info: 匿名ユーザはページを移動させることはできません
  • code: cantmove
    • info: ページを移動させるパーミッションがありません
  • code: cantmovefile
    • info: You don't have permission to move files
      • If file moving is disabled altogether, you'll get an immobilenamespace error instead
  • code: selfmove
    • info: ページをそれ自身に移動させることはできません
  • code: immobilenamespace
    • info: 移動が保護されている名前空間からもしくはその名前空間にページを移動させようとしました
  • code: articleexists
    • info: 移動先の記事は既に存在し元の記事へのリダイレクトではありません
  • code: protectedpage
    • info: この移動を実行するパーミッションを持っていません。
  • code: protectedtitle
    • info: 目的の記事は保護されていて作成できません
  • code: nonfilenamespace
    • info: Can't move a file to a non-file namespace
  • code: filetypemismatch
    • info: The new file extension doesn't match its type
  • code: mustbeposted
    • info: The move module requires a POST request

注: ページ自身を移動させることが成功したが、トークページを移動させることが失敗した場合、関連性のあるエラーが talkmove-error-codetalkmove-error-infoフィールドに返されます。