Code Monkey home page Code Monkey logo

steamphp's Introduction

SteamPHP

Notice!

Do not pick the master branch, its unstable and broken as its WIP.

Pick a release instead, those are stable!

Compability

PHP5.x PHP7.0 PHP7.1 PHP7.2 PHP7.3 PHP7.4 PHP8.0

Info

GitHub issues

GitHub license

FAQ

Why?

Most developers struggle with interacting with the WebAPI, this (yet) unfinished library makes everything easier!

How?

Making web requests especially multiple can be frustrating such as code quality. This library makes it easy with providing one liners. Examples below*

Installation

Composer

  1. composer require justinback/steam-php
  2. include vendor/autoload.php
  3. See Usage

By Source

  1. Download from GitHub
  2. include steam.php
  3. See Usage

Usage

$steam  = new justinback\steam\SteamManager($sApiKey, $iAppID, $sSteamid);

Examples

Examples are in the examples/ directory.

Documentation

Docs

Generating

Get apigen

./path_to_executeable "generate" "--source" "path_to_source" "--destination" "path_to_source/docs" "--title" "SteamPHP" "--charset" "UTF-8" "--exclude" "index.php" "--access-levels" "public" "--access-levels" "protected" "--php" "--tree" "--deprecated" "--todo" "--template-theme bootstrap"

Feature Requests / Bug Reports

Feel free to make a Pull Request or Open an Issue!

steamphp's People

Contributors

justinback avatar zandor300 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

steamphp's Issues

GetAvatar[Size]() replacement

Is your feature request related to a problem? Please describe.
INo.

Describe the solution you'd like
One function to to get all avatars.

Describe alternatives you've considered
Result avatars rather in an array than 3 functions.

GetLeaderboardsForGame() misplacement

Describe the bug
GetLeaderboardsForGame() chronological sorting doesnt work with a huge amount of leaderboards.
An unknown amount (Reported ca. 400 Leaderboards) will be placed before the oldest leaderboards.

To Reproduce
Code to reproduce the behavior:

foreach(array_reverse($steam->game()->leaderboards()->GetLeaderboardsForGame()) as $leaderboard){
    echo $leaderboard->name. "<br>";
}

Expected behavior
List all Leaderboards in a chronologial order

Screenshots
None Provided.

Desktop (please complete the following information):

  • OS: Linux
  • Distro: Debian (9) Stretch
  • PHP Version 7.2

Additional context
This has to be fixed on Valve's end as I have no control over it.

Throw exceptions on error.

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
Rather than returning NULL or nothing, throw an exception.

Describe alternatives you've considered
None,

Additional context
None.

ConsumeItem has default response

Describe the bug
Forgot to directly return the response object

To Reproduce
Steps to reproduce the behavior:

  1. var_dump(ConsumeItem());

Expected behavior
Direct access to the object.

Screenshots
If applicable, add screenshots to help explain your problem.
None

Desktop (please complete the following information):

  • OS: Linux
  • Distro: stretch
  • PHP Version 7.2

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.