https://github.com/sebj/Steam
A Swift package to interact directly with Steam.
https://github.com/sebj/Steam
combine steam swift
Last synced: about 1 year ago
JSON representation
A Swift package to interact directly with Steam.
- Host: GitHub
- URL: https://github.com/sebj/Steam
- Owner: sebj
- License: mit
- Created: 2021-03-21T17:09:11.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-01-31T17:59:04.000Z (over 2 years ago)
- Last Synced: 2024-11-15T16:16:41.222Z (over 1 year ago)
- Topics: combine, steam, swift
- Language: Swift
- Homepage: https://swiftpackageindex.com/sebj/Steam/main/documentation/steam
- Size: 108 KB
- Stars: 15
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rainmana - sebj/Steam - A Swift package to interact directly with Steam. (Swift)
README
# đź’¨ Steam
[](https://swiftpackageindex.com/sebj/steam)
[](https://swiftpackageindex.com/sebj/steam)
[](LICENSE)
[](https://github.com/sebj/steam/actions/workflows/build-and-test.yaml)
A Swift package to directly interact with [Steam](https://store.steampowered.com).
* Login to a Steam account (via password or 2FA code)
* Retrieve basic user info
* Steam identifier
* Account flags
* Steam Community vanity profile URL
* Friends list Steam identifiers & friend status
* Add/remove friends
## Installation
### Swift Package Manager (Xcode):
1. From the **File** menu, select **Add Packages…**
2. Enter "https://github.com/sebj/steam" into the package repository URL text field
### Swift Package Manager (standalone):
Add the following to the `dependencies` of your `Package.swift` file:
`.package(url: "https://github.com/sebj/Steam.git", ...)`
## Usage
1. Choose a server from `SteamServer.defaultServers` or fetch the latest Steam server list using `SteamServersFetcher`.
2. Instantiate a `SteamService` and connect to the chosen server (`connect`).
3. `login`
4. Receive user information and friends list, and use any functions that require user authentication (`addFriend`, `removeFriend` etc) as desired.
## Protobufs
Several Steam Protobufs from [SteamDatabase/Protobufs](https://github.com/SteamDatabase/Protobufs) and their converted Swift models (via [Swift Protobuf](https://github.com/apple/swift-protobuf)) are bundled with this library, as Swift packages do not currently support running scripts/custom build phase actions (which would ideally be used to clone the Protobufs repo, convert and copy the relevant files).
## License
This library is released under the MIT license. See the [LICENSE](LICENSE) file for more information.
## Related Libraries
* [Philipp15b/go-steam](https://github.com/Philipp15b/go-steam)
* [seishun/node-steam](https://github.com/seishun/node-steam)
* [ValvePython/steam](https://github.com/ValvePython/steam)