This is a simple implementation of an HTTP client that we can pass as a dependency to the API implementation
All of the calls here rely on callbacks (C++ Lambdas) since there are no more than a couple of levels of chaining them one to another it keeps the implementatin simpler rather than relying on other syncing mechanism like delegates.
If you are not familiar with C++ Lambdas please read this document
For more information about the SkyboxAI API please go to their online docs
Simple and very specific implementation of an API client for SkyboxAI that implements only the required endpoints for this plugin
It has 2 providers that you can access which are Skybox
and Imagine
You can also set the HTTP client that you want to use, by default it uses the USKyboxAiHttpClient
which is a simple implementation of an HTTP client that uses the UE HTTP module
You can set the client to any class that inherits from USkyboxAiHttpClientBase
This is a very modular API client that you can add or modify providers as needed without needing to add functionality
The API implementation takes the composition over inheritance approach and a lite version of dependency injection to create the functionality to interact with SkyboxAI API
This is achieved by implementing providers, providers are just resources from the API, e.g: skybox and imagine
This provider implements logic for the following endpoints:
Method | Endpoint | Description |
---|---|---|
POST | /skybox | Send a request to generate a skybox |
GET | /skybox/styles | Get all supported styles for skybox generation |
GET | /skybox/export | Get all possible export formats |
GET | /skybox/export/{id} | Get the status of the export with a specific ID |
POST | /skybox/export | Request an export of the skybox into a file |
This provider implements logic for the following endpoints:
Method | Endpoint | Description |
---|---|---|
GET | /imagine/requests/{id} | Used to implement the functionality of import |
GET | /imagine/requests/obfuscated-id/{id} | Used to poll the generation process of our skybox so that once it's generated we can export it and save it to our project |