{"id":15027619,"url":"https://github.com/syntaxerrors/steam","last_synced_at":"2025-05-15T08:08:33.414Z","repository":{"id":15558089,"uuid":"18293242","full_name":"syntaxerrors/Steam","owner":"syntaxerrors","description":"A composer package to make use of the steam web api.","archived":false,"fork":false,"pushed_at":"2024-12-10T00:42:16.000Z","size":1697,"stargazers_count":164,"open_issues_count":13,"forks_count":58,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-03T04:09:07.130Z","etag":null,"topics":["laravel","php81","php82","php83","steam-api","steam-community","steamid"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/syntax/steam-api","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syntaxerrors.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-03-31T13:02:43.000Z","updated_at":"2025-02-10T01:44:17.000Z","dependencies_parsed_at":"2024-04-27T05:20:10.711Z","dependency_job_id":"537fc50e-2139-4dca-a3f2-0a58cac3472e","html_url":"https://github.com/syntaxerrors/Steam","commit_stats":{"total_commits":152,"total_committers":25,"mean_commits":6.08,"dds":0.6578947368421053,"last_synced_commit":"09974abbadf89f928ff7a9cde78a4ff1e5844fe4"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syntaxerrors%2FSteam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syntaxerrors%2FSteam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syntaxerrors%2FSteam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syntaxerrors%2FSteam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syntaxerrors","download_url":"https://codeload.github.com/syntaxerrors/Steam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166865,"owners_count":21058481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","php81","php82","php83","steam-api","steam-community","steamid"],"created_at":"2024-09-24T20:06:47.784Z","updated_at":"2025-04-10T06:20:02.074Z","avatar_url":"https://github.com/syntaxerrors.png","language":"PHP","readme":"# Steam API\n\n[![Join the chat at https://gitter.im/syntaxerrors/Steam](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/syntaxerrors/Steam?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n![Unit Tests](https://github.com/syntaxerrors/Steam/workflows/Unit%20Tests/badge.svg)\n[![Maintainability](https://api.codeclimate.com/v1/badges/eb99d8de80e750fd4c27/maintainability)](https://codeclimate.com/github/syntaxerrors/Steam/maintainability)\n\u003ca href=\"https://codeclimate.com/github/syntaxerrors/Steam/test_coverage\"\u003e\u003cimg src=\"https://api.codeclimate.com/v1/badges/eb99d8de80e750fd4c27/test_coverage\" /\u003e\u003c/a\u003e\n[![Latest Stable Version](https://poser.pugx.org/syntax/steam-api/v/stable.svg)](https://packagist.org/packages/syntax/steam-api)\n[![Total Downloads](https://poser.pugx.org/syntax/steam-api/downloads.svg)](https://packagist.org/packages/syntax/steam-api)\n[![License](https://poser.pugx.org/syntax/steam-api/license.svg)](https://packagist.org/packages/syntax/steam-api)\n\n**Version Support**  \n`Laravel \u003e= 10.0`  \n`PHP \u003e= 8.1`  \n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributors](#contributors)\n\nThis package provides an easy way to get details from the Steam API service.  The services it can access are:\n\n- `ISteamNews`\n- `IPlayerService`\n- `ISteamUser`\n- `ISteamUserStats`\n- `ISteamApp`\n\n## Installation\n\nBegin by installing this package with composer.\n\n\t\"require\": {\n\t\t\"syntax/steam-api\": \"3.*\"\n\t}\n\t\nNext, update composer from the terminal.\n\n\tcomposer update syntax/steam-api\n\n\u003e Alternately, you can run \"composer require syntax/steam-api:dev-master\" from the command line.\n\nLastly, publish the config file.  You can get your API key from [Steam](http://steamcommunity.com/dev/apikey).\n\n\tphp artisan vendor:publish --provider=\"Syntax\\SteamApi\\SteamApiServiceProvider\"\n\n## Usage\n\n```php\nuse Syntax\\SteamApi\\Facades\\SteamApi;\n\n/** Get Portal 2 */\n$apps = SteamApi::app()-\u003eappDetails(620);\n\necho $app-\u003efirst()-\u003ename;\n```\n\nEach service from the Steam API has its own methods you can use.\n\n- [Global](#global)\n- [News](#news)\n- [Player](#player)\n- [User](#user)\n- [User Stats](#user-stats)\n- [App](#app)\n- [Package](#package)\n- [Item](#item)\n- [Group](#group)\n\n### Global\nThese are methods that are available to each service.\n\n#### convertId\nThis will convert the given steam ID to each type of steam ID (64 bit, 32 bit and steam ID3).\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\nid| string  | The id you want to convert | Yes\nformat | string | The format you want back. | No | null\n\n\u003e Possible formats are ID64, id64, 64, ID32, id32, 32, ID3, id3 and 3.\n\n##### Example usage\n\n```php\nSteamApi::convertId($id, $format);\n```\n\n\u003e Example Output: [convertId](./examples/global/convertId.txt)\n\n### News\nThe [Steam News](https://developer.valvesoftware.com/wiki/Steam_Web_API#GetNewsForApp_.28v0002.29) web api is used to get articles for games.\n\n```php\nSteamApi::news()\n```\n\n#### GetNewsForApp\nThis method will get the news articles for a given app ID.  It has three parameters.\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\nappId| int  | The id for the app you want news on | Yes\ncount | int | The number of news items to return | No | 5\nmaxlength | int | The maximum number of characters to return | No | null\n\n##### Example usage\n\n```php\n\u003c?php\n\t$news = SteamApi::news()-\u003eGetNewsForApp($appId, 5, 500)-\u003enewsitems;\n?\u003e\n```\n\n\u003e Example Output: [GetNewsForApp](./examples/news/GetNewsForApp.txt)\n\n### Player\nThe [Player Service](https://developer.valvesoftware.com/wiki/Steam_Web_API#GetOwnedGames_.28v0001.29) is used to get details on players.\n\nWhen instantiating the player class, you are required to pass a steamId or Steam community ID.\n\n```php\nSteamApi::player($steamId)\n```\n\n#### GetSteamLevel\nThis method will return the level of the Steam user given.  It simply returns the integer of their current level.\n\n\n\u003e Example Output: [GetSteamLevel](./examples/player/GetSteamLevel.txt)\n\n#### GetPlayerLevelDetails\nThis will return a Syntax\\Containers\\Player_Level object with full details for the players level. \n\n\n\u003e Example Output: [GetPlayerLevelDetails](./examples/player/GetPlayerLevelDetails.txt)\n\n#### GetBadges\nThis call will give you a list of the badges that the player currently has. There is currently no schema for badges, so all you will get is the ID and details.\n\n\n\u003e Example Output: [GetBadges](./examples/player/GetBadges.txt)\n\n#### GetOwnedGames\nGetOwnedGames returns a list of games a player owns along with some playtime information, if the profile is publicly visible. Private, friends-only, and other privacy settings are not supported unless you are asking for your own personal details (i.e. the WebAPI key you are using is linked to the steamID you are requesting).\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\nincludeAppInfo| boolean  | Whether or not to include game details | No | true\nincludePlayedFreeGames | boolean | Whether or not to include free games | No | false\nappIdsFilter | array | An array of appIds.  These will be the only ones returned if the user has them | No | array()\n\n\n\u003e Example Output: [GetOwnedGames](./examples/player/GetOwnedGames.txt)\n\n#### GetRecentlyPlayedGames\nGetRecentlyPlayedGames returns a list of games a player has played in the last two weeks, if the profile is publicly visible. Private, friends-only, and other privacy settings are not supported unless you are asking for your own personal details (i.e. the WebAPI key you are using is linked to the steamID you are requesting).\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\ncount| int  | The number of games to return | No | null\n\n\u003e Example Output: [GetRecentlyPlayedGames](./examples/player/GetRecentlyPlayedGames.txt)\n\n#### IsPlayingSharedGame\nIsPlayingSharedGame returns the original owner's SteamID if a borrowing account is currently playing this game. If the game is not borrowed or the borrower currently doesn't play this game, the result is always 0.\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\nappId| int  | The game to check for  | Yes |\n\n\n\u003e Example Output: [IsPlayingSharedGame](./examples/player/IsPlayingSharedGame.txt)\n\n### User\nThe [User](https://developer.valvesoftware.com/wiki/Steam_Web_API#GetFriendList_.28v0001.29) WebAPI call is used to get details about the user specifically.\n\nWhen instantiating the user class, you are required to pass at least one steamId or steam community ID.\n\n```php\nSteamApi::user($steamId)\n```\n\n#### ResolveVanityURL\nThis will return details on the user from their display name.\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\ndisplayName| string  | The display name to get the steam ID for.  In `http://steamcommunity.com/id/gabelogannewell` it would be `gabelogannewell`.  | Yes | NULL\n\n```php\n\t$player = SteamApi::user($steamId)-\u003eResolveVanityURL('gabelogannewell');\n```\n\n\u003e Example Output: [ResolveVanityURL](./examples/user/ResolveVanityURL.txt)\n\n#### GetPlayerSummaries\nThis will return details on one or more users.\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\nsteamId| int[]  | An array of (or singular) steam ID(s) to get details for  | No | Steam ID passed to user()\n\n```php\n\t// One user\n\t$steamId = 76561197960287930;\n\t$player = SteamApi::user($steamId)-\u003eGetPlayerSummaries()[0];\n\t\n\t// Several users\n\t$steamIds = [76561197960287930, 76561197968575517]\n\t$players = SteamApi::user($steamIds)-\u003eGetPlayerSummaries();\n```\n\n\u003e Example Output: [GetPlayerSummaries](./examples/user/GetPlayerSummaries.txt)\n\n#### GetFriendList\nReturns the friend list of any Steam user, provided his Steam Community profile visibility is set to \"Public\".\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\nrelationship| string (all or friend)  | The type of friends to get | No | all\nsummaries| bool (true or false)  | To return the friend player summaries, or only steamIds | No | true\n\nOnce the list of friends is gathered, if `summaries` is not set to `false`; it is passed through [GetPlayerSummaries](#GetPlayerSummaries).  This allows you to get back a collection of Player objects.\n\n\n\u003e Example Output: [GetFriendList](./examples/user/GetFriendList.txt)\n\n#### GetPlayerBans\nReturns the possible bans placed on the provided steam ID(s).\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\nsteamId| int[]  | An array of (or singular) steam id(s) to get details for  | No | Steam id passed to user()\n\n\n\u003e Example Output: [GetPlayerBans](./examples/user/GetPlayerBans.txt)\n\n### User Stats\nThe [User Stats](https://developer.valvesoftware.com/wiki/Steam_Web_API#GetPlayerAchievements_.28v0001.29) WebAPI call is used to get details about a user's gaming.\n\nWhen instantiating the user stats class, you are required to pass a steamID or Steam community ID.\n\n```php\nSteamApi::userStats($steamId)\n```\n\n#### GetPlayerAchievements\nReturns a list of achievements for this user by app ID.\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\nappId| int | The id of the game you want the user's achievements in | Yes |\n\n\n\u003e Example Output: [GetPlayerAchievements](./examples/user/stats/GetPlayerAchievements.txt)\n\n#### GetGlobalAchievementPercentagesForApp\nThis method will return a list of all achievements for the specified game and the percentage of all users that have unlocked each achievement.\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\nappId| int | The ID of the game you want the user's achievements in | Yes |\n\n\n\u003e Example Output: [GetGlobalAchievementPercentagesForApp](./examples/user/stats/GetGlobalAchievementPercentageForApp.txt)\n\n#### GetUserStatsForGame\nReturns a list of achievements for this user by app ID.\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\nappId| int | The ID of the game you want the user's achievements in | Yes |\nall| boolean | If you want all stats and not just the achievements set to true.| No | FALSE\n\n\n\u003e Example Output: [GetUserStatsForGame](./examples/user/stats/GetUserStatsForGame.txt) | [GetUserStatsForGame (all)](./examples/user/stats/GetUserStatsForGameAll.txt)\n\n#### GetSchemaForGame\nReturns a list of game details, including achievements and stats.\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\nappId| int | The ID of the game you want the details for. | Yes |\n\n\n\u003e Example Output: [GetSchemaForGame](./examples/user/stats/GetSchemaForGame.txt)\n\n### App\nThis area will get details for games.\n\n```php\nSteamApi::app()\n```\n\n#### appDetails\nThis gets all the details for a game.  This is most of the information from the store page of a game.\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\nappIds| int[] | The ids of the games you want details for | Yes |\ncc | string | The cc is the country code, you can get appropriate currency values according to [ISO 3166-1](https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) | No |\nl | string | The l is the language parameter, you can get the appropriate language according to [ISO 639-1](https://wikipedia.org/wiki/List_of_ISO_639-1_codes) | No |\n\n\n\u003e Example Output: [appDetails](./examples/app/appDetails.txt)\n\n#### GetAppList\nThis method will return an array of app objects directly from Steam.  It includes the appID and the app name.\n\n\u003e Example Output: [GetAppList](./examples/app/GetAppList.txt)\n\n### Package\nThis method will get details for packages.\n\n```php\nSteamApi::package()\n```\n\n#### packageDetails\nThis gets all the details for a package. This is most of the information from the store page of a package.\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\npackIds| int[] | The ids of the packages you want details for | Yes |\ncc | string | The cc is the country code, you can get appropriate currency values according to [ISO 3166-1](https://wikipedia.org/wiki/ISO_3166-1) | No |\nl | string | The l is the language parameter, you can get the appropriate language according to [ISO 639-1](https://wikipedia.org/wiki/ISO_639-1) (If there is one) | No |\n\n\n\u003e Example Output: [packageDetails](./examples/package/packageDetails.txt)\n\n### Item\nThis method will get user inventory for item.\n\n```php\nSteamApi::item()\n```\n\n#### GetPlayerItems\nThis gets all the item for a user inventory.\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\nappId| int  | The appid of the game you want for | Yes |\nsteamid | int | The steamid of the Steam user you want for | Yes |\n\n⚠️ **Now known to supports**:`440`, `570`, `620`, `730`, `205790`, `221540`, `238460`\n\n\u003e Example Output: [GetPlayerItems](./examples/item/GetPlayerItems.txt)\n\n### Group\nThis service is used to get details on a Steam group.\n\n```php\nSteamApi::group()\n```\n\n#### GetGroupSummary\nThis method will get the details for a group.\n\n##### Arguments\n\nName | Type | Description | Required | Default\n-----|------|-------------|----------|---------\ngroup| string or int  | The ID or the name of the group. | Yes\n\n##### Example usage\n\n```php\n\u003c?php\n\t$news = SteamApi::group()-\u003eGetGroupSummary('Valve');\n?\u003e\n```\n\n\u003e Example Output: [GetGroupSummary](./examples/group/GetGroupSummary.txt)\n\n## Testing the Steam Package\n\nA Steam API key must be provided or most tests will fail.\n  \n**Run Tests**  \n```\n# Build container\ndocker-compose build\n\n# Install dependancies\ndocker-compose run --rm php composer install\n\n# Run tests (assumes apiKey is set in .env file)\ndocker-compose run --rm php composer test\n\n# Or with the apiKey inline\ndocker-compose run --rm -e api=YOUR_STEAM_API_KEY php composer test\n\n# With coverage\ndocker-compose run --rm php composer coverage\n\n# Play around\ndocker-compose run --rm php bash\n```\n\n## Contributors\n- [Stygiansabyss](https://github.com/stygiansabyss)\n- [nicekiwi](https://github.com/nicekiwi)\n- [rannmann](https://github.com/rannmann)\n- [Amegatron](https://github.com/Amegatron)\n- [mjmarianetti](https://github.com/mjmarianetti)\n- [MaartenStaa](https://github.com/MaartenStaa)\n- [JRizzle88](https://github.com/JRizzle88)\n- [jastend](https://github.com/jastend)\n- [Teakowa](https://github.com/Teakowa)\n- [Ben Sherred](https://github.com/bensherred)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyntaxerrors%2Fsteam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyntaxerrors%2Fsteam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyntaxerrors%2Fsteam/lists"}