go-steamwebapi

module
v0.0.0-...-aacb22f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2015 License: MIT

README

go-steamwebapi

GoDoc

A simple, and idiomatic Go package for programmatically working with Steam's Web API (particularly its Dota 2 Web API).

This library's design was inspired by go-github.

Usage

  1. Download, and install go-steamwebapi/steamwebapi:

    go get github.com/mrsaints/go-steamwebapi/steamwebapi
    
  2. Import the package into your code:

    import "github.com/mrsaints/go-steamwebapi/steamwebapi"
    
  3. Construct a Steam Web API client:

    // Accepts an API key as a parameter
    // Alternatively, you can set the API key via the `STEAM_API_KEY` environment variable
    client = steamwebapi.NewClient("")
    
  4. Using the newly constructed client, call methods via its respective service (DOTA2 and DOTA2Matches):

    // Returns information about a particular match.
    client.DOTA2Matches.GetMatchDetails(matchId)
    
    // Returns a list of heroes within Dota 2.
    client.DOTA2.GetHeroes()
    
    // Returns the current prize pool for specific tournaments.
    client.DOTA2.GetTournamentPrizePool(leagueId)
    

View the GoDoc, examples or code for more information (i.e. available services / methods).

Directories

Path Synopsis
examples
dota2-cli command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL