Skip to content

0xAozora/steam

 
 

Repository files navigation

Steam Build Status

Steam is a library for interactions with Steam, it's written in Go.
Steam tries to keep-it-simple and does not add extra non-sense. There are absolutely no internal-polling or such, everything is up to you, all it does is wrap around Steam API.

Why?

  • You don't want a library to be "re-trying" automatically
  • You don't want a library to be doing your homework
  • You are an on-point person and just want stuff that works as-needed

Installation

Make sure you have at least Go 1.6 with a GOPATH set then run:

go get github.com/PuerkitoBio/goquery
go get github.com/doctype/steam

Example

package main

import (
	"log"
	"os"

	"github.com/doctype/steam"
)

func main() {
	log.SetFlags(log.LstdFlags | log.Lshortfile)

	timeTip, err := steam.GetTimeTip()
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Time tip: %#v\n", timeTip)
	timeDiff := time.Duration(timeTip.Time - time.Now().Unix())
	
	session := steam.NewSession(&http.Client{}, "")
	if err := session.Login(os.Getenv("steamAccount"), os.Getenv("steamPassword"), os.Getenv("steamSharedSecret"), timeDiff); err != nil {
		log.Fatal(err)
	}
	log.Print("Login successful")
}

Find more examples in the examples/ directory. Even better is to read through the source code, it's simple and straight-forward to understand.

Authors

License

LGPL 2.1

About

Steam Library written in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%