Template:ApiEx/bn

This page is a translated version of the page Template:ApiEx and the translation is 67% complete.


টেমপ্লেট নথি

একটি উদাহরণ এপিআই অনুরোধ বিন্যাস করতে এপিআই ডকুমেন্টেশন পৃষ্ঠাগুলিতে এই টেমপ্লেটটি ব্যবহার করুন।

বিকল্প হিসাবে নোট করুন, {{Api help}} সোর্স কোড থেকে উৎপন্ন এপিআই ডকুমেন্টেশনগুলি স্থানীয়কৃত করে যাতে সাধারণ এপিআই উদাহরণ রয়েছে।

User:SPage (WMF)/ApiEx utility creates a {{ApiEx}} template invocation if you paste an api.php URL into it.

ব্যবহার

{{ApiEx
| desc=Capitalization, localization, "_" => " ", "Project" => "Wikipedia", ...
| p1=action=query
| p2=titles=Project:articleA{{!}}article_B
| result=<syntaxhighlight lang="xml">
<api>
  <query>
    <normalized>
      <n from="Project:articleA" to="Wikipedia:ArticleA" />
      <n from="article_B" to="Article B" />
    </normalized>
    <pages>
      <page ns="4" title="Wikipedia:ArticleA" missing="" />
      <page ns="0" title="Article B" missing="" />
    </pages>
  </query>
</api>
</syntaxhighlight>
| post={{ApiEx/Post|parameter=days|value=integer|default=7|comment=comment}}
}}

পরিমিতি

  • desc — এপিআই অনুরোধ বিবরণ
  • lang — উইকি ভাষার জন্য দুই অক্ষরের কোড। ডিফল্ট ভাবে 'en'
  • site — উদাহরণে ব্যবহার করার জন্য সাইটের সম্পূর্ণ ইউআরএল (উদাঃ, www.mediawiki.org)। lang প্যারামিটার ওভাররাইড করে।
  • p1-p9 — parameter groups, each containing either one param=value pair or multiple pairs each separated by an ampersand (&), e.g. p3=param=value&paramB=valueBbbb
  • result — the result of the query execution. Add the template, preview, click the api.php link, and copy and paste the API response into the template as | result=<syntaxhighlight lang="javascript">PASTE RESPONSE HERE</syntaxhighlight>
  • post — a "list" of {{ApiEx/Post}} objects, to generate a post table
  • collapse — set to "no" to stop "result" and "post" sections from being collapsed with {{Collapse top}}/{{Collapse bottom}}
  • apisandbox — whether to show a "[try in ApiSandbox]" link that loads the example API query parameters into Special:ApiSandbox. Default is 1, add | apisandbox=0 to not show this link.

টীকা

  • This template outputs a wikitext link. Any spaces in the URL parameters p1...p9 will garble the link, so change them to %20.
  • Similarly, any pipe-separate values in the URL parameters such as a group of pages "title1|title2" must be escaped, so use the {{!}} magic word.

উদাহরণ

Capitalization, localization, "_" => " ", "Project" => "Wikipedia", ...

ফলাফল
পরামিতি পোস্ট করুন
পরামিতির নাম মান পূর্বনির্ধারিত মন্তব্য
days integer 7 comment
<api>
  <query>
    <normalized>
      <n from="Project:articleA" to="Wikipedia:ArticleA" />
      <n from="article_B" to="Article B" />
    </normalized>
    <pages>
      <page ns="4" title="Wikipedia:ArticleA" missing="" />
      <page ns="0" title="Article B" missing="" />
    </pages>
  </query>
</api>