-
Couldn't load subscription status.
- Fork 15
Rework of the library #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
131 commits
Select commit
Hold shift + click to select a range
b83603d
Started initial refactor
B3none 2ff6d7d
Renamed models, removed iterable helper.
B3none e084a49
Refactored models and implemented GroupedModel class to extend from.
B3none 5e77325
Removed silly spacing
B3none 5e5753d
Added write listeners for grouped variables
B3none 866c135
Throw APIErrorException if there's a gametime endpoint error
B3none f051502
Fixed wording in readme
B3none 928b862
Removed redundant PHP versions from Travis setup
B3none 5fc3668
Altered .gitignore
B3none 7f53799
Fixed PHPCBF errors.
B3none eeec4cd
More slight refinements, fixed unit test error
B3none f9d4199
Updated unit tests
B3none ec26cc5
Switched to Client
B3none 10fdccd
Switched GroupedModel to abstract class
B3none 0e10d77
Call correct class in unit tests
B3none e891fb9
Removed more spacing
B3none 9e14c06
Switched example user to caf!!! to fix the erroring unit tests.
B3none f9c6183
Switched to PHPUnit 7 and updated Unit Tests to test the bans whether…
B3none d60deba
Added deprecated tag to the version function
B3none d13fc7a
Added Rules endpoint.
B3none 48e88e1
Fixed rules.
B3none 195f0d5
Altered client, fixed rules.
B3none baeb46d
Updated unit tests to include rules model and added some more assertions
B3none 059bb93
Switched to using getters and setters to remove unstable dependency.
B3none f33eb63
We now call the endpoints based on the function name
B3none 48596e0
Removed unstable dependency
B3none ba042f5
Composer update
B3none 0d4e08a
Update readme to describe new style.
B3none 805f7b9
Readme wording updates
B3none 864f382
Updated unit tests to use new format
B3none b97a76e
Added the ability to pass an index to get functions for groupedModels
B3none 238f852
Put getGroupedValue logic all in the same place
B3none 2808df5
Separated the tests into individual classes
bensherred 582f2eb
Removed hhvm from travis config
bensherred 2caa0d3
Set the scheme to always be HTTPS
bensherred 2602dd7
Added author info and the ability to tell if the player is banned
bensherred 279c0bc
Added the ability to get the players VTC info
bensherred 86f0dc5
Added extra properties to the ServerModel
bensherred 0bcb583
Renamed isBannedUntil to getBannedUntil
bensherred 3d1c31b
Temporarily removed the old models for refactor
bensherred 549c7f8
Added the new Checksum model and refactored the version model
bensherred aff8548
Refactored the Game and Rule models
bensherred 7d31f6d
Updated the server and player model
bensherred 82b61ff
Update .travis.yml
bensherred 20dc083
Undeprecated the version method
bensherred 3f0e330
Added the ability to get a companies information
bensherred 2b3bf75
Fixed offsetGet in the Collection class
bensherred fb8dc9d
We now cache the player information
bensherred d4cc609
Added caching for all endpoints during testing
bensherred 11b32ec
Added the ability to get the recent and featured companies
bensherred adf691b
Created a request class for each method
bensherred 3025967
Fixed an issue with styling in CompanyRequest
bensherred 2a32b3f
Added comments to all the constants
bensherred 407164d
Added a server collection
bensherred f355f03
Renamed the all() method to get()
bensherred 5a6a09f
We now only return the ServerCollection for the ServerRequest
bensherred 961eb1e
Added the ability to get the companies news posts
bensherred 090eb9b
Renamed Post model to CompanyPost
bensherred 101ca0e
Renamed news() to posts() in company request
bensherred 087baca
Added the ability to get a companies post
bensherred a75b8d9
Reimplemented the ability to get recent and featured companies
bensherred a56d201
Added the ability to get the company roles
bensherred 41da132
We now handle errors if an invalid request is made
bensherred 3731994
Fixed issue with getting featured companies
bensherred fa1bc5c
Renamed the call method to send on the request class
bensherred 25d48b1
Fixed an issue with the VersionRequest
bensherred aedaf79
Changed the way we get the recent and featured companies
bensherred b9fa711
Fixed a type in the CompanyRequest class
bensherred 48da0ac
Update composer packages to latest version
bensherred 4c772ca
Renamed the Companies model and refactored some requests
bensherred 9449f0e
Updated PHPDoc comments and removed support for PHP 7.1
bensherred 48703e5
Removed PHP 7.4 from Travis CI config
bensherred 43e32e6
Added the ability to get a company member
bensherred 41ce1ee
Added the ability to get all the members for a company
bensherred 803fcf7
Merge branch 'pr/1' into develop
bensherred 2afb926
Removed types folder after pull request
bensherred 8fa5316
Apply fixes from StyleCI
bensherred 9a9b4cf
Merge pull request #2 from bensherred/analysis-jLxWyZ
bensherred 4e983df
Removed old API client and request file
bensherred a0c0bef
Updated required PHP version
bensherred 0d3967f
Simplified the README file
bensherred bb7da6e
Added requirements and how to install to README
bensherred a4f84a8
Added composer to the list of requirements
bensherred b599b8f
Added PHP 7.4 to travis config
bensherred 6d010c6
Removed PHP 7.4 from TravisCI config
bensherred 5212a16
Removed the examples from the codebase
bensherred ccbb674
We now return the bans as a collection
bensherred 1567caf
Added the ability to get the players VTC information
bensherred cd135c3
Updated comments in PlayerTest
bensherred 5da8ff9
Changed the way we get the guzzle config
bensherred 0446702
Apply fixes from StyleCI
bensherred 564075c
Merge pull request #3 from bensherred/analysis-nN4lMG
bensherred 748c275
Added the ability to get the players bans via the player request
bensherred 6917cc5
Fixed styling on PHPDoc comments
bensherred 2b7bbea
Added the ability to get the players company via the model
bensherred 012288e
Added the ability to get the players company member model via the pla…
bensherred 8c3f881
We can now get the players company role via the player model
bensherred c14dc04
Optimized how we get the players company details
bensherred 0ab8b08
Apply fixes from StyleCI
bensherred b3e862e
Merge pull request #4 from bensherred/analysis-ZljM5g
bensherred b92240b
Corrected a comment spelling mistake in the PostRequest class
bensherred b0aabbd
Corrected a comment spelling mistake in the MemberRequest class
bensherred d87a143
Updated collection construct comments to be accurate
bensherred 8ed4059
Updated CompanyIndex construct description
bensherred 7bd2c7d
We now use the getter to determine if the user is in a company
bensherred b53847e
Update description of owner property in CompanyRole model
bensherred efc3f08
We now only fetch the player bans when the getter is called
bensherred 63ae7ce
Merge branch 'develop' of https://github.com/bensherred/API-Client in…
bensherred e213826
Removed used property from CompanyRequest class
bensherred fa7e75d
Aded .phpunit.result.cache to gitignore file
bensherred ce3aff2
Fixed styling in Player model
bensherred 9b099cb
Updated composer.lock file
bensherred b7740c8
Renamed NewsRequest to PostsRequest
bensherred 53459ec
Fixed issue with styling
bensherred 652ccf4
Renamed some classes and updated some as per pr #12 changes
bensherred 9f7c8c6
Fixed styling issues
bensherred 930644f
Fixed further styling issues
bensherred 5a0f71c
Apply suggestions from code review
bensherred 423fc39
Updated documentation for PostIndexRequest
bensherred 796b979
Removed assert for social info being null
bensherred 17b0fb6
Merge branch 'develop' of https://github.com/bensherred/API-Client in…
bensherred 573bb7c
Added the ability to tell if a companies recruitment is open or not
bensherred 2c74c48
Updated the way we check if a company is open
bensherred fadc03c
Removed duplicate assertion when checking company social info
bensherred 2ee6e9c
Update all namespaces to be TruckersMP\APIClient
bensherred 3a2de48
Apply fixes from StyleCI
bensherred 5a886b0
Merge pull request #5 from bensherred/analysis-bQN6r5
bensherred 56a269a
Updated the type of sync delay
bensherred 783fa94
Updated getter name on Version model
bensherred a28981c
Fixed an issue with an undefined property
bensherred 1ad2d81
Added PHP 7.4 to Travis CI config
bensherred File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| ] | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.