Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
refactor: complete the fork to faceit/go-steam
Browse files Browse the repository at this point in the history
  • Loading branch information
paralin committed Jan 29, 2018
1 parent f8a1116 commit 3074a87
Show file tree
Hide file tree
Showing 42 changed files with 118 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "generator/SteamKit"]
path = generator/SteamKit
url = https://github.com/Philipp15b/SteamKit.git
url = https://github.com/SteamRE/SteamKit.git
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014 The go-steam Authors. All rights reserved.
Copyright (c) 2017 The go-steam Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand All @@ -23,4 +23,4 @@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Steam for Go

> Automate actions on the Steam network with Go.
## Introduction

This library implements Steam's protocol to allow automation of different actions on Steam without running an actual Steam client. It is based on [SteamKit2](https://github.com/SteamRE/SteamKit), a .NET library.

In addition, it contains APIs to Steam Community features, like trade offers and inventories.
Expand All @@ -15,23 +19,25 @@ Some of the currently implemented features:

If this is useful to you, there's also the [go-steamapi](https://github.com/Philipp15b/go-steamapi) package that wraps some of the official Steam Web API's types.

This package was originally authored by [Philipp15b](https://github.com/Philipp15b/go-steam) and was forked/adopted by FACEIT.

## Installation

go get github.com/Philipp15b/go-steam
go get github.com/faceit/go-steam

## Usage

You can view the documentation with the [`godoc`](http://golang.org/cmd/godoc) tool or
[online on godoc.org](http://godoc.org/github.com/Philipp15b/go-steam).
[online on godoc.org](http://godoc.org/github.com/faceit/go-steam).

You should also take a look at the following sub-packages:

* [`gsbot`](http://godoc.org/github.com/Philipp15b/go-steam/gsbot) utilites that make writing bots easier
* [example bot](http://godoc.org/github.com/Philipp15b/go-steam/gsbot/gsbot) and [its source code](https://github.com/Philipp15b/go-steam/blob/master/gsbot/gsbot/gsbot.go)
* [`trade`](http://godoc.org/github.com/Philipp15b/go-steam/trade) for trading
* [`tradeoffer`](http://godoc.org/github.com/Philipp15b/go-steam/tradeoffer) for trade offers
* [`economy/inventory`](http://godoc.org/github.com/Philipp15b/go-steam/economy/inventory) for inventories
* [`tf2`](http://godoc.org/github.com/Philipp15b/go-steam/tf2) for Team Fortress 2 related things
* [`gsbot`](http://godoc.org/github.com/faceit/go-steam/gsbot) utilites that make writing bots easier
* [example bot](http://godoc.org/github.com/faceit/go-steam/gsbot/gsbot) and [its source code](https://github.com/faceit/go-steam/blob/master/gsbot/gsbot/gsbot.go)
* [`trade`](http://godoc.org/github.com/faceit/go-steam/trade) for trading
* [`tradeoffer`](http://godoc.org/github.com/faceit/go-steam/tradeoffer) for trade offers
* [`economy/inventory`](http://godoc.org/github.com/faceit/go-steam/economy/inventory) for inventories
* [`tf2`](http://godoc.org/github.com/faceit/go-steam/tf2) for Team Fortress 2 related things

## Working with go-steam

Expand All @@ -47,19 +53,13 @@ Whether you want to develop your own Steam bot or directly work on go-steam itse

To update go-steam to a new version of SteamKit, do the following:

go get github.com/golang/protobuf/protoc-gen-go/
git submodule update --init --recursive
cd generator
go run generator.go clean proto steamlang

Make sure that `$GOPATH/bin` / `protoc-gen-go` is in your `$PATH`. You'll also need [`protoc`](https://developers.google.com/protocol-buffers/docs/downloads), the protocol buffer compiler. At the moment, we use Protocol Buffers 2.6.1 with `proco-gen-go`-[2402d76](https://github.com/golang/protobuf/tree/2402d76f3d41f928c7902a765dfc872356dd3aad).

To compile the Steam Language files, you also need the [.NET Framework](https://www.microsoft.com/net/downloads)
on Windows or [mono](http://www.go-mono.com/mono-downloads/download.html) on other operating systems.
go get -d -v ./
go build -v
./generator clean proto steamlang

Apply the protocol changes where necessary.

## License

Steam for Go is licensed under the New BSD License. More information can be found in LICENSE.txt.

8 changes: 4 additions & 4 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package steam

import (
"crypto/sha1"
. "github.com/Philipp15b/go-steam/protocol"
. "github.com/Philipp15b/go-steam/protocol/protobuf"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/Philipp15b/go-steam/steamid"
. "github.com/faceit/go-steam/protocol"
. "github.com/faceit/go-steam/protocol/protobuf"
. "github.com/faceit/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/steamid"
"github.com/golang/protobuf/proto"
"sync/atomic"
"time"
Expand Down
6 changes: 3 additions & 3 deletions auth_events.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package steam

import (
. "github.com/Philipp15b/go-steam/protocol/protobuf"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/Philipp15b/go-steam/steamid"
. "github.com/faceit/go-steam/protocol/protobuf"
. "github.com/faceit/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/steamid"
)

type LoggedOnEvent struct {
Expand Down
12 changes: 6 additions & 6 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
"sync/atomic"
"time"

"github.com/Philipp15b/go-steam/cryptoutil"
"github.com/Philipp15b/go-steam/netutil"
. "github.com/Philipp15b/go-steam/protocol"
. "github.com/Philipp15b/go-steam/protocol/protobuf"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/Philipp15b/go-steam/steamid"
"github.com/faceit/go-steam/cryptoutil"
"github.com/faceit/go-steam/netutil"
. "github.com/faceit/go-steam/protocol"
. "github.com/faceit/go-steam/protocol/protobuf"
. "github.com/faceit/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/steamid"
)

// Represents a client to the Steam network.
Expand Down
2 changes: 1 addition & 1 deletion client_events.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package steam

import (
"github.com/Philipp15b/go-steam/netutil"
"github.com/faceit/go-steam/netutil"
)

// When this event is emitted by the Client, the connection is automatically closed.
Expand Down
4 changes: 2 additions & 2 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"net"
"sync"

"github.com/Philipp15b/go-steam/cryptoutil"
. "github.com/Philipp15b/go-steam/protocol"
"github.com/faceit/go-steam/cryptoutil"
. "github.com/faceit/go-steam/protocol"
)

type connection interface {
Expand Down
4 changes: 2 additions & 2 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ You can also find a running example in the `gsbot` package.
"io/ioutil"
"log"
"github.com/Philipp15b/go-steam"
"github.com/Philipp15b/go-steam/protocol/steamlang"
"github.com/faceit/go-steam"
"github.com/faceit/go-steam/protocol/steamlang"
)
func main() {
Expand Down
2 changes: 1 addition & 1 deletion economy/inventory/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/Philipp15b/go-steam/jsont"
"github.com/faceit/go-steam/jsont"
"strconv"
)

Expand Down
2 changes: 1 addition & 1 deletion economy/inventory/inventory_apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package inventory
import (
"encoding/json"
"fmt"
"github.com/Philipp15b/go-steam/steamid"
"github.com/faceit/go-steam/steamid"
"io/ioutil"
"net/http"
"regexp"
Expand Down
8 changes: 4 additions & 4 deletions gamecoordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package steam

import (
"bytes"
. "github.com/Philipp15b/go-steam/protocol"
. "github.com/Philipp15b/go-steam/protocol/gamecoordinator"
. "github.com/Philipp15b/go-steam/protocol/protobuf"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/protocol"
. "github.com/faceit/go-steam/protocol/gamecoordinator"
. "github.com/faceit/go-steam/protocol/protobuf"
. "github.com/faceit/go-steam/protocol/steamlang"
"github.com/golang/protobuf/proto"
)

Expand Down
6 changes: 3 additions & 3 deletions generator/GoSteamLanguageGenerator/GoGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public void EmitClasses(Node root, StringBuilder sb)
sb.AppendLine(" \"io\"");
sb.AppendLine(" \"encoding/binary\"");
sb.AppendLine(" \"github.com/golang/protobuf/proto\"");
sb.AppendLine(" \"github.com/Philipp15b/go-steam/steamid\"");
sb.AppendLine(" \"github.com/Philipp15b/go-steam/rwu\"");
sb.AppendLine(" . \"github.com/Philipp15b/go-steam/protocol/protobuf\"");
sb.AppendLine(" \"github.com/faceit/go-steam/steamid\"");
sb.AppendLine(" \"github.com/faceit/go-steam/rwu\"");
sb.AppendLine(" . \"github.com/faceit/go-steam/protocol/protobuf\"");
sb.AppendLine(")");
sb.AppendLine();

Expand Down
6 changes: 3 additions & 3 deletions gsbot/gsbot.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"reflect"
"time"

"github.com/Philipp15b/go-steam"
"github.com/Philipp15b/go-steam/netutil"
"github.com/Philipp15b/go-steam/protocol"
"github.com/faceit/go-steam"
"github.com/faceit/go-steam/netutil"
"github.com/faceit/go-steam/protocol"
"github.com/davecgh/go-spew/spew"
)

Expand Down
6 changes: 3 additions & 3 deletions gsbot/gsbot/gsbot.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"fmt"
"os"

"github.com/Philipp15b/go-steam"
"github.com/Philipp15b/go-steam/gsbot"
"github.com/Philipp15b/go-steam/protocol/steamlang"
"github.com/faceit/go-steam"
"github.com/faceit/go-steam/gsbot"
"github.com/faceit/go-steam/protocol/steamlang"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package steam

import (
"crypto/rsa"
"github.com/Philipp15b/go-steam/cryptoutil"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
"github.com/faceit/go-steam/cryptoutil"
. "github.com/faceit/go-steam/protocol/steamlang"
)

var publicKeys = map[EUniverse][]byte{
Expand Down
6 changes: 3 additions & 3 deletions notifications.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package steam

import (
. "github.com/Philipp15b/go-steam/protocol"
. "github.com/Philipp15b/go-steam/protocol/protobuf"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/protocol"
. "github.com/faceit/go-steam/protocol/protobuf"
. "github.com/faceit/go-steam/protocol/steamlang"
)

type Notifications struct {
Expand Down
4 changes: 2 additions & 2 deletions protocol/gamecoordinator/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package gamecoordinator
import (
"io"

. "github.com/Philipp15b/go-steam/protocol"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/protocol"
. "github.com/faceit/go-steam/protocol/steamlang"
"github.com/golang/protobuf/proto"
)

Expand Down
6 changes: 3 additions & 3 deletions protocol/gamecoordinator/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package gamecoordinator

import (
"bytes"
. "github.com/Philipp15b/go-steam/protocol"
. "github.com/Philipp15b/go-steam/protocol/protobuf"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/protocol"
. "github.com/faceit/go-steam/protocol/protobuf"
. "github.com/faceit/go-steam/protocol/steamlang"
"github.com/golang/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion protocol/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"math"
"strconv"

. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/protocol/steamlang"
)

type JobId uint64
Expand Down
4 changes: 2 additions & 2 deletions protocol/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package protocol

import (
"github.com/golang/protobuf/proto"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/Philipp15b/go-steam/steamid"
. "github.com/faceit/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/steamid"
"io"
)

Expand Down
2 changes: 1 addition & 1 deletion protocol/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/golang/protobuf/proto"
"encoding/binary"
"fmt"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/protocol/steamlang"
)

// TODO: Headers are always deserialized twice.
Expand Down
6 changes: 3 additions & 3 deletions protocol/steamlang/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ package steamlang

import (
"encoding/binary"
. "github.com/Philipp15b/go-steam/protocol/protobuf"
"github.com/Philipp15b/go-steam/rwu"
"github.com/Philipp15b/go-steam/steamid"
. "github.com/faceit/go-steam/protocol/protobuf"
"github.com/faceit/go-steam/rwu"
"github.com/faceit/go-steam/steamid"
"github.com/golang/protobuf/proto"
"io"
)
Expand Down
2 changes: 1 addition & 1 deletion servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"math/rand"
"time"

"github.com/Philipp15b/go-steam/netutil"
"github.com/faceit/go-steam/netutil"
)

// CMServers contains a list of worlwide servers
Expand Down
12 changes: 6 additions & 6 deletions social.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"bytes"
"encoding/binary"
"encoding/hex"
. "github.com/Philipp15b/go-steam/protocol"
. "github.com/Philipp15b/go-steam/protocol/protobuf"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/Philipp15b/go-steam/rwu"
"github.com/Philipp15b/go-steam/socialcache"
. "github.com/Philipp15b/go-steam/steamid"
. "github.com/faceit/go-steam/protocol"
. "github.com/faceit/go-steam/protocol/protobuf"
. "github.com/faceit/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/rwu"
"github.com/faceit/go-steam/socialcache"
. "github.com/faceit/go-steam/steamid"
"github.com/golang/protobuf/proto"
"io"
"sync"
Expand Down
4 changes: 2 additions & 2 deletions social_events.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package steam

import (
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/Philipp15b/go-steam/steamid"
. "github.com/faceit/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/steamid"
"time"
)

Expand Down
4 changes: 2 additions & 2 deletions socialcache/chats.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package socialcache

import (
"errors"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/Philipp15b/go-steam/steamid"
. "github.com/faceit/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/steamid"
"sync"
)

Expand Down
4 changes: 2 additions & 2 deletions socialcache/friends.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package socialcache

import (
"errors"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/Philipp15b/go-steam/steamid"
. "github.com/faceit/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/steamid"
"sync"
)

Expand Down
4 changes: 2 additions & 2 deletions socialcache/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package socialcache

import (
"errors"
. "github.com/Philipp15b/go-steam/protocol/steamlang"
. "github.com/Philipp15b/go-steam/steamid"
. "github.com/faceit/go-steam/protocol/steamlang"
. "github.com/faceit/go-steam/steamid"
"sync"
)

Expand Down
Loading

0 comments on commit 3074a87

Please sign in to comment.