Skip to content

Commit

Permalink
feat(router): re-implementation of routing via go_router
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
JagandeepBrar committed Aug 30, 2022
1 parent 9960124 commit 1d4207a
Show file tree
Hide file tree
Showing 815 changed files with 3,788 additions and 4,647 deletions.
2 changes: 2 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"LunaConfig",
"lunasea",
"LunaTable",
"microtask",
"msix",
"Newznab",
"NZBGet",
Expand All @@ -61,6 +62,7 @@
"Sonarr",
"stickied",
"subheaders",
"subroutes",
"Tautulli",
"TestFlight",
"Trakt",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:lunasea/api/overseerr/models.dart';
import 'package:lunasea/core.dart';
import 'package:lunasea/modules/overseerr.dart';

part 'movie.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:lunasea/core.dart';
import 'package:lunasea/modules/overseerr.dart';
import 'package:lunasea/api/overseerr/models.dart';

part 'series.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:lunasea/api/overseerr/models.dart';
import 'package:lunasea/api/overseerr/types.dart';
import 'package:lunasea/core.dart';
import 'package:lunasea/modules/overseerr.dart';
import 'package:lunasea/utils/parser.dart';

part 'issue.g.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:lunasea/core.dart';
import 'package:lunasea/modules/overseerr.dart';
import 'package:lunasea/api/overseerr/models.dart';
import 'package:lunasea/utils/parser.dart';

part 'issue_comment.g.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:lunasea/core.dart';
import 'package:lunasea/modules/overseerr.dart';
import 'package:lunasea/api/overseerr/models.dart';

part 'issue_page.g.dart';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import 'package:dio/dio.dart';
import 'package:retrofit/retrofit.dart';
import 'package:lunasea/modules/overseerr/api/models.dart';
import 'package:lunasea/api/overseerr/models.dart';

part 'overseerr.g.dart';

