Documentation ¶
Overview ¶
Go-Runescape is a library for the Runescape API.
The library contains functions to get grandexchange information (RS3 only) and player highscores information (OSRS and RS3). The user is advised to view the IHttpClient interface as it is essential to this package. Extra documentation and examples can be found on the github page.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category []categoryLetterItem
Category is an array containing information on the category. The array is indexed by the alphabet including a hashtag. Indexed as # = 0, a = 1, b = 2, c = 3 ...
func GetCategory ¶
func GetCategory(geConstant string, HttpClient IHttpClient) (Category, error)
GetCategory returns a Category for the passed ge_constant.
type IHttpClient ¶
IHttpUtil is used for all major function calls in the package. An implementing struct should define the Get() method to retrieve the data from the passed url and store the information as a *http.Response. See the github repository for more information.
type ItemDetail ¶
type ItemDetail struct { Icon string `json:"icon"` IconLarge string `json:"icon_large"` Id int64 `json:"id"` ItemType string `json:"type"` TypeIconURL string `json:"typeIcon"` Name string `json:"name"` Description string `json:"description"` Current timeTrendPrice `json:"current"` Today timeTrendPrice `json:"today"` Day30 timeTrendPercentage `json:"day30"` Day90 timeTrendPercentage `json:"day90"` Day180 timeTrendPercentage `json:"day180"` }
ItemDetail contains information on a item.
func GetItemDetail ¶
func GetItemDetail(itemID int64, HttpClient IHttpClient) (ItemDetail, error)
Gets grandexchage information from the passed item. If the passed item id is invalid a json error will occur and be passed back.
type ItemJson ¶
type ItemJson struct {
Item ItemDetail `json:"item"`
}
ItemJson defines the json object returned by jagex when requesting for item information.
type Items ¶
type Items struct { Icon string `json:"icon"` IconLarge string `json:"icon_lrage"` Id int `json:"id"` Type string `json:"type"` TypeIcon string `json:"typeIcon"` Name string `json:"name"` Description string `json:"description"` Current TrendPrice `json:"current"` Today TrendPrice `json:"today"` Members string `json:"members"` }
Information about item.
type ItemsCatalogue ¶
Information on an grandexchange category.
func GetItemsCatalogue ¶
func GetItemsCatalogue(geConstant string, letter byte, pageNo int, HttpClient IHttpClient) (c ItemsCatalogue, err error)
Gets information on the passed grandexchange category. It is advised that the user uses the ge_constants package to choose a grandexchange category. Only items starting with the passed letter will be returned. pageNo is the page number of the grandexchange catalogue to return for that category & letter.
type PlayerHighscores ¶
This will store the highscore_constants information of a player. The skill indexes can be found in the highscore_constants package. For example Levels[highscore_constants.MINING] would give the mining level of the player.
func GetPlayerHighscores ¶
func GetPlayerHighscores(playerName string, highscoreType string, httpClient IHttpClient) (rsph PlayerHighscores, err error)
GetPlayerHighscores gets a players highscores information. The highscoreType is the type of scoreboard to search. Acceptable values are stored as constants in the highscore_constants package. These constants are:
highscore_constants.RS3PLAYER
highscore_constants.RS3IRONMAN
highscore_constants.RS3HARDCOREIRONMAN
highscore_constants.OSRSPLAYER
highscore_constants.OSRSIRONMAN
highscore_constants.OSRSULTIMATEIRONMAN
type Rank ¶
type Rank struct { Name string `json:"name"` Score string `json:"score"` Rank string `json:"rank"` }
Contains the list of ranked players on the highscores.
func GetRankings ¶
func GetRankings(skill int64, category int64, amountOfPlayers int64, HttpClient IHttpClient) (rankings []Rank, err error)
GetRankings gets the rankings for a passed skill. The user is advised to use the highscore_constants package to specify the skill.
type TrendPrice ¶
type TrendPrice struct { Trend string `json:"trend"` Price interface{} `json:"price"` }
Information on the current price trend.
Directories ¶
Path | Synopsis |
---|---|
Contains constants useful as parameters to functions interacting with the grandexchange api.
|
Contains constants useful as parameters to functions interacting with the grandexchange api. |
Contains constants useful as parameters to functions which interact with the highscores api.
|
Contains constants useful as parameters to functions which interact with the highscores api. |