diff --git a/.editorconfig b/.editorconfig index f274d881..d1c0c72f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,270 +6,10 @@ charset = utf-8 indent_style = tab insert_final_newline = true -# Csproj files -[*.csproj] +[*.{csproj,yml}] indent_style = space indent_size = 2 -# Code files for C# [*.cs] -indent_size = 4 -trim_trailing_whitespace = true - -# Organize usings -dotnet_sort_system_directives_first = false - -# this. preferences -dotnet_style_qualification_for_field = false : suggestion -dotnet_style_qualification_for_event = false : suggestion -dotnet_style_qualification_for_method = false : suggestion -dotnet_style_qualification_for_property = false : suggestion - -# Language keywords vs BCL types preferences -dotnet_style_predefined_type_for_locals_parameters_members = true : silent -dotnet_style_predefined_type_for_member_access = true : silent - -# Parentheses preferences -dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary : suggestion -dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary : suggestion -dotnet_style_parentheses_in_other_operators = never_if_unnecessary : suggestion -dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary : suggestion - -# Modifier preferences -dotnet_style_readonly_field = true : warning -dotnet_style_require_accessibility_modifiers = for_non_interface_members : suggestion - -# Expression-level preferences -dotnet_style_coalesce_expression = true : suggestion -dotnet_style_collection_initializer = true : warning -dotnet_style_explicit_tuple_names = true : warning -dotnet_style_null_propagation = true : suggestion -dotnet_style_object_initializer = true : warning -dotnet_style_prefer_auto_properties = true : silent -dotnet_style_prefer_conditional_expression_over_assignment = true : silent -dotnet_style_prefer_conditional_expression_over_return = true : silent -dotnet_style_prefer_inferred_anonymous_type_member_names = true : suggestion -dotnet_style_prefer_inferred_tuple_names = true : suggestion -dotnet_style_prefer_is_null_check_over_reference_equality_method = true : silent - -# Style definitions -dotnet_naming_style.instance_field_style.capitalization = camel_case -dotnet_naming_style.pascal_case_style.capitalization = pascal_case - -# Use PascalCase with I prefix for interfaces -dotnet_naming_symbols.interface_type_symbol.applicable_kinds = interface -dotnet_naming_style.interface_type_style.capitalization = pascal_case -dotnet_naming_style.interface_type_style.required_prefix = I -dotnet_naming_rule.interface_types_must_be_prefixed_with_I.severity = warning -dotnet_naming_rule.interface_types_must_be_prefixed_with_I.symbols = interface_type_symbol -dotnet_naming_rule.interface_types_must_be_prefixed_with_I.style = interface_type_style - -# Use camelCase for parameters -dotnet_naming_symbols.parameter_symbol.applicable_kinds = parameter -dotnet_naming_style.parameter_style.capitalization = camel_case -dotnet_naming_rule.parameters_are_camel_case.severity = warning -dotnet_naming_rule.parameters_are_camel_case.symbols = parameter_symbol -dotnet_naming_rule.parameters_are_camel_case.style = parameter_style - -# Use PascalCase for methods -dotnet_naming_symbols.method_symbol.applicable_kinds = method -dotnet_naming_style.method_style.capitalization = pascal_case -dotnet_naming_rule.methods_are_pascal_case.severity = warning -dotnet_naming_rule.methods_are_pascal_case.symbols = method_symbol -dotnet_naming_rule.methods_are_pascal_case.style = method_style - -# Use PascalCase for constant fields with an accessibility of internal or higher -dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning -dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style -dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields -dotnet_naming_symbols.constant_fields.applicable_accessibilities = public,protected_internal,internal -dotnet_naming_symbols.constant_fields.applicable_kinds = field -dotnet_naming_symbols.constant_fields.required_modifiers = const - -# Use PascalCase for static fields with an accessibility of internal or higher -dotnet_naming_rule.static_fields_should_be_pascal_case.severity = warning -dotnet_naming_rule.static_fields_should_be_pascal_case.style = pascal_case_style -dotnet_naming_rule.static_fields_should_be_pascal_case.symbols = static_fields -dotnet_naming_symbols.static_fields.applicable_accessibilities = public,protected_internal,internal -dotnet_naming_symbols.static_fields.applicable_kinds = field -dotnet_naming_symbols.static_fields.required_modifiers = static - -# Use camelCase with _ prefix for instance fields -dotnet_naming_rule.instance_fields_should_be_camel_case.severity = warning -dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style -dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields -dotnet_naming_symbols.instance_fields.applicable_kinds = field -dotnet_naming_rule.public_members_must_be_capitalized.severity = warning -dotnet_naming_rule.public_members_must_be_capitalized.style = first_word_upper_case_style -dotnet_naming_style.first_word_upper_case_style.capitalization = first_word_upper -dotnet_naming_style.instance_field_style.required_prefix = _ -dotnet_naming_symbols.public_symbols.applicable_accessibilities = public -dotnet_naming_symbols.public_symbols.applicable_kinds = property,method,field,event,delegate -dotnet_naming_symbols.public_symbols.required_modifiers = readonly - -# Namespace preferences -csharp_style_namespace_declarations = file_scoped : warning - -# var preferences -csharp_style_var_elsewhere = false : warning -csharp_style_var_for_built_in_types = false : warning -csharp_style_var_when_type_is_apparent = false : warning - -# Expression-bodied members -csharp_style_expression_bodied_accessors = true : silent -csharp_style_expression_bodied_constructors = false : silent -csharp_style_expression_bodied_indexers = true : silent -csharp_style_expression_bodied_methods = false : silent -csharp_style_expression_bodied_operators = false : silent -csharp_style_expression_bodied_properties = true : silent - -# Pattern matching preferences -csharp_style_pattern_matching_over_as_with_null_check = true : suggestion -csharp_style_pattern_matching_over_is_with_cast_check = true : suggestion - -# Null-checking preferences -csharp_style_conditional_delegate_call = true : suggestion -csharp_style_throw_expression = true : suggestion - -# Modifier preferences -csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async : suggestion - -# Expression-level preferences -csharp_prefer_braces = true : silent -csharp_prefer_simple_default_expression = true : suggestion -csharp_style_deconstructed_variable_declaration = true : warning -csharp_style_inlined_variable_declaration = true : suggestion -csharp_style_pattern_local_over_anonymous_function = true : suggestion - -# New line preferences -csharp_new_line_before_catch = true -csharp_new_line_before_else = true -csharp_new_line_before_finally = true -csharp_new_line_before_members_in_anonymous_types = true -csharp_new_line_before_members_in_object_initializers = true -csharp_new_line_before_open_brace = all -csharp_new_line_between_query_expression_clauses = true - -# Indentation preferences -csharp_indent_case_contents = true -csharp_indent_labels = flush_left -csharp_indent_switch_labels = true - -# Space preferences -csharp_space_after_cast = false -csharp_space_after_colon_in_inheritance_clause = true -csharp_space_after_keywords_in_control_flow_statements = true -csharp_space_around_binary_operators = before_and_after -csharp_space_before_colon_in_inheritance_clause = true -csharp_space_between_method_call_empty_parameter_list_parentheses = false -csharp_space_between_method_call_name_and_opening_parenthesis = false -csharp_space_between_method_call_parameter_list_parentheses = false -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false -csharp_space_between_method_declaration_parameter_list_parentheses = false -csharp_space_between_parentheses = false - -# Wrapping preferences -csharp_preserve_single_line_blocks = true -csharp_preserve_single_line_statements = true - -# CSC warning suppressions when XML documentation is enabled - -# CS1591: Missing XML comment for publicly visible type or member. - -dotnet_diagnostic.CS1591.severity = none - -# StyleCopAnalyzers suppressions - -# SA0001: XML comment analysis is disabled due to project configuration. -# SA1000: The keyword 'new' should be followed by a space. (C# 9) -# SA1003: Operator should be preceded by whitespace. (C# 9) -# SA1008: Opening parenthesis should be preceded by a space. (C# 9) -# SA1027: Replace tabs with spaces. -# SA1101: Prefix local calls with this. -# SA1124: Do not use regions. -# SA1200: Using directive should appear within a namespace declaration. -# SA1202: Elements should be ordered by access. -# SA1204: Static members should appear before non-static members. -# SA1208: Using directive for 'System' should appear first. -# SA1214: Readonly fields should appear before non-readonly fields. -# SA1303: Const field names should begin with upper-case letter. -# SA1309: Field should not begin with an underscore. -# SA1311: Static readonly fields should begin with upper-case letter. -# SA1407: Arithmetic expressions should declare precedence. -# SA1408: Conditional expressions should declare precedence. -# SA1503: Braces should not be omitted. -# SA1516: Elements should be separated by blank line. -# SA1600: Elements should be documented. -# SA1601: Partial elements should be documented. -# SA1602: Enumeration items should be documented. -# SA1611: Element parameters value should be documented. -# SA1615: Element return value should be documented. -# SA1623: The property's documentation summary text should begin with: 'Gets'. -# SA1633: The file header is missing or not located at the top of the file. -# SA1642: Constructor summary documentation should begin with standard text. - -dotnet_diagnostic.SA0001.severity = none -dotnet_diagnostic.SA1000.severity = none -dotnet_diagnostic.SA1003.severity = none -dotnet_diagnostic.SA1008.severity = none -dotnet_diagnostic.SA1027.severity = none -dotnet_diagnostic.SA1101.severity = none -dotnet_diagnostic.SA1124.severity = none -dotnet_diagnostic.SA1200.severity = none -dotnet_diagnostic.SA1202.severity = none -dotnet_diagnostic.SA1204.severity = none -dotnet_diagnostic.SA1208.severity = none -dotnet_diagnostic.SA1214.severity = none -dotnet_diagnostic.SA1303.severity = none -dotnet_diagnostic.SA1309.severity = none -dotnet_diagnostic.SA1311.severity = none -dotnet_diagnostic.SA1407.severity = none -dotnet_diagnostic.SA1408.severity = none -dotnet_diagnostic.SA1503.severity = none -dotnet_diagnostic.SA1516.severity = none -dotnet_diagnostic.SA1600.severity = none -dotnet_diagnostic.SA1601.severity = none -dotnet_diagnostic.SA1602.severity = none -dotnet_diagnostic.SA1611.severity = none -dotnet_diagnostic.SA1615.severity = none -dotnet_diagnostic.SA1623.severity = none -dotnet_diagnostic.SA1633.severity = none -dotnet_diagnostic.SA1642.severity = none - -# StyleCopAnalyzers suppressions when using NRT - -# SA1009: Closing parenthesis should be followed by a space. -# SA1011: Closing square bracket should be followed by a space. - -dotnet_diagnostic.SA1009.severity = none -dotnet_diagnostic.SA1011.severity = none - -# SonarAnalyzers suppressions - -# S101: Rename class to match pascal case naming rules. -# S112: 'System.Exception' should not be thrown by user code. -# S1121: Extract the assignment from this expression. (C# 9) -# S1135: Complete the task associated to this 'TODO' comment. -# S1144: Unused private types or members should be removed. (C# 9) -# S2368: Make this method private or simplify its parameters to not use multidimensional arrays. -# S3358: Extract this nested ternary operation into an independent statement. -# S3453: This class can't be instantiated; make its constructor 'public'. (C# 9) -# S3903: Move class into a named namespace. (C# 10) - -dotnet_diagnostic.S101.severity = none -dotnet_diagnostic.S112.severity = none -dotnet_diagnostic.S1121.severity = none -dotnet_diagnostic.S1135.severity = suggestion -dotnet_diagnostic.S1144.severity = none -dotnet_diagnostic.S2368.severity = none -dotnet_diagnostic.S3358.severity = none -dotnet_diagnostic.S3453.severity = none -dotnet_diagnostic.S3903.severity = none - -# RoslynatorAnalyzers suppressions - -# RCS1090: Call 'ConfigureAwait(false)'. -# RCS1123: Add parentheses when necessary. - -dotnet_diagnostic.RCS1090.severity = none -dotnet_diagnostic.RCS1123.severity = none +indent_size = 4 +trim_trailing_whitespace = true diff --git a/.globalconfig b/.globalconfig new file mode 100644 index 00000000..0013f73a --- /dev/null +++ b/.globalconfig @@ -0,0 +1,320 @@ +is_global = true + +# Organize usings +dotnet_sort_system_directives_first = false + +# this. preferences +dotnet_style_qualification_for_field = false : suggestion +dotnet_style_qualification_for_event = false : suggestion +dotnet_style_qualification_for_method = false : suggestion +dotnet_style_qualification_for_property = false : suggestion + +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true : silent +dotnet_style_predefined_type_for_member_access = true : silent + +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary : suggestion +dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary : suggestion +dotnet_style_parentheses_in_other_operators = never_if_unnecessary : suggestion +dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary : suggestion + +# Modifier preferences +dotnet_style_readonly_field = true : warning +dotnet_style_require_accessibility_modifiers = for_non_interface_members : suggestion + +# Expression-level preferences +dotnet_style_coalesce_expression = true : suggestion +dotnet_style_collection_initializer = true : warning +dotnet_style_explicit_tuple_names = true : warning +dotnet_style_null_propagation = true : suggestion +dotnet_style_object_initializer = true : warning +dotnet_style_prefer_auto_properties = true : silent +dotnet_style_prefer_conditional_expression_over_assignment = true : silent +dotnet_style_prefer_conditional_expression_over_return = true : silent +dotnet_style_prefer_inferred_anonymous_type_member_names = true : suggestion +dotnet_style_prefer_inferred_tuple_names = true : suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true : silent + +# Style definitions +dotnet_naming_style.instance_field_style.capitalization = camel_case +dotnet_naming_style.pascal_case_style.capitalization = pascal_case + +# Use PascalCase with I prefix for interfaces +dotnet_naming_symbols.interface_type_symbol.applicable_kinds = interface +dotnet_naming_style.interface_type_style.capitalization = pascal_case +dotnet_naming_style.interface_type_style.required_prefix = I +dotnet_naming_rule.interface_types_must_be_prefixed_with_I.severity = warning +dotnet_naming_rule.interface_types_must_be_prefixed_with_I.symbols = interface_type_symbol +dotnet_naming_rule.interface_types_must_be_prefixed_with_I.style = interface_type_style + +# Use camelCase for parameters +dotnet_naming_symbols.parameter_symbol.applicable_kinds = parameter +dotnet_naming_style.parameter_style.capitalization = camel_case +dotnet_naming_rule.parameters_are_camel_case.severity = warning +dotnet_naming_rule.parameters_are_camel_case.symbols = parameter_symbol +dotnet_naming_rule.parameters_are_camel_case.style = parameter_style + +# Use PascalCase for methods +dotnet_naming_symbols.method_symbol.applicable_kinds = method +dotnet_naming_style.method_style.capitalization = pascal_case +dotnet_naming_rule.methods_are_pascal_case.severity = warning +dotnet_naming_rule.methods_are_pascal_case.symbols = method_symbol +dotnet_naming_rule.methods_are_pascal_case.style = method_style + +# Use PascalCase for constant fields with an accessibility of internal or higher +dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning +dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style +dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields +dotnet_naming_symbols.constant_fields.applicable_accessibilities = public,protected_internal,internal +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.required_modifiers = const + +# Use PascalCase for static fields with an accessibility of internal or higher +dotnet_naming_rule.static_fields_should_be_pascal_case.severity = warning +dotnet_naming_rule.static_fields_should_be_pascal_case.style = pascal_case_style +dotnet_naming_rule.static_fields_should_be_pascal_case.symbols = static_fields +dotnet_naming_symbols.static_fields.applicable_accessibilities = public,protected_internal,internal +dotnet_naming_symbols.static_fields.applicable_kinds = field +dotnet_naming_symbols.static_fields.required_modifiers = static + +# Use camelCase with _ prefix for instance fields +dotnet_naming_rule.instance_fields_should_be_camel_case.severity = warning +dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style +dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields +dotnet_naming_symbols.instance_fields.applicable_kinds = field +dotnet_naming_style.first_word_upper_case_style.capitalization = first_word_upper +dotnet_naming_style.instance_field_style.required_prefix = _ +dotnet_naming_symbols.public_symbols.applicable_accessibilities = public +dotnet_naming_symbols.public_symbols.applicable_kinds = property,method,field,event,delegate +dotnet_naming_symbols.public_symbols.required_modifiers = readonly + +# Namespace preferences +csharp_style_namespace_declarations = file_scoped : warning + +# var preferences +csharp_style_var_elsewhere = false : warning +csharp_style_var_for_built_in_types = false : warning +csharp_style_var_when_type_is_apparent = false : warning + +# Expression-bodied members +csharp_style_expression_bodied_accessors = true : silent +csharp_style_expression_bodied_constructors = false : silent +csharp_style_expression_bodied_indexers = true : silent +csharp_style_expression_bodied_methods = false : silent +csharp_style_expression_bodied_operators = false : silent +csharp_style_expression_bodied_properties = true : silent + +# Pattern matching preferences +csharp_style_pattern_matching_over_as_with_null_check = true : suggestion +csharp_style_pattern_matching_over_is_with_cast_check = true : suggestion + +# Null-checking preferences +csharp_style_conditional_delegate_call = true : suggestion +csharp_style_throw_expression = true : suggestion + +# Modifier preferences +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async : suggestion + +# Expression-level preferences +csharp_prefer_braces = true : silent +csharp_prefer_simple_default_expression = true : suggestion +csharp_style_deconstructed_variable_declaration = true : warning +csharp_style_inlined_variable_declaration = true : suggestion +csharp_style_pattern_local_over_anonymous_function = true : suggestion + +# New line preferences +csharp_new_line_before_catch = true +csharp_new_line_before_else = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_open_brace = all +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_case_contents = true +csharp_indent_labels = flush_left +csharp_indent_switch_labels = true + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_around_binary_operators = before_and_after +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false + +# Wrapping preferences +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = true + +# Severity: error + +# Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. +dotnet_diagnostic.CS4014.severity = error + +# Members attributed with RequiresUnreferencedCode may break when trimming. +dotnet_diagnostic.IL2026.severity = error + +# Null-forgiving operator without justification +dotnet_diagnostic.NX0001.severity = error + +# Null-forgiving operator without justification +dotnet_diagnostic.NX0003.severity = error + +# Found markup element with unexpected name. If this is intended to be a component, add a @using directive for its namespace. +dotnet_diagnostic.RZ10012.severity = error + +# Add a way to break out of this method/property's recursion. +dotnet_diagnostic.S2190.severity = error + +# Severity: suggestion + +# Member is obsolete. +dotnet_diagnostic.CS0618.severity = suggestion + +# Complete the task associated to this 'TODO' comment. +dotnet_diagnostic.S1135.severity = suggestion + +# Severity: none + +# Validate arguments of public methods. +dotnet_diagnostic.CA1062.severity = none + +# Do not directly await a Task. +dotnet_diagnostic.CA2007.severity = none + +# Missing XML comment for publicly visible type or member. +dotnet_diagnostic.CS1591.severity = none + +# Call 'ConfigureAwait(false)'. +dotnet_diagnostic.RCS1090.severity = none + +# Add parentheses when necessary. +dotnet_diagnostic.RCS1123.severity = none + +# The keyword 'new' should be followed by a space. (C# 9) +dotnet_diagnostic.SA1000.severity = none + +# Operator should be preceded by whitespace. (C# 9) +dotnet_diagnostic.SA1003.severity = none + +# Opening parenthesis should be preceded by a space. (C# 9) +dotnet_diagnostic.SA1008.severity = none + +# Closing parenthesis should be followed by a space. +dotnet_diagnostic.SA1009.severity = none + +# Closing square bracket should be followed by a space. +dotnet_diagnostic.SA1011.severity = none + +# Replace tabs with spaces. +dotnet_diagnostic.SA1027.severity = none + +# Prefix local calls with this. +dotnet_diagnostic.SA1101.severity = none + +# Do not use regions. +dotnet_diagnostic.SA1124.severity = none + +# Using directive should appear within a namespace declaration. +dotnet_diagnostic.SA1200.severity = none + +# Elements should be ordered by access. +dotnet_diagnostic.SA1202.severity = none + +# Static members should appear before non-static members. +dotnet_diagnostic.SA1204.severity = none + +# The 'required' modifier should appear before 'public'. (C# 11) +dotnet_diagnostic.SA1206.severity = none + +# Using directive for 'System' should appear first. +dotnet_diagnostic.SA1208.severity = none + +# Readonly fields should appear before non-readonly fields. +dotnet_diagnostic.SA1214.severity = none + +# Const field names should begin with upper-case letter. +dotnet_diagnostic.SA1303.severity = none + +# Field should not begin with an underscore. +dotnet_diagnostic.SA1309.severity = none + +# Field should not contain an underscore. +dotnet_diagnostic.SA1310.severity = none + +# Static readonly fields should begin with upper-case letter. +dotnet_diagnostic.SA1311.severity = none + +# Arithmetic expressions should declare precedence. +dotnet_diagnostic.SA1407.severity = none + +# Conditional expressions should declare precedence. +dotnet_diagnostic.SA1408.severity = none + +# Braces should not be omitted. +dotnet_diagnostic.SA1503.severity = none + +# Elements should be separated by blank line. +dotnet_diagnostic.SA1516.severity = none + +# Elements should be documented. +dotnet_diagnostic.SA1600.severity = none + +# Partial elements should be documented. +dotnet_diagnostic.SA1601.severity = none + +# Enumeration items should be documented. +dotnet_diagnostic.SA1602.severity = none + +# Element parameters value should be documented. +dotnet_diagnostic.SA1611.severity = none + +# Element return value should be documented. +dotnet_diagnostic.SA1615.severity = none + +# The property's documentation summary text should begin with: 'Gets'. +dotnet_diagnostic.SA1623.severity = none + +# The file header is missing or not located at the top of the file. +dotnet_diagnostic.SA1633.severity = none + +# Constructor summary documentation should begin with standard text. +dotnet_diagnostic.SA1642.severity = none + +# Rename class to match pascal case naming rules. +dotnet_diagnostic.S101.severity = none + +# 'System.Exception' should not be thrown by user code. +dotnet_diagnostic.S112.severity = none + +# Extract the assignment from this expression. (C# 9) +dotnet_diagnostic.S1121.severity = none + +# Unused private types or members should be removed. (C# 9) +dotnet_diagnostic.S1144.severity = none + +# Make this method private or simplify its parameters to not use multidimensional arrays. +dotnet_diagnostic.S2368.severity = none + +# Static fields should not be used in generic types (C# 11 static abstract members). +dotnet_diagnostic.S2743.severity = none + +# Extract this nested ternary operation into an independent statement. +dotnet_diagnostic.S3358.severity = none + +# This class can't be instantiated; make its constructor 'public'. (C# 9) +dotnet_diagnostic.S3453.severity = none + +# Move class into a named namespace. (C# 10) +dotnet_diagnostic.S3903.severity = none + +# Use 'Guid.NewGuid()' or 'Guid.Empty' or add arguments to this GUID instantiation. +dotnet_diagnostic.S4581.severity = none diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ce4a40d..e0e87396 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.5.0.0] - 2024-01-17 + +This is an API compatibility update. Older versions will soon stop working. + +- The application now uses the latest API endpoints so that it can continue to function. +- The application no longer checks for updates. +- The application no longer displays the changelog. + ## [1.4.0.0] - 2022-05-01 - API updates to support multiple builds. Windows 7 now has a separate build. More builds for other operating systems will follow in the future (not soon). diff --git a/DevilDaggersAssetEditor.Tests/DevilDaggersAssetEditor.Tests.csproj b/DevilDaggersAssetEditor.Tests/DevilDaggersAssetEditor.Tests.csproj index 6028f61f..145a6dd9 100644 --- a/DevilDaggersAssetEditor.Tests/DevilDaggersAssetEditor.Tests.csproj +++ b/DevilDaggersAssetEditor.Tests/DevilDaggersAssetEditor.Tests.csproj @@ -5,18 +5,18 @@ false - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/DevilDaggersAssetEditor.Wpf/Clients/DevilDaggersInfoApiClient.cs b/DevilDaggersAssetEditor.Wpf/Clients/DevilDaggersInfoApiClient.cs index fa2d314d..68822f6b 100644 --- a/DevilDaggersAssetEditor.Wpf/Clients/DevilDaggersInfoApiClient.cs +++ b/DevilDaggersAssetEditor.Wpf/Clients/DevilDaggersInfoApiClient.cs @@ -1,6 +1,6 @@ //---------------------- // -// Generated using the NSwag toolchain v13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) +// Generated using the NSwag toolchain v14.0.1.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) // //---------------------- @@ -9,29 +9,31 @@ #pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." #pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." #pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' +#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" #pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... #pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." #pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" #pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" #pragma warning disable 8603 // Disable "CS8603 Possible null reference return" +#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" +#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type" namespace DevilDaggersAssetEditor.Wpf.Clients { using System = global::System; - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.1.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class DevilDaggersInfoApiClient { private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; + private static System.Lazy _settings = new System.Lazy(CreateSerializerSettings, true); public DevilDaggersInfoApiClient(System.Net.Http.HttpClient httpClient) { _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); } - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + private static Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() { var settings = new Newtonsoft.Json.JsonSerializerSettings(); UpdateJsonSerializerSettings(settings); @@ -40,7 +42,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + static partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); @@ -48,11 +50,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// A server side error occurred. - public virtual async System.Threading.Tasks.Task>> Assets_GetAssetInfoForDdaeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [System.Obsolete] + public virtual async System.Threading.Tasks.Task>> Assets_GetAssetInfoObsoleteAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/assets/ddae/info"); - var client_ = _httpClient; var disposeClient_ = false; try @@ -62,6 +62,11 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/assets/ddae/info" + urlBuilder_.Append("api/assets/ddae/info"); + PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); @@ -73,7 +78,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -114,15 +121,8 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CustomEntries_GetCustomEntryReplayBufferByIdAsync(int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public virtual async System.Threading.Tasks.Task>> Assets_GetAssetInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/custom-entries/{id}/replay-buffer"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - var client_ = _httpClient; var disposeClient_ = false; try @@ -130,7 +130,12 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/octet-stream")); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/ddae/assets/info" + urlBuilder_.Append("api/ddae/assets/info"); PrepareRequest(client_, request_, urlBuilder_); @@ -143,7 +148,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -153,32 +160,14 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; - if (status_ == 200 || status_ == 206) - { - var responseStream_ = response_.Content == null ? System.IO.Stream.Null : await response_.Content.ReadAsStreamAsync().ConfigureAwait(false); - var fileResponse_ = new FileResponse(status_, headers_, responseStream_, null, response_); - disposeClient_ = false; disposeResponse_ = false; // response and client are disposed by FileResponse - return fileResponse_; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) + if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + return objectResponse_.Object; } else { @@ -202,15 +191,8 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CustomEntries_GetCustomEntryReplayByIdAsync(int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public virtual async System.Threading.Tasks.Task> Mods_GetModsAsync(string? authorFilter = null, string? nameFilter = null, bool? isHostedFilter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/custom-entries/{id}/replay"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - var client_ = _httpClient; var disposeClient_ = false; try @@ -218,7 +200,26 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/octet-stream")); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/ddae/mods" + urlBuilder_.Append("api/ddae/mods"); + urlBuilder_.Append('?'); + if (authorFilter != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("authorFilter")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(authorFilter, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (nameFilter != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("nameFilter")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(nameFilter, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (isHostedFilter != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("isHostedFilter")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(isHostedFilter, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; PrepareRequest(client_, request_, urlBuilder_); @@ -231,7 +232,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -241,32 +244,14 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; - if (status_ == 200 || status_ == 206) - { - var responseStream_ = response_.Content == null ? System.IO.Stream.Null : await response_.Content.ReadAsStreamAsync().ConfigureAwait(false); - var fileResponse_ = new FileResponse(status_, headers_, responseStream_, null, response_); - disposeClient_ = false; disposeResponse_ = false; // response and client are disposed by FileResponse - return fileResponse_; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) + if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + return objectResponse_.Object; } else { @@ -290,15 +275,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CustomEntries_GetCustomEntryDataByIdAsync(int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [System.Obsolete] + public virtual async System.Threading.Tasks.Task> Mods_GetModsObsoleteAsync(string? authorFilter = null, string? nameFilter = null, bool? isHostedFilter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/custom-entries/{id}/data"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - var client_ = _httpClient; var disposeClient_ = false; try @@ -308,6 +287,25 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/mods/ddae" + urlBuilder_.Append("api/mods/ddae"); + urlBuilder_.Append('?'); + if (authorFilter != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("authorFilter")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(authorFilter, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (nameFilter != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("nameFilter")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(nameFilter, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (isHostedFilter != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("isHostedFilter")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(isHostedFilter, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); @@ -319,7 +317,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -331,7 +331,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -339,16 +339,6 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() return objectResponse_.Object; } else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); @@ -370,13 +360,10 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CustomEntries_SubmitScoreForDdclAsync(AddUploadRequest uploadRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public virtual async System.Threading.Tasks.Task Mods_GetModFileAsync(string modName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (uploadRequest == null) - throw new System.ArgumentNullException("uploadRequest"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/custom-entries/submit"); + if (modName == null) + throw new System.ArgumentNullException("modName"); var client_ = _httpClient; var disposeClient_ = false; @@ -384,11 +371,15 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() { using (var request_ = new System.Net.Http.HttpRequestMessage()) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(uploadRequest, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/octet-stream")); + + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/ddae/mods/{modName}/file" + urlBuilder_.Append("api/ddae/mods/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(modName, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/file"); PrepareRequest(client_, request_, urlBuilder_); @@ -401,7 +392,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -411,17 +404,25 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; - if (status_ == 200) + if (status_ == 200 || status_ == 206) + { + var responseStream_ = response_.Content == null ? System.IO.Stream.Null : await response_.Content.ReadAsStreamAsync().ConfigureAwait(false); + var fileResponse_ = new FileResponse(status_, headers_, responseStream_, null, response_); + disposeClient_ = false; disposeResponse_ = false; // response and client are disposed by FileResponse + return fileResponse_; + } + else + if (status_ == 400) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - return objectResponse_.Object; + throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else - if (status_ == 400) + if (status_ == 404) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) @@ -450,7042 +451,263 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() } } - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CustomLeaderboards_CustomLeaderboardExistsBySpawnsetHashAsync(byte[]? hash = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + protected struct ObjectResponseResult { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/custom-leaderboards?"); - if (hash != null) + public ObjectResponseResult(T responseObject, string responseText) { - urlBuilder_.Append(System.Uri.EscapeDataString("hash") + "=").Append(System.Uri.EscapeDataString(ConvertToString(hash, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + this.Object = responseObject; + this.Text = responseText; } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("HEAD"); - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + public T Object { get; } - PrepareRequest(client_, request_, url_); + public string Text { get; } + } - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } + public bool ReadResponseAsString { get; set; } - ProcessResponse(client_, response_); + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T)!, string.Empty); + } - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - return; - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } + if (ReadResponseAsString) + { + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody!, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new DevilDaggersInfoApiException(message, (int)response.StatusCode, responseText, headers, exception); } } - finally + else { - if (disposeClient_) - client_.Dispose(); + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody!, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new DevilDaggersInfoApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } } } - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CustomLeaderboards_GetCustomLeaderboardsAsync(CustomLeaderboardCategory? category = null, string? spawnsetFilter = null, string? authorFilter = null, int? pageIndex = null, int? pageSize = null, CustomLeaderboardSorting? sortBy = null, bool? ascending = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private string ConvertToString(object? value, System.Globalization.CultureInfo cultureInfo) { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/custom-leaderboards?"); - if (category != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("category") + "=").Append(System.Uri.EscapeDataString(ConvertToString(category, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (spawnsetFilter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("spawnsetFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(spawnsetFilter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (authorFilter != null) + if (value == null) { - urlBuilder_.Append(System.Uri.EscapeDataString("authorFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(authorFilter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + return ""; } - if (pageIndex != null) + + if (value is System.Enum) { - urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; + } } - if (pageSize != null) + else if (value is bool) { - urlBuilder_.Append(System.Uri.EscapeDataString("pageSize") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); } - if (sortBy != null) + else if (value is byte[]) { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + return System.Convert.ToBase64String((byte[]) value); } - if (ascending != null) + else if (value is string[]) { - urlBuilder_.Append(System.Uri.EscapeDataString("ascending") + "=").Append(System.Uri.EscapeDataString(ConvertToString(ascending, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + return string.Join(",", (string[])value); } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try + else if (value.GetType().IsArray) { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + var valueArray = (System.Array)value; + var valueTextArray = new string[valueArray.Length]; + for (var i = 0; i < valueArray.Length; i++) { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CustomLeaderboards_GetGlobalCustomLeaderboardForCategoryAsync(CustomLeaderboardCategory? category = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/custom-leaderboards/global-leaderboard?"); - if (category != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("category") + "=").Append(System.Uri.EscapeDataString(ConvertToString(category, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> CustomLeaderboards_GetCustomLeaderboardsOverviewDdLiveAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/custom-leaderboards/ddlive"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CustomLeaderboards_GetTotalCustomLeaderboardDataAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/custom-leaderboards/total-data"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CustomLeaderboards_GetCustomLeaderboardByIdAsync(int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/custom-leaderboards/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CustomLeaderboards_GetCustomLeaderboardByIdDdLiveAsync(int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/custom-leaderboards/{id}/ddlive"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Donations_GetDonatorsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/donations/donators"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Integrations_GetDdstatsRustAccessInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/integrations/ddstats-rust"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task LeaderboardHistory_GetLeaderboardHistoryAsync(System.DateTime? dateTime = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/leaderboard-history?"); - if (dateTime != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("dateTime") + "=").Append(System.Uri.EscapeDataString(dateTime.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> LeaderboardHistoryStatistics_GetLeaderboardHistoryStatisticsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/leaderboard-history-statistics"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Leaderboards_GetLeaderboardAsync(int? rankStart = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/leaderboards?"); - if (rankStart != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("rankStart") + "=").Append(System.Uri.EscapeDataString(ConvertToString(rankStart, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Leaderboards_GetEntryByIdAsync(int? id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/leaderboards/entry/by-id?"); - if (id != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("id") + "=").Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Leaderboards_GetEntriesByIdsAsync(string? commaSeparatedIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/leaderboards/entry/by-ids?"); - if (commaSeparatedIds != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("commaSeparatedIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(commaSeparatedIds, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Leaderboards_GetEntriesByNameAsync(string? name = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/leaderboards/entry/by-username?"); - if (name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Leaderboards_GetEntryByRankAsync(int? rank = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/leaderboards/entry/by-rank?"); - if (rank != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("rank") + "=").Append(System.Uri.EscapeDataString(ConvertToString(rank, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task LeaderboardStatistics_GetLeaderboardStatisticsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/leaderboard-statistics"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task LeaderboardStatistics_GetLeaderboardStatisticsDdLiveAsync(LeaderboardStatisticsLimitDdLive? top = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/leaderboard-statistics/ddlive?"); - if (top != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("top") + "=").Append(System.Uri.EscapeDataString(ConvertToString(top, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Mods_GetModsAsync(bool? onlyHosted = null, string? modFilter = null, string? authorFilter = null, int? pageIndex = null, int? pageSize = null, ModSorting? sortBy = null, bool? ascending = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/mods?"); - if (onlyHosted != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("onlyHosted") + "=").Append(System.Uri.EscapeDataString(ConvertToString(onlyHosted, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (modFilter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("modFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(modFilter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (authorFilter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("authorFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(authorFilter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (pageIndex != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (pageSize != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("pageSize") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (ascending != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("ascending") + "=").Append(System.Uri.EscapeDataString(ConvertToString(ascending, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Mods_GetModsForDdaeAsync(string? authorFilter = null, string? nameFilter = null, bool? isHostedFilter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/mods/ddae?"); - if (authorFilter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("authorFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(authorFilter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (nameFilter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("nameFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(nameFilter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (isHostedFilter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("isHostedFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(isHostedFilter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Mods_GetModByIdAsync(int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/mods/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Mods_GetTotalModDataAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/mods/total-data"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Mods_GetModFileAsync(string? modName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/mods/{modName}/file"); - urlBuilder_.Replace("{modName}", System.Uri.EscapeDataString(ConvertToString(modName, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/octet-stream")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200 || status_ == 206) - { - var responseStream_ = response_.Content == null ? System.IO.Stream.Null : await response_.Content.ReadAsStreamAsync().ConfigureAwait(false); - var fileResponse_ = new FileResponse(status_, headers_, responseStream_, null, response_); - disposeClient_ = false; disposeResponse_ = false; // response and client are disposed by FileResponse - return fileResponse_; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Mods_GetModsByAuthorIdAsync(int? playerId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/mods/by-author?"); - if (playerId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("playerId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(playerId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task ModScreenshots_GetScreenshotByFilePathAsync(string? modName = null, string? fileName = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/mod-screenshots?"); - if (modName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("modName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(modName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (fileName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("fileName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fileName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/octet-stream")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200 || status_ == 206) - { - var responseStream_ = response_.Content == null ? System.IO.Stream.Null : await response_.Content.ReadAsStreamAsync().ConfigureAwait(false); - var fileResponse_ = new FileResponse(status_, headers_, responseStream_, null, response_); - disposeClient_ = false; disposeResponse_ = false; // response and client are disposed by FileResponse - return fileResponse_; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Players_GetPlayersForLeaderboardAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/players/leaderboard"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Players_GetCommonNamesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/players/common-names"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Players_GetPlayersForSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/players/settings"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Players_GetPlayerByIdAsync(int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/players/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Players_GetPlayerFlagByIdAsync(int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/players/{id}/flag"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Players_GetPlayerHistoryByIdAsync(int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/players/{id}/history"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Players_GetCustomLeaderboardStatisticsByPlayerIdAsync(int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/players/{id}/custom-leaderboard-statistics"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Players_GetProfileByPlayerIdAsync(int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/players/{id}/profile"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Players_UpdateProfileByPlayerIdAsync(int id, EditPlayerProfile editPlayerProfile, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (editPlayerProfile == null) - throw new System.ArgumentNullException("editPlayerProfile"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/players/{id}/profile"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(editPlayerProfile, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - return; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task ProcessMemory_GetMarkerAsync(SupportedOperatingSystem? operatingSystem = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/process-memory/marker?"); - if (operatingSystem != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("operatingSystem") + "=").Append(System.Uri.EscapeDataString(ConvertToString(operatingSystem, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Spawnsets_GetSpawnsetsAsync(bool? practiceOnly = null, bool? withCustomLeaderboardOnly = null, string? spawnsetFilter = null, string? authorFilter = null, int? pageIndex = null, int? pageSize = null, SpawnsetSorting? sortBy = null, bool? ascending = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/spawnsets?"); - if (practiceOnly != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("practiceOnly") + "=").Append(System.Uri.EscapeDataString(ConvertToString(practiceOnly, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (withCustomLeaderboardOnly != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("withCustomLeaderboardOnly") + "=").Append(System.Uri.EscapeDataString(ConvertToString(withCustomLeaderboardOnly, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (spawnsetFilter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("spawnsetFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(spawnsetFilter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (authorFilter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("authorFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(authorFilter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (pageIndex != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (pageSize != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("pageSize") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (ascending != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("ascending") + "=").Append(System.Uri.EscapeDataString(ConvertToString(ascending, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Spawnsets_GetSpawnsetsForDdseAsync(string? authorFilter = null, string? nameFilter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/spawnsets/ddse?"); - if (authorFilter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("authorFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(authorFilter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (nameFilter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("nameFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(nameFilter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Spawnsets_GetSpawnsetByHashAsync(byte[]? hash = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/spawnsets/by-hash?"); - if (hash != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("hash") + "=").Append(System.Uri.EscapeDataString(ConvertToString(hash, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Spawnsets_GetSpawnsetNameByHashAsync(byte[]? hash = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/spawnsets/name-by-hash?"); - if (hash != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("hash") + "=").Append(System.Uri.EscapeDataString(ConvertToString(hash, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Spawnsets_GetSpawnsetHashAsync(string? fileName = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/spawnsets/hash?"); - if (fileName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("fileName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fileName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Spawnsets_GetTotalSpawnsetDataAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/spawnsets/total-data"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Spawnsets_GetSpawnsetFileAsync(string? fileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/spawnsets/{fileName}/file"); - urlBuilder_.Replace("{fileName}", System.Uri.EscapeDataString(ConvertToString(fileName, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/octet-stream")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200 || status_ == 206) - { - var responseStream_ = response_.Content == null ? System.IO.Stream.Null : await response_.Content.ReadAsStreamAsync().ConfigureAwait(false); - var fileResponse_ = new FileResponse(status_, headers_, responseStream_, null, response_); - disposeClient_ = false; disposeResponse_ = false; // response and client are disposed by FileResponse - return fileResponse_; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Spawnsets_GetSpawnsetByIdAsync(int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/spawnsets/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Spawnsets_GetDefaultSpawnsetAsync(GameVersion? gameVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/spawnsets/default?"); - if (gameVersion != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("gameVersion") + "=").Append(System.Uri.EscapeDataString(ConvertToString(gameVersion, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Spawnsets_GetSpawnsetsByAuthorIdAsync(int? playerId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/spawnsets/by-author?"); - if (playerId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("playerId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(playerId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Tools_GetToolAsync(string? toolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/tools/{toolName}"); - urlBuilder_.Replace("{toolName}", System.Uri.EscapeDataString(ConvertToString(toolName, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Tools_GetToolDistributionFileAsync(string? toolName, ToolPublishMethod? publishMethod = null, ToolBuildType? buildType = null, string? version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/tools/{toolName}/file?"); - urlBuilder_.Replace("{toolName}", System.Uri.EscapeDataString(ConvertToString(toolName, System.Globalization.CultureInfo.InvariantCulture))); - if (publishMethod != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("publishMethod") + "=").Append(System.Uri.EscapeDataString(ConvertToString(publishMethod, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (buildType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("buildType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(buildType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (version != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("version") + "=").Append(System.Uri.EscapeDataString(ConvertToString(version, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/octet-stream")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200 || status_ == 206) - { - var responseStream_ = response_.Content == null ? System.IO.Stream.Null : await response_.Content.ReadAsStreamAsync().ConfigureAwait(false); - var fileResponse_ = new FileResponse(status_, headers_, responseStream_, null, response_); - disposeClient_ = false; disposeResponse_ = false; // response and client are disposed by FileResponse - return fileResponse_; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Tools_GetLatestToolDistributionAsync(string? toolName, ToolPublishMethod? publishMethod = null, ToolBuildType? buildType = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/tools/{toolName}/distribution-latest?"); - urlBuilder_.Replace("{toolName}", System.Uri.EscapeDataString(ConvertToString(toolName, System.Globalization.CultureInfo.InvariantCulture))); - if (publishMethod != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("publishMethod") + "=").Append(System.Uri.EscapeDataString(ConvertToString(publishMethod, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (buildType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("buildType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(buildType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task Tools_GetToolDistributionByVersionAsync(string? toolName, ToolPublishMethod? publishMethod = null, ToolBuildType? buildType = null, string? version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/tools/{toolName}/distribution?"); - urlBuilder_.Replace("{toolName}", System.Uri.EscapeDataString(ConvertToString(toolName, System.Globalization.CultureInfo.InvariantCulture))); - if (publishMethod != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("publishMethod") + "=").Append(System.Uri.EscapeDataString(ConvertToString(publishMethod, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (buildType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("buildType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(buildType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (version != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("version") + "=").Append(System.Uri.EscapeDataString(ConvertToString(version, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new DevilDaggersInfoApiException("A server side error occurred.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task WorldRecords_GetWorldRecordDataAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/world-records"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new DevilDaggersInfoApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new DevilDaggersInfoApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T)!, string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody!, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new DevilDaggersInfoApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody!, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new DevilDaggersInfoApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object? value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[]) value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array) value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetAssetInfo - { - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("tags", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Tags { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ProblemDetails - { - [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? Type { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? Title { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Status { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("detail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? Detail { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("instance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? Instance { get; set; } = default!; - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - - [Newtonsoft.Json.JsonExtensionData] - public System.Collections.Generic.IDictionary AdditionalProperties - { - get { return _additionalProperties; } - set { _additionalProperties = value; } - } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetCustomEntryData - { - [Newtonsoft.Json.JsonProperty("customEntryId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int CustomEntryId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int PlayerId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PlayerName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spawnsetName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SpawnsetName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("time", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Time { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("customLeaderboardDagger", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CustomLeaderboardDagger? CustomLeaderboardDagger { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsCollected", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsCollected { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int EnemiesKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersFired { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHit", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersHit { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int EnemiesAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingStored", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int HomingStored { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingEaten", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int HomingEaten { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsDespawned", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsDespawned { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsEaten", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsEaten { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte DeathType { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime2", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime2 { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime3", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime3 { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime4", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime4 { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("submitDate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime SubmitDate { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("clientVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? ClientVersion { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsCollectedData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? GemsCollectedData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? EnemiesKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFiredData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? DaggersFiredData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHitData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? DaggersHitData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? EnemiesAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingStoredData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? HomingStoredData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingEatenData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? HomingEatenData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsDespawnedData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? GemsDespawnedData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsEatenData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? GemsEatenData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsTotalData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? GemsTotalData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull1sAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Skull1sAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull2sAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Skull2sAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull3sAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Skull3sAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spiderlingsAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? SpiderlingsAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull4sAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Skull4sAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("squid1sAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Squid1sAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("squid2sAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Squid2sAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("squid3sAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Squid3sAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("centipedesAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? CentipedesAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gigapedesAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? GigapedesAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spider1sAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Spider1sAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spider2sAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Spider2sAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("leviathansAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? LeviathansAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("orbsAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? OrbsAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("thornsAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? ThornsAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("ghostpedesAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? GhostpedesAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spiderEggsAliveData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? SpiderEggsAliveData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull1sKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Skull1sKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull2sKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Skull2sKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull3sKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Skull3sKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spiderlingsKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? SpiderlingsKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull4sKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Skull4sKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("squid1sKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Squid1sKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("squid2sKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Squid2sKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("squid3sKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Squid3sKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("centipedesKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? CentipedesKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gigapedesKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? GigapedesKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spider1sKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Spider1sKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spider2sKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Spider2sKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("leviathansKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? LeviathansKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("orbsKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? OrbsKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("thornsKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? ThornsKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("ghostpedesKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? GhostpedesKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spiderEggsKilledData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? SpiderEggsKilledData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("startingLevel", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public HandLevel StartingLevel { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hasReplay", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HasReplay { get; set; } = default!; - - } - - /// - /// 0 = Leviathan - ///
1 = Devil - ///
2 = Golden - ///
3 = Silver - ///
4 = Bronze - ///
5 = Default - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum CustomLeaderboardDagger - { - - Leviathan = 0, - - Devil = 1, - - Golden = 2, - - Silver = 3, - - Bronze = 4, - - Default = 5, - - } - - /// - /// 1 = Level1 - ///
2 = Level2 - ///
3 = Level3 - ///
4 = Level4 - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum HandLevel - { - - Level1 = 1, - - Level2 = 2, - - Level3 = 3, - - Level4 = 4, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetUploadSuccess - { - [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Message { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalPlayers", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int TotalPlayers { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("leaderboard", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetCustomLeaderboardDdcl Leaderboard { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CustomLeaderboardCategory Category { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("entries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Entries { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isNewPlayerOnThisLeaderboard", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsNewPlayerOnThisLeaderboard { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isHighscore", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsHighscore { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("rankState", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfInteger RankState { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timeState", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfDouble TimeState { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsCollectedState", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfInteger GemsCollectedState { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesKilledState", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfInteger EnemiesKilledState { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFiredState", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfInteger DaggersFiredState { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHitState", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfInteger DaggersHitState { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesAliveState", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfInteger EnemiesAliveState { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingStoredState", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfInteger HomingStoredState { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingEatenState", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfInteger HomingEatenState { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsDespawnedState", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfInteger GemsDespawnedState { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsEatenState", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfInteger GemsEatenState { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsTotalState", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfInteger GemsTotalState { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime2State", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfDouble LevelUpTime2State { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime3State", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfDouble LevelUpTime3State { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime4State", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetScoreStateOfDouble LevelUpTime4State { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetCustomLeaderboardDdcl - { - [Newtonsoft.Json.JsonProperty("spawnsetName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SpawnsetName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetCustomLeaderboardDaggers? Daggers { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CustomLeaderboardCategory Category { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isAscending", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsAscending { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetCustomLeaderboardDaggers - { - [Newtonsoft.Json.JsonProperty("bronze", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Bronze { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("silver", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Silver { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("golden", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Golden { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("devil", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Devil { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("leviathan", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Leviathan { get; set; } = default!; - - } - - /// - /// 1 = Survival - ///
2 = TimeAttack - ///
3 = Speedrun - ///
4 = Race - ///
5 = Pacifist - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum CustomLeaderboardCategory - { - - Survival = 1, - - TimeAttack = 2, - - Speedrun = 3, - - Race = 4, - - Pacifist = 5, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetCustomEntryDdcl - { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int PlayerId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PlayerName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timeInSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double TimeInSeconds { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsCollected", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsCollected { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int EnemiesKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersFired { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHit", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersHit { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int EnemiesAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingStored", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int HomingStored { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingEaten", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int HomingEaten { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsDespawned", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsDespawned { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsEaten", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsEaten { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte DeathType { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime2InSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime2InSeconds { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime3InSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime3InSeconds { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime4InSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime4InSeconds { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("submitDate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime SubmitDate { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("clientVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? ClientVersion { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hasReplay", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HasReplay { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetScoreStateOfInteger - { - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Value { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("valueDifference", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int ValueDifference { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetScoreStateOfDouble - { - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Value { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("valueDifference", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double ValueDifference { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class AddUploadRequest - { - [Newtonsoft.Json.JsonProperty("survivalHashMd5", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.StringLength(16, MinimumLength = 16)] - public byte[] SurvivalHashMd5 { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int PlayerId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.StringLength(32)] - public string PlayerName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("replayPlayerId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int ReplayPlayerId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timeInSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double TimeInSeconds { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timeAsBytes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.StringLength(4, MinimumLength = 4)] - public byte[] TimeAsBytes { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsCollected", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsCollected { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int EnemiesKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersFired { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHit", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersHit { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int EnemiesAlive { get; set; } = default!; - - /// - /// This value is not reliable in game memory and therefore no longer used. It is now only used for the request signature. - /// - [Newtonsoft.Json.JsonProperty("homingStored", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int HomingStored { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingEaten", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int HomingEaten { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsDespawned", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsDespawned { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsEaten", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsEaten { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte DeathType { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime2InSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime2InSeconds { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime3InSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime3InSeconds { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime4InSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime4InSeconds { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime2AsBytes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.StringLength(4, MinimumLength = 4)] - public byte[] LevelUpTime2AsBytes { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime3AsBytes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.StringLength(4, MinimumLength = 4)] - public byte[] LevelUpTime3AsBytes { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime4AsBytes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.StringLength(4, MinimumLength = 4)] - public byte[] LevelUpTime4AsBytes { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("clientVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.StringLength(16)] - public string ClientVersion { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("client", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Client { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("operatingSystem", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string OperatingSystem { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("buildMode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BuildMode { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("validation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Validation { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("validationVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int ValidationVersion { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isReplay", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsReplay { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("prohibitedMods", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool ProhibitedMods { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gameMode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte GameMode { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timeAttackOrRaceFinished", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool TimeAttackOrRaceFinished { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gameData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public AddGameData GameData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("replayData", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required] - [System.ComponentModel.DataAnnotations.StringLength(31457280, MinimumLength = 1)] - public byte[] ReplayData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Status { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class AddGameData - { - [Newtonsoft.Json.JsonProperty("gemsCollected", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List GemsCollected { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List EnemiesKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List DaggersFired { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHit", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List DaggersHit { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List EnemiesAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingStored", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List HomingStored { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingEaten", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List HomingEaten { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsDespawned", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List GemsDespawned { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsEaten", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List GemsEaten { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List GemsTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull1sAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Skull1sAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull2sAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Skull2sAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull3sAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Skull3sAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spiderlingsAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List SpiderlingsAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull4sAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Skull4sAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("squid1sAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Squid1sAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("squid2sAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Squid2sAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("squid3sAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Squid3sAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("centipedesAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List CentipedesAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gigapedesAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List GigapedesAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spider1sAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Spider1sAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spider2sAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Spider2sAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("leviathansAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List LeviathansAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("orbsAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List OrbsAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("thornsAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List ThornsAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("ghostpedesAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List GhostpedesAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spiderEggsAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List SpiderEggsAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull1sKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Skull1sKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull2sKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Skull2sKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull3sKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Skull3sKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spiderlingsKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List SpiderlingsKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("skull4sKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Skull4sKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("squid1sKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Squid1sKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("squid2sKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Squid2sKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("squid3sKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Squid3sKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("centipedesKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List CentipedesKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gigapedesKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List GigapedesKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spider1sKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Spider1sKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spider2sKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Spider2sKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("leviathansKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List LeviathansKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("orbsKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List OrbsKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("thornsKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List ThornsKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("ghostpedesKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List GhostpedesKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spiderEggsKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List SpiderEggsKilled { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class PageOfGetCustomLeaderboardOverview - { - [Newtonsoft.Json.JsonProperty("results", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Results { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalResults", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int TotalResults { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetCustomLeaderboardOverview - { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spawnsetName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SpawnsetName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spawnsetAuthorName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SpawnsetAuthorName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetCustomLeaderboardDaggers? Daggers { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isFeatured", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsFeatured { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("dateLastPlayed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime? DateLastPlayed { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("dateCreated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateCreated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("submitCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int SubmitCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int PlayerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("topPlayer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? TopPlayer { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("worldRecord", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? WorldRecord { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("worldRecordDagger", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CustomLeaderboardDagger? WorldRecordDagger { get; set; } = default!; - - } - - /// - /// 0 = SpawnsetName - ///
1 = AuthorName - ///
2 = TimeBronze - ///
3 = TimeSilver - ///
4 = TimeGolden - ///
5 = TimeDevil - ///
6 = TimeLeviathan - ///
7 = DateCreated - ///
8 = DateLastPlayed - ///
9 = Submits - ///
10 = Players - ///
11 = TopPlayer - ///
12 = WorldRecord - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum CustomLeaderboardSorting - { - - SpawnsetName = 0, - - AuthorName = 1, - - TimeBronze = 2, - - TimeSilver = 3, - - TimeGolden = 4, - - TimeDevil = 5, - - TimeLeviathan = 6, - - DateCreated = 7, - - DateLastPlayed = 8, - - Submits = 9, - - Players = 10, - - TopPlayer = 11, - - WorldRecord = 12, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetGlobalCustomLeaderboard - { - [Newtonsoft.Json.JsonProperty("entries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Entries { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalLeaderboards", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int TotalLeaderboards { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalPoints", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int TotalPoints { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetGlobalCustomLeaderboardEntry - { - [Newtonsoft.Json.JsonProperty("playerId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int PlayerId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PlayerName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("points", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Points { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("leviathanDaggerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int LeviathanDaggerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("devilDaggerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DevilDaggerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("goldenDaggerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GoldenDaggerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("silverDaggerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int SilverDaggerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("bronzeDaggerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int BronzeDaggerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("defaultDaggerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DefaultDaggerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("leaderboardsPlayedCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int LeaderboardsPlayedCount { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetCustomLeaderboardOverviewDdLive - { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spawnsetName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SpawnsetName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spawnsetAuthorId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int SpawnsetAuthorId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spawnsetAuthorName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SpawnsetAuthorName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetCustomLeaderboardDaggers? Daggers { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("dateLastPlayed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime? DateLastPlayed { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("dateCreated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateCreated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("submitCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int SubmitCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int PlayerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CustomLeaderboardCategory Category { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("topPlayerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TopPlayerId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("topPlayerName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? TopPlayerName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("worldRecord", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? WorldRecord { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("worldRecordDagger", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CustomLeaderboardDagger? WorldRecordDagger { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetTotalCustomLeaderboardData - { - [Newtonsoft.Json.JsonProperty("leaderboardsPerCategory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.Dictionary LeaderboardsPerCategory { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("scoresPerCategory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.Dictionary ScoresPerCategory { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("submitsPerCategory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.Dictionary SubmitsPerCategory { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playersPerCategory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.Dictionary PlayersPerCategory { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalPlayers", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int TotalPlayers { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetCustomLeaderboard - { - [Newtonsoft.Json.JsonProperty("spawnsetId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int SpawnsetId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spawnsetName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SpawnsetName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spawnsetAuthorName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SpawnsetAuthorName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spawnsetHtmlDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? SpawnsetHtmlDescription { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetCustomLeaderboardDaggers? Daggers { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("dateLastPlayed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime? DateLastPlayed { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("dateCreated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateCreated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("submitCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int SubmitCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isFeatured", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsFeatured { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CustomLeaderboardCategory Category { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("customEntries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List CustomEntries { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetCustomEntry - { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("rank", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Rank { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int PlayerId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PlayerName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("countryCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? CountryCode { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("time", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Time { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("customLeaderboardDagger", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CustomLeaderboardDagger? CustomLeaderboardDagger { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsCollected", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsCollected { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int EnemiesKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersFired { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHit", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersHit { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int EnemiesAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingStored", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int HomingStored { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingEaten", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HomingEaten { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsDespawned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GemsDespawned { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsEaten", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GemsEaten { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte DeathType { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime2", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime2 { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime3", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime3 { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime4", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime4 { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("submitDate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime SubmitDate { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("clientVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? ClientVersion { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("client", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CustomLeaderboardsClient Client { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hasGraphs", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HasGraphs { get; set; } = default!; - - } - - /// - /// 0 = DevilDaggersCustomLeaderboards - ///
1 = DdstatsRust - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum CustomLeaderboardsClient - { - - DevilDaggersCustomLeaderboards = 0, - - DdstatsRust = 1, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetCustomLeaderboardDdLive - { - [Newtonsoft.Json.JsonProperty("spawnsetId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int SpawnsetId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spawnsetName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SpawnsetName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spawnsetAuthorName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SpawnsetAuthorName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spawnsetHtmlDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? SpawnsetHtmlDescription { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetCustomLeaderboardDaggers? Daggers { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("dateLastPlayed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime? DateLastPlayed { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("dateCreated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateCreated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("submitCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int SubmitCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isFeatured", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsFeatured { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CustomLeaderboardCategory Category { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("customEntries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List CustomEntries { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetCustomEntryDdLive - { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("rank", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Rank { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int PlayerId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PlayerName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("countryCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? CountryCode { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("time", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Time { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("customLeaderboardDagger", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CustomLeaderboardDagger? CustomLeaderboardDagger { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsCollected", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GemsCollected { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesKilled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int EnemiesKilled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersFired { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHit", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersHit { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesAlive", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int EnemiesAlive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingStored", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int HomingStored { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("homingEaten", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HomingEaten { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsDespawned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GemsDespawned { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsEaten", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GemsEaten { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte DeathType { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime2", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime2 { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime3", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime3 { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("levelUpTime4", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double LevelUpTime4 { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("submitDate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime SubmitDate { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("clientVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? ClientVersion { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("client", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CustomLeaderboardsClient Client { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hasGraphs", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HasGraphs { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hasReplay", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HasReplay { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetDonator - { - [Newtonsoft.Json.JsonProperty("playerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PlayerId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playerName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PlayerName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("donations", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Donations { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetDonation - { - [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Amount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("convertedEuroCentsReceived", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int ConvertedEuroCentsReceived { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("currency", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public Currency Currency { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isRefunded", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsRefunded { get; set; } = default!; - - } - - /// - /// 0 = Eur - ///
1 = Usd - ///
2 = Aud - ///
3 = Gbp - ///
4 = Sgd - ///
5 = Rub - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum Currency - { - - Eur = 0, - - Usd = 1, - - Aud = 2, - - Gbp = 3, - - Sgd = 4, - - Rub = 5, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class DdstatsRustAccessInfo - { - [Newtonsoft.Json.JsonProperty("requiredVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RequiredVersion { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetLeaderboardHistory - { - [Newtonsoft.Json.JsonProperty("dateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateTime { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalPlayers", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int TotalPlayers { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timeGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double TimeGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("killsGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long KillsGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long GemsGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathsGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DeathsGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHitGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DaggersHitGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFiredGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DaggersFiredGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("entries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Entries { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetEntryHistory - { - [Newtonsoft.Json.JsonProperty("dateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateTime { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("rank", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Rank { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Username { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("time", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Time { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("kills", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Kills { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Gems { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte DeathType { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHit", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersHit { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersFired { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timeTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double TimeTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("killsTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long KillsTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long GemsTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathsTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DeathsTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHitTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DaggersHitTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFiredTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DaggersFiredTotal { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetLeaderboardHistoryStatistics - { - [Newtonsoft.Json.JsonProperty("dateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateTime { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalPlayers", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int TotalPlayers { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timeGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double TimeGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("killsGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long KillsGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long GemsGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathsGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DeathsGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHitGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DaggersHitGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFiredGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DaggersFiredGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("top1Entrance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Top1Entrance { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("top2Entrance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Top2Entrance { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("top3Entrance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Top3Entrance { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("top10Entrance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Top10Entrance { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("top100Entrance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Top100Entrance { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalPlayersUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool TotalPlayersUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timeGlobalUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool TimeGlobalUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("killsGlobalUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool KillsGlobalUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsGlobalUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool GemsGlobalUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathsGlobalUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool DeathsGlobalUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHitGlobalUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool DaggersHitGlobalUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFiredGlobalUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool DaggersFiredGlobalUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("top1EntranceUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool Top1EntranceUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("top2EntranceUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool Top2EntranceUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("top3EntranceUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool Top3EntranceUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("top10EntranceUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool Top10EntranceUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("top100EntranceUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool Top100EntranceUpdated { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetLeaderboard - { - [Newtonsoft.Json.JsonProperty("dateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateTime { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalPlayers", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int TotalPlayers { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timeGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double TimeGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("killsGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long KillsGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long GemsGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathsGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DeathsGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHitGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DaggersHitGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFiredGlobal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DaggersFiredGlobal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("entries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Entries { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetEntry - { - [Newtonsoft.Json.JsonProperty("rank", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Rank { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Username { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("time", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Time { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("kills", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Kills { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Gems { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte DeathType { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHit", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersHit { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersFired { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timeTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double TimeTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("killsTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long KillsTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long GemsTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathsTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DeathsTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHitTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DaggersHitTotal { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFiredTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long DaggersFiredTotal { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetLeaderboardStatistics - { - [Newtonsoft.Json.JsonProperty("dateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateTime { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isFetched", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsFetched { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalEntries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int TotalEntries { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersStatistics", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.Dictionary DaggersStatistics { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathsStatistics", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.Dictionary DeathsStatistics { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("enemiesStatistics", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.Dictionary EnemiesStatistics { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timesStatistics", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.Dictionary TimesStatistics { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("killsStatistics", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.Dictionary KillsStatistics { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gemsStatistics", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.Dictionary GemsStatistics { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFiredStatistics", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.Dictionary DaggersFiredStatistics { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHitStatistics", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.Dictionary DaggersHitStatistics { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playersWithLevel1", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int PlayersWithLevel1 { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playersWithLevel2", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int PlayersWithLevel2 { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("playersWithLevel3Or4", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int PlayersWithLevel3Or4 { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("globalStatistics", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetArrayStatistics GlobalStatistics { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetArrayStatistics - { - [Newtonsoft.Json.JsonProperty("times", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetArrayStatistic Times { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("kills", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetArrayStatistic Kills { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetArrayStatistic Gems { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetArrayStatistic DaggersFired { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHit", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetArrayStatistic DaggersHit { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("accuracy", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetArrayStatistic Accuracy { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetArrayStatistic - { - [Newtonsoft.Json.JsonProperty("average", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Average { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("median", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Median { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("mode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Mode { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetLeaderboardStatisticsDdLive - { - [Newtonsoft.Json.JsonProperty("dateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateTime { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isFetched", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsFetched { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalEntries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int TotalEntries { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("top1000Statistics", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetArrayStatistics Top1000Statistics { get; set; } = default!; - - } - - /// - /// 10 = Top10 - ///
100 = Top100 - ///
1000 = Top1000 - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum LeaderboardStatisticsLimitDdLive - { - - Top10 = 10, - - Top100 = 100, - - Top1000 = 1000, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class PageOfGetModOverview - { - [Newtonsoft.Json.JsonProperty("results", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Results { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalResults", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int TotalResults { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetModOverview - { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("authors", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Authors { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("lastUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime LastUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("modTypes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ModTypes ModTypes { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isHosted", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsHosted { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("containsProhibitedAssets", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ContainsProhibitedAssets { get; set; } = default!; - - } - - /// - /// 0 = None - ///
1 = Audio - ///
2 = Texture - ///
4 = Mesh - ///
8 = Shader - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - [System.Flags] - public enum ModTypes - { - - None = 0, - - Audio = 1, - - Texture = 2, - - Mesh = 4, - - Shader = 8, - - } - - /// - /// 0 = Name - ///
1 = Authors - ///
2 = LastUpdated - ///
3 = ModTypes - ///
4 = Hosted - ///
5 = ProhibitedAssets - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum ModSorting - { - - Name = 0, - - Authors = 1, - - LastUpdated = 2, - - ModTypes = 3, - - Hosted = 4, - - ProhibitedAssets = 5, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetModDdae - { - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("htmlDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? HtmlDescription { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("trailerUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? TrailerUrl { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("authors", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Authors { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("lastUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime LastUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("assetModTypes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ModTypes AssetModTypes { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isHostedOnDdInfo", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsHostedOnDdInfo { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("containsProhibitedAssets", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ContainsProhibitedAssets { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("modArchive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetModArchiveDdae? ModArchive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("screenshotFileNames", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List ScreenshotFileNames { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetModArchiveDdae - { - [Newtonsoft.Json.JsonProperty("fileSize", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long FileSize { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("fileSizeExtracted", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long FileSizeExtracted { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("binaries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Binaries { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetModBinaryDdae - { - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("size", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Size { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("modBinaryType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ModBinaryType ModBinaryType { get; set; } = default!; - - } - - /// - /// 0 = Audio - ///
1 = Dd - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum ModBinaryType - { - - Audio = 0, - - Dd = 1, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetMod - { - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("htmlDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? HtmlDescription { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? Url { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("trailerUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? TrailerUrl { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("authors", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Authors { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("lastUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime LastUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("modTypes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ModTypes ModTypes { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isHosted", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsHosted { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("containsProhibitedAssets", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ContainsProhibitedAssets { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("modArchive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetModArchive? ModArchive { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("screenshotFileNames", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? ScreenshotFileNames { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetModArchive - { - [Newtonsoft.Json.JsonProperty("fileSize", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long FileSize { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("fileSizeExtracted", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long FileSizeExtracted { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("binaries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Binaries { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetModBinary - { - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("size", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Size { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("modBinaryType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ModBinaryType ModBinaryType { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("containsProhibitedAssets", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool ContainsProhibitedAssets { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("assets", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Assets { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("modifiedLoudness", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? ModifiedLoudness { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetModAsset - { - [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public AssetType Type { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("size", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Size { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isProhibited", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsProhibited { get; set; } = default!; - - } - - /// - /// 1 = Mesh - ///
2 = Texture - ///
16 = Shader - ///
32 = Audio - ///
128 = ObjectBinding - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum AssetType - { - - Mesh = 1, - - Texture = 2, - - Shader = 16, - - Audio = 32, - - ObjectBinding = 128, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetModifiedLoudness - { - [Newtonsoft.Json.JsonProperty("assetName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AssetName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isProhibited", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsProhibited { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("defaultLoudness", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public float DefaultLoudness { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("modifiedLoudness", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public float ModifiedLoudness { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetTotalModData - { - [Newtonsoft.Json.JsonProperty("count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Count { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetModName - { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetPlayerForLeaderboard - { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("banType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public BanType BanType { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("banDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? BanDescription { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("banResponsibleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BanResponsibleId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("countryCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? CountryCode { get; set; } = default!; - - } - - /// - /// 0 = NotBanned - ///
1 = Alt - ///
2 = Cheater - ///
3 = Boosted - ///
4 = IllegitimateStats - ///
5 = BlankName - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum BanType - { - - NotBanned = 0, - - Alt = 1, - - Cheater = 2, - - Boosted = 3, - - IllegitimateStats = 4, - - BlankName = 5, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetCommonName - { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("commonName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CommonName { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetPlayerForSettings - { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("countryCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? CountryCode { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("settings", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetPlayerSettings Settings { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetPlayerSettings - { - [Newtonsoft.Json.JsonProperty("dpi", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Dpi { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("inGameSens", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public float? InGameSens { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("fov", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Fov { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isRightHanded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRightHanded { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("usesFlashHand", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsesFlashHand { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gamma", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public float? Gamma { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("usesLegacyAudio", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsesLegacyAudio { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("usesHrtf", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsesHrtf { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("usesInvertY", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsesInvertY { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("verticalSync", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public VerticalSync VerticalSync { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("edpi", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public float? Edpi { get; set; } = default!; - - } - - /// - /// 0 = Unknown - ///
1 = Off - ///
2 = On - ///
3 = Adaptive - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum VerticalSync - { - - Unknown = 0, - - Off = 1, - - On = 2, - - Adaptive = 3, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetPlayer - { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isBanned", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsBanned { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("banDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? BanDescription { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isPublicDonator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsPublicDonator { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("countryCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? CountryCode { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("settings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetPlayerSettings? Settings { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetPlayerHistory - { - [Newtonsoft.Json.JsonProperty("bestRank", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BestRank { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hidePastUsernames", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HidePastUsernames { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("usernames", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Usernames { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("scoreHistory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List ScoreHistory { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("activityHistory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List ActivityHistory { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("rankHistory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List RankHistory { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetPlayerHistoryScoreEntry - { - [Newtonsoft.Json.JsonProperty("dateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateTime { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("rank", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Rank { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Username { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("time", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Time { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("kills", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Kills { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Gems { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte DeathType { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersHit", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersHit { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("daggersFired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersFired { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetPlayerHistoryActivityEntry - { - [Newtonsoft.Json.JsonProperty("dateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateTime { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("deathsIncrement", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double DeathsIncrement { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timeIncrement", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double TimeIncrement { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetPlayerHistoryRankEntry - { - [Newtonsoft.Json.JsonProperty("dateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateTime { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("rank", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Rank { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetPlayerCustomLeaderboardStatistics - { - [Newtonsoft.Json.JsonProperty("customLeaderboardCategory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CustomLeaderboardCategory CustomLeaderboardCategory { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("leviathanDaggerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int LeviathanDaggerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("devilDaggerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DevilDaggerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("goldenDaggerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int GoldenDaggerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("silverDaggerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int SilverDaggerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("bronzeDaggerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int BronzeDaggerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("defaultDaggerCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DefaultDaggerCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("leaderboardsPlayedCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int LeaderboardsPlayedCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int TotalCount { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetPlayerProfile - { - [Newtonsoft.Json.JsonProperty("countryCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? CountryCode { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("dpi", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Dpi { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("inGameSens", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public float? InGameSens { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("fov", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Fov { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isRightHanded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRightHanded { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hasFlashHandEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasFlashHandEnabled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gamma", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public float? Gamma { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("usesLegacyAudio", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsesLegacyAudio { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("usesHrtf", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsesHrtf { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("usesInvertY", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsesInvertY { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("verticalSync", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public VerticalSync VerticalSync { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hideSettings", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HideSettings { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hideDonations", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HideDonations { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hidePastUsernames", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HidePastUsernames { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class EditPlayerProfile - { - [Newtonsoft.Json.JsonProperty("countryCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.StringLength(2)] - public string? CountryCode { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("dpi", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.Range(10, 20000)] - public int? Dpi { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("inGameSens", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.Range(0.00999999977648258D, 2.0D)] - public float? InGameSens { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("fov", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.Range(85, 120)] - public int? Fov { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isRightHanded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRightHanded { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hasFlashHandEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasFlashHandEnabled { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gamma", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.Range(1.0D, 3.0D)] - public float? Gamma { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("usesLegacyAudio", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsesLegacyAudio { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("usesHrtf", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsesHrtf { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("usesInvertY", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsesInvertY { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("verticalSync", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public VerticalSync VerticalSync { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hideSettings", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HideSettings { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hideDonations", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HideDonations { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hidePastUsernames", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HidePastUsernames { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Marker - { - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Value { get; set; } = default!; - - } - - /// - /// 1 = Windows - ///
2 = Linux - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum SupportedOperatingSystem - { - - Windows = 1, - - Linux = 2, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class PageOfGetSpawnsetOverview - { - [Newtonsoft.Json.JsonProperty("results", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Results { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalResults", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int TotalResults { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetSpawnsetOverview - { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("authorName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AuthorName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("lastUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime LastUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gameMode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GameMode GameMode { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("loopLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public float? LoopLength { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("loopSpawnCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int LoopSpawnCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("preLoopLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public float? PreLoopLength { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("preLoopSpawnCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int PreLoopSpawnCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hand", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public HandLevel Hand { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("additionalGems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int AdditionalGems { get; set; } = default!; - - } - - /// - /// 0 = Survival - ///
1 = TimeAttack - ///
2 = Race - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum GameMode - { - - Survival = 0, - - TimeAttack = 1, - - Race = 2, - - } - - /// - /// 0 = Name - ///
1 = AuthorName - ///
2 = LastUpdated - ///
4 = GameMode - ///
5 = LoopLength - ///
6 = LoopSpawnCount - ///
7 = PreLoopLength - ///
8 = PreLoopSpawnCount - ///
9 = Hand - ///
10 = AdditionalGems - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum SpawnsetSorting - { - - Name = 0, - - AuthorName = 1, - - LastUpdated = 2, - - GameMode = 4, - - LoopLength = 5, - - LoopSpawnCount = 6, - - PreLoopLength = 7, - - PreLoopSpawnCount = 8, - - Hand = 9, - - AdditionalGems = 10, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetSpawnsetDdse - { - [Newtonsoft.Json.JsonProperty("maxDisplayWaves", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MaxDisplayWaves { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("htmlDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string? HtmlDescription { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("lastUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime LastUpdated { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("spawnsetData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetSpawnsetDataDdse SpawnsetData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("authorName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AuthorName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hasCustomLeaderboard", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HasCustomLeaderboard { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isPractice", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsPractice { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetSpawnsetDataDdse - { - [Newtonsoft.Json.JsonProperty("spawnVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int SpawnVersion { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("worldVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int WorldVersion { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gameMode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GameMode GameMode { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("nonLoopSpawnCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int NonLoopSpawnCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("loopSpawnCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int LoopSpawnCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("nonLoopLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public float? NonLoopLength { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("loopLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public float? LoopLength { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hand", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte? Hand { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("additionalGems", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AdditionalGems { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("timerStart", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public float? TimerStart { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetSpawnsetByHash - { - [Newtonsoft.Json.JsonProperty("spawnsetId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int SpawnsetId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("authorName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AuthorName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("customLeaderboard", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetSpawnsetByHashCustomLeaderboard? CustomLeaderboard { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetSpawnsetByHashCustomLeaderboard - { - [Newtonsoft.Json.JsonProperty("customLeaderboardId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int CustomLeaderboardId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("customEntries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List CustomEntries { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetSpawnsetByHashCustomEntry - { - [Newtonsoft.Json.JsonProperty("customEntryId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int CustomEntryId { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("time", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Time { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("hasReplay", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool HasReplay { get; set; } = default!; + valueTextArray[i] = ConvertToString(valueArray.GetValue(i), cultureInfo); + } + return string.Join(",", valueTextArray); + } + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetSpawnsetNameByHash + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.1.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetAssetInfo { [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Name { get; set; } = default!; - } + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } = default!; - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetTotalSpawnsetData - { - [Newtonsoft.Json.JsonProperty("count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Count { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("tags", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.List Tags { get; set; } = default!; } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetSpawnset + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.1.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetModDdae { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Name { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("authorName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AuthorName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("isPractice", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsPractice { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("customLeaderboardId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CustomLeaderboardId { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("htmlDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string? HtmlDescription { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("maxDisplayWaves", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MaxDisplayWaves { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("trailerUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string? TrailerUrl { get; set; } = default!; + + [Newtonsoft.Json.JsonProperty("authors", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.List Authors { get; set; } = default!; [Newtonsoft.Json.JsonProperty("lastUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTime LastUpdated { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("fileBytes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte[] FileBytes { get; set; } = default!; - - } - - /// - /// 0 = V1_0 - ///
1 = V2_0 - ///
2 = V3_0 - ///
3 = V3_1 - ///
4 = V3_2 - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum GameVersion - { - - V1_0 = 0, - - V2_0 = 1, - - V3_0 = 2, - - V3_1 = 3, - - V3_2 = 4, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetSpawnsetName - { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetTool - { - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("versionNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string VersionNumber { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("versionNumberRequired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string VersionNumberRequired { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("changelog", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? Changelog { get; set; } = default!; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetToolVersion - { - [Newtonsoft.Json.JsonProperty("versionNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string VersionNumber { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime Date { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("downloadCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DownloadCount { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("assetModTypes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ModTypesDdae AssetModTypes { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("changes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Changes { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("isHostedOnDdInfo", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsHostedOnDdInfo { get; set; } = default!; - } + [Newtonsoft.Json.JsonProperty("containsProhibitedAssets", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? ContainsProhibitedAssets { get; set; } = default!; - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetToolVersionChange - { - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("modArchive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GetModArchiveDdae? ModArchive { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("subChanges", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List? SubChanges { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("screenshotFileNames", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.List ScreenshotFileNames { get; set; } = default!; } /// - /// 0 = SelfContained - ///
1 = Default + /// 0 = None + ///
1 = Audio + ///
2 = Texture + ///
4 = Mesh + ///
8 = Shader ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum ToolPublishMethod + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.1.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.Flags] + public enum ModTypesDdae { - SelfContained = 0, - - Default = 1, + None = 0, - } + Audio = 1, - /// - /// 0 = WindowsWpf - ///
1 = WindowsConsole - ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public enum ToolBuildType - { + Texture = 2, - WindowsWpf = 0, + Mesh = 4, - WindowsConsole = 1, + Shader = 8, } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetToolDistribution + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.1.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetModArchiveDdae { - [Newtonsoft.Json.JsonProperty("versionNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string VersionNumber { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("fileSize", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int FileSize { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("publishMethod", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ToolPublishMethod PublishMethod { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("buildType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ToolBuildType BuildType { get; set; } = default!; - - } + public long FileSize { get; set; } = default!; - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetWorldRecordDataContainer - { - [Newtonsoft.Json.JsonProperty("worldRecordHolders", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List WorldRecordHolders { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("fileSizeExtracted", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long FileSizeExtracted { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("worldRecords", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List WorldRecords { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("binaries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.List Binaries { get; set; } = default!; } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetWorldRecordHolder + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.1.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetModBinaryDdae { - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("usernames", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.List Usernames { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("totalTimeHeld", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan TotalTimeHeld { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("longestTimeHeldConsecutively", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan LongestTimeHeldConsecutively { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("worldRecordCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int WorldRecordCount { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("firstHeld", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime FirstHeld { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("lastHeld", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime LastHeld { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("size", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Size { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("mostRecentUsername", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MostRecentUsername { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("modBinaryType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ModBinaryTypeDdae ModBinaryType { get; set; } = default!; } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetWorldRecord + /// + /// 0 = Audio + ///
1 = Dd + ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.1.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum ModBinaryTypeDdae { - [Newtonsoft.Json.JsonProperty("dateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateTime { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("entry", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetWorldRecordEntry Entry { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("gameVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GameVersion? GameVersion { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("worldRecordDuration", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan WorldRecordDuration { get; set; } = default!; + Audio = 0, - [Newtonsoft.Json.JsonProperty("worldRecordImprovement", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? WorldRecordImprovement { get; set; } = default!; + Dd = 1, } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class GetWorldRecordEntry + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.1.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProblemDetails { - [Newtonsoft.Json.JsonProperty("dateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTime DateTime { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Id { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Username { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string? Type { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("time", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Time { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string? Title { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("kills", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Kills { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Status { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("gems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int Gems { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("detail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string? Detail { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("deathType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte DeathType { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("instance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string? Instance { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("daggersHit", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersHit { get; set; } = default!; + private System.Collections.Generic.IDictionary? _additionalProperties; - [Newtonsoft.Json.JsonProperty("daggersFired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int DaggersFired { get; set; } = default!; + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.1.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class FileResponse : System.IDisposable { private System.IDisposable? _client; @@ -7522,7 +744,7 @@ public void Dispose() } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.1.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class DevilDaggersInfoApiException : System.Exception { public int StatusCode { get; private set; } @@ -7545,7 +767,7 @@ public override string ToString() } } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.1.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class DevilDaggersInfoApiException : DevilDaggersInfoApiException { public TResult Result { get; private set; } @@ -7559,10 +781,14 @@ public DevilDaggersInfoApiException(string message, int statusCode, string? resp } -#pragma warning restore 1591 -#pragma warning restore 1573 -#pragma warning restore 472 -#pragma warning restore 114 #pragma warning restore 108 +#pragma warning restore 114 +#pragma warning restore 472 +#pragma warning restore 612 +#pragma warning restore 1573 +#pragma warning restore 1591 +#pragma warning restore 8073 #pragma warning restore 3016 -#pragma warning restore 8603 \ No newline at end of file +#pragma warning restore 8603 +#pragma warning restore 8604 +#pragma warning restore 8625 \ No newline at end of file diff --git a/DevilDaggersAssetEditor.Wpf/Clients/DevilDaggersInfoApiClient.nswag b/DevilDaggersAssetEditor.Wpf/Clients/DevilDaggersInfoApiClient.nswag index b7e9320f..b95c3c8c 100644 --- a/DevilDaggersAssetEditor.Wpf/Clients/DevilDaggersInfoApiClient.nswag +++ b/DevilDaggersAssetEditor.Wpf/Clients/DevilDaggersInfoApiClient.nswag @@ -3,7 +3,7 @@ "defaultVariables": null, "documentGenerator": { "fromDocument": { - "url": "http://devildaggers.info/swagger/v1/swagger.json", + "url": "https://devildaggers.info/swagger/DDAE/swagger.json", "output": null, "newLineBehavior": "Auto" } @@ -13,7 +13,9 @@ "clientBaseClass": null, "configurationClass": null, "generateClientClasses": true, + "suppressClientClassesOutput": false, "generateClientInterfaces": false, + "suppressClientInterfacesOutput": false, "clientBaseInterface": null, "injectHttpClient": true, "disposeHttpClient": true, @@ -31,6 +33,8 @@ "exposeJsonSerializerSettings": false, "clientClassAccessModifier": "public", "typeAccessModifier": "public", + "propertySetterAccessModifier": "", + "generateNativeRecords": false, "generateContractsOutput": false, "contractsNamespace": null, "contractsOutputFilePath": null, @@ -87,10 +91,6 @@ "generateOptionalPropertiesAsNullable": false, "generateNullableReferenceTypes": true, "templateDirectory": null, - "typeNameGeneratorType": null, - "propertyNameGeneratorType": null, - "enumNameGeneratorType": null, - "checksumCacheEnabled": false, "serviceHost": null, "serviceSchemes": null, "output": "DevilDaggersInfoApiClient.cs", diff --git a/DevilDaggersAssetEditor.Wpf/DevilDaggersAssetEditor.Wpf.csproj b/DevilDaggersAssetEditor.Wpf/DevilDaggersAssetEditor.Wpf.csproj index a2dffedd..e35b5e68 100644 --- a/DevilDaggersAssetEditor.Wpf/DevilDaggersAssetEditor.Wpf.csproj +++ b/DevilDaggersAssetEditor.Wpf/DevilDaggersAssetEditor.Wpf.csproj @@ -3,7 +3,7 @@ WinExe net6.0-windows true - 1.4.0.0 + 1.5.0.0 enable Icon.ico true @@ -19,18 +19,18 @@ - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/DevilDaggersAssetEditor.Wpf/Extensions/DialogExtensions.cs b/DevilDaggersAssetEditor.Wpf/Extensions/DialogExtensions.cs index 85878db8..97344144 100644 --- a/DevilDaggersAssetEditor.Wpf/Extensions/DialogExtensions.cs +++ b/DevilDaggersAssetEditor.Wpf/Extensions/DialogExtensions.cs @@ -7,30 +7,18 @@ namespace DevilDaggersAssetEditor.Wpf.Extensions; public static class DialogExtensions { - public static void OpenDevilDaggersRootFolder(this VistaFolderBrowserDialog folderDialog) - => folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableDevilDaggersRootFolder, UserHandler.Instance.Settings.DevilDaggersRootFolder); - public static void OpenDevilDaggersRootFolder(this FileDialog folderDialog) => folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableDevilDaggersRootFolder, UserHandler.Instance.Settings.DevilDaggersRootFolder); - public static void OpenDevilDaggersModsFolder(this VistaFolderBrowserDialog folderDialog) - => folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableDevilDaggersRootFolder, Path.Combine(UserHandler.Instance.Settings.DevilDaggersRootFolder, "mods")); - public static void OpenDevilDaggersModsFolder(this FileDialog folderDialog) => folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableDevilDaggersRootFolder, Path.Combine(UserHandler.Instance.Settings.DevilDaggersRootFolder, "mods")); - public static void OpenModsRootFolder(this VistaFolderBrowserDialog folderDialog) - => folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableModsRootFolder, UserHandler.Instance.Settings.ModsRootFolder); - public static void OpenModsRootFolder(this FileDialog folderDialog) => folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableModsRootFolder, UserHandler.Instance.Settings.ModsRootFolder); public static void OpenAssetsRootFolder(this VistaFolderBrowserDialog folderDialog) => folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableAssetsRootFolder, UserHandler.Instance.Settings.AssetsRootFolder); - public static void OpenAssetsRootFolder(this FileDialog folderDialog) - => folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableAssetsRootFolder, UserHandler.Instance.Settings.AssetsRootFolder); - public static void OpenDirectory(this VistaFolderBrowserDialog folderDialog, bool condition, string? path) { if (condition && !string.IsNullOrEmpty(path) && Directory.Exists(path)) diff --git a/DevilDaggersAssetEditor.Wpf/Gui/UserControls/AssetRowControl.xaml.cs b/DevilDaggersAssetEditor.Wpf/Gui/UserControls/AssetRowControl.xaml.cs index cf225073..3190f748 100644 --- a/DevilDaggersAssetEditor.Wpf/Gui/UserControls/AssetRowControl.xaml.cs +++ b/DevilDaggersAssetEditor.Wpf/Gui/UserControls/AssetRowControl.xaml.cs @@ -10,7 +10,6 @@ using DevilDaggersAssetEditor.Wpf.Utils; using DevilDaggersCore.Wpf.Utils; using Microsoft.Win32; -using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/DevilDaggersAssetEditor.Wpf/Gui/UserControls/DownloadModsControl.xaml.cs b/DevilDaggersAssetEditor.Wpf/Gui/UserControls/DownloadModsControl.xaml.cs index f7ba03a9..8f22fb25 100644 --- a/DevilDaggersAssetEditor.Wpf/Gui/UserControls/DownloadModsControl.xaml.cs +++ b/DevilDaggersAssetEditor.Wpf/Gui/UserControls/DownloadModsControl.xaml.cs @@ -231,12 +231,12 @@ private void ReloadButton_Click(object sender, RoutedEventArgs e) ReloadButton.Content = "Loading..."; using BackgroundWorker thread = new(); - thread.DoWork += (senderDoWork, eDoWork) => + thread.DoWork += (_, _) => { Task modsTask = NetworkHandler.Instance.RetrieveModList(); modsTask.Wait(); }; - thread.RunWorkerCompleted += (senderRunWorkerCompleted, eRunWorkerCompleted) => + thread.RunWorkerCompleted += (_, _) => { UpdateMods(); UpdatePageLabel(); diff --git a/DevilDaggersAssetEditor.Wpf/Gui/UserControls/PreviewerControls/AudioPreviewerControl.xaml.cs b/DevilDaggersAssetEditor.Wpf/Gui/UserControls/PreviewerControls/AudioPreviewerControl.xaml.cs index 27c3ad2f..2c753edc 100644 --- a/DevilDaggersAssetEditor.Wpf/Gui/UserControls/PreviewerControls/AudioPreviewerControl.xaml.cs +++ b/DevilDaggersAssetEditor.Wpf/Gui/UserControls/PreviewerControls/AudioPreviewerControl.xaml.cs @@ -3,7 +3,6 @@ using DevilDaggersAssetEditor.Utils; using DevilDaggersAssetEditor.Wpf.Audio; using DevilDaggersCore.Wpf.Extensions; -using DevilDaggersCore.Wpf.Windows; using NoahStolk.OpenAlBindings; using NoahStolk.WaveParser; using System; @@ -54,7 +53,7 @@ public AudioPreviewerControl() ResetPitchImage.Source = ((Image)Resources["ResetPitchImage"]).Source; DispatcherTimer timer = new() { Interval = new TimeSpan(0, 0, 0, 0, 10) }; - timer.Tick += (sender, e) => + timer.Tick += (_, _) => { if (_soundSource == null || _soundSource.State == SourceState.Paused) return; diff --git a/DevilDaggersAssetEditor.Wpf/Gui/Windows/Loading.xaml.cs b/DevilDaggersAssetEditor.Wpf/Gui/Windows/Loading.xaml.cs index 8c573fd9..3deb75c7 100644 --- a/DevilDaggersAssetEditor.Wpf/Gui/Windows/Loading.xaml.cs +++ b/DevilDaggersAssetEditor.Wpf/Gui/Windows/Loading.xaml.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; -using System.Windows.Media; namespace DevilDaggersAssetEditor.Wpf.Gui.Windows; @@ -34,50 +33,9 @@ public LoadingWindow() private void RunThreads(object? sender, EventArgs e) { - using BackgroundWorker checkVersionThread = new(); - checkVersionThread.DoWork += (sender, e) => NetworkHandler.Instance.GetOnlineTool(); - checkVersionThread.RunWorkerCompleted += (sender, e) => - { - Dispatcher.Invoke(() => - { - string message = string.Empty; - SolidColorBrush color; - - if (NetworkHandler.Instance.Tool == null || NetworkHandler.Instance.Distribution == null) - { - message = "Error"; - color = ColorUtils.ThemeColors["ErrorText"]; - } - else if (App.LocalVersion < Version.Parse(NetworkHandler.Instance.Tool.VersionNumberRequired)) - { - message = "Warning (update required)"; - color = ColorUtils.ThemeColors["WarningText"]; - } - else if (App.LocalVersion < Version.Parse(NetworkHandler.Instance.Distribution.VersionNumber)) - { - message = "Warning (update recommended)"; - color = ColorUtils.ThemeColors["SuggestionText"]; - } - else - { - message = "OK (up to date)"; - color = ColorUtils.ThemeColors["SuccessText"]; - } - - TaskResultsStackPanel.Children.Add(new TextBlock - { - Text = message, - Foreground = color, - FontWeight = FontWeights.Bold, - }); - }); - - ThreadComplete(); - }; - bool readUserSettingsSuccess = false; using BackgroundWorker readUserSettingsThread = new(); - readUserSettingsThread.DoWork += (sender, e) => + readUserSettingsThread.DoWork += (_, _) => { try { @@ -89,7 +47,7 @@ private void RunThreads(object? sender, EventArgs e) App.Instance.ShowError("Error", "Error while trying to read user settings.", ex); } }; - readUserSettingsThread.RunWorkerCompleted += (sender, e) => + readUserSettingsThread.RunWorkerCompleted += (_, _) => { Dispatcher.Invoke(() => { @@ -106,7 +64,7 @@ private void RunThreads(object? sender, EventArgs e) bool readUserCacheSuccess = false; using BackgroundWorker readUserCacheThread = new(); - readUserCacheThread.DoWork += (sender, e) => + readUserCacheThread.DoWork += (_, _) => { try { @@ -118,7 +76,7 @@ private void RunThreads(object? sender, EventArgs e) App.Instance.ShowError("Error", "Error while trying to read user cache.", ex); } }; - readUserCacheThread.RunWorkerCompleted += (sender, e) => + readUserCacheThread.RunWorkerCompleted += (_, _) => { Dispatcher.Invoke(() => { @@ -135,13 +93,13 @@ private void RunThreads(object? sender, EventArgs e) bool retrieveModsSuccess = false; using BackgroundWorker retrieveModsThread = new(); - retrieveModsThread.DoWork += (sender, e) => + retrieveModsThread.DoWork += (_, _) => { Task modsTask = NetworkHandler.Instance.RetrieveModList(); modsTask.Wait(); retrieveModsSuccess = modsTask.Result; }; - retrieveModsThread.RunWorkerCompleted += (sender, e) => + retrieveModsThread.RunWorkerCompleted += (_, _) => { Dispatcher.Invoke(() => { @@ -158,13 +116,13 @@ private void RunThreads(object? sender, EventArgs e) bool retrieveAssetInfoSuccess = false; using BackgroundWorker retrieveAssetInfoThread = new(); - retrieveAssetInfoThread.DoWork += (sender, e) => + retrieveAssetInfoThread.DoWork += (_, _) => { Task assetInfoTask = NetworkHandler.Instance.RetrieveAssetInfo(); assetInfoTask.Wait(); retrieveAssetInfoSuccess = assetInfoTask.Result; }; - retrieveAssetInfoThread.RunWorkerCompleted += (sender, e) => + retrieveAssetInfoThread.RunWorkerCompleted += (_, _) => { Dispatcher.Invoke(() => { @@ -180,7 +138,7 @@ private void RunThreads(object? sender, EventArgs e) }; using BackgroundWorker mainInitThread = new(); - mainInitThread.DoWork += (sender, e) => + mainInitThread.DoWork += (_, _) => { Dispatcher.Invoke(() => { @@ -188,16 +146,14 @@ private void RunThreads(object? sender, EventArgs e) mainWindow.Show(); }); }; - mainInitThread.RunWorkerCompleted += (sender, e) => Close(); + mainInitThread.RunWorkerCompleted += (_, _) => Close(); - _threads.Add(checkVersionThread); _threads.Add(readUserSettingsThread); _threads.Add(readUserCacheThread); _threads.Add(retrieveModsThread); _threads.Add(retrieveAssetInfoThread); _threads.Add(mainInitThread); - _threadMessages.Add("Checking for updates..."); _threadMessages.Add("Reading user settings..."); _threadMessages.Add("Reading user cache..."); _threadMessages.Add("Retrieving mods..."); diff --git a/DevilDaggersAssetEditor.Wpf/Gui/Windows/Main.xaml b/DevilDaggersAssetEditor.Wpf/Gui/Windows/Main.xaml index 8d66c92a..8cd08062 100644 --- a/DevilDaggersAssetEditor.Wpf/Gui/Windows/Main.xaml +++ b/DevilDaggersAssetEditor.Wpf/Gui/Windows/Main.xaml @@ -55,9 +55,7 @@ - - diff --git a/DevilDaggersAssetEditor.Wpf/Gui/Windows/Main.xaml.cs b/DevilDaggersAssetEditor.Wpf/Gui/Windows/Main.xaml.cs index 30e033a1..1252b8e0 100644 --- a/DevilDaggersAssetEditor.Wpf/Gui/Windows/Main.xaml.cs +++ b/DevilDaggersAssetEditor.Wpf/Gui/Windows/Main.xaml.cs @@ -7,9 +7,7 @@ using DevilDaggersAssetEditor.Wpf.Gui.UserControls; using DevilDaggersAssetEditor.Wpf.Gui.UserControls.PreviewerControls; using DevilDaggersAssetEditor.Wpf.ModFiles; -using DevilDaggersAssetEditor.Wpf.Network; using DevilDaggersAssetEditor.Wpf.Utils; -using DevilDaggersCore.Wpf.Models; using DevilDaggersCore.Wpf.Windows; using Microsoft.Win32; using System; @@ -52,25 +50,9 @@ public MainWindow() { InitializeComponent(); - if (NetworkHandler.Instance.Distribution != null && App.LocalVersion < Version.Parse(NetworkHandler.Instance.Distribution.VersionNumber)) - { - HelpItem.Header += " (Update available)"; - HelpItem.FontWeight = FontWeights.Bold; - - foreach (MenuItem? menuItem in HelpItem.Items) - { - if (menuItem == null) - continue; - menuItem.FontWeight = FontWeights.Normal; - } - - UpdateItem.Header = "Update available"; - UpdateItem.FontWeight = FontWeights.Bold; - } - #if DEBUG MenuItem debugItem = new() { Header = "Open debug window" }; - debugItem.Click += (sender, e) => + debugItem.Click += (_, _) => { DebugWindow debugWindow = new(); debugWindow.ShowDialog(); @@ -106,10 +88,6 @@ public MainWindow() public Point CurrentTabControlSize { get; private set; } - public double PathSize { get; private set; } - public double DescriptionSize { get; private set; } - public double TagsSize { get; private set; } - public bool HasLoaded { get; private set; } public bool HasAnyAudioFiles() @@ -128,14 +106,8 @@ private void Window_Loaded(object sender, RoutedEventArgs e) { ModFileHandler.Instance.FileOpen(UserHandler.Instance.Cache.OpenedModFilePath); - if (NetworkHandler.Instance.Distribution != null && App.LocalVersion < Version.Parse(NetworkHandler.Instance.Distribution.VersionNumber)) - { - UpdateRecommendedWindow updateRecommendedWindow = new(NetworkHandler.Instance.Distribution.VersionNumber, App.LocalVersion.ToString(), GetUpdateUrl(), App.ApplicationDisplayName); - updateRecommendedWindow.ShowDialog(); - } - using BackgroundWorker heavyGuiThread = new(); - heavyGuiThread.DoWork += (sender, e) => + heavyGuiThread.DoWork += (_, _) => { Dispatcher.Invoke(() => { @@ -161,7 +133,7 @@ private void Window_Loaded(object sender, RoutedEventArgs e) HasLoaded = true; }); }; - heavyGuiThread.RunWorkerCompleted += (sender, e) => + heavyGuiThread.RunWorkerCompleted += (_, _) => { UpdateTextBoxSizes(); UpdateHeights(); @@ -291,52 +263,9 @@ private void About_Click(object sender, RoutedEventArgs e) aboutWindow.ShowDialog(); } - private void Changelog_Click(object sender, RoutedEventArgs e) - { - if (NetworkHandler.Instance.Tool != null) - { - List changes = NetworkHandler.Instance.Tool.Changelog?.ConvertAll(c => new ChangelogEntry(Version.Parse(c.VersionNumber), c.Date, MapToSharedModel(c.Changes)?.ToList() ?? new())) ?? new(); - ChangelogWindow changelogWindow = new(changes, App.LocalVersion); - changelogWindow.ShowDialog(); - } - else - { - App.Instance.ShowError("Changelog not retrieved", "The changelog has not been retrieved from DevilDaggers.info."); - } - - static IEnumerable? MapToSharedModel(List? changes) - { - foreach (Clients.GetToolVersionChange change in changes ?? new()) - yield return new(change.Description, MapToSharedModel(change.SubChanges)?.ToList()); - } - } - private void ViewSourceCode_Click(object sender, RoutedEventArgs e) => ProcessUtils.OpenUrl(UrlUtils.SourceCode); - private void CheckForUpdates_Click(object sender, RoutedEventArgs e) - { - CheckingForUpdatesWindow window = new(NetworkHandler.Instance.GetOnlineTool); - window.ShowDialog(); - - if (NetworkHandler.Instance.Distribution != null) - { - if (App.LocalVersion < Version.Parse(NetworkHandler.Instance.Distribution.VersionNumber)) - { - UpdateRecommendedWindow updateRecommendedWindow = new(NetworkHandler.Instance.Distribution.VersionNumber, App.LocalVersion.ToString(), GetUpdateUrl(), App.ApplicationDisplayName); - updateRecommendedWindow.ShowDialog(); - } - else - { - App.Instance.ShowMessage("Up to date", $"{App.ApplicationDisplayName} {App.LocalVersion} is up to date."); - } - } - else - { - App.Instance.ShowError("Error retrieving tool information", "An error occurred while attempting to retrieve tool information from the API."); - } - } - private void Window_Closing(object sender, CancelEventArgs e) { UserHandler.Instance.SaveSettings(); @@ -422,11 +351,4 @@ private void UpdateHeights() } #endregion GUI Responsiveness - - private static string GetUpdateUrl() - { - int publishMethod = (int)DistributionUtils.GetPublishMethod(); - const int buildType = (int)Clients.ToolBuildType.WindowsWpf; - return $"{NetworkHandler.BaseUrl}/api/tools/{App.ApplicationName}/file?publishMethod={publishMethod}&buildType={buildType}"; - } } diff --git a/DevilDaggersAssetEditor.Wpf/Network/NetworkHandler.cs b/DevilDaggersAssetEditor.Wpf/Network/NetworkHandler.cs index 4e3983b2..84fe534b 100644 --- a/DevilDaggersAssetEditor.Wpf/Network/NetworkHandler.cs +++ b/DevilDaggersAssetEditor.Wpf/Network/NetworkHandler.cs @@ -1,6 +1,5 @@ using DevilDaggersAssetEditor.Assets; using DevilDaggersAssetEditor.Wpf.Clients; -using DevilDaggersAssetEditor.Wpf.Utils; using System; using System.Collections.Generic; using System.Linq; @@ -11,51 +10,30 @@ namespace DevilDaggersAssetEditor.Wpf.Network; public sealed class NetworkHandler { #if TESTING - public static readonly string BaseUrl = "https://localhost:44318"; + private const string _baseUrl = "https://localhost:44318"; #else - public static readonly string BaseUrl = "https://devildaggers.info"; + private const string _baseUrl = "https://devildaggers.info"; #endif private static readonly Lazy _lazy = new(() => new()); + private readonly DevilDaggersInfoApiClient _apiClient; + private NetworkHandler() { - ApiClient = new(new() { BaseAddress = new(BaseUrl) }); + _apiClient = new(new() { BaseAddress = new(_baseUrl) }); } public static NetworkHandler Instance => _lazy.Value; - public DevilDaggersInfoApiClient ApiClient { get; } - - public GetTool? Tool { get; private set; } - - public GetToolDistribution? Distribution { get; private set; } - public List Mods { get; } = new(); - public bool GetOnlineTool() - { - try - { - Tool = ApiClient.Tools_GetToolAsync(App.ApplicationName).Result; - - Distribution = ApiClient.Tools_GetLatestToolDistributionAsync(App.ApplicationName, DistributionUtils.GetPublishMethod(), ToolBuildType.WindowsWpf).Result; - - return true; - } - catch (Exception ex) - { - App.Instance.ShowError("Error retrieving tool information", "An error occurred while attempting to retrieve tool information from the API.", ex); - return false; - } - } - public async Task RetrieveModList() { try { Mods.Clear(); - Mods.AddRange(await ApiClient.Mods_GetModsForDdaeAsync(null, null, true)); + Mods.AddRange(await _apiClient.Mods_GetModsAsync(null, null, true)); return true; } @@ -70,7 +48,7 @@ public async Task RetrieveAssetInfo() { try { - foreach (KeyValuePair> kvp in await ApiClient.Assets_GetAssetInfoForDdaeAsync()) + foreach (KeyValuePair> kvp in await _apiClient.Assets_GetAssetInfoAsync()) { List? assets = (kvp.Key switch { diff --git a/DevilDaggersAssetEditor.Wpf/Utils/DistributionUtils.cs b/DevilDaggersAssetEditor.Wpf/Utils/DistributionUtils.cs deleted file mode 100644 index 74087be6..00000000 --- a/DevilDaggersAssetEditor.Wpf/Utils/DistributionUtils.cs +++ /dev/null @@ -1,15 +0,0 @@ -using DevilDaggersAssetEditor.Wpf.Clients; - -namespace DevilDaggersAssetEditor.Wpf.Utils; - -public static class DistributionUtils -{ - public static ToolPublishMethod GetPublishMethod() - { -#if SELF_CONTAINED - return ToolPublishMethod.SelfContained; -#else - return ToolPublishMethod.Default; -#endif - } -} diff --git a/DevilDaggersAssetEditor.Wpf/Utils/EditorUtils.cs b/DevilDaggersAssetEditor.Wpf/Utils/EditorUtils.cs index 7ec1958f..202c425d 100644 --- a/DevilDaggersAssetEditor.Wpf/Utils/EditorUtils.cs +++ b/DevilDaggersAssetEditor.Wpf/Utils/EditorUtils.cs @@ -1,13 +1,7 @@ -using System; -using System.Reflection; - namespace DevilDaggersAssetEditor.Wpf.Utils; public static class EditorUtils { - public static Uri MakeUri(string localPath) - => new($"pack://application:,,,/{Assembly.GetCallingAssembly().GetName().Name};component/{localPath}"); - public static System.Windows.Media.Color FromRgbTuple((byte R, byte G, byte B) tuple) => System.Windows.Media.Color.FromRgb(tuple.R, tuple.G, tuple.B); } diff --git a/DevilDaggersAssetEditor.Wpf/Utils/UrlUtils.cs b/DevilDaggersAssetEditor.Wpf/Utils/UrlUtils.cs index 04960d52..34ad943d 100644 --- a/DevilDaggersAssetEditor.Wpf/Utils/UrlUtils.cs +++ b/DevilDaggersAssetEditor.Wpf/Utils/UrlUtils.cs @@ -5,14 +5,14 @@ namespace DevilDaggersAssetEditor.Wpf.Utils; public static class UrlUtils { #if TESTING - public static Uri BaseUrl { get; } = new("http://localhost:2963"); + private static readonly Uri _baseUrl = new("http://localhost:2963"); #else - public static Uri BaseUrl { get; } = new("https://devildaggers.info"); + private static readonly Uri _baseUrl = new("https://devildaggers.info"); #endif public static string DiscordInviteLink => "https://discord.gg/NF32j8S"; - public static string GuidePage => $"{BaseUrl}guides/asset-editor"; + public static string GuidePage => $"{_baseUrl}guides/asset-editor"; public static string SourceCode => $"https://github.com/NoahStolk/{App.ApplicationName}"; } diff --git a/DevilDaggersAssetEditor.sln.DotSettings b/DevilDaggersAssetEditor.sln.DotSettings new file mode 100644 index 00000000..2e4af3d3 --- /dev/null +++ b/DevilDaggersAssetEditor.sln.DotSettings @@ -0,0 +1,2 @@ + + True \ No newline at end of file diff --git a/DevilDaggersAssetEditor/DevilDaggersAssetEditor.csproj b/DevilDaggersAssetEditor/DevilDaggersAssetEditor.csproj index f4f799e8..a5c0e2c0 100644 --- a/DevilDaggersAssetEditor/DevilDaggersAssetEditor.csproj +++ b/DevilDaggersAssetEditor/DevilDaggersAssetEditor.csproj @@ -11,13 +11,13 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/DevilDaggersAssetEditor/Extensions/EnumExtensions.cs b/DevilDaggersAssetEditor/Extensions/EnumExtensions.cs index 0f554c2b..55a18c0f 100644 --- a/DevilDaggersAssetEditor/Extensions/EnumExtensions.cs +++ b/DevilDaggersAssetEditor/Extensions/EnumExtensions.cs @@ -41,7 +41,7 @@ public static class EnumExtensions AssetType.Model => (255, 0, 0), AssetType.Shader => (0, 255, 0), AssetType.Texture => (255, 127, 0), - _ => throw new NotSupportedException($"{nameof(AssetType)} '{assetType}' is not supported in the {nameof(GetFolderName)} method."), + _ => throw new NotSupportedException($"{nameof(AssetType)} '{assetType}' is not supported in the {nameof(GetColor)} method."), }; public static byte GetBinaryType(this AssetType assetType) => assetType switch diff --git a/DevilDaggersAssetEditor/Utils/AssemblyUtils.cs b/DevilDaggersAssetEditor/Utils/AssemblyUtils.cs index e3599db6..f7f344e8 100644 --- a/DevilDaggersAssetEditor/Utils/AssemblyUtils.cs +++ b/DevilDaggersAssetEditor/Utils/AssemblyUtils.cs @@ -1,5 +1,3 @@ -using System; -using System.Diagnostics; using System.IO; using System.Reflection; @@ -7,10 +5,6 @@ namespace DevilDaggersAssetEditor.Utils; public static class AssemblyUtils { - public static Assembly CurrentAssembly => Assembly.GetExecutingAssembly(); - - internal static Version LocalVersion => Version.Parse(FileVersionInfo.GetVersionInfo(CurrentAssembly.Location).FileVersion ?? throw new("Could not get file version from current assembly.")); - public static Stream GetContentStream(string relativeContentName) - => CurrentAssembly.GetManifestResourceStream($"DevilDaggersAssetEditor.Content.{relativeContentName}") ?? throw new($"Could not retrieve content stream '{relativeContentName}'."); + => Assembly.GetExecutingAssembly().GetManifestResourceStream($"DevilDaggersAssetEditor.Content.{relativeContentName}") ?? throw new($"Could not retrieve content stream '{relativeContentName}'."); } diff --git a/DevilDaggersAssetEditor/Utils/LogUtils.cs b/DevilDaggersAssetEditor/Utils/LogUtils.cs deleted file mode 100644 index d8e31957..00000000 --- a/DevilDaggersAssetEditor/Utils/LogUtils.cs +++ /dev/null @@ -1,9 +0,0 @@ -using log4net; -using System.Reflection; - -namespace DevilDaggersAssetEditor.Utils; - -public static class LogUtils -{ - public static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod()!.DeclaringType); -}