Package Data | |
---|---|
Maintainer Username: | sync667 |
Maintainer Contact: | sync667@gmail.com (sync667) |
Package Create Date: | 2015-12-10 |
Package Last Update: | 2015-12-11 |
Home Page: | |
Language: | PHP |
License: | Apache-2.0 |
Last Refreshed: | 2024-11-15 15:18:17 |
Package Statistics | |
---|---|
Total Downloads: | 14 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 2 |
Total Open Issues: | 0 |
Version will be updated by me to new Web API.
A wrapper library that allows you to send requests to Steam Web API implemented in PHP Laravel Framework
.
This library simply takes arguments from method call and uses GuzzleHttp
to send request Steam Web API and returns the response as expected.
It requires minimum PHP 5.6
version.
You can easily install this package via Composer:
"sync667/steam-web-api2": "2.*"
to your composer.json
file.{
"require": {
"sync667/steam-web-api2": "2.*"
}
}
Type composer update
on Terminal
Ready to use!
## Usage
use sync667\SteamWebApi\Api\AbstractSteamAPI;
AbstractSteamAPI::init('https://api.steampowered.com', 'YOUR_API_KEY', 'YOUR_RESPONSE_FORMAT');
Note : Response format can be either json or xml.
Let say we would like to get player items, then following code block will be fine for that purpose
$appID = ApplicationIDs::TeamFortress2;
$steamID = 76561197962033671;
$response = IEconItemsAPI::getPlayerItems($appID, $steamID);
var_dump($response);
Here is the list of class names and their namespaces that you can use.
ISteamApps => 'Epigra\SteamWebApi\Api\ISteamApps'
ISteamEconomy => 'Epigra\SteamWebApi\Api\ISteamEconomy'
ISteamNews => 'Epigra\SteamWebApi\Api\ISteamNews'
ISteamRemoteStorage => 'Epigra\SteamWebApi\Api\ISteamRemoteStorage'
ISteamUser => 'Epigra\SteamWebApi\Api\ISteamUser'
ISteamUserStats => 'Epigra\SteamWebApi\Api\ISteamUserStats'
IPlayerService => 'Epigra\SteamWebApi\Api\IPlayerService'
ISteamWebAPIUtil => 'Epigra\SteamWebApi\Api\ISteamWebAPIUtil'
IEconItems => 'Epigra\SteamWebApi\Api\IEconItems'
ApplicationIDs
class under Epigra\SteamWebApi\Constants
namespace.List of applications and their ids provided by the library:
CounterStrikeBeta = 260;
CounterStrikeGlobalOffensiveBeta = 710;
TeamFortress2 = 440;
TeamFortress2PublicBeta = 520;
Dota2 = 570;
Dota2InternalTest = 620;
Dota2Beta = 205790;
Portal2 = 620;
Portal2Beta = 841;
e.g. You can easily get TeamFortress2 ID like following
ApplicationIDs::TeamFortress2;
This library is well documented and can be reached from docs/
directory.
For more information Visit Steam Page.
Copyright 2014 Epigra
Updated 2015 sync667
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.