legendary icon indicating copy to clipboard operation
legendary copied to clipboard

Better interface for other devs

Open Dummerle opened this issue 4 years ago • 14 comments

It is very hard to use legendary in my project. A better interface for other developers would be a very nice feature

Dummerle avatar Oct 27 '20 10:10 Dummerle

It would be helpful if you could provide specific examples of what could be better. Just saying "make it better" is absolutely useless feedback or criticism.

derrod avatar Oct 27 '20 11:10 derrod

Some methods in cli.py take just the parameter "args". So it is hard to see, which arguments I need in my function. The list functions in core are good, but the launch and auth functions are not so easy to use. I tried to build an easier interface but some functions are hard to implement, so I have not finished. I hope you understand my problem

Dummerle avatar Oct 27 '20 12:10 Dummerle

Nothing in the CLI is supposed to be used by external users. It's just the command line interface for the main legendary project and can change at any time (and will soon enough). In a future version I might look into preventing others from importing the cli module into their code. The core itself is supposed to not change drastically, though I will probably change how the downloading process works quite significantly in a future update.

I know that auth and launch aren't exactly the cleanest, but you'll have to be more specific what about them is hard to use.

derrod avatar Oct 28 '20 09:10 derrod

IMO the interface to devs is amazing! I made a gui frontend for this with a widgeting system, just from shellscript oneliners and the --json flag. image (i wanted to share this.. and this is the perfect issue to do so)

legendofmiracles avatar Nov 01 '20 07:11 legendofmiracles

Why not creating an API? Then making a GUI would be easier

salva09 avatar Nov 09 '20 00:11 salva09

There is an API.

derrod avatar Nov 09 '20 03:11 derrod

Yeah, I just've seen it, sorry. Can it be used only in a python script or can be used by other languages? I'm also interested in the GUI because I don't want to type "legendary launch a bunch of numers" every time I want to play something xd

salva09 avatar Nov 09 '20 04:11 salva09

Scripts yes, if legendary is installed as a python package you can just from legendary.core import LegendaryCore for example and use its features. Other languages? No, you'd be better of re-implementing things anyway.

derrod avatar Nov 09 '20 11:11 derrod

@salva09 can you specify which language you were planning on using? E.g. for Java and JavaScript you should be able to use GraalVM for polyglot projects.

Otherwise from python I agree that the import solution from @derrod and the json solution @alx365 proposed should be good enough and is the most we can expect from this project.

StefanLobbenmeier avatar Dec 17 '20 16:12 StefanLobbenmeier

@salva09 can you specify which language you were planning on using? E.g. for Java and JavaScript you should be able to use GraalVM for polyglot projects.

Otherwise from python I agree that the import solution from @derrod and the json solution @alx365 proposed should be good enough and is the most we can expect from this project.

I wanted to use Rust, but it really is better to use python

salva09 avatar Dec 17 '20 20:12 salva09

When a GUI is implemented, may I suggest it be optional and that you could still launch games with CLI

ghost avatar Dec 25 '20 17:12 ghost

Sorry to barge in, just discovered this project.

Is there an "official" or "community chosen" UI project/feature going on for this project? While the CLI is perfect, I can see it being a nuisance for non-tech people.

I've good experience with angular/vue and electron but if there is something already going I'd like to take a peek of the work done until now and see if I can help.

theCrius avatar Dec 29 '20 10:12 theCrius

Hello, no UI project for this still? Could not agree more with @theCrius!

Sorry to barge in, just discovered this project.

Is there an "official" or "community chosen" UI project/feature going on for this project? While the CLI is perfect, I can see it being a nuisance for non-tech people.

I've good experience with angular/vue and electron but if there is something already going I'd like to take a peek of the work done until now and see if I can help.

djey47 avatar Apr 20 '21 09:04 djey47

I guess it would be nice if this project would officially promote https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher

StefanLobbenmeier avatar Apr 20 '21 10:04 StefanLobbenmeier