@RestApi()
abstract class Overseerr {
factory Overseerr({
abstract class OverseerrAPI {
factory OverseerrAPI({
required String host,
required String apiKey,
Map<String, dynamic> headers = const {},
Expand All @@ -22,7 +22,7 @@ abstract class Overseerr {
maxRedirects: 5,
),
);
return _Overseerr(_dio, baseUrl: _baseUrl);
return _OverseerrAPI(_dio, baseUrl: _baseUrl);
}

@GET('issue')
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
library radarr_commands;

import 'package:dio/dio.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/modules/radarr/api/types.dart';
import 'package:lunasea/api/radarr/models.dart';
import 'package:lunasea/api/radarr/types.dart';

// Commands
part 'src/commands/command.dart';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ library radarr;

// Imports
import 'package:dio/dio.dart';
import 'package:lunasea/modules/radarr/api/commands.dart';
import 'package:lunasea/api/radarr/commands.dart';

/// The core class to handle all connections to Radarr.
/// Gives you easy access to all implemented command handlers, initialized and ready to call.
///
/// [Radarr] handles the creation of the initial [Dio] HTTP client & command handlers.
/// [RadarrAPI] handles the creation of the initial [Dio] HTTP client & command handlers.
/// You can optionally use the factory `.from()` to define your own [Dio] HTTP client.
class Radarr {
class RadarrAPI {
/// Internal constructor
Radarr._internal({
RadarrAPI._internal({
required this.httpClient,
required this.command,
required this.credits,
Expand Down Expand Up @@ -51,7 +51,7 @@ class Radarr {
/// - `headers`: Map that contains additional headers that should be attached to all requests
/// - `followRedirects`: If the HTTP client should follow URL redirects
/// - `maxRedirects`: The maximum amount of redirects the client should follow (does nothing if `followRedirects` is false)
factory Radarr({
factory RadarrAPI({
required String host,
required String apiKey,
Map<String, dynamic>? headers,
Expand All @@ -70,7 +70,7 @@ class Radarr {
maxRedirects: maxRedirects,
),
);
return Radarr._internal(
return RadarrAPI._internal(
httpClient: _dio,
command: RadarrCommandHandlerCommand(_dio),
credits: RadarrCommandHandlerCredits(_dio),
Expand Down Expand Up @@ -112,10 +112,10 @@ class Radarr {
/// ),
/// );
/// ```
factory Radarr.from({
factory RadarrAPI.from({
required Dio client,
}) {
return Radarr._internal(
return RadarrAPI._internal(
httpClient: client,
command: RadarrCommandHandlerCommand(client),
credits: RadarrCommandHandlerCredits(client),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/utilities.dart';
import 'package:lunasea/modules/radarr/api/src/models/command/command_body.dart';
import 'package:lunasea/api/radarr/utilities.dart';
import 'package:lunasea/api/radarr/src/models/command/command_body.dart';

part 'command.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/src/models/custom_format/custom_format_specifications.dart';
import 'package:lunasea/api/radarr/src/models/custom_format/custom_format_specifications.dart';

part 'custom_format.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/types.dart';
import 'package:lunasea/modules/radarr/api/utilities.dart';
import 'package:lunasea/api/radarr/types.dart';
import 'package:lunasea/api/radarr/utilities.dart';

part 'directory.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/types.dart';
import 'package:lunasea/modules/radarr/api/utilities.dart';
import 'package:lunasea/api/radarr/types.dart';
import 'package:lunasea/api/radarr/utilities.dart';

part 'file.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'filesystem.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/types.dart';
import 'package:lunasea/modules/radarr/api/utilities.dart';
import 'package:lunasea/api/radarr/types.dart';
import 'package:lunasea/api/radarr/utilities.dart';

part 'health_check.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/types.dart';
import 'package:lunasea/modules/radarr/api/utilities.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/types.dart';
import 'package:lunasea/api/radarr/utilities.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'history.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/types.dart';
import 'package:lunasea/modules/radarr/api/utilities.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/types.dart';
import 'package:lunasea/api/radarr/utilities.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'history_record.g.dart';

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/types.dart';
import 'package:lunasea/modules/radarr/api/utilities.dart';
import 'package:lunasea/api/radarr/types.dart';
import 'package:lunasea/api/radarr/utilities.dart';

part 'import_list.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'manual_import.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'manual_import_file.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'manual_import_update.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'manual_import_update_data.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'alternate_titles.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'collection.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/types.dart';
import 'package:lunasea/modules/radarr/api/utilities.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/types.dart';
import 'package:lunasea/api/radarr/utilities.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'credits.g.dart';

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/utilities.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/utilities.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'movie_file.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'movie_file_quality.g.dart';

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'item.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'quality_definition.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/api/radarr/models.dart';

part 'quality_profile.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/utilities.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/modules/radarr/api/types.dart';
import 'package:lunasea/api/radarr/utilities.dart';
import 'package:lunasea/api/radarr/models.dart';
import 'package:lunasea/api/radarr/types.dart';

part 'queue.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/utilities.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/modules/radarr/api/types.dart';
import 'package:lunasea/api/radarr/utilities.dart';
import 'package:lunasea/api/radarr/models.dart';
import 'package:lunasea/api/radarr/types.dart';

part 'queue_record.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/utilities.dart';
import 'package:lunasea/modules/radarr/api/models.dart';
import 'package:lunasea/modules/radarr/api/types.dart';
import 'package:lunasea/api/radarr/utilities.dart';
import 'package:lunasea/api/radarr/models.dart';
import 'package:lunasea/api/radarr/types.dart';

part 'release.g.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
import 'package:lunasea/modules/radarr/api/src/models/root_folder/unmapped_folder.dart';
import 'package:lunasea/api/radarr/src/models/root_folder/unmapped_folder.dart';

part 'root_folder.g.dart';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// Library containing all utility functions for Radarr data.
library radarr_utilities;

import 'package:lunasea/modules/radarr/api/types.dart';
import 'package:lunasea/api/radarr/types.dart';

/// [RadarrUtilities] gives access to static, functional operations. These are mainly used for the (de)serialization of received JSON data.
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/// Library containing all logic and accessors to make calls to Sonarr's API.
library sonarr_commands;

import 'package:lunasea/modules/sonarr/api/types.dart';
import 'package:lunasea/api/sonarr/models.dart';
import 'package:lunasea/api/sonarr/types.dart';
import 'package:dio/dio.dart';
import 'package:intl/intl.dart';
import 'package:lunasea/modules/sonarr/api/models.dart';

// Calendar
part 'src/controllers/calendar.dart';
Expand Down
File renamed without changes.
Loading

0 comments on commit 1d4207a

Please sign in to comment.