Ratcho Posted December 24, 2019 Share Posted December 24, 2019 The TruckersMP PHP library provides a convenient way to access the TruckersMP API from applications written in the PHP language. It includes a pre-defined set of classes for each API endpoint to get the data as a collection or model. You can find the source code on GitHub and view the package on Packagist. Installation For installation instructions, please refer to the Installation & Usage page of the Wiki. Documentation You can find the documentation by visiting the Wiki on GitHub. Example Below is an example of how you can get the name of a player using the client. <?php require_once('vendor/autoload.php'); $client = new TruckersMP\APIClient\Client(); $player = $client->player(28159)->get(); echo 'The players name is ' . $player->getName(); For those of you who currenly use the API Client, a new major version was released today (24th December 2019). 2 1 Link to comment Share on other sites More sharing options...
Spig_Xiao Zhu Posted December 31, 2019 Share Posted December 31, 2019 I will collect,Thank you for your information, which will help! 1 Link to comment Share on other sites More sharing options...
Game Developer ShawnCZek Posted March 6, 2020 Game Developer Share Posted March 6, 2020 A new version has been released, v1.0.2, to provide support for latest versions of used dependencies. Game Developer Discord Bot Developer Link to comment Share on other sites More sharing options...
Ratcho Posted March 8, 2020 Author Share Posted March 8, 2020 v1.0.3 has been released Added Added .gitattributes (#16) Changed Replaced the build status badge with Github actions/workflow instead of Travis CI in readme.md (#16) 1 Link to comment Share on other sites More sharing options...
Ratcho Posted April 11, 2020 Author Share Posted April 11, 2020 v1.0.4 has been released which fixes loading guzzlehttp/guzzle if the initial project does not use it. Link to comment Share on other sites More sharing options...
Ratcho Posted May 18, 2020 Author Share Posted May 18, 2020 v1.1.0 has been released Added Added the ability to get the companies validation status (i.e. if they are validated or not) (#17) Changed Cleaned up the project by adding missing documentation, return types and spacing within PHPDocs (#17) Changed StyleCI and tests to test against PSR12 (#17) Updated composer dependencies (#17) 1 Link to comment Share on other sites More sharing options...
Ratcho Posted July 18, 2020 Author Share Posted July 18, 2020 v1.1.1 has been released (2020-06-20) Added Added the ability to get player's Discord Snowflake Added the ability to get the color of player's group Changed Updated all dependencies v1.2.0 has been releasd (2020-07-18) Added Added if the player is a staff member and/or is part of upper staff Added the ability to get the users Patreon information. Changed Updated composer dependencies Changed the test names to include underscores - this makes the names slightly easier to read 3 Link to comment Share on other sites More sharing options...
Guest AssassinGoEasy Posted July 20, 2020 Share Posted July 20, 2020 Thank you for the information, This help's Alot! Link to comment Share on other sites More sharing options...
Recommended Posts