Jump to content

Extension:StructuredDiscussions/API: Difference between revisions

From mediawiki.org
Content deleted Content added
SPage (WMF) (talk | contribs)
action=query&prop=flow&titles=Foo: update, use {{ApiEx}}
Line 1: Line 1:
: ''See also [[Flow/Architecture/API]] and {{gerrit|107411}}''
: ''See also [[Flow/Architecture/API]] and {{gerrit|107411}}''


== action=query&prop=flow&titles=Foo ==
== action=query&prop=flowinfo ==
Allows you to tell if Flow is enabled on a given page.
Indicates if Flow is enabled on the specified pages. (In [[gerrit:111255]] .)


{{ApiEx
An example output where "Talk:Flow" has Flow enabled, "Main Page" does not, and "Talk:Foo" does not exist.
| desc=Example: get Flow info where "Talk:Sandbox" has Flow enabled, "Main_Page" does not, and "Talk:Foo" does not exist.

| p1=action=query
<source lang="xml">
| p2=prop=flowinfo
<?xml version="1.0"?>
| p3=titles=Talk:Sandbox&#x7C;Main_Page&#x7C;Talk:Foo
<api>
| result=<source lang="xml"><api>
<query>
<pages>
<query>
<normalized>
<page ns="1" title="Talk:Foo" missing="" />
<page pageid="6" ns="0" title="Main Page">
<n from="Main_Page" to="Main Page" />
</normalized>
<flow />
<pages>
</page>
<page pageid="12" ns="1" title="Talk:Flow">
<page ns="1" title="Talk:Foo" missing="" />
<page pageid="1423" ns="0" title="Main Page">
<flow enabled="" />
<flowinfo>
</page>
<flow />
</pages>
</flowinfo>
</query>
</api>
</page>
<page pageid="186417" ns="1" title="Talk:Sandbox">
</source>
<flowinfo>
<flow enabled="" />
</flowinfo>
</page>
</pages>
</query>
</api></source>}}

Revision as of 22:07, 21 April 2014

See also Flow/Architecture/API and Gerrit change 107411

action=query&prop=flowinfo

Indicates if Flow is enabled on the specified pages. (In gerrit:111255 .)

Example: get Flow info where "Talk:Sandbox" has Flow enabled, "Main_Page" does not, and "Talk:Foo" does not exist.
Result
<api>
  <query>
    <normalized>
      <n from="Main_Page" to="Main Page" />
    </normalized>
    <pages>
      <page ns="1" title="Talk:Foo" missing="" />
      <page pageid="1423" ns="0" title="Main Page">
        <flowinfo>
          <flow />
        </flowinfo>
      </page>
      <page pageid="186417" ns="1" title="Talk:Sandbox">
        <flowinfo>
          <flow enabled="" />
        </flowinfo>
      </page>
    </pages>
  </query>
</api>