public class Sherdog extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Sherdog.Builder
Builder
|
Constructor and Description |
---|
Sherdog() |
Modifier and Type | Method and Description |
---|---|
Event |
getEvent(String sherdogUrl)
Gets an event via it's sherdog URL.
|
Event |
getEventFromHtml(String html)
Gets an event via it's shergog page HTML
|
Fighter |
getFighter(String sherdogUrl)
Get a fighter via it;s sherdog URL.
|
Fighter |
getFighterFromHtml(String html)
Get a fighter via it;s sherdog page HTML
|
Organization |
getOrganization(Organizations organization)
Gets an organization via it's sherdog URL.
|
Organization |
getOrganization(String sherdogUrl)
Gets an organization via it's sherdog URL.
|
Organization |
getOrganizationFromHtml(String html)
Gets an organization via it's sherdog page HTML, in case you want to have your own way of getting teh HTML content
|
PictureProcessor |
getPictureProcessor()
Gets a picture processor
|
java.time.ZoneId |
getZoneId()
Gets the zone id
|
Search |
search(String query)
Prepares the search for fighters and events
|
void |
setPictureProcessor(PictureProcessor pictureProcessor)
Sets a picture processor if some processing is needed for the fighter picture
|
void |
setZoneId(java.time.ZoneId zoneId)
Sets the zoneod
|
public static final String BASE_URL
public Search search(String query)
query
- the search querypublic java.time.ZoneId getZoneId()
public void setZoneId(java.time.ZoneId zoneId)
zoneId
- which zone id the event times need to be convertedpublic Organization getOrganization(String sherdogUrl) throws IOException, ParseException, SherdogParserException
sherdogUrl
- Sherdog URL, can find predefined url in Organizations.* enum.IOException
- if connecting to sherdog failsParseException
- if the page structure has changedSherdogParserException
- if anythign related to the parser goes wrongpublic Organization getOrganizationFromHtml(String html) throws IOException, ParseException, SherdogParserException
html
- The web page HTMLIOException
- if connecting to sherdog failsParseException
- if the page structure has changedSherdogParserException
- if anythign related to the parser goes wrongpublic Organization getOrganization(Organizations organization) throws IOException, ParseException, SherdogParserException
organization
- An organization from the Organizations. enumIOException
- if connecting to sherdog failsParseException
- if the page structure has changedSherdogParserException
- if anythign related to the parser goes wrongpublic Event getEventFromHtml(String html) throws IOException, ParseException, SherdogParserException
html
- The web page HTMLIOException
- if connecting to sherdog failsParseException
- if the page structure has changedSherdogParserException
- if anythign related to the parser goes wrongpublic Event getEvent(String sherdogUrl) throws IOException, ParseException, SherdogParserException
sherdogUrl
- Sherdog URL, can be found in the list of event of an organizationIOException
- if connecting to sherdog failsParseException
- if the page structure has changedSherdogParserException
- if anythign related to the parser goes wrongpublic Fighter getFighterFromHtml(String html) throws IOException, ParseException, SherdogParserException
html
- The web page HTMLIOException
- if connecting to sherdog failsParseException
- if the page structure has changedSherdogParserException
- if anythign related to the parser goes wrongpublic Fighter getFighter(String sherdogUrl) throws IOException, ParseException, SherdogParserException
sherdogUrl
- the shergod url of the fighterIOException
- if connecting to sherdog failsParseException
- if the page structure has changedSherdogParserException
- if anythign related to the parser goes wrongpublic PictureProcessor getPictureProcessor()
public void setPictureProcessor(PictureProcessor pictureProcessor)
pictureProcessor
- the picture processor to useCopyright © 2019. All rights reserved.