[LIB-5] Site sources of snooker-score-api
[snooker-score-api.git] / src / site / 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="Frequently Asked Questions">
23     <part id="general">
24         <title>General:</title>
25         <faq id="how-to-get-event">
26             <question>
27                 How to get full information on a specific tournament?
28             </question>
29             <answer>
30                 <p><pre>Event event = Snooker.API().getEvent(eventId);</pre>
31                 where parameter <code>eventId</code> is ID of the tournament.
32                 </p>
33             </answer>
34         </faq>
35         <faq id="how-to-get-match">
36             <question>
37                 How to get full information on a specific match?
38             </question>
39             <answer>
40                 <p><pre>Match match = Snooker.API().getMatch(eventId, roundId, matchNumber);</pre>
41                 where parameter <code>eventId</code> is ID of the tournament which the match is played;
42                 <code>roundId</code> is ID of the round of the tournament;
43                 <code>matchNumber</code> is number of the match in the round.
44                 </p>
45             </answer>
46         </faq>
47         <faq id="how-to-get-player">
48             <question>
49                 How to get full information on a specific player?
50             </question>
51             <answer>
52                 <p><pre>Player player = Snooker.API().getPlayer(int playerId);</pre>
53                 where parameter <code>playerId</code> is ID of the player.
54                 </p>
55             </answer>
56         </faq>
57         <faq id="how-to-get-season-events">
58             <question>
59                 How to get information on all tournaments in the season?
60             </question>
61             <answer>
62                 <p><pre>Events seasonEvents = Snooker.API().getSeasonEvents(season);</pre>
63                 where parameter <code>season</code> is object of class <code>Season</code>
64                 that specify a season or <code>Season.ALL</code> for all available seasons.
65                 </p>
66             </answer>
67         </faq>
68         <faq id="how-to-get-event-matches">
69             <question>
70                 How to get information on all matches of a specific tournament?
71             </question>
72             <answer>
73                 <p><pre>Matches eventMatches = Snooker.API().getEventMatches(eventId);</pre>
74                 where parameter <code>eventId</code> is ID of the tournament.
75                 </p>
76             </answer>
77         </faq>
78         <faq id="how-to-get-ongoing-matches">
79             <question>
80                 How to get information on the matches which take place in this moment?
81             </question>
82             <answer>
83                 <p><pre>OngoingMatches matches = Snooker.API().getOngoingMatches();</pre>
84                 </p>
85             </answer>
86         </faq>
87         <faq id="how-to-get-player-matches">
88             <question>
89                 How to get information on all matches of a specific player in the season?
90             </question>
91             <answer>
92                 <p><pre>Matches playerMatches = Snooker.API().getPlayerMatches(playerId, season);</pre>
93                 where parameter <code>playerId</code> is ID of the player
94                 and <code>season</code> is object of class <code>Season</code>
95                 that specify a season or <code>Season.ALL</code> for all available seasons.
96                 </p>
97             </answer>
98         </faq>
99         <faq id="how-to-get-event-players">
100             <question>
101                 How to get information on all players in a specific tournament?
102             </question>
103             <answer>
104                 <p><pre>Players eventPlayers = Snooker.API().getEventPlayers(eventId);</pre>
105                 where parameter <code>eventId</code> is ID of the tournament.
106                 </p>
107             </answer>
108         </faq>
109         <faq id="how-to-get-players">
110             <question>
111                 How to get information on all players in a specific season?
112             </question>
113             <answer>
114                 <p><pre>Players players = Snooker.API().getPlayers(season, category);</pre>
115                 where parameter <code>season</code> is object of class <code>Season</code>
116                 that specify a season or <code>Season.ALL</code> for all available seasons
117                 and <code>category</code> is object of class <code>PlayerCategory</code>
118                 that specify a category of players (for example, <code>PlayerCategory.PRO</code>).
119                 </p>
120             </answer>
121         </faq>
122     </part>
123     <part id="additional">
124         <title>Additional:</title>
125         <faq id="how-to-get-rankings">
126             <question>
127                 How to get information on the ratings/earnings of all players in the season?
128             </question>
129             <answer>
130                 <p><pre>Rankings rankings = Snooker.API().getRankings(season, rankingType);</pre>
131                 where parameter <code>season</code> is object of class <code>Season</code>
132                 that specify a season or <code>Season.ALL</code> for all available seasons
133                 and <code>rankingType</code> is object of class <code>RankingType</code>
134                 that specify a rating type (for example, <code>RankingType.MoneyRankings</code>).
135                 </p>
136             </answer>
137         </faq>
138     </part>
139 </faqs>