get method

Future<PlexApiResult> get(
  1. String endpoint, {
  2. Map<String, dynamic>? queryParams,
  3. Map<String, String>? headers,
  4. bool useFullUrl = false,
})

Makes a GET request to the specified endpoint

endpoint - The API endpoint (will be appended to the base URL) queryParams - Optional query parameters to append to the URL headers - Optional headers to include in the request useFullUrl - If true, endpoint is treated as a complete URL

Returns a Future<PlexApiResult> containing the response

Implementation

Future<PlexApiResult> get(
  String endpoint, {
  Map<String, dynamic>? queryParams,
  Map<String, String>? headers,
  bool useFullUrl = false,
}) async {
  final url = useFullUrl ? endpoint : endpoint;
  final response = await PlexNetworking.instance.get(
    url,
    query: queryParams,
    headers: headers,
  );

  return _handleResponse(response);
}