public class ThemesMoeParser
ThemesMoeParser is a class that parses themes.moe.
The parser can be configured in a variety of ways to deliver different results using a variety of optional parameters, which all default to true
For example, the class may be called with a simple
ThemesMoeParser()
but say one wants to only include Openings
ThemesMoeParser(includeOp = true,
includeEd = false)
or:
ThemesMoeParser(includeEd = false)
Constructor and Description |
---|
ThemesMoeParser(boolean includeOp,
boolean includeEd)
ThemesMoeParser is a class that parses themes.moe.
|
ThemesMoeParser()
ThemesMoeParser is a class that parses themes.moe.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<net.namibsun.anitheme.dl.lib.parsing.Series> |
fetchPlayList(int playListId)
Fetches all series in a generated themes.moe playlist
|
java.util.List<net.namibsun.anitheme.dl.lib.parsing.Series> |
fetchPopularList()
Fetches the currently popular series from the popular list on themes.moe
|
java.util.List<net.namibsun.anitheme.dl.lib.parsing.Series> |
fetchSeasonList(int year,
Seasons season)
Fetches all series for a specified season of anime
|
java.util.List<net.namibsun.anitheme.dl.lib.parsing.Series> |
fetchUserList(java.lang.String username,
ListTypes listType)
Fetches all series for a user on one of the list services supported by
themes.moe.
|
java.lang.String |
getBaseApiUrl()
The base URL for the themes.moe PHP API
|
boolean |
getIncludeEd()
Specifes if the ending themes should be included in the result
|
boolean |
getIncludeOp()
Specifies if opening themes should be included in the result
|
java.util.logging.Logger |
getLogger() |
java.util.List<net.namibsun.anitheme.dl.lib.parsing.Series> |
search(java.lang.String query)
Searches themes.moe for opening and ending songs
|
public ThemesMoeParser(boolean includeOp, boolean includeEd)
ThemesMoeParser is a class that parses themes.moe.
The parser can be configured in a variety of ways to deliver different results using a variety of optional parameters, which all default to true
For example, the class may be called with a simple
ThemesMoeParser()
but say one wants to only include Openings
ThemesMoeParser(includeOp = true,
includeEd = false)
or:
ThemesMoeParser(includeEd = false)
includeOp
- Specifies if opening themes should be included in the resultincludeEd
- Specifes if the ending themes should be included in the resultincludeOp
- Specifies if opening themes should be included in the resultincludeEd
- Specifes if the ending themes should be included in the resultpublic ThemesMoeParser()
ThemesMoeParser is a class that parses themes.moe.
The parser can be configured in a variety of ways to deliver different results using a variety of optional parameters, which all default to true
For example, the class may be called with a simple
ThemesMoeParser()
but say one wants to only include Openings
ThemesMoeParser(includeOp = true,
includeEd = false)
or:
ThemesMoeParser(includeEd = false)
public java.util.logging.Logger getLogger()
public java.lang.String getBaseApiUrl()
The base URL for the themes.moe PHP API
Used for all POST requests
public java.util.List<net.namibsun.anitheme.dl.lib.parsing.Series> fetchUserList(java.lang.String username, ListTypes listType)
Fetches all series for a user on one of the list services supported by themes.moe.
A basic usage example would be:
ThemesMoeParser().fetchUserList("namboy94", MYANIMELIST)
This will fetch all series for the user "namboy94" using the myanimelst service of themes.moe
username
- The username for which to retrieve the list forlistType
- The type of list to search for. Must be in the enum ListTypes
enumclass Series
objects found while parsing the result from themes.moepublic java.util.List<net.namibsun.anitheme.dl.lib.parsing.Series> fetchPlayList(int playListId)
Fetches all series in a generated themes.moe playlist
The playlist is identified by the unique id that themes.moe assigns to the playlist
A basic usage example:
ThemesMoeParser().fetchPlayList(15214) // Fetches all series for the playlist 15214
playListId
- The unique Playlist IDclass Series
objects found while parsing the result from themes.moepublic java.util.List<net.namibsun.anitheme.dl.lib.parsing.Series> fetchSeasonList(int year, Seasons season)
Fetches all series for a specified season of anime
To do this, both a season and year parameter are required Of course, only seasonal lists that exist on themes.moe can be fetched.
A basic usage example:
ThemesMoeParser().fetchSeasonList(2017, Seasons.WINTER) // Fetches all series from the 2017 winter season
year
- The year for which to fetch the seasonal listseason
- The season for which to fetch the seasonal listclass Series
objects found while parsing the result from themes.moepublic java.util.List<net.namibsun.anitheme.dl.lib.parsing.Series> fetchPopularList()
Fetches the currently popular series from the popular list on themes.moe
This list is of course subject to change whenever the popularity of theme songs on themes.moe changes.
Basic usage example:
ThemesMoeParser().fetchPopularList // Fetches all series from the popular list
public java.util.List<net.namibsun.anitheme.dl.lib.parsing.Series> search(java.lang.String query)
Searches themes.moe for opening and ending songs
This method emulates the search form on themes.moe
A basic usage example:
ThemesMoeParser().search("One Punch Man") // Fetches all search results for 'One Punch Man'
query
- The search term to search forclass Series
objects found while parsing the result from themes.moepublic boolean getIncludeOp()
Specifies if opening themes should be included in the result
public boolean getIncludeEd()
Specifes if the ending themes should be included in the result