API:Move/ja
From MediaWiki.org
< API:Move(Redirected from API:Edit - Move/ja)
| このページは MediaWiki API ドキュメントの一部です。 |
| 言語: | English • Deutsch • 日本語 |
|---|
| MediaWiki バージョン: | 1.12 |
Contents |
トークン [edit]
ページを移動させるために、moveトークンが必要です。このトークンはeditトークンと等しくすべてのページに対して同じですが、すべてのログインで変わります。moveトークンは次のように取得できます:
| 結果 |
|---|
| The following content has been placed in a collapsed box for improved usability. |
<?xml version="1.0" encoding="utf-8"?> <api> <query> <pages> <page pageid="1" ns="0" title="Main Page" touched="2007-09-03T20:32:21Z" lastrevid="20" counter="20" length="470" movetoken="58b54e0bab4a1d3fd3f7653af38e75cb+\" /> </pages> </query> </api> |
| The above content has been placed in a collapsed box for improved usability. |
ページを移動する [edit]
ページはaction=moveで移動できます。
パラメータ [edit]
from: 移動させたいページのタイトル。Cannot be used together withfromidfromid: Page ID of the page you want to move. Cannot be used together withfromto: ページを移動させた後の新しいタイトルtoken: 以前のリクエストで取得されたトークン。urlencodeで'+'を'%2B'に符号化することに注意reason: 移動する理由(オプション)movetalk: 可能であるなら、トークページを移動するmovesubpages: Move subpages, if applicablenoredirect: 古いタイトルから新しいものへのリダイレクトを作らない。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 watchlistunwatch: Remove the page and the redirect from your watchlistignorewarnings: 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.
| 結果 |
|---|
| The following content has been placed in a collapsed box for improved usability. |
<?xml version="1.0" encoding="utf-8"?> <api> <move from="Main Pgae" to="Main Page" reason="Oops, misspelling" talkfrom="Talk:Main Pgae" talkto="Talk:Main Page" /> </api> |
| The above content has been placed in a collapsed box for improved usability. |
起こり得るエラー [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
- info: You don't have permission to move files
- 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-codeと talkmove-error-infoフィールドに返されます。