All Projects → zyberspace → php-steam-web-api-client

zyberspace / php-steam-web-api-client

Licence: MPL-2.0 license
Automatically generated api client for the Steam Web API.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to php-steam-web-api-client

Async Gamequery Lib
A high-performance java game query library designed for steam/source based games and others
Stars: ✭ 88 (+11.39%)
Mutual labels:  steam, valve, steam-api
Steamworks
Exposing SteamWorks functions to SourcePawn.
Stars: ✭ 70 (-11.39%)
Mutual labels:  steam, valve, steam-api
steam.py
An async python wrapper to interact with the Steam API and its CMs
Stars: ✭ 74 (-6.33%)
Mutual labels:  steam, valve, steam-api
Steamcmd Autoupdate Any Gameserver
Windows SteamCMD to autoupdate and install any game server steam cmd settings configurable lots of useful features. This batch script will keep your game servers automaticly updated updating intervals announce the server is shutting down for updates etc all configurable.
Stars: ✭ 77 (-2.53%)
Mutual labels:  steam, valve, steam-api
Archisteamfarm
C# application with primary purpose of idling Steam cards from multiple accounts simultaneously.
Stars: ✭ 7,219 (+9037.97%)
Mutual labels:  steam, valve, steam-api
Vac Bypass Loader
Loader for VAC Bypass written in C.
Stars: ✭ 204 (+158.23%)
Mutual labels:  steam, valve
Vpk
📦 Open, Search, Extract and Create VPKs in python
Stars: ✭ 79 (+0%)
Mutual labels:  steam, valve
Punk
⚡ Alternative cross-platform Steam client for desktop
Stars: ✭ 87 (+10.13%)
Mutual labels:  steam, steam-api
Vac Hooks
Hook WinAPI functions used by Valve Anti-Cheat. Log calls and intercept arguments & return values. DLL written in C.
Stars: ✭ 103 (+30.38%)
Mutual labels:  steam, valve
Steamforwarder
steam_api.dll implementation for wine. Your windows games now can interact with your linux steam! (This repo mirrors https://gitlab.com/xomachine/SteamForwarder)
Stars: ✭ 190 (+140.51%)
Mutual labels:  steam, steam-api
JavaSteam
Java library that provides an interface to directly interact with Valve's Steam servers.
Stars: ✭ 70 (-11.39%)
Mutual labels:  steam, valve
Sourcedemorender
Multithreaded, hardware accelerated solution to create high quality movies for the Source engine.
Stars: ✭ 152 (+92.41%)
Mutual labels:  steam, valve
Steamkit
SteamKit2 is a .NET library designed to interoperate with Valve's Steam network. It aims to provide a simple, yet extensible, interface to perform various actions on the network.
Stars: ✭ 1,926 (+2337.97%)
Mutual labels:  steam, valve
vdf
📜 Package for working with Valve's text and binary KeyValue format
Stars: ✭ 146 (+84.81%)
Mutual labels:  steam, valve
Steamid.php
🆔 PHP library to work with SteamIDs
Stars: ✭ 83 (+5.06%)
Mutual labels:  steam, valve
Personal Influxdb
Import data from various APIs into InfluxDB
Stars: ✭ 51 (-35.44%)
Mutual labels:  steam, steam-api
Depressurizer
A Steam library categorizing tool.
Stars: ✭ 1,008 (+1175.95%)
Mutual labels:  steam, valve
Steampy
A Steam trading library for python 3
Stars: ✭ 212 (+168.35%)
Mutual labels:  steam, steam-api
Steam Market
Find arbitrages on the Steam Market.
Stars: ✭ 25 (-68.35%)
Mutual labels:  steam, steam-api
Dota2
🐸 Python package for interacting with Dota 2 Game Coordinator
Stars: ✭ 129 (+63.29%)
Mutual labels:  steam, valve

zyberspace/steam-web-api-client

Automatically generated api client for the Steam Web API in style of the google-api-php-client.

Packagist License

Automatically generated?

Yeah, every API interface (those are not php interfaces) got generated automatically from the /ISteamWebAPIUtil/GetSupportedAPIList/v1/ method. Only the classes outside of the Interfaces directory are written from hand.

This way it is easy for me to keep the api updated because i just need to run the generation command every time valve changes something.

Installation

In your project-root:

composer require --update-no-dev zyberspace/steam-web-api-client

Composer will then automatically add the package to your project requirements and install it (also creates the composer.json if you don't have one already).

Client structure

The client is structured in 3 peaces:

  • The Client class which saves your api key and takes care of the actual api calls.
  • The api interfaces which are automatically generated and provide the api methods to call.
  • The InterfaceGenerator which generated the interfaces. You don't need this one except you want to update the saved interface classes.
    (Use it by installing the dev dependencies and the execute composer generate-interfaces [your api key].)

Quickstart

If you installed the client with composer like above and already obtained your api key from valve these are the 4 steps to use the api:

  1. Require the composer autoloader

    require('vendor/autoload.php');
  2. Create the Steam Web API Client

    $client = new \Zyberspace\SteamWebApi\Client('[your api key goes here]');
  3. Create an instance of the api interface you want to use

    $steamUser = new \Zyberspace\SteamWebApi\Interfaces\ISteamUser($client);
  4. Make your call to the method you want to use

    $response = $steamUser->GetPlayerSummariesV2('76561198059720690');

Every method returns an object build from the json response. If you want to know more about the response format of every specific method, check the Steam Web API documentation.

require('vendor/autoload.php');

$client = new \Zyberspace\SteamWebApi\Client($_ENV['STEAM_WEB_API_KEY']);
$steamUser = new \Zyberspace\SteamWebApi\Interfaces\ISteamUser($client);
$response = $steamUser->GetPlayerSummariesV2(implode(',', $steamIds));

var_dump($response);

Working with multiple optional arguments

If the method you need has multiple optional arguments but you don't want to use all of them, set the non-needed arguments to null. This is also the default value for them and will therefore be ignored by the client.

Documentation

To create the docs, just run phpdoc in the the project-root.
An online-version is available at phpdoc.zyberware.org/zyberspace/steam-web-api-client.

For more information about the api interfaces and the methods please refer to the Steam Web API documentation.

License

This software is licensed under the Mozilla Public License v. 2.0. For more information, read the file LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].