Giter Club home page Giter Club logo

retroachievements-composer's Introduction

RetroAchievements composer package

Install with:

composer require joestrong/retroachievements

Use in a project:

require_once('../vendor/autoload.php');

use JoeStrong\RetroAchievements\RetroAchievements;

$ra = new RetroAchievements($username, $apiKey);
$users = $ra->getTopTenUsers();

foreach ($users as $user) {
    echo "$user->username<br>";
}

Methods

Auth with the API

$ra = new RetroAchievements($username, $apiKey);

Get the top 10 users

$ra->getTopTenUsers();

Get the consoles

$ra->getConsoles();

Get games for console

$ra->getGamesForConsole($consoleId);

Get game info

$ra->getGameInfo($gameId);

Contributing

See CONTRIBUTING.md

retroachievements-composer's People

Contributors

joestrong avatar supun94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

retroachievements-composer's Issues

Add composer.lock to gitignore

Composer.lock is being tracked by git, this file is generated when composer is installed/updated and should be in the project and not tracket by git.

Add a line in .gitignore file to remove the composer.lock from git track

Add nicer tests

The current tests aren't doing much

Mainly the API endpoint needs to be mocked so the endpoint isn't a part of the test

I'm happy for phpspec to be replaced by phpunit etc

Add CONTRIBUTING.md

Important contents for the CONTRIBUTING.md:

  • Creating a new branch off of the develop branch
  • All changes to the code should have appropriate unit tests
  • All code should match PSR-2 style
  • Submit a pull request againt develop as the base branch
  • All travis checks will need to pass

Official RetroAchievements Web API Client

Hey there,
I'm just about to set up the repository and composer package for an official RetroAchievements Web API Client.

Reason for this happening is that there will be a new V2 API at some point and I want to make sure the process of upgrading to the new web api will be as streamlined as possible for any existing projects.

The initial plan was to just push the currently downloadable client class file as is (properly named though), release it as 1.0 and proceed with the implementation of new client versions.
(http://retroachievements.org/GetRA_API.php)

As I was made aware of this project and getting the impression that it has a proper setup altogether, I wondered if you'd be interested in moving/allowing to mirror the current setup to said repository (https://github.com/RetroAchievements/RAWebApiClientPHP) to stand as the current V1 PHP client implementation but also as the basis for the newer versions.

Appropriate mentions of source and contributors are implied.

Add to travis

Would be good to run this through travis once we have:

  • Automated tests
  • PHPCS-Fixer integration

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.