Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
b83603d
Started initial refactor
B3none Mar 27, 2019
2ff6d7d
Renamed models, removed iterable helper.
B3none Mar 27, 2019
e084a49
Refactored models and implemented GroupedModel class to extend from.
B3none Mar 27, 2019
5e77325
Removed silly spacing
B3none Mar 27, 2019
5e5753d
Added write listeners for grouped variables
B3none Mar 27, 2019
866c135
Throw APIErrorException if there's a gametime endpoint error
B3none Mar 27, 2019
f051502
Fixed wording in readme
B3none Mar 27, 2019
928b862
Removed redundant PHP versions from Travis setup
B3none Mar 27, 2019
5fc3668
Altered .gitignore
B3none Mar 27, 2019
7f53799
Fixed PHPCBF errors.
B3none Mar 28, 2019
eeec4cd
More slight refinements, fixed unit test error
B3none Mar 28, 2019
f9d4199
Updated unit tests
B3none Mar 28, 2019
ec26cc5
Switched to Client
B3none Mar 28, 2019
10fdccd
Switched GroupedModel to abstract class
B3none Mar 28, 2019
0e10d77
Call correct class in unit tests
B3none Mar 28, 2019
e891fb9
Removed more spacing
B3none Mar 28, 2019
9e14c06
Switched example user to caf!!! to fix the erroring unit tests.
B3none Mar 28, 2019
f9c6183
Switched to PHPUnit 7 and updated Unit Tests to test the bans whether…
B3none Mar 28, 2019
d60deba
Added deprecated tag to the version function
B3none Mar 28, 2019
d13fc7a
Added Rules endpoint.
B3none Mar 28, 2019
48e88e1
Fixed rules.
B3none Mar 28, 2019
195f0d5
Altered client, fixed rules.
B3none Mar 28, 2019
baeb46d
Updated unit tests to include rules model and added some more assertions
B3none Mar 28, 2019
059bb93
Switched to using getters and setters to remove unstable dependency.
B3none Mar 28, 2019
f33eb63
We now call the endpoints based on the function name
B3none Mar 28, 2019
48596e0
Removed unstable dependency
B3none Mar 28, 2019
ba042f5
Composer update
B3none Mar 28, 2019
0d4e08a
Update readme to describe new style.
B3none Mar 28, 2019
805f7b9
Readme wording updates
B3none Mar 28, 2019
864f382
Updated unit tests to use new format
B3none Mar 28, 2019
b97a76e
Added the ability to pass an index to get functions for groupedModels
B3none Mar 28, 2019
238f852
Put getGroupedValue logic all in the same place
B3none Mar 28, 2019
2808df5
Separated the tests into individual classes
bensherred Nov 16, 2019
582f2eb
Removed hhvm from travis config
bensherred Nov 16, 2019
2caa0d3
Set the scheme to always be HTTPS
bensherred Nov 16, 2019
2602dd7
Added author info and the ability to tell if the player is banned
bensherred Nov 16, 2019
279c0bc
Added the ability to get the players VTC info
bensherred Nov 16, 2019
86f0dc5
Added extra properties to the ServerModel
bensherred Nov 16, 2019
0bcb583
Renamed isBannedUntil to getBannedUntil
bensherred Nov 16, 2019
3d1c31b
Temporarily removed the old models for refactor
bensherred Nov 17, 2019
549c7f8
Added the new Checksum model and refactored the version model
bensherred Nov 17, 2019
aff8548
Refactored the Game and Rule models
bensherred Nov 17, 2019
7d31f6d
Updated the server and player model
bensherred Nov 17, 2019
82b61ff
Update .travis.yml
bensherred Nov 17, 2019
20dc083
Undeprecated the version method
bensherred Nov 17, 2019
3f0e330
Added the ability to get a companies information
bensherred Nov 17, 2019
2b3bf75
Fixed offsetGet in the Collection class
bensherred Nov 17, 2019
fb8dc9d
We now cache the player information
bensherred Nov 17, 2019
d4cc609
Added caching for all endpoints during testing
bensherred Nov 17, 2019
11b32ec
Added the ability to get the recent and featured companies
bensherred Nov 18, 2019
adf691b
Created a request class for each method
bensherred Nov 18, 2019
3025967
Fixed an issue with styling in CompanyRequest
bensherred Nov 18, 2019
2a32b3f
Added comments to all the constants
bensherred Nov 18, 2019
407164d
Added a server collection
bensherred Nov 18, 2019
f355f03
Renamed the all() method to get()
bensherred Nov 18, 2019
5a6a09f
We now only return the ServerCollection for the ServerRequest
bensherred Nov 19, 2019
961eb1e
Added the ability to get the companies news posts
bensherred Nov 19, 2019
090eb9b
Renamed Post model to CompanyPost
bensherred Nov 19, 2019
101ca0e
Renamed news() to posts() in company request
bensherred Nov 19, 2019
087baca
Added the ability to get a companies post
bensherred Nov 19, 2019
a75b8d9
Reimplemented the ability to get recent and featured companies
bensherred Nov 19, 2019
a56d201
Added the ability to get the company roles
bensherred Nov 19, 2019
41da132
We now handle errors if an invalid request is made
bensherred Nov 23, 2019
3731994
Fixed issue with getting featured companies
bensherred Nov 23, 2019
fa1bc5c
Renamed the call method to send on the request class
bensherred Nov 23, 2019
25d48b1
Fixed an issue with the VersionRequest
bensherred Nov 23, 2019
aedaf79
Changed the way we get the recent and featured companies
bensherred Nov 23, 2019
b9fa711
Fixed a type in the CompanyRequest class
bensherred Nov 24, 2019
48da0ac
Update composer packages to latest version
bensherred Nov 25, 2019
4c772ca
Renamed the Companies model and refactored some requests
bensherred Nov 25, 2019
9449f0e
Updated PHPDoc comments and removed support for PHP 7.1
bensherred Nov 25, 2019
48703e5
Removed PHP 7.4 from Travis CI config
bensherred Nov 25, 2019
43e32e6
Added the ability to get a company member
bensherred Nov 26, 2019
41ce1ee
Added the ability to get all the members for a company
bensherred Nov 26, 2019
803fcf7
Merge branch 'pr/1' into develop
bensherred Nov 27, 2019
2afb926
Removed types folder after pull request
bensherred Nov 27, 2019
8fa5316
Apply fixes from StyleCI
bensherred Nov 27, 2019
9a9b4cf
Merge pull request #2 from bensherred/analysis-jLxWyZ
bensherred Nov 27, 2019
4e983df
Removed old API client and request file
bensherred Nov 27, 2019
a0c0bef
Updated required PHP version
bensherred Nov 27, 2019
0d3967f
Simplified the README file
bensherred Nov 29, 2019
bb7da6e
Added requirements and how to install to README
bensherred Nov 29, 2019
a4f84a8
Added composer to the list of requirements
bensherred Nov 29, 2019
b599b8f
Added PHP 7.4 to travis config
bensherred Nov 29, 2019
6d010c6
Removed PHP 7.4 from TravisCI config
bensherred Nov 29, 2019
5212a16
Removed the examples from the codebase
bensherred Nov 29, 2019
ccbb674
We now return the bans as a collection
bensherred Nov 29, 2019
1567caf
Added the ability to get the players VTC information
bensherred Nov 29, 2019
cd135c3
Updated comments in PlayerTest
bensherred Nov 29, 2019
5da8ff9
Changed the way we get the guzzle config
bensherred Nov 29, 2019
0446702
Apply fixes from StyleCI
bensherred Nov 29, 2019
564075c
Merge pull request #3 from bensherred/analysis-nN4lMG
bensherred Nov 29, 2019
748c275
Added the ability to get the players bans via the player request
bensherred Nov 29, 2019
6917cc5
Fixed styling on PHPDoc comments
bensherred Nov 29, 2019
2b7bbea
Added the ability to get the players company via the model
bensherred Nov 29, 2019
012288e
Added the ability to get the players company member model via the pla…
bensherred Nov 29, 2019
8c3f881
We can now get the players company role via the player model
bensherred Nov 29, 2019
c14dc04
Optimized how we get the players company details
bensherred Nov 29, 2019
0ab8b08
Apply fixes from StyleCI
bensherred Nov 29, 2019
b3e862e
Merge pull request #4 from bensherred/analysis-ZljM5g
bensherred Nov 29, 2019
b92240b
Corrected a comment spelling mistake in the PostRequest class
bensherred Dec 1, 2019
b0aabbd
Corrected a comment spelling mistake in the MemberRequest class
bensherred Dec 1, 2019
d87a143
Updated collection construct comments to be accurate
bensherred Dec 1, 2019
8ed4059
Updated CompanyIndex construct description
bensherred Dec 1, 2019
7bd2c7d
We now use the getter to determine if the user is in a company
bensherred Dec 1, 2019
b53847e
Update description of owner property in CompanyRole model
bensherred Dec 1, 2019
efc3f08
We now only fetch the player bans when the getter is called
bensherred Dec 1, 2019
63ae7ce
Merge branch 'develop' of https://github.com/bensherred/API-Client in…
bensherred Dec 1, 2019
e213826
Removed used property from CompanyRequest class
bensherred Dec 1, 2019
fa7e75d
Aded .phpunit.result.cache to gitignore file
bensherred Dec 1, 2019
ce3aff2
Fixed styling in Player model
bensherred Dec 1, 2019
9b099cb
Updated composer.lock file
bensherred Dec 1, 2019
b7740c8
Renamed NewsRequest to PostsRequest
bensherred Dec 3, 2019
53459ec
Fixed issue with styling
bensherred Dec 3, 2019
652ccf4
Renamed some classes and updated some as per pr #12 changes
bensherred Dec 3, 2019
9f7c8c6
Fixed styling issues
bensherred Dec 3, 2019
930644f
Fixed further styling issues
bensherred Dec 3, 2019
5a0f71c
Apply suggestions from code review
bensherred Dec 3, 2019
423fc39
Updated documentation for PostIndexRequest
bensherred Dec 3, 2019
796b979
Removed assert for social info being null
bensherred Dec 3, 2019
17b0fb6
Merge branch 'develop' of https://github.com/bensherred/API-Client in…
bensherred Dec 3, 2019
573bb7c
Added the ability to tell if a companies recruitment is open or not
bensherred Dec 3, 2019
2c74c48
Updated the way we check if a company is open
bensherred Dec 3, 2019
fadc03c
Removed duplicate assertion when checking company social info
bensherred Dec 3, 2019
2ee6e9c
Update all namespaces to be TruckersMP\APIClient
bensherred Dec 3, 2019
3a2de48
Apply fixes from StyleCI
bensherred Dec 3, 2019
5a886b0
Merge pull request #5 from bensherred/analysis-bQN6r5
bensherred Dec 3, 2019
56a269a
Updated the type of sync delay
bensherred Dec 4, 2019
783fa94
Updated getter name on Version model
bensherred Dec 5, 2019
a28981c
Fixed an issue with an undefined property
bensherred Dec 5, 2019
1ad2d81
Added PHP 7.4 to Travis CI config
bensherred Dec 14, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
### Composer ###
# Composer
composer.phar
/vendor/

