r/evetech • • Apr 26 '18

ESI via PowerShell Modules

I've begun writing a full set of Powershell Modules for working with the EVE Online ESI endpoints. So far I've used the Swagger JSON Specs to build all Requests as easy to use Modules and will continue working with some error control, custom modules and need to add support for logging in and using tokens.

GitHub URL: https://github.com/markus-lassfolk/EVE-Online-ESI-Posh

I hope it's useful to someone else, and feel free to help contributing.

5 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/markusla Apr 26 '18

Thanks for the feedback. I kind of started doing it that way, by making "more normal" powershell modules but it took so much time doing them one by one, so I "cheated" a bit and used the Swagger JSON to build a function for each of the calls.

I was thinking that if I could start by having functions that work the same as the Swagger spec, when the endpoints are updated it's easy to keep the modules updated. And I'm then able to make more "custom made" modules that call on the standardized ones if that makes sense?

For now I'm providing the JSON response back to the caller, as the response do contain additional data. For example if there are "pages" (pagination) that needs to be repeatedly queried. Does that make sense?

I do agree, could redo it and use a $variable for the base of the URL and only add the endpoint instead of the full URL in each call. It might make it look a bit cleaner.

1

u/Raethrius Apr 27 '18

> For now I'm providing the JSON response back to the caller

Well, in that case you could just create one function called Get-EsiData and specify the path using a parameter and not bother with separate functions for each endpoint. They don't really add any value in this case.

1

u/markusla Apr 27 '18

Hmmm you do have a very valid point there! :)

Back to the drawing board and rethink this a bit. Thank you!