Skip to content

Comments

CLI integration to JVA#1

Open
SarrayMedMehdi wants to merge 1 commit intoSocketC0nnection:masterfrom
SarrayMedMehdi:commands-integration
Open

CLI integration to JVA#1
SarrayMedMehdi wants to merge 1 commit intoSocketC0nnection:masterfrom
SarrayMedMehdi:commands-integration

Conversation

@SarrayMedMehdi
Copy link

CLI integration to JVA and code improvement

Currently the JVA has no CLI i've added it using PicoCLI also this commit contains some code improvement which are the following:

  • Upgraded JVA to JAVA 11
  • Added a new dependency HTTP client for consuming the API : OkHttp which contains async functionnality and would be a good start to consider improve the API consumption.
  • Added google guava dependency usefull for improving code quality also it includes good functionnality e.g caching
  • Added a feature the CLI using PicoCLI which gives the capability for the user to launch JVA through command line.

The current implementation works with arguments as follows :

Once upon generating the jar with dependency with specifying the Main class, we launch JVA as follows :

java -jar jva.jar -h
this will print the help command the result :

Usage: Valorant CLI [-hV] [COMMAND]
Welcome to Valorant CLI use the following commands.
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
PlayerRank Get player informations.
PlayerMatchHistory Get a players match history.
MatchById Get a match using the match id.
LeaderBoard Get the leaderboard for a region.
RegionVersion Get player informations.
LatestValorantArticle Get the last articles from the official VALORANT page.
RegionUpdates Get current maintenances and incidents for a specific
region.
ValorantStoreItems Get all store items.
ValorantStoreBundle Get all available store bundles.

Upon choosing a command the required arguments will be shown if not specifed as argument e.g:

Missing required options: '--username=Username', '--tagname=Tagname'
Usage: Valorant CLI playerRank [-h] [-ak=] -t=Tagname -u=Username
Get player informations.
-ak, --apikey=
The api key
-h, --help display a help message
-t, --tagname=Tagname The player tag name
-u, --username=Username The player username

All the arguments are according to the README.md file.

PicoCLI integration
code improvement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant