[LIB-5] Site sources of snooker-score-api
[snooker-score-api.git] / src / site / ru / fml / faq.fml
diff --git a/src/site/ru/fml/faq.fml b/src/site/ru/fml/faq.fml
new file mode 100644 (file)
index 0000000..f4d4262
--- /dev/null
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright (c) 2017. Developed by Hedgecode.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+
+<faqs xmlns="http://maven.apache.org/FML/1.0.1"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="http://maven.apache.org/FML/1.0.1 http://maven.apache.org/xsd/fml-1.0.1.xsd"
+      title="Часто Задаваемые Вопросы">
+    <part id="general">
+        <title>Основные вопросы:</title>
+        <faq id="how-to-get-event">
+            <question>
+                Как получить полную информацию по конкретному турниру?
+            </question>
+            <answer>
+                <p><pre>Event event = Snooker.API().getEvent(eventId);</pre>
+                где параметр <code>eventId</code> - ID турнира.
+                </p>
+            </answer>
+        </faq>
+        <faq id="how-to-get-match">
+            <question>
+                Как получить полную информацию по конкретному матчу?
+            </question>
+            <answer>
+                <p><pre>Match match = Snooker.API().getMatch(eventId, roundId, matchNumber);</pre>
+                где параметр <code>eventId</code> - ID турнира, в котором играется искомый матч;
+                <code>roundId</code> - ID раунда турнира; <code>matchNumber</code> - номер матча в раунде.
+                </p>
+            </answer>
+        </faq>
+        <faq id="how-to-get-player">
+            <question>
+                Как получить полную информацию по конкретному игроку?
+            </question>
+            <answer>
+                <p><pre>Player player = Snooker.API().getPlayer(int playerId);</pre>
+                где параметр <code>playerId</code> - ID игрока.
+                </p>
+            </answer>
+        </faq>
+        <faq id="how-to-get-season-events">
+            <question>
+                Как получить информацию по всем турнирам в сезоне?
+            </question>
+            <answer>
+                <p><pre>Events seasonEvents = Snooker.API().getSeasonEvents(season);</pre>
+                где параметр <code>season</code> - объект класса <code>Season</code>, задающий
+                конкретный сезон, или же <code>Season.ALL</code> - для всех доступных сезонов.
+                </p>
+            </answer>
+        </faq>
+        <faq id="how-to-get-event-matches">
+            <question>
+                Как получить информацию по всем матчам конкретного турнира?
+            </question>
+            <answer>
+                <p><pre>Matches eventMatches = Snooker.API().getEventMatches(eventId);</pre>
+                где параметр <code>eventId</code> - ID турнира.
+                </p>
+            </answer>
+        </faq>
+        <faq id="how-to-get-ongoing-matches">
+            <question>
+                Как получить информацию по матчам, которые проходят в данным момент?
+            </question>
+            <answer>
+                <p><pre>OngoingMatches matches = Snooker.API().getOngoingMatches();</pre>
+                </p>
+            </answer>
+        </faq>
+        <faq id="how-to-get-player-matches">
+            <question>
+                Как получить информацию по всем матчам конкретного игрока в сезоне?
+            </question>
+            <answer>
+                <p><pre>Matches playerMatches = Snooker.API().getPlayerMatches(playerId, season);</pre>
+                где параметр <code>playerId</code> - ID игрока,
+                а <code>season</code> - объект класса <code>Season</code>, задающий
+                конкретный сезон, или же <code>Season.ALL</code> - для всех доступных сезонов.
+                </p>
+            </answer>
+        </faq>
+        <faq id="how-to-get-event-players">
+            <question>
+                Как получить информацию по всем игрокам в конкретном турнире?
+            </question>
+            <answer>
+                <p><pre>Players eventPlayers = Snooker.API().getEventPlayers(eventId);</pre>
+                где параметр <code>eventId</code> - ID турнира.
+                </p>
+            </answer>
+        </faq>
+        <faq id="how-to-get-players">
+            <question>
+                Как получить информацию по всем игрокам в конкретном сезоне?
+            </question>
+            <answer>
+                <p><pre>Players players = Snooker.API().getPlayers(season, category);</pre>
+                где параметр <code>season</code> - объект класса <code>Season</code>, задающий
+                конкретный сезон, или же <code>Season.ALL</code> - для всех доступных сезонов,
+                а <code>category</code> - объект класса <code>PlayerCategory</code>,
+                задающий категорию игроков (например, <code>PlayerCategory.PRO</code>).
+                </p>
+            </answer>
+        </faq>
+    </part>
+    <part id="additional">
+        <title>Дополнительно:</title>
+        <faq id="how-to-get-rankings">
+            <question>
+                Как получить информацию по рейтингам/заработанным суммам всех игроков в сезоне?
+            </question>
+            <answer>
+                <p><pre>Rankings rankings = Snooker.API().getRankings(season, rankingType);</pre>
+                где параметр <code>season</code> - объект класса <code>Season</code>, задающий
+                конкретный сезон, или же <code>Season.ALL</code> - для всех доступных сезонов,
+                а <code>rankingType</code> - объект класса <code>RankingType</code>,
+                задающий тип рейтинга (например, <code>RankingType.MoneyRankings</code>).
+                </p>
+            </answer>
+        </faq>
+    </part>
+</faqs>