[LIB-5] Site sources of snooker-score-api
[snooker-score-api.git] / src / site / ru / fml / faq.fml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4   ~ Copyright (c) 2017. Developed by Hedgecode.
5   ~
6   ~ Licensed under the Apache License, Version 2.0 (the "License");
7   ~ you may not use this file except in compliance with the License.
8   ~ You may obtain a copy of the License at
9   ~
10   ~   http://www.apache.org/licenses/LICENSE-2.0
11   ~
12   ~ Unless required by applicable law or agreed to in writing, software
13   ~ distributed under the License is distributed on an "AS IS" BASIS,
14   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   ~ See the License for the specific language governing permissions and
16   ~ limitations under the License.
17 -->
18
19 <faqs xmlns="http://maven.apache.org/FML/1.0.1"
20       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21       xsi:schemaLocation="http://maven.apache.org/FML/1.0.1 http://maven.apache.org/xsd/fml-1.0.1.xsd"
22       title="Часто Задаваемые Вопросы">
23     <part id="general">
24         <title>Основные вопросы:</title>
25         <faq id="how-to-get-event">
26             <question>
27                 Как получить полную информацию по конкретному турниру?
28             </question>
29             <answer>
30                 <p><pre>Event event = Snooker.API().getEvent(eventId);</pre>
31                 где параметр <code>eventId</code> - ID турнира.
32                 </p>
33             </answer>
34         </faq>
35         <faq id="how-to-get-match">
36             <question>
37                 Как получить полную информацию по конкретному матчу?
38             </question>
39             <answer>
40                 <p><pre>Match match = Snooker.API().getMatch(eventId, roundId, matchNumber);</pre>
41                 где параметр <code>eventId</code> - ID турнира, в котором играется искомый матч;
42                 <code>roundId</code> - ID раунда турнира; <code>matchNumber</code> - номер матча в раунде.
43                 </p>
44             </answer>
45         </faq>
46         <faq id="how-to-get-player">
47             <question>
48                 Как получить полную информацию по конкретному игроку?
49             </question>
50             <answer>
51                 <p><pre>Player player = Snooker.API().getPlayer(int playerId);</pre>
52                 где параметр <code>playerId</code> - ID игрока.
53                 </p>
54             </answer>
55         </faq>
56         <faq id="how-to-get-season-events">
57             <question>
58                 Как получить информацию по всем турнирам в сезоне?
59             </question>
60             <answer>
61                 <p><pre>Events seasonEvents = Snooker.API().getSeasonEvents(season);</pre>
62                 где параметр <code>season</code> - объект класса <code>Season</code>, задающий
63                 конкретный сезон, или же <code>Season.ALL</code> - для всех доступных сезонов.
64                 </p>
65             </answer>
66         </faq>
67         <faq id="how-to-get-event-matches">
68             <question>
69                 Как получить информацию по всем матчам конкретного турнира?
70             </question>
71             <answer>
72                 <p><pre>Matches eventMatches = Snooker.API().getEventMatches(eventId);</pre>
73                 где параметр <code>eventId</code> - ID турнира.
74                 </p>
75             </answer>
76         </faq>
77         <faq id="how-to-get-ongoing-matches">
78             <question>
79                 Как получить информацию по матчам, которые проходят в данным момент?
80             </question>
81             <answer>
82                 <p><pre>OngoingMatches matches = Snooker.API().getOngoingMatches();</pre>
83                 </p>
84             </answer>
85         </faq>
86         <faq id="how-to-get-player-matches">
87             <question>
88                 Как получить информацию по всем матчам конкретного игрока в сезоне?
89             </question>
90             <answer>
91                 <p><pre>Matches playerMatches = Snooker.API().getPlayerMatches(playerId, season);</pre>
92                 где параметр <code>playerId</code> - ID игрока,
93                 а <code>season</code> - объект класса <code>Season</code>, задающий
94                 конкретный сезон, или же <code>Season.ALL</code> - для всех доступных сезонов.
95                 </p>
96             </answer>
97         </faq>
98         <faq id="how-to-get-event-players">
99             <question>
100                 Как получить информацию по всем игрокам в конкретном турнире?
101             </question>
102             <answer>
103                 <p><pre>Players eventPlayers = Snooker.API().getEventPlayers(eventId);</pre>
104                 где параметр <code>eventId</code> - ID турнира.
105                 </p>
106             </answer>
107         </faq>
108         <faq id="how-to-get-players">
109             <question>
110                 Как получить информацию по всем игрокам в конкретном сезоне?
111             </question>
112             <answer>
113                 <p><pre>Players players = Snooker.API().getPlayers(season, category);</pre>
114                 где параметр <code>season</code> - объект класса <code>Season</code>, задающий
115                 конкретный сезон, или же <code>Season.ALL</code> - для всех доступных сезонов,
116                 а <code>category</code> - объект класса <code>PlayerCategory</code>,
117                 задающий категорию игроков (например, <code>PlayerCategory.PRO</code>).
118                 </p>
119             </answer>
120         </faq>
121     </part>
122     <part id="additional">
123         <title>Дополнительно:</title>
124         <faq id="how-to-get-rankings">
125             <question>
126                 Как получить информацию по рейтингам/заработанным суммам всех игроков в сезоне?
127             </question>
128             <answer>
129                 <p><pre>Rankings rankings = Snooker.API().getRankings(season, rankingType);</pre>
130                 где параметр <code>season</code> - объект класса <code>Season</code>, задающий
131                 конкретный сезон, или же <code>Season.ALL</code> - для всех доступных сезонов,
132                 а <code>rankingType</code> - объект класса <code>RankingType</code>,
133                 задающий тип рейтинга (например, <code>RankingType.MoneyRankings</code>).
134                 </p>
135             </answer>
136         </faq>
137     </part>
138 </faqs>