# PHPStorm
/.idea/
/Tests/cache/

# Unit Tests
/tests/cache/
.phpunit.result.cache

# Mac OS
.DS_Store
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ cache:
- $HOME/.composer/cache

php:
- 7.1
- 7.2
- 7.3
- hhvm
- 7.4

before_install:
- composer self-update
Expand All @@ -21,4 +20,6 @@ install:
script:
- vendor/bin/phpunit
- vendor/bin/phpcs src --standard=PSR2
- vendor/bin/phpcs Tests --standard=PSR2
- vendor/bin/phpcs tests/Unit --standard=PSR2


98 changes: 0 additions & 98 deletions Tests/ClientTest.php

This file was deleted.

117 changes: 65 additions & 52 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,71 @@
{
"name": "truckersmp/api-client",
"description": "TruckersMP API Library helps connecting to and using the TruckersMP API.",
"homepage": "https://truckersmp.com/",
"license": "MIT",
"authors": [
{
"name": "HumaneWolf",
"email": "humanewolf@truckersmp.com",
"homepage": "https://humanewolf.com/",
"role": "CM/Dev"
"name": "truckersmp/api-client",
"description": "TruckersMP API Library helps connecting to and using the TruckersMP API.",
"homepage": "https://truckersmp.com/",
"license": "MIT",
"authors": [
{
"name": "HumaneWolf",
"email": "humanewolf@truckersmp.com",
"homepage": "https://humanewolf.com/",
"role": "CM/Dev"
},
{
"name": "Thor Erik (Tuxy Fluffyclaws) Lie",
"email": "tuxy@truckersmp.com",
"homepage": "https://truckersmp.com/",
"role": "Dev"
},
{
"name": "CJMAXiK",
"email": "me@cjmaxik.ru",
"homepage": "https://cjmaxik.ru",
"role": "IGA/Dev"
},
{
"name": "Alex Blackham (B3none)",
"email": "ablackham2000@gmail.com",
"homepage": "https://github.com/b3none",
"role": "Dev"
},
{
"name": "Ben Sherred (Ratcho)",
"email": "me@ratcho.dev",
"homepage": "https://github.com/bensherred",
"role": "Contributor"
}
],
"require": {
"php": "^7.2",
"nesbot/carbon": "^2.16",
"ext-json": "*",
"phpfastcache/phpfastcache": "^7.1",
"php-http/message": "^1.8",
"guzzlehttp/psr7": "^1.6"
},
{
"name": "Thor Erik (Tuxy Fluffyclaws) Lie",
"email": "tuxy@truckersmp.com",
"homepage": "https://truckersmp.com/",
"role": "Dev"
"require-dev": {
"phpunit/phpunit": "^7.0",
"squizlabs/php_codesniffer": "^2.6",
"php-http/guzzle6-adapter": "^1.0"
},
{
"name": "CJMAXiK",
"email": "me@cjmaxik.ru",
"homepage": "https://cjmaxik.ru",
"role": "IGA/Dev"
}
],
"require": {
"php": "^7.1",
"nesbot/carbon": "^1.21",
"php-http/message": "^1.2",
"guzzlehttp/psr7": "^1.3",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^5.3",
"squizlabs/php_codesniffer": "^2.6",
"php-http/guzzle6-adapter": "^1.0"
},
"autoload": {
"psr-4": {
"TruckersMP\\": "src/"
"autoload": {
"psr-4": {
"TruckersMP\\APIClient\\": "src/"
},
"classmap": [
"src/"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"classmap": [
"src/"
]
},
"autoload-dev": {
"psr-4": {
"TruckersMP\\Tests\\API\\": "tests/"
"scripts": {
"test": [
"./vendor/bin/phpunit",
"./vendor/bin/phpcs src --standard=PSR2",
"./vendor/bin/phpcs tests/Unit --standard=PSR2"
]
}
},
"scripts": {
"test": [
"./vendor/bin/phpunit",
"./vendor/bin/phpcs src --standard=PSR2",
"./vendor/bin/phpcs Tests --standard=PSR2"
]
}
}
Loading