1 <?xml version="1.0" encoding="UTF-8"?>
4 ~ Copyright (c) 2017-2020. Developed by Hedgecode.
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
10 ~ http://www.apache.org/licenses/LICENSE-2.0
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.
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">
24 <title>General:</title>
25 <faq id="how-to-get-event">
27 How to get full information on a specific tournament?
30 <p><pre>Event event = Snooker.API().getEvent(eventId);</pre>
31 where parameter <code>eventId</code> is ID of the tournament.
35 <faq id="how-to-get-match">
37 How to get full information on a specific match?
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.
47 <faq id="how-to-get-player">
49 How to get full information on a specific player?
52 <p><pre>Player player = Snooker.API().getPlayer(int playerId);</pre>
53 where parameter <code>playerId</code> is ID of the player.
57 <faq id="how-to-get-season-events">
59 How to get information on all tournaments in the season?
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.
68 <faq id="how-to-get-event-matches">
70 How to get information on all matches of a specific tournament?
73 <p><pre>Matches eventMatches = Snooker.API().getEventMatches(eventId);</pre>
74 where parameter <code>eventId</code> is ID of the tournament.
78 <faq id="how-to-get-ongoing-matches">
80 How to get information on the matches which take place in this moment?
83 <p><pre>OngoingMatches matches = Snooker.API().getOngoingMatches();</pre>
87 <faq id="how-to-get-player-matches">
89 How to get information on all matches of a specific player in the season?
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.
99 <faq id="how-to-get-event-players">
101 How to get information on all players in a specific tournament?
104 <p><pre>Players eventPlayers = Snooker.API().getEventPlayers(eventId);</pre>
105 where parameter <code>eventId</code> is ID of the tournament.
109 <faq id="how-to-get-players">
111 How to get information on all players in a specific season?
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>).
123 <part id="additional">
124 <title>Additional:</title>
125 <faq id="how-to-get-rankings">
127 How to get information on the ratings/earnings of all players in the season?
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>).