Documentation
¶
Index ¶
- type Scraper
- func (s *Scraper) FetchCWLS(id string) (*models.CWLS, error)
- func (s *Scraper) FetchCharacter(id uint32) (*models.Character, error)
- func (s *Scraper) FetchCharacterAchievements(id uint32) chan *models.AchievementInfo
- func (s *Scraper) FetchCharacterMinions(id uint32) ([]*models.Minion, error)
- func (s *Scraper) FetchCharacterMounts(id uint32) ([]*models.Mount, error)
- func (s *Scraper) FetchFreeCompany(id string) (*models.FreeCompany, error)
- func (s *Scraper) FetchFreeCompanyMembers(id string) chan *models.FreeCompanyMember
- func (s *Scraper) FetchLinkshell(id string) (*models.Linkshell, error)
- func (s *Scraper) FetchPVPTeam(id string) (*models.PVPTeam, error)
- func (s *Scraper) SearchCWLS(opts search.CWLSOptions) chan *models.CWLSSearchResult
- func (s *Scraper) SearchCharacters(opts search.CharacterOptions) chan *models.CharacterSearchResult
- func (s *Scraper) SearchFreeCompanies(opts search.FreeCompanyOptions) chan *models.FreeCompanySearchResult
- func (s *Scraper) SearchLinkshells(opts search.LinkshellOptions) chan *models.LinkshellSearchResult
- func (s *Scraper) SearchPVPTeams(opts search.PVPTeamOptions) chan *models.PVPTeamSearchResult
- type SiteLang
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scraper ¶
type Scraper struct {
// contains filtered or unexported fields
}
Scraper is the object through which interactions with The Lodestone are made.
func NewScraper ¶
NewScraper creates a new instance of the Scraper. Do note that all five language-versions of the website are on the same physical servers in Japan. Changing the language of the website will not meaningfully improve response times.
func (*Scraper) FetchCWLS ¶
FetchCWLS returns CWLS information for the provided CWLS ID. The error is returned if the request fails.
func (*Scraper) FetchCharacter ¶
FetchCharacter returns character information for the provided Lodestone ID. This function makes two requests: one to the base character profile, and another to the class and job page, returning an error if either request fails.
func (*Scraper) FetchCharacterAchievements ¶
func (s *Scraper) FetchCharacterAchievements(id uint32) chan *models.AchievementInfo
FetchCharacterAchievements returns unlocked achievement information for the provided Lodestone ID. The error is returned if the request fails with anything other than a 403. A 403 will be raised when the character's achievements are private. Instead of raising an error, the object in the return channel will have its private flag set to `true`.
func (*Scraper) FetchCharacterMinions ¶
FetchCharacterMinions returns unlocked minion information for the provided Lodestone ID. The error is returned if the request fails with anything other than a 404. A 404 can result from a character not existing, but it can also result from a character not having any minions.
func (*Scraper) FetchCharacterMounts ¶
FetchCharacterMounts returns unlocked mount information for the provided Lodestone ID. The error is returned if the request fails with anything other than a 404. A 404 can result from a character not existing, but it can also result from a character not having any mounts.
func (*Scraper) FetchFreeCompany ¶
func (s *Scraper) FetchFreeCompany(id string) (*models.FreeCompany, error)
FetchFreeCompany returns Free Company information for the provided Free Company ID. The error is returned if the request fails.
func (*Scraper) FetchFreeCompanyMembers ¶
func (s *Scraper) FetchFreeCompanyMembers(id string) chan *models.FreeCompanyMember
FetchFreeCompanyMembers returns Free Company member information for the provided Free Company ID. The error is returned if the request fails.
func (*Scraper) FetchLinkshell ¶
FetchLinkshell returns linkshell information for the provided linkshell ID. The error is returned if the request fails.
func (*Scraper) FetchPVPTeam ¶
FetchPVPTeam returns PVP team information for the provided PVP team ID. The error is returned if the request fails.
func (*Scraper) SearchCWLS ¶
func (s *Scraper) SearchCWLS(opts search.CWLSOptions) chan *models.CWLSSearchResult
SearchCWLS returns a channel of searchable crossworld linkshells. Please note that searches are notoriously poor, and often return exact matches far down in the results, or else return no search results when search results should be present. This library does one retry on each failure, but this is not a guarantee that all search results will be returned.
func (*Scraper) SearchCharacters ¶
func (s *Scraper) SearchCharacters(opts search.CharacterOptions) chan *models.CharacterSearchResult
SearchCharacters returns a channel of searchable characters. Please note that searches are notoriously poor, and often return exact matches far down in the results, or else return no search results when search results should be present. This library does one retry on each failure, but this is not a guarantee that all search results will be returned.
func (*Scraper) SearchFreeCompanies ¶
func (s *Scraper) SearchFreeCompanies(opts search.FreeCompanyOptions) chan *models.FreeCompanySearchResult
SearchFreeCompanies returns a channel of searchable Free Companies. Please note that searches are notoriously poor, and often return exact matches far down in the results, or else return no search results when search results should be present. This library does one retry on each failure, but this is not a guarantee that all search results will be returned.
func (*Scraper) SearchLinkshells ¶
func (s *Scraper) SearchLinkshells(opts search.LinkshellOptions) chan *models.LinkshellSearchResult
SearchLinkshells returns a channel of searchable linkshells. Please note that searches are notoriously poor, and often return exact matches far down in the results, or else return no search results when search results should be present. This library does one retry on each failure, but this is not a guarantee that all search results will be returned.
func (*Scraper) SearchPVPTeams ¶
func (s *Scraper) SearchPVPTeams(opts search.PVPTeamOptions) chan *models.PVPTeamSearchResult
SearchPVPTeams returns a channel of searchable PVP teams. Please note that searches are notoriously poor, and often return exact matches far down in the results, or else return no search results when search results should be present. This library does one retry on each failure, but this is not a guarantee that all search results will be returned.
type SiteLang ¶
type SiteLang string
SiteLang represents the scraped website language.
Lodestone website language. Do note that all five language-versions of the website (`eu` not listed) are on the same physical servers in Japan. Changing the language of the website will not meaningfully improve response times.
Directories
¶
| Path | Synopsis |
|---|---|
|
data
|
|
|
examples
|
|
|
achievements
command
|
|
|
character
command
|
|
|
character-search
command
|
|
|
cwls
command
|
|
|
cwls-search
command
|
|
|
freecompany
command
|
|
|
freecompany-members
command
|
|
|
freecompany-search
command
|
|
|
linkshell
command
|
|
|
linkshell-search
command
|
|
|
minions
command
|
|
|
mounts
command
|
|
|
pvpteam
command
|
|
|
pvpteam-search
command
|
|
|
pack
|
|
|
css
Package main generated by go-bindata.// sources: lodestone-css-selectors/cwls/cwls.json lodestone-css-selectors/cwls/members.json lodestone-css-selectors/freecompany/focus.json lodestone-css-selectors/freecompany/freecompany.json lodestone-css-selectors/freecompany/members.json lodestone-css-selectors/freecompany/reputation.json lodestone-css-selectors/freecompany/seeking.json lodestone-css-selectors/linkshell/ls.json lodestone-css-selectors/linkshell/members.json lodestone-css-selectors/meta.json lodestone-css-selectors/profile/achievements.json lodestone-css-selectors/profile/attributes.json lodestone-css-selectors/profile/character.json lodestone-css-selectors/profile/classjob.json lodestone-css-selectors/profile/gearset.json lodestone-css-selectors/profile/minion.json lodestone-css-selectors/profile/mount.json lodestone-css-selectors/pvpteam/members.json lodestone-css-selectors/pvpteam/pvpteam.json lodestone-css-selectors/search/character.json lodestone-css-selectors/search/cwls.json lodestone-css-selectors/search/freecompany.json lodestone-css-selectors/search/linkshell.json lodestone-css-selectors/search/pvpteam.json
|
Package main generated by go-bindata.// sources: lodestone-css-selectors/cwls/cwls.json lodestone-css-selectors/cwls/members.json lodestone-css-selectors/freecompany/focus.json lodestone-css-selectors/freecompany/freecompany.json lodestone-css-selectors/freecompany/members.json lodestone-css-selectors/freecompany/reputation.json lodestone-css-selectors/freecompany/seeking.json lodestone-css-selectors/linkshell/ls.json lodestone-css-selectors/linkshell/members.json lodestone-css-selectors/meta.json lodestone-css-selectors/profile/achievements.json lodestone-css-selectors/profile/attributes.json lodestone-css-selectors/profile/character.json lodestone-css-selectors/profile/classjob.json lodestone-css-selectors/profile/gearset.json lodestone-css-selectors/profile/minion.json lodestone-css-selectors/profile/mount.json lodestone-css-selectors/pvpteam/members.json lodestone-css-selectors/pvpteam/pvpteam.json lodestone-css-selectors/search/character.json lodestone-css-selectors/search/cwls.json lodestone-css-selectors/search/freecompany.json lodestone-css-selectors/search/linkshell.json lodestone-css-selectors/search/pvpteam.json |
|
exports
Package main generated by go-bindata.// sources: lodestone-data-exports/pack/achievement_table.bin lodestone-data-exports/pack/classjob_table.bin lodestone-data-exports/pack/deity_table.bin lodestone-data-exports/pack/gc_table.bin lodestone-data-exports/pack/item_table.bin lodestone-data-exports/pack/minion_table.bin lodestone-data-exports/pack/mount_table.bin lodestone-data-exports/pack/race_table.bin lodestone-data-exports/pack/reputation_table.bin lodestone-data-exports/pack/title_table.bin lodestone-data-exports/pack/town_table.bin lodestone-data-exports/pack/tribe_table.bin
|
Package main generated by go-bindata.// sources: lodestone-data-exports/pack/achievement_table.bin lodestone-data-exports/pack/classjob_table.bin lodestone-data-exports/pack/deity_table.bin lodestone-data-exports/pack/gc_table.bin lodestone-data-exports/pack/item_table.bin lodestone-data-exports/pack/minion_table.bin lodestone-data-exports/pack/mount_table.bin lodestone-data-exports/pack/race_table.bin lodestone-data-exports/pack/reputation_table.bin lodestone-data-exports/pack/title_table.bin lodestone-data-exports/pack/town_table.bin lodestone-data-exports/pack/tribe_table.bin |