User:FeralKitty/Local/API stuff

From PinataIsland.info, the Viva Piñata wiki
Jump to: navigation, search

http://127.0.0.1/~kathryn/w/api.php?format=xml&action=query&prop=info&titles=PVA/DL

http://127.0.0.1/~kathryn/w/api.php?format=xmlfm&action=query&prop=info&titles=PVA/DL

http://127.0.0.1/~kathryn/w/index.php?title=PVA/DL&action=raw

http://127.0.0.1/~kathryn/w/index.php?title=No_such_page&action=raw

http://127.0.0.1/~kathryn/w/api.php?format=xmlfm&action=query&prop=info&titles=No_such_page


http://pinataisland.info/api.php?format=xmlfm&action=query&prop=info&titles=PVA/DL

http://pinataisland.info/api.php?format=xmlfm&action=query&prop=info&titles=PVA/DL8192

http://pinataisland.info/api.php?action=query&prop=links&titles=Main%20Page

http://pinataisland.info/api.php?action=query&generator=links&titles=Main%20Page&prop=info

http://pinataisland.info/api.php?action=query&generator=images&titles=Main%20Page&prop=imageinfo

Show all categories: http://pinataisland.info/api.php?action=query&list=allcategories&aclimit=500

Show all members for a category: http://pinataisland.info/api.php?action=query&list=categorymembers&cmtitle=Category:Black_variant_cards&cmnamespace=6&cmlimit=500&cmprop=title%7Ctimestamp

Show all properties for members: http://pinataisland.info/api.php?action=query&generator=categorymembers&gcmtitle=Category:Black_variant_cards&gcmnamespace=6&gcmlimit=500&prop=imageinfo&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize

Show only url and size for members: http://pinataisland.info/api.php?action=query&generator=categorymembers&gcmtitle=Category:Black_variant_cards&gcmnamespace=6&gcmlimit=500&prop=imageinfo&iiprop=url%7Csize

Generating thumbnails, resizing images

http://pinataisland.info/api.php?action=query&titles=Image:ArcticBunnycomb-TroubleInParadise-Black-PV.jpg&prop=imageinfo&iiprop=url&iiurlwidth=480&iiurlheight=320

  • URL = 454px-ArcticBunnycomb-TroubleInParadise-Black-PV.jpg

http://127.0.0.1/~kathryn/w/api.php?action=query&titles=Image:ClearSky-TroubleInParadise-PV.jpg&prop=imageinfo&iiprop=url&iiurlwidth=480&iiurlheight=320

  • URL = 454px-ClearSky-TroubleInParadise-PV.jpg

http://127.0.0.1/~kathryn/w/api.php?action=query&titles=Image:WINTER_CARD.jpg&prop=imageinfo&iiprop=url&iiurlwidth=320&iiurlheight=480

  • URL = 320px-WINTER_CARD.jpg

Max width or height = 320

http://pinataisland.info/api.php?action=query&titles=Image:ArcticBunnycomb-TroubleInParadise-Black-PV.jpg&prop=imageinfo&iiprop=url&iiurlwidth=320&iiurlheight=320

  • URL = 320px-ArcticBunnycomb-TroubleInParadise-Black-PV.jpg

http://127.0.0.1/~kathryn/w/api.php?action=query&titles=Image:ClearSky-TroubleInParadise-PV.jpg&prop=imageinfo&iiprop=url&iiurlwidth=320&iiurlheight=320

  • URL = 320px-ClearSky-TroubleInParadise-PV.jpg

http://127.0.0.1/~kathryn/w/api.php?action=query&titles=Image:WINTER_CARD.jpg&prop=imageinfo&iiprop=url&iiurlwidth=320&iiurlheight=320

  • URL = 226px-WINTER_CARD.jpg

Max width or height = 450

PV app cards are 450 x 317.

  • URL = 450px-Crowla-TroubleInParadise-SolidPurple-Chuck-Unsupported-PV.jpg

xml format

<?xml version="1.0" encoding="utf-8"?><api><query><pages><page pageid="9012" ns="6" title="Image:Crowla-TroubleInParadise-SolidPurple-Chuck-Unsupported-PV.jpg" imagerepository="local"><imageinfo><ii thumburl="/images/thumb/d/dc/Crowla-TroubleInParadise-SolidPurple-Chuck-Unsupported-PV.jpg/450px-Crowla-TroubleInParadise-SolidPurple-Chuck-Unsupported-PV.jpg" thumbwidth="450" thumbheight="309" url="/images/d/dc/Crowla-TroubleInParadise-SolidPurple-Chuck-Unsupported-PV.jpg" /></imageinfo></page></pages></query></api>
note special characters to parse

If URL contains apostrophe, space, etc.

<?xml version="1.0" encoding="utf-8"?>
<api>
  <query>
    <pages>
      <page pageid="8911" ns="6" title="Image:SourS'morepion-TroubleInParadise-Unsupported-PV.jpg" imagerepository="local">
        <imageinfo>
          <ii thumburl="/images/thumb/f/fa/SourS%27morepion-TroubleInParadise-Unsupported-PV.jpg/450px-SourS%27morepion-TroubleInParadise-Unsupported-PV.jpg" thumbwidth="450" thumbheight="309" url="/images/f/fa/SourS%27morepion-TroubleInParadise-Unsupported-PV.jpg" />
        </imageinfo>
      </page>
    </pages>
  </query>
</api>