Categorygithub.com/MrGunflame/gw2api
modulepackage
1.0.4
Repository: https://github.com/mrgunflame/gw2api.git
Documentation: pkg.go.dev

# README

GW2API

Go Reference

A Guild Wars 2 API Wrapper Client in Go.

Installation

go get -u github.com/MrGunflame/gw2api

Examples

Create a new api session and use it to fetch endpoints.

package main

import (
    "fmt"

    "github.com/MrGunflame/gw2api"
)

func main() {
    // Create a new session
    api := gw2api.New()

    // Make a request
    worlds, err := api.Worlds()
    if err != nil {
        panic(err)
    }

    fmt.Println(worlds)

    // Some endpoints will require an apikey
    // Set an api token
    api = api.WithAcessToken("<YOUR APIKEY>")

    // Make a request
    account, err := gw2api.Account()
    if err != nil {
        panic(err)
    }

    fmt.Println(account)
}

Supported Endpoints

  • /v2/achievements

  • /v2/achievements/daily

  • /v2/achievements/daily/tomorrow

  • /v2/achievements/groups

  • /v2/achievements/categories

  • /v2/account

  • /v2/account/achievements

  • /v2/account/bank

  • /v2/account/dailycrafting

  • /v2/account/dungeons

  • /v2/account/dyes

  • /v2/account/finishers

  • /v2/account/gliders

  • /v2/account/home

  • /v2/account/home/cats

  • /v2/account/home/nodes

  • /v2/account/inventory

  • /v2/account/legendaryarmory

  • /v2/account/luck

  • /v2/account/mailcarriers

  • /v2/account/mapchests

  • /v2/account/masteries

  • /v2/account/mastery/points

  • /v2/account/materials

  • /v2/account/minis

  • /v2/account/mounts/skins

  • /v2/account/mounts/types

  • /v2/account/novelties

  • /v2/account/outfits

  • /v2/account/pvp/heroes

  • /v2/account/raids

  • /v2/account/recipes

  • /v2/account/skins

  • /v2/account/titles

  • /v2/account/wallet

  • /v2/account/worldbosses

  • /v2/characters

  • /v2/pvp/stats

  • /v2/pvp/games

  • /v2/pvp/standings

  • /v2/tokeninfo

  • /v2/dailycrafting

  • /v2/mapchests

  • /v2/worldbosses

  • /v2/masteries

  • /v2/mounts

  • /v2/mounts/skins

  • /v2/mounts/types

  • /v2/outfits

  • /v2/pets

  • /v2/professions

  • /v2/races

  • /v2/specializations

  • /v2/skills

  • /v2/traits

  • /v2/legendaryarmory

  • /v2/legends

  • /v2/guild/:id

  • /v2/emblem

  • /v2/guild/permissions

  • /v2/guild/search

  • /v2/guild/upgrades

  • /v2/guild/:id/log

  • /v2/guild/:id/members

  • /v2/guild/:id/ranks

  • /v2/guild/:id/stash

  • /v2/guild/:id/treasury

  • /v2/guild/:id/teams

  • /v2/guild/:id/upgrades

  • /v2/home/cats

  • /v2/home/nodes

  • /v2/finishers

  • /v2/items

  • /v2/itemstats

  • /v2/materials

  • /v2/pvp/amulets

  • /v2/recipes

  • /v2/recipes/search

  • /v2/skins

  • /v2/continents

  • /v2/maps

  • /v2/build

  • /v2/colors

  • /v2/currencies

  • /v2/dungeons

  • /v2/files

  • /v2/quaggans

  • /v2/minis

  • /v2/novelties

  • /v2/raids

  • /v2/titles

  • /v2/worlds

  • /v2/backstory/answers

  • /v2/backstory/questions

  • /v2/stories

  • /v2/stories/seasons

  • /v2/quests

  • /v2/pvp

  • /v2/pvp/ranks

  • /v2/pvp/seasons

  • /v2/pvp/seasons/:id/leaderboards

  • /v2/commerce/delivery

  • /v2/commerce/exchange

  • /v2/commerce/exchange/coins

  • /v2/commerce/exchange/gems

  • /v2/commerce/listings

  • /v2/commerce/prices

  • /v2/commerce/transactions

  • /v2/wvw/abilities

  • /v2/wvw/matches

  • /v2/wvw/objectives

  • /v2/wvw/ranks

  • /v2/wvw/upgrades

# Packages

No description provided by the author
No description provided by the author

# Functions

New creates a new gw2api session.

# Variables

Error constants.
Error constants.
Error constants.
Error constants.

# Structs

Account contains general information.
AccountAchievement contains the unlock status for an achievement.
AccountBankItem is an item from the account bank.
AccountCurrency represents objects in the account wallet.
AccountDailyCraftingItem is an object crafted daily.
AccountFinisher is an finisher unluck for an account.
AccountHomeCat is a home cat node.
AccountLegendaryArmoryItem is an item added in the account's legendary armory.
AccountLuck is the accounts consumed luck.
AccountMastery contains the unlocked mastery level.
AccountMasteryPoints contains the accounts mastery points for each region.
A AccountMaterial is an item stored in the players vault/material storage.
Achievement is a game achievement.
AchievementCategory is an achievement category.
AchievementGroup is an achievement group.
BackStoryAnswer contains information about the initial story choices during character creation.
BackStoryQuestion contains a game backstory question.
Build contains the id of a game build.
BuildTemplate is a template in the accounts storage.
Character contains all the listed items from subrequests.
CharacterCore contains general character information.
CharacterEquipment defines an equipment item carried by an character.
CharacterExtras contains special data contained in the general request.
CharacterSab contains the character's super adventure box progression.
CharacterSkills contains the skills for all gamemodes.
CharacterSpecialization defines a specialization and its trait choices.
CharacterSpecializations contains the specializations for all gamemodes.
Color is a game item color.
CommerceCoinGemExchange contains information about exchanging gems to coins and vice versa.
CommerceDelivery contains the coins and items available for pickup.
CommerceListing contains an items buy and sell orders.
CommercePrice contains the currently highest buy price and lowest sell price.
CommerceTransaction is an item waiting for exchanging or exchanged in the trading post.
Continent is a game continent.
Currency is a game wallet currency.
DailyAchievement is a daiy achievement.
DailyCraftingItem contains data for a daily craftable item.
DisciplineProgress defines a crafting discipline and the characters progress.
Dungeon is a game dungeon.
DyeSlot contains information about a dye used in a dye slot.
Emblem is a guild emblem.
Error is an error returned from the gw2api.
Fact contains information about a skills/trait effect.
FactTraited contains skill effects that are overriding the default skill/trait effects.
File is a in-game asset ressource.
Finisher is a game finisher.
Guild contains the core information about a guild.
GuildLogEntry is an entry in the guild log.
GuildMember is a guild member.
GuildPermission is a assignable guild permission.
GuildRank is a guild rank.
GuildStashContainer is a section of the guild stash holding items.
GuildTeam contains information about a guild pvp team.
GuildTreasurySlot is a slot for items needed for guild ugrades.
GuildUpgrade contains information about upgrades for guild halls.
HomeCat is a home instance cat.
HomeNode is a home instance node.
InventoryBag is a bag placed in the inventory bag slots.
Item is a game item.
ItemStack is the data contained in requests that return stored items, e.g.
Itemstat contains the stattype and attributes of an item.
Legend is a revenant legend.
LegendaryArmoryItem is an item that can be added into the Legendary Armory.
Map is a game map.
MapChest is a chest lootable once per day.
Mastery contains information about a unlockable mastery.
Material is a material in the material storage.
Mini is a game miniature.
MountSkin contains information about a mount skin.
MountType contains information about a mount type.
Novelty is a game novelty.
Outfit is a game outfit.
Pet is a game ranger pet.
Profession is a game profession.
PvPGame contains information about played pvp games.
PvPLeaderboardAccount is an account displayed on the pvp leaderboards.
PvPRank is a pvp rank.
PvPSeason is a pvp season.
PvPStandings contains information about the account season ranking and the best sesion rankings.
PvPStats contains the accounts pvp stats.
PvPWinLossStats contains the wins and losses.
Quaggan is a quaggaon image ressource.
Quest contains story journal mission information.
Race is a game race.
Raid is a game raid instance.
Recipe is a game recipe.
Session is used to make requests to the gw2api.
Skill contains skill info.
Skills defines a set of character skills.
Skin is a game item skin.
Specialization is a game specialization.
Story
Story contains information about story journal stories.
StorySeason is a game story season.
Title is a game title.
TokenInfo contains general token information, such as the permissions.
TrainingTree defines a training tree for both skills and traits as displayed in the game.
Trait contains trait info.
World is a game world.
WorldBoss is a worldboss chest that can be opened once per day.
WvWAbility is a trainable ability in wvw.
WvWMatch is a match in wvw.
WvWObjective is a capturable structure in wvw.
WvWRank is a rank as seen by enemy players.
WvWUpgrade is an automatic objective upgrade.

# Type aliases

Attributes contains the attributes of an item.