diff options
author | Wim <wim@42.be> | 2017-06-22 01:00:27 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-06-22 01:00:27 +0200 |
commit | 1f914618538920db4bfec7b106ee97038b157c9b (patch) | |
tree | 6bd0ab107fe1673dbacdf9dfd10004289cd7bfab /vendor/github.com/Philipp15b/go-steam/doc.go | |
parent | 1f9874102aaca09ce5e0289beff376c307b8c57b (diff) | |
download | matterbridge-msglm-1f914618538920db4bfec7b106ee97038b157c9b.tar.gz matterbridge-msglm-1f914618538920db4bfec7b106ee97038b157c9b.tar.bz2 matterbridge-msglm-1f914618538920db4bfec7b106ee97038b157c9b.zip |
Add vendor (steam)
Diffstat (limited to 'vendor/github.com/Philipp15b/go-steam/doc.go')
-rw-r--r-- | vendor/github.com/Philipp15b/go-steam/doc.go | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/vendor/github.com/Philipp15b/go-steam/doc.go b/vendor/github.com/Philipp15b/go-steam/doc.go new file mode 100644 index 00000000..4d695037 --- /dev/null +++ b/vendor/github.com/Philipp15b/go-steam/doc.go @@ -0,0 +1,53 @@ +/* +This package allows you to automate actions on Valve's Steam network. It is a Go port of SteamKit. + +To login, you'll have to create a new Client first. Then connect to the Steam network +and wait for a ConnectedCallback. Then you may call the Login method in the Auth module +with your login information. This is covered in more detail in the method's documentation. After you've +received the LoggedOnEvent, you should set your persona state to online to receive friend lists etc. + +Example code + +You can also find a running example in the `gsbot` package. + + package main + + import ( + "io/ioutil" + "log" + + "github.com/Philipp15b/go-steam" + "github.com/Philipp15b/go-steam/protocol/steamlang" + ) + + func main() { + myLoginInfo := new(steam.LogOnDetails) + myLoginInfo.Username = "Your username" + myLoginInfo.Password = "Your password" + + client := steam.NewClient() + client.Connect() + for event := range client.Events() { + switch e := event.(type) { + case *steam.ConnectedEvent: + client.Auth.LogOn(myLoginInfo) + case *steam.MachineAuthUpdateEvent: + ioutil.WriteFile("sentry", e.Hash, 0666) + case *steam.LoggedOnEvent: + client.Social.SetPersonaState(steamlang.EPersonaState_Online) + case steam.FatalErrorEvent: + log.Print(e) + case error: + log.Print(e) + } + } + } + + +Events + +go-steam emits events that can be read via Client.Events(). Although the channel has the type interface{}, +only types from this package ending with "Event" and errors will be emitted. + +*/ +package steam |