Categorygithub.com/dstgo/steamapi
modulepackage
1.3.2
Repository: https://github.com/dstgo/steamapi.git
Documentation: pkg.go.dev

# README

English|简体中文

steamapi

Static Badge GitHub

steamapi is a Steam Web API Client package.Through it, you can easily interact with the Steam web API. The original Steam API Doc address is located at Steam Web API

Install

go get github.com/dstgo/steamapi@latest

Supported Interface

Since the host is partner.steam-api.com, the interface needs the publisher key to call, and the publisher key must be 100$ to register, so we have no way to get its specific response, so the interface The unified return type is map[string]any

  • IPublishedFileService
  • ISteamNews
  • ISteamUser
  • IPlayerService
  • ISteamWebAPIUtil
  • ISteamApps
  • ISteamPublishedItemVoting
  • ISteamPublishedItemSearch
  • ISteamLeaderBoard
  • ISteamUserAuth
  • ISteamBroadcastService
  • ISteamRemoteStorage
  • ISteamGameServerStats
  • ISteamCommunity

Example

GetServerInfo interface has no apikey required, but you should pass a key still.In this case, you can pass a steamapi.NopKey to New func which just a meaningless string.

// initialize client with NopKey
client, err := steamapi.New(steamapi.NopKey)
if err != nil {
    panic(err)
}
// call the webapiutil interface
info, err := client.ISteamWebAPIUtil().GetServerInfo()
if err != nil {
    panic(err)
}
fmt.Printf("%+v", info)

output

{ ServerTime: 1693832041 ServerTimeString: Mon Sep  4 05:54:01 2023 }

GetSupportedAPIList interface needs to pass your own apikey


// pass your own key
client, err := steamapi.New(key)
if err != nil {
    panic(err)
}
list, err := client.ISteamWebAPIUtil().GetSupportedAPIList()
if err != nil {
    panic(err)
}
fmt.Printf("%+v", list)

output

{ApiList:{Interfaces:[{Name:IClientStats_1046930 Methods:[{Name:ReportEvent Version:1 HttpMethod:POST Parameters:[]}]} {Name:ICSGOPlayers_730...
...
...
...

Contribute

  1. fork this repository
  2. create you own feature branch
  3. commit your changes
  4. create a pull request to this repository
  5. waiting pr to be merged

# Packages

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

# Functions

New func create a new Client only with api key which must be provided, if you just want to access some interface which does not need api key you can pass the NopKey.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
InputJson service interface need "input_json" query parameter to pass post params.
No description provided by the author
PartnerHost is the partner steam server, you should take your publisher api key in query parameters in any case.
PublicHost is the public steam server, you can interact with you own normal key.
No description provided by the author
No description provided by the author

# Variables

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

# Structs

Client steam api client, interact with steam api server.
No description provided by the author
IPlayerService see https://partner.steamgames.com/doc/webapi/IPlayerService.
ISteamApps see https://partner.steamgames.com/doc/webapi/ISteamApps.
ISteamBroadcastService see https://partner.steamgames.com/doc/webapi/IBroadcastService.
ISteamCommunity see https://partner.steamgames.com/doc/webapi/ISteamCommunity.
ISteamGameServerStats see https://partner.steamgames.com/doc/webapi/ISteamGameServerStats.
ISteamLeaderBoards see https://partner.steamgames.com/doc/webapi/ISteamLeaderboards.
No description provided by the author
No description provided by the author
ISteamPublishedItemSearch see https://partner.steamgames.com/doc/webapi/ISteamPublishedItemSearch.
ISteamPublishedItemVoting see https://partner.steamgames.com/doc/webapi/ISteamPublishedItemVoting.
ISteamRemoteStorage see https://partner.steamgames.com/doc/webapi/ISteamRemoteStorage.
No description provided by the author
ISteamUserAuth see https://partner.steamgames.com/doc/webapi/ISteamUserAuth.
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
RequestOption use options to override some request settings.