getEndpoint static method

String getEndpoint(
  1. Api api
)

Returns the endpoint based on the API type. @param api The API type Api. @return The endpoint URL as a string.

Implementation

static String getEndpoint(Api api) {
  switch (api) {
    case Api.text:
      return textEndpoint;
    case Api.image:
      return imageEndpoint;
  }
}