mirror of
https://github.com/tribufu/tribufu-dotnet
synced 2025-06-15 18:04:18 +00:00
Create wrapper class
This commit is contained in:
@ -1 +1,2 @@
|
||||
TRIBUFU_API_KEY=""
|
||||
TRIBUFU_API_URL="https://api.tribufu.com"
|
||||
|
@ -1,60 +1,60 @@
|
||||
src/Tribufu/Api/TribufuApi.cs
|
||||
src/Tribufu/Client/ApiClient.cs
|
||||
src/Tribufu/Client/ApiException.cs
|
||||
src/Tribufu/Client/ApiResponse.cs
|
||||
src/Tribufu/Client/ClientUtils.cs
|
||||
src/Tribufu/Client/Configuration.cs
|
||||
src/Tribufu/Client/ExceptionFactory.cs
|
||||
src/Tribufu/Client/GlobalConfiguration.cs
|
||||
src/Tribufu/Client/HttpMethod.cs
|
||||
src/Tribufu/Client/IApiAccessor.cs
|
||||
src/Tribufu/Client/IAsynchronousClient.cs
|
||||
src/Tribufu/Client/IReadableConfiguration.cs
|
||||
src/Tribufu/Client/ISynchronousClient.cs
|
||||
src/Tribufu/Client/Multimap.cs
|
||||
src/Tribufu/Client/OpenAPIDateConverter.cs
|
||||
src/Tribufu/Client/RequestOptions.cs
|
||||
src/Tribufu/Client/RetryConfiguration.cs
|
||||
src/Tribufu/Model/AbstractOpenAPISchema.cs
|
||||
src/Tribufu/Model/Account.cs
|
||||
src/Tribufu/Model/Application.cs
|
||||
src/Tribufu/Model/ApplicationType.cs
|
||||
src/Tribufu/Model/AuthorizeRequest.cs
|
||||
src/Tribufu/Model/CodeChallengeMethod.cs
|
||||
src/Tribufu/Model/CryptoViewModel.cs
|
||||
src/Tribufu/Model/Game.cs
|
||||
src/Tribufu/Model/GameServer.cs
|
||||
src/Tribufu/Model/GameServerCluster.cs
|
||||
src/Tribufu/Model/GrantType.cs
|
||||
src/Tribufu/Model/Group.cs
|
||||
src/Tribufu/Model/GroupGame.cs
|
||||
src/Tribufu/Model/GroupMember.cs
|
||||
src/Tribufu/Model/GroupRank.cs
|
||||
src/Tribufu/Model/HashViewModel.cs
|
||||
src/Tribufu/Model/IntrospectRequest.cs
|
||||
src/Tribufu/Model/IpAddress.cs
|
||||
src/Tribufu/Model/LeaderboardItem.cs
|
||||
src/Tribufu/Model/LeaderboardOrder.cs
|
||||
src/Tribufu/Model/LoginProvider.cs
|
||||
src/Tribufu/Model/LoginRequest.cs
|
||||
src/Tribufu/Model/LoginResponse.cs
|
||||
src/Tribufu/Model/Package.cs
|
||||
src/Tribufu/Model/Profile.cs
|
||||
src/Tribufu/Model/ProfileGame.cs
|
||||
src/Tribufu/Model/ProfileGroup.cs
|
||||
src/Tribufu/Model/RefreshRequest.cs
|
||||
src/Tribufu/Model/RegisterRequest.cs
|
||||
src/Tribufu/Model/ResponseType.cs
|
||||
src/Tribufu/Model/RevokeRequest.cs
|
||||
src/Tribufu/Model/SearchRequest.cs
|
||||
src/Tribufu/Model/SearchType.cs
|
||||
src/Tribufu/Model/ServerMetrics.cs
|
||||
src/Tribufu/Model/ServerStatus.cs
|
||||
src/Tribufu/Model/Subscription.cs
|
||||
src/Tribufu/Model/TokenHintType.cs
|
||||
src/Tribufu/Model/TokenRequest.cs
|
||||
src/Tribufu/Model/TokenResponse.cs
|
||||
src/Tribufu/Model/TokenType.cs
|
||||
src/Tribufu/Model/UpdateProfile.cs
|
||||
src/Tribufu/Model/UserInfo.cs
|
||||
src/Tribufu/Model/UserType.cs
|
||||
src/Tribufu.Generated/Api/TribufuGeneratedApi.cs
|
||||
src/Tribufu.Generated/Client/ApiClient.cs
|
||||
src/Tribufu.Generated/Client/ApiException.cs
|
||||
src/Tribufu.Generated/Client/ApiResponse.cs
|
||||
src/Tribufu.Generated/Client/ClientUtils.cs
|
||||
src/Tribufu.Generated/Client/Configuration.cs
|
||||
src/Tribufu.Generated/Client/ExceptionFactory.cs
|
||||
src/Tribufu.Generated/Client/GlobalConfiguration.cs
|
||||
src/Tribufu.Generated/Client/HttpMethod.cs
|
||||
src/Tribufu.Generated/Client/IApiAccessor.cs
|
||||
src/Tribufu.Generated/Client/IAsynchronousClient.cs
|
||||
src/Tribufu.Generated/Client/IReadableConfiguration.cs
|
||||
src/Tribufu.Generated/Client/ISynchronousClient.cs
|
||||
src/Tribufu.Generated/Client/Multimap.cs
|
||||
src/Tribufu.Generated/Client/OpenAPIDateConverter.cs
|
||||
src/Tribufu.Generated/Client/RequestOptions.cs
|
||||
src/Tribufu.Generated/Client/RetryConfiguration.cs
|
||||
src/Tribufu.Generated/Model/AbstractOpenAPISchema.cs
|
||||
src/Tribufu.Generated/Model/Account.cs
|
||||
src/Tribufu.Generated/Model/Application.cs
|
||||
src/Tribufu.Generated/Model/ApplicationType.cs
|
||||
src/Tribufu.Generated/Model/AuthorizeRequest.cs
|
||||
src/Tribufu.Generated/Model/CodeChallengeMethod.cs
|
||||
src/Tribufu.Generated/Model/CryptoViewModel.cs
|
||||
src/Tribufu.Generated/Model/Game.cs
|
||||
src/Tribufu.Generated/Model/GameServer.cs
|
||||
src/Tribufu.Generated/Model/GameServerCluster.cs
|
||||
src/Tribufu.Generated/Model/GrantType.cs
|
||||
src/Tribufu.Generated/Model/Group.cs
|
||||
src/Tribufu.Generated/Model/GroupGame.cs
|
||||
src/Tribufu.Generated/Model/GroupMember.cs
|
||||
src/Tribufu.Generated/Model/GroupRank.cs
|
||||
src/Tribufu.Generated/Model/HashViewModel.cs
|
||||
src/Tribufu.Generated/Model/IntrospectRequest.cs
|
||||
src/Tribufu.Generated/Model/IpAddress.cs
|
||||
src/Tribufu.Generated/Model/LeaderboardItem.cs
|
||||
src/Tribufu.Generated/Model/LeaderboardOrder.cs
|
||||
src/Tribufu.Generated/Model/LoginProvider.cs
|
||||
src/Tribufu.Generated/Model/LoginRequest.cs
|
||||
src/Tribufu.Generated/Model/LoginResponse.cs
|
||||
src/Tribufu.Generated/Model/Package.cs
|
||||
src/Tribufu.Generated/Model/Profile.cs
|
||||
src/Tribufu.Generated/Model/ProfileGame.cs
|
||||
src/Tribufu.Generated/Model/ProfileGroup.cs
|
||||
src/Tribufu.Generated/Model/RefreshRequest.cs
|
||||
src/Tribufu.Generated/Model/RegisterRequest.cs
|
||||
src/Tribufu.Generated/Model/ResponseType.cs
|
||||
src/Tribufu.Generated/Model/RevokeRequest.cs
|
||||
src/Tribufu.Generated/Model/SearchRequest.cs
|
||||
src/Tribufu.Generated/Model/SearchType.cs
|
||||
src/Tribufu.Generated/Model/ServerMetrics.cs
|
||||
src/Tribufu.Generated/Model/ServerStatus.cs
|
||||
src/Tribufu.Generated/Model/Subscription.cs
|
||||
src/Tribufu.Generated/Model/TokenHintType.cs
|
||||
src/Tribufu.Generated/Model/TokenRequest.cs
|
||||
src/Tribufu.Generated/Model/TokenResponse.cs
|
||||
src/Tribufu.Generated/Model/TokenType.cs
|
||||
src/Tribufu.Generated/Model/UpdateProfile.cs
|
||||
src/Tribufu.Generated/Model/UserInfo.cs
|
||||
src/Tribufu.Generated/Model/UserType.cs
|
||||
|
14
Tribufu.sln
14
Tribufu.sln
@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tribufu", "src\Tribufu\Tribufu.csproj", "{7B7890D8-863A-4F1D-98C0-4B7D8C46CB52}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tribufu.Generated", "src\Tribufu.Generated\Tribufu.Generated.csproj", "{FF9B3170-0FD8-44A5-B6E3-01A8D11D2BEF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tribufu.Example", "src\Tribufu.Example\Tribufu.Example.csproj", "{D6392A29-E2DC-4050-B4C1-B279DD2D226D}"
|
||||
EndProject
|
||||
Global
|
||||
@ -27,6 +29,18 @@ Global
|
||||
{7B7890D8-863A-4F1D-98C0-4B7D8C46CB52}.Release|x64.Build.0 = Release|Any CPU
|
||||
{7B7890D8-863A-4F1D-98C0-4B7D8C46CB52}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{7B7890D8-863A-4F1D-98C0-4B7D8C46CB52}.Release|x86.Build.0 = Release|Any CPU
|
||||
{FF9B3170-0FD8-44A5-B6E3-01A8D11D2BEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FF9B3170-0FD8-44A5-B6E3-01A8D11D2BEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FF9B3170-0FD8-44A5-B6E3-01A8D11D2BEF}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{FF9B3170-0FD8-44A5-B6E3-01A8D11D2BEF}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{FF9B3170-0FD8-44A5-B6E3-01A8D11D2BEF}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{FF9B3170-0FD8-44A5-B6E3-01A8D11D2BEF}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{FF9B3170-0FD8-44A5-B6E3-01A8D11D2BEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FF9B3170-0FD8-44A5-B6E3-01A8D11D2BEF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FF9B3170-0FD8-44A5-B6E3-01A8D11D2BEF}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{FF9B3170-0FD8-44A5-B6E3-01A8D11D2BEF}.Release|x64.Build.0 = Release|Any CPU
|
||||
{FF9B3170-0FD8-44A5-B6E3-01A8D11D2BEF}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{FF9B3170-0FD8-44A5-B6E3-01A8D11D2BEF}.Release|x86.Build.0 = Release|Any CPU
|
||||
{D6392A29-E2DC-4050-B4C1-B279DD2D226D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D6392A29-E2DC-4050-B4C1-B279DD2D226D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D6392A29-E2DC-4050-B4C1-B279DD2D226D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
|
@ -7,6 +7,6 @@ java -jar ./vendor/openapi-generator/openapi-generator-cli.jar generate `
|
||||
-g csharp `
|
||||
-o . `
|
||||
--global-property apis,models,supportingFiles,apiDocs=false,modelDocs=false,apiTests=false,modelTests=false `
|
||||
--additional-properties=packageName=Tribufu,library=restsharp,apiName=TribufuApi,zeroBasedEnums=true,nullableReferenceTypes=true `
|
||||
--openapi-normalizer SET_TAGS_FOR_ALL_OPERATIONS=Tribufu `
|
||||
--additional-properties=packageName=Tribufu.Generated,library=restsharp,zeroBasedEnums=true,nullableReferenceTypes=true `
|
||||
--openapi-normalizer SET_TAGS_FOR_ALL_OPERATIONS=TribufuGenerated `
|
||||
--skip-validate-spec
|
||||
|
@ -2,8 +2,7 @@
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
|
||||
using dotenv.net;
|
||||
using Tribufu.Api;
|
||||
using Tribufu.Client;
|
||||
using Tribufu.Generated.Client;
|
||||
|
||||
namespace Tribufu.Test
|
||||
{
|
||||
@ -13,31 +12,19 @@ namespace Tribufu.Test
|
||||
{
|
||||
DotEnv.Load(new DotEnvOptions(ignoreExceptions: true, envFilePaths: [".env", "../../.env"]));
|
||||
|
||||
var config = new Configuration
|
||||
{
|
||||
BasePath = "https://api.tribufu.com"
|
||||
};
|
||||
|
||||
var apiKey = Environment.GetEnvironmentVariable("TRIBUFU_API_KEY");
|
||||
if (!string.IsNullOrEmpty(apiKey))
|
||||
{
|
||||
config.AddApiKey("Authorization", "DvyTVeT6EBsvqsPE1mRuW7ewwiP1f9playWE9wLTmdXnCuBQqBrluhU0p1KXYaRi");
|
||||
config.AddApiKeyPrefix("Authorization", "ApiKey");
|
||||
}
|
||||
var tribufu = new TribufuApi(apiKey ?? "");
|
||||
|
||||
var tribufu = new TribufuApi(config);
|
||||
Console.WriteLine(TribufuApi.GetVersion());
|
||||
|
||||
try
|
||||
{
|
||||
var result = await tribufu.GetUserInfoAsync();
|
||||
Console.WriteLine("Result:");
|
||||
Console.WriteLine(result);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Console.WriteLine("---- API Error ----");
|
||||
Console.WriteLine($"Status: {e.ErrorCode}");
|
||||
Console.WriteLine($"Details: {e.Data}");
|
||||
Console.WriteLine(e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -30,9 +30,9 @@ using RestSharp.Serializers;
|
||||
using RestSharpMethod = RestSharp.Method;
|
||||
using FileIO = System.IO.File;
|
||||
using Polly;
|
||||
using Tribufu.Model;
|
||||
using Tribufu.Generated.Model;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows RestSharp to Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON.
|
@ -11,7 +11,7 @@
|
||||
|
||||
using System;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// API Exception
|
@ -13,7 +13,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a non-generic contract for the ApiResponse wrapper.
|
@ -19,7 +19,7 @@ using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility functions providing some benefit to API client consumers.
|
@ -21,7 +21,7 @@ using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Net.Security;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a set of configuration settings
|
||||
@ -537,7 +537,7 @@ namespace Tribufu.Client
|
||||
/// </summary>
|
||||
public static string ToDebugReport()
|
||||
{
|
||||
string report = "C# SDK (Tribufu) Debug Report:\n";
|
||||
string report = "C# SDK (Tribufu.Generated) Debug Report:\n";
|
||||
report += " OS: " + System.Environment.OSVersion + "\n";
|
||||
report += " .NET Framework Version: " + System.Environment.Version + "\n";
|
||||
report += " Version of the API: 1.1.0\n";
|
@ -11,7 +11,7 @@
|
||||
|
||||
using System;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// A delegate to ExceptionFactory method
|
@ -11,7 +11,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="GlobalConfiguration"/> provides a compile-time extension point for globally configuring
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Http methods supported by swagger
|
@ -11,7 +11,7 @@
|
||||
|
||||
using System;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents configuration aspects required to interact with the API endpoints.
|
@ -12,7 +12,7 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Contract for Asynchronous RESTful API interactions.
|
@ -15,7 +15,7 @@ using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a readable-only configuration contract.
|
@ -12,7 +12,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Contract for Synchronous RESTful API interactions.
|
@ -13,7 +13,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// A dictionary in which one key has many associated values.
|
@ -10,7 +10,7 @@
|
||||
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Formatter for 'date' openapi formats ss defined by full-date - RFC3339
|
@ -14,7 +14,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// A container for generalized request inputs. This type allows consumers to extend the request functionality
|
@ -12,7 +12,7 @@
|
||||
using Polly;
|
||||
using RestSharp;
|
||||
|
||||
namespace Tribufu.Client
|
||||
namespace Tribufu.Generated.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Configuration class to set the polly retry policies to be applied to the requests.
|
@ -13,7 +13,7 @@ using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Account
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Application
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines ApplicationType
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// AuthorizeRequest
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines CodeChallengeMethod
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// CryptoViewModel
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Game
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// GameServer
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// GameServerCluster
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines GrantType
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Group
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// GroupGame
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// GroupMember
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines GroupRank
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// HashViewModel
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// IntrospectRequest
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// IpAddress
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// LeaderboardItem
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines LeaderboardOrder
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines LoginProvider
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// LoginRequest
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// LoginResponse
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Package
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Profile
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// ProfileGame
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// ProfileGroup
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// RefreshRequest
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// RegisterRequest
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines ResponseType
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// RevokeRequest
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// SearchRequest
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines SearchType
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// ServerMetrics
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines ServerStatus
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Subscription
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines TokenHintType
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// TokenRequest
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// TokenResponse
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines TokenType
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// UpdateProfile
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// UserInfo
|
@ -22,9 +22,9 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
namespace Tribufu.Generated.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines UserType
|
1
src/Tribufu.Generated/README.md
Normal file
1
src/Tribufu.Generated/README.md
Normal file
@ -0,0 +1 @@
|
||||
# Tribufu
|
27
src/Tribufu.Generated/Tribufu.Generated.csproj
Normal file
27
src/Tribufu.Generated/Tribufu.Generated.csproj
Normal file
@ -0,0 +1,27 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<PackageId>Tribufu.Generated</PackageId>
|
||||
<Description>Tribufu .NET SDK</Description>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>annotations</Nullable>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFrameworks>net6.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="dotenv.net" />
|
||||
<PackageReference Include="JsonSubTypes" />
|
||||
<PackageReference Include="Newtonsoft.Json" />
|
||||
<PackageReference Include="Polly" />
|
||||
<PackageReference Include="RestSharp" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,205 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Attachment
|
||||
/// </summary>
|
||||
[DataContract(Name = "Attachment")]
|
||||
public partial class Attachment : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Attachment" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Attachment() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Attachment" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="name">name (required).</param>
|
||||
/// <param name="contentType">contentType (required).</param>
|
||||
/// <param name="url">url (required).</param>
|
||||
/// <param name="size">size.</param>
|
||||
/// <param name="hash">hash.</param>
|
||||
/// <param name="etag">etag.</param>
|
||||
/// <param name="created">created.</param>
|
||||
/// <param name="updated">updated.</param>
|
||||
public Attachment(string id = default(string), string name = default(string), string contentType = default(string), string url = default(string), long size = default(long), string hash = default(string), string etag = default(string), DateTime created = default(DateTime), DateTime? updated = default(DateTime?))
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
if (name == null)
|
||||
{
|
||||
throw new ArgumentNullException("name is a required property for Attachment and cannot be null");
|
||||
}
|
||||
this.Name = name;
|
||||
// to ensure "contentType" is required (not null)
|
||||
if (contentType == null)
|
||||
{
|
||||
throw new ArgumentNullException("contentType is a required property for Attachment and cannot be null");
|
||||
}
|
||||
this.ContentType = contentType;
|
||||
// to ensure "url" is required (not null)
|
||||
if (url == null)
|
||||
{
|
||||
throw new ArgumentNullException("url is a required property for Attachment and cannot be null");
|
||||
}
|
||||
this.Url = url;
|
||||
this.Id = id;
|
||||
this.Size = size;
|
||||
this.Hash = hash;
|
||||
this.Etag = etag;
|
||||
this.Created = created;
|
||||
this.Updated = updated;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ContentType
|
||||
/// </summary>
|
||||
[DataMember(Name = "content_type", IsRequired = true, EmitDefaultValue = true)]
|
||||
public string ContentType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Url
|
||||
/// </summary>
|
||||
[DataMember(Name = "url", IsRequired = true, EmitDefaultValue = true)]
|
||||
public string Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Size
|
||||
/// </summary>
|
||||
[DataMember(Name = "size", EmitDefaultValue = false)]
|
||||
public long Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Hash
|
||||
/// </summary>
|
||||
[DataMember(Name = "hash", EmitDefaultValue = true)]
|
||||
public string Hash { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Etag
|
||||
/// </summary>
|
||||
[DataMember(Name = "etag", EmitDefaultValue = true)]
|
||||
public string Etag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Created
|
||||
/// </summary>
|
||||
[DataMember(Name = "created", EmitDefaultValue = false)]
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Updated
|
||||
/// </summary>
|
||||
[DataMember(Name = "updated", EmitDefaultValue = true)]
|
||||
public DateTime? Updated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class Attachment {\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" ContentType: ").Append(ContentType).Append("\n");
|
||||
sb.Append(" Url: ").Append(Url).Append("\n");
|
||||
sb.Append(" Size: ").Append(Size).Append("\n");
|
||||
sb.Append(" Hash: ").Append(Hash).Append("\n");
|
||||
sb.Append(" Etag: ").Append(Etag).Append("\n");
|
||||
sb.Append(" Created: ").Append(Created).Append("\n");
|
||||
sb.Append(" Updated: ").Append(Updated).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
// Name (string) maxLength
|
||||
if (this.Name != null && this.Name.Length > 45)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Name, length must be less than 45.", new [] { "Name" });
|
||||
}
|
||||
|
||||
// ContentType (string) maxLength
|
||||
if (this.ContentType != null && this.ContentType.Length > 45)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for ContentType, length must be less than 45.", new [] { "ContentType" });
|
||||
}
|
||||
|
||||
// Url (string) maxLength
|
||||
if (this.Url != null && this.Url.Length > 255)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Url, length must be less than 255.", new [] { "Url" });
|
||||
}
|
||||
|
||||
// Hash (string) maxLength
|
||||
if (this.Hash != null && this.Hash.Length > 64)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Hash, length must be less than 64.", new [] { "Hash" });
|
||||
}
|
||||
|
||||
// Etag (string) maxLength
|
||||
if (this.Etag != null && this.Etag.Length > 32)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Etag, length must be less than 32.", new [] { "Etag" });
|
||||
}
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// ClientInfo
|
||||
/// </summary>
|
||||
[DataContract(Name = "ClientInfo")]
|
||||
public partial class ClientInfo : IValidatableObject
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Type
|
||||
/// </summary>
|
||||
[DataMember(Name = "type", EmitDefaultValue = false)]
|
||||
public ClientType? Type { get; set; }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ClientInfo" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected ClientInfo() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ClientInfo" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="name">name (required).</param>
|
||||
/// <param name="type">type.</param>
|
||||
/// <param name="photoUrl">photoUrl.</param>
|
||||
/// <param name="permissions">permissions.</param>
|
||||
public ClientInfo(string id = default(string), string name = default(string), ClientType? type = default(ClientType?), string photoUrl = default(string), List<string> permissions = default(List<string>))
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
if (name == null)
|
||||
{
|
||||
throw new ArgumentNullException("name is a required property for ClientInfo and cannot be null");
|
||||
}
|
||||
this.Name = name;
|
||||
this.Id = id;
|
||||
this.Type = type;
|
||||
this.PhotoUrl = photoUrl;
|
||||
this.Permissions = permissions;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets PhotoUrl
|
||||
/// </summary>
|
||||
[DataMember(Name = "photo_url", EmitDefaultValue = true)]
|
||||
public string PhotoUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Permissions
|
||||
/// </summary>
|
||||
[DataMember(Name = "permissions", EmitDefaultValue = true)]
|
||||
public List<string> Permissions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class ClientInfo {\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" Type: ").Append(Type).Append("\n");
|
||||
sb.Append(" PhotoUrl: ").Append(PhotoUrl).Append("\n");
|
||||
sb.Append(" Permissions: ").Append(Permissions).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines ClientType
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum ClientType
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum Web for value: web
|
||||
/// </summary>
|
||||
[EnumMember(Value = "web")]
|
||||
Web,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Desktop for value: desktop
|
||||
/// </summary>
|
||||
[EnumMember(Value = "desktop")]
|
||||
Desktop,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Mobile for value: mobile
|
||||
/// </summary>
|
||||
[EnumMember(Value = "mobile")]
|
||||
Mobile
|
||||
}
|
||||
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// CodeResponse
|
||||
/// </summary>
|
||||
[DataContract(Name = "CodeResponse")]
|
||||
public partial class CodeResponse : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CodeResponse" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected CodeResponse() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CodeResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="code">code (required).</param>
|
||||
/// <param name="state">state.</param>
|
||||
public CodeResponse(string code = default(string), string state = default(string))
|
||||
{
|
||||
// to ensure "code" is required (not null)
|
||||
if (code == null)
|
||||
{
|
||||
throw new ArgumentNullException("code is a required property for CodeResponse and cannot be null");
|
||||
}
|
||||
this.Code = code;
|
||||
this.State = state;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Code
|
||||
/// </summary>
|
||||
[DataMember(Name = "code", IsRequired = true, EmitDefaultValue = true)]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets State
|
||||
/// </summary>
|
||||
[DataMember(Name = "state", EmitDefaultValue = true)]
|
||||
public string State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class CodeResponse {\n");
|
||||
sb.Append(" Code: ").Append(Code).Append("\n");
|
||||
sb.Append(" State: ").Append(State).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,225 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// CreateUser
|
||||
/// </summary>
|
||||
[DataContract(Name = "CreateUser")]
|
||||
public partial class CreateUser : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CreateUser" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected CreateUser() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CreateUser" /> class.
|
||||
/// </summary>
|
||||
/// <param name="uuid">uuid.</param>
|
||||
/// <param name="name">name (required).</param>
|
||||
/// <param name="displayName">displayName.</param>
|
||||
/// <param name="email">email.</param>
|
||||
/// <param name="password">password.</param>
|
||||
/// <param name="language">language.</param>
|
||||
/// <param name="timezone">timezone.</param>
|
||||
/// <param name="currency">currency.</param>
|
||||
/// <param name="ipAddress">ipAddress.</param>
|
||||
public CreateUser(Guid? uuid = default(Guid?), string name = default(string), string displayName = default(string), string email = default(string), string password = default(string), string language = default(string), string timezone = default(string), string currency = default(string), string ipAddress = default(string))
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
if (name == null)
|
||||
{
|
||||
throw new ArgumentNullException("name is a required property for CreateUser and cannot be null");
|
||||
}
|
||||
this.Name = name;
|
||||
this.Uuid = uuid;
|
||||
this.DisplayName = displayName;
|
||||
this.Email = email;
|
||||
this.Password = password;
|
||||
this.Language = language;
|
||||
this.Timezone = timezone;
|
||||
this.Currency = currency;
|
||||
this.IpAddress = ipAddress;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = true)]
|
||||
public Guid? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets DisplayName
|
||||
/// </summary>
|
||||
[DataMember(Name = "display_name", EmitDefaultValue = true)]
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Email
|
||||
/// </summary>
|
||||
[DataMember(Name = "email", EmitDefaultValue = true)]
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Password
|
||||
/// </summary>
|
||||
[DataMember(Name = "password", EmitDefaultValue = true)]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Language
|
||||
/// </summary>
|
||||
[DataMember(Name = "language", EmitDefaultValue = true)]
|
||||
public string Language { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Timezone
|
||||
/// </summary>
|
||||
[DataMember(Name = "timezone", EmitDefaultValue = true)]
|
||||
public string Timezone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Currency
|
||||
/// </summary>
|
||||
[DataMember(Name = "currency", EmitDefaultValue = true)]
|
||||
public string Currency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets IpAddress
|
||||
/// </summary>
|
||||
[DataMember(Name = "ip_address", EmitDefaultValue = true)]
|
||||
public string IpAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class CreateUser {\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" DisplayName: ").Append(DisplayName).Append("\n");
|
||||
sb.Append(" Email: ").Append(Email).Append("\n");
|
||||
sb.Append(" Password: ").Append(Password).Append("\n");
|
||||
sb.Append(" Language: ").Append(Language).Append("\n");
|
||||
sb.Append(" Timezone: ").Append(Timezone).Append("\n");
|
||||
sb.Append(" Currency: ").Append(Currency).Append("\n");
|
||||
sb.Append(" IpAddress: ").Append(IpAddress).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
// Name (string) maxLength
|
||||
if (this.Name != null && this.Name.Length > 45)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Name, length must be less than 45.", new [] { "Name" });
|
||||
}
|
||||
|
||||
// Name (string) minLength
|
||||
if (this.Name != null && this.Name.Length < 1)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" });
|
||||
}
|
||||
|
||||
if (this.Name != null) {
|
||||
// Name (string) pattern
|
||||
Regex regexName = new Regex(@"^[a-zA-Z0-9-_]*$", RegexOptions.CultureInvariant);
|
||||
if (!regexName.Match(this.Name).Success)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, must match a pattern of " + regexName, new [] { "Name" });
|
||||
}
|
||||
}
|
||||
|
||||
// DisplayName (string) maxLength
|
||||
if (this.DisplayName != null && this.DisplayName.Length > 45)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for DisplayName, length must be less than 45.", new [] { "DisplayName" });
|
||||
}
|
||||
|
||||
if (this.DisplayName != null) {
|
||||
// DisplayName (string) pattern
|
||||
Regex regexDisplayName = new Regex(@"^[a-zA-Z0-9-_ ]*$", RegexOptions.CultureInvariant);
|
||||
if (!regexDisplayName.Match(this.DisplayName).Success)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, must match a pattern of " + regexDisplayName, new [] { "DisplayName" });
|
||||
}
|
||||
}
|
||||
|
||||
// Email (string) maxLength
|
||||
if (this.Email != null && this.Email.Length > 255)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Email, length must be less than 255.", new [] { "Email" });
|
||||
}
|
||||
|
||||
// Language (string) maxLength
|
||||
if (this.Language != null && this.Language.Length > 5)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Language, length must be less than 5.", new [] { "Language" });
|
||||
}
|
||||
|
||||
// Currency (string) maxLength
|
||||
if (this.Currency != null && this.Currency.Length > 3)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" });
|
||||
}
|
||||
|
||||
// IpAddress (string) maxLength
|
||||
if (this.IpAddress != null && this.IpAddress.Length > 255)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for IpAddress, length must be less than 255.", new [] { "IpAddress" });
|
||||
}
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,152 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// GameServerQuery
|
||||
/// </summary>
|
||||
[DataContract(Name = "GameServerQuery")]
|
||||
public partial class GameServerQuery : IValidatableObject
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Status
|
||||
/// </summary>
|
||||
[DataMember(Name = "status", EmitDefaultValue = false)]
|
||||
public GameServerStatus? Status { get; set; }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GameServerQuery" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="serverId">serverId.</param>
|
||||
/// <param name="status">status.</param>
|
||||
/// <param name="ping">ping.</param>
|
||||
/// <param name="currentPlayers">currentPlayers.</param>
|
||||
/// <param name="maxPlayers">maxPlayers.</param>
|
||||
/// <param name="motd">motd.</param>
|
||||
/// <param name="created">created.</param>
|
||||
public GameServerQuery(string id = default(string), string serverId = default(string), GameServerStatus? status = default(GameServerStatus?), int ping = default(int), int currentPlayers = default(int), int maxPlayers = default(int), string motd = default(string), DateTime created = default(DateTime))
|
||||
{
|
||||
this.Id = id;
|
||||
this.ServerId = serverId;
|
||||
this.Status = status;
|
||||
this.Ping = ping;
|
||||
this.CurrentPlayers = currentPlayers;
|
||||
this.MaxPlayers = maxPlayers;
|
||||
this.Motd = motd;
|
||||
this.Created = created;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ServerId
|
||||
/// </summary>
|
||||
[DataMember(Name = "server_id", EmitDefaultValue = false)]
|
||||
public string ServerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Ping
|
||||
/// </summary>
|
||||
[DataMember(Name = "ping", EmitDefaultValue = false)]
|
||||
public int Ping { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets CurrentPlayers
|
||||
/// </summary>
|
||||
[DataMember(Name = "current_players", EmitDefaultValue = false)]
|
||||
public int CurrentPlayers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MaxPlayers
|
||||
/// </summary>
|
||||
[DataMember(Name = "max_players", EmitDefaultValue = false)]
|
||||
public int MaxPlayers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Motd
|
||||
/// </summary>
|
||||
[DataMember(Name = "motd", EmitDefaultValue = true)]
|
||||
public string Motd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Created
|
||||
/// </summary>
|
||||
[DataMember(Name = "created", EmitDefaultValue = false)]
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class GameServerQuery {\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" ServerId: ").Append(ServerId).Append("\n");
|
||||
sb.Append(" Status: ").Append(Status).Append("\n");
|
||||
sb.Append(" Ping: ").Append(Ping).Append("\n");
|
||||
sb.Append(" CurrentPlayers: ").Append(CurrentPlayers).Append("\n");
|
||||
sb.Append(" MaxPlayers: ").Append(MaxPlayers).Append("\n");
|
||||
sb.Append(" Motd: ").Append(Motd).Append("\n");
|
||||
sb.Append(" Created: ").Append(Created).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
// Motd (string) maxLength
|
||||
if (this.Motd != null && this.Motd.Length > 255)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Motd, length must be less than 255.", new [] { "Motd" });
|
||||
}
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines GameServerStatus
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum GameServerStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum Unknown for value: unknown
|
||||
/// </summary>
|
||||
[EnumMember(Value = "unknown")]
|
||||
Unknown,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Offline for value: offline
|
||||
/// </summary>
|
||||
[EnumMember(Value = "offline")]
|
||||
Offline,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Online for value: online
|
||||
/// </summary>
|
||||
[EnumMember(Value = "online")]
|
||||
Online
|
||||
}
|
||||
|
||||
}
|
@ -1,182 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// IntrospectResponse
|
||||
/// </summary>
|
||||
[DataContract(Name = "IntrospectResponse")]
|
||||
public partial class IntrospectResponse : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="IntrospectResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="jti">jti.</param>
|
||||
/// <param name="active">active.</param>
|
||||
/// <param name="tokenType">tokenType.</param>
|
||||
/// <param name="clientId">clientId.</param>
|
||||
/// <param name="sub">sub.</param>
|
||||
/// <param name="username">username.</param>
|
||||
/// <param name="scope">scope.</param>
|
||||
/// <param name="iss">iss.</param>
|
||||
/// <param name="aud">aud.</param>
|
||||
/// <param name="iat">iat.</param>
|
||||
/// <param name="exp">exp.</param>
|
||||
/// <param name="nbf">nbf.</param>
|
||||
public IntrospectResponse(string jti = default(string), bool active = default(bool), string tokenType = default(string), string clientId = default(string), string sub = default(string), string username = default(string), string scope = default(string), string iss = default(string), string aud = default(string), long? iat = default(long?), long? exp = default(long?), long? nbf = default(long?))
|
||||
{
|
||||
this.Jti = jti;
|
||||
this.Active = active;
|
||||
this.TokenType = tokenType;
|
||||
this.ClientId = clientId;
|
||||
this.Sub = sub;
|
||||
this.Username = username;
|
||||
this.Scope = scope;
|
||||
this.Iss = iss;
|
||||
this.Aud = aud;
|
||||
this.Iat = iat;
|
||||
this.Exp = exp;
|
||||
this.Nbf = nbf;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Jti
|
||||
/// </summary>
|
||||
[DataMember(Name = "jti", EmitDefaultValue = true)]
|
||||
public string Jti { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Active
|
||||
/// </summary>
|
||||
[DataMember(Name = "active", EmitDefaultValue = true)]
|
||||
public bool Active { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets TokenType
|
||||
/// </summary>
|
||||
[DataMember(Name = "token_type", EmitDefaultValue = true)]
|
||||
public string TokenType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ClientId
|
||||
/// </summary>
|
||||
[DataMember(Name = "client_id", EmitDefaultValue = true)]
|
||||
public string ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Sub
|
||||
/// </summary>
|
||||
[DataMember(Name = "sub", EmitDefaultValue = true)]
|
||||
public string Sub { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Username
|
||||
/// </summary>
|
||||
[DataMember(Name = "username", EmitDefaultValue = true)]
|
||||
public string Username { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Scope
|
||||
/// </summary>
|
||||
[DataMember(Name = "scope", EmitDefaultValue = true)]
|
||||
public string Scope { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Iss
|
||||
/// </summary>
|
||||
[DataMember(Name = "iss", EmitDefaultValue = true)]
|
||||
public string Iss { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Aud
|
||||
/// </summary>
|
||||
[DataMember(Name = "aud", EmitDefaultValue = true)]
|
||||
public string Aud { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Iat
|
||||
/// </summary>
|
||||
[DataMember(Name = "iat", EmitDefaultValue = true)]
|
||||
public long? Iat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Exp
|
||||
/// </summary>
|
||||
[DataMember(Name = "exp", EmitDefaultValue = true)]
|
||||
public long? Exp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Nbf
|
||||
/// </summary>
|
||||
[DataMember(Name = "nbf", EmitDefaultValue = true)]
|
||||
public long? Nbf { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class IntrospectResponse {\n");
|
||||
sb.Append(" Jti: ").Append(Jti).Append("\n");
|
||||
sb.Append(" Active: ").Append(Active).Append("\n");
|
||||
sb.Append(" TokenType: ").Append(TokenType).Append("\n");
|
||||
sb.Append(" ClientId: ").Append(ClientId).Append("\n");
|
||||
sb.Append(" Sub: ").Append(Sub).Append("\n");
|
||||
sb.Append(" Username: ").Append(Username).Append("\n");
|
||||
sb.Append(" Scope: ").Append(Scope).Append("\n");
|
||||
sb.Append(" Iss: ").Append(Iss).Append("\n");
|
||||
sb.Append(" Aud: ").Append(Aud).Append("\n");
|
||||
sb.Append(" Iat: ").Append(Iat).Append("\n");
|
||||
sb.Append(" Exp: ").Append(Exp).Append("\n");
|
||||
sb.Append(" Nbf: ").Append(Nbf).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,243 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// ModelClient
|
||||
/// </summary>
|
||||
[DataContract(Name = "varClient")]
|
||||
public partial class ModelClient : IValidatableObject
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Type
|
||||
/// </summary>
|
||||
[DataMember(Name = "type", EmitDefaultValue = false)]
|
||||
public ClientType? Type { get; set; }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ModelClient" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected ModelClient() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ModelClient" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="name">name (required).</param>
|
||||
/// <param name="type">type.</param>
|
||||
/// <param name="organizationId">organizationId.</param>
|
||||
/// <param name="trusted">trusted.</param>
|
||||
/// <param name="packageId">packageId.</param>
|
||||
/// <param name="websiteUrl">websiteUrl.</param>
|
||||
/// <param name="photoUrl">photoUrl.</param>
|
||||
/// <param name="backgroundUrl">backgroundUrl.</param>
|
||||
/// <param name="customSchema">customSchema.</param>
|
||||
/// <param name="redirects">redirects.</param>
|
||||
/// <param name="scopes">scopes.</param>
|
||||
/// <param name="created">created.</param>
|
||||
/// <param name="updated">updated.</param>
|
||||
public ModelClient(string id = default(string), string name = default(string), ClientType? type = default(ClientType?), string organizationId = default(string), bool trusted = default(bool), string packageId = default(string), string websiteUrl = default(string), string photoUrl = default(string), string backgroundUrl = default(string), string customSchema = default(string), string redirects = default(string), string scopes = default(string), DateTime created = default(DateTime), DateTime? updated = default(DateTime?))
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
if (name == null)
|
||||
{
|
||||
throw new ArgumentNullException("name is a required property for ModelClient and cannot be null");
|
||||
}
|
||||
this.Name = name;
|
||||
this.Id = id;
|
||||
this.Type = type;
|
||||
this.OrganizationId = organizationId;
|
||||
this.Trusted = trusted;
|
||||
this.PackageId = packageId;
|
||||
this.WebsiteUrl = websiteUrl;
|
||||
this.PhotoUrl = photoUrl;
|
||||
this.BackgroundUrl = backgroundUrl;
|
||||
this.CustomSchema = customSchema;
|
||||
this.Redirects = redirects;
|
||||
this.Scopes = scopes;
|
||||
this.Created = created;
|
||||
this.Updated = updated;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets OrganizationId
|
||||
/// </summary>
|
||||
[DataMember(Name = "organization_id", EmitDefaultValue = false)]
|
||||
public string OrganizationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Trusted
|
||||
/// </summary>
|
||||
[DataMember(Name = "trusted", EmitDefaultValue = true)]
|
||||
public bool Trusted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets PackageId
|
||||
/// </summary>
|
||||
[DataMember(Name = "package_id", EmitDefaultValue = true)]
|
||||
public string PackageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets WebsiteUrl
|
||||
/// </summary>
|
||||
[DataMember(Name = "website_url", EmitDefaultValue = true)]
|
||||
public string WebsiteUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets PhotoUrl
|
||||
/// </summary>
|
||||
[DataMember(Name = "photo_url", EmitDefaultValue = true)]
|
||||
public string PhotoUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets BackgroundUrl
|
||||
/// </summary>
|
||||
[DataMember(Name = "background_url", EmitDefaultValue = true)]
|
||||
public string BackgroundUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets CustomSchema
|
||||
/// </summary>
|
||||
[DataMember(Name = "custom_schema", EmitDefaultValue = true)]
|
||||
public string CustomSchema { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Redirects
|
||||
/// </summary>
|
||||
[DataMember(Name = "redirects", EmitDefaultValue = true)]
|
||||
public string Redirects { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Scopes
|
||||
/// </summary>
|
||||
[DataMember(Name = "scopes", EmitDefaultValue = true)]
|
||||
public string Scopes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Permissions
|
||||
/// </summary>
|
||||
[DataMember(Name = "permissions", EmitDefaultValue = true)]
|
||||
public List<string> Permissions { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as Permissions should not be serialized given that it's read-only.
|
||||
/// </summary>
|
||||
/// <returns>false (boolean)</returns>
|
||||
public bool ShouldSerializePermissions()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or Sets Created
|
||||
/// </summary>
|
||||
[DataMember(Name = "created", EmitDefaultValue = false)]
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Updated
|
||||
/// </summary>
|
||||
[DataMember(Name = "updated", EmitDefaultValue = true)]
|
||||
public DateTime? Updated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class ModelClient {\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" Type: ").Append(Type).Append("\n");
|
||||
sb.Append(" OrganizationId: ").Append(OrganizationId).Append("\n");
|
||||
sb.Append(" Trusted: ").Append(Trusted).Append("\n");
|
||||
sb.Append(" PackageId: ").Append(PackageId).Append("\n");
|
||||
sb.Append(" WebsiteUrl: ").Append(WebsiteUrl).Append("\n");
|
||||
sb.Append(" PhotoUrl: ").Append(PhotoUrl).Append("\n");
|
||||
sb.Append(" BackgroundUrl: ").Append(BackgroundUrl).Append("\n");
|
||||
sb.Append(" CustomSchema: ").Append(CustomSchema).Append("\n");
|
||||
sb.Append(" Redirects: ").Append(Redirects).Append("\n");
|
||||
sb.Append(" Scopes: ").Append(Scopes).Append("\n");
|
||||
sb.Append(" Permissions: ").Append(Permissions).Append("\n");
|
||||
sb.Append(" Created: ").Append(Created).Append("\n");
|
||||
sb.Append(" Updated: ").Append(Updated).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
// Name (string) maxLength
|
||||
if (this.Name != null && this.Name.Length > 75)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Name, length must be less than 75.", new [] { "Name" });
|
||||
}
|
||||
|
||||
// PhotoUrl (string) maxLength
|
||||
if (this.PhotoUrl != null && this.PhotoUrl.Length > 255)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for PhotoUrl, length must be less than 255.", new [] { "PhotoUrl" });
|
||||
}
|
||||
|
||||
// BackgroundUrl (string) maxLength
|
||||
if (this.BackgroundUrl != null && this.BackgroundUrl.Length > 255)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for BackgroundUrl, length must be less than 255.", new [] { "BackgroundUrl" });
|
||||
}
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,159 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// PackageRelease
|
||||
/// </summary>
|
||||
[DataContract(Name = "PackageRelease")]
|
||||
public partial class PackageRelease : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PackageRelease" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected PackageRelease() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PackageRelease" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="varVersion">varVersion (required).</param>
|
||||
/// <param name="packageId">packageId.</param>
|
||||
/// <param name="notes">notes.</param>
|
||||
/// <param name="created">created.</param>
|
||||
/// <param name="updated">updated.</param>
|
||||
public PackageRelease(string id = default(string), string varVersion = default(string), string packageId = default(string), string notes = default(string), DateTime created = default(DateTime), DateTime? updated = default(DateTime?))
|
||||
{
|
||||
// to ensure "varVersion" is required (not null)
|
||||
if (varVersion == null)
|
||||
{
|
||||
throw new ArgumentNullException("varVersion is a required property for PackageRelease and cannot be null");
|
||||
}
|
||||
this.VarVersion = varVersion;
|
||||
this.Id = id;
|
||||
this.PackageId = packageId;
|
||||
this.Notes = notes;
|
||||
this.Created = created;
|
||||
this.Updated = updated;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets VarVersion
|
||||
/// </summary>
|
||||
[DataMember(Name = "version", IsRequired = true, EmitDefaultValue = true)]
|
||||
public string VarVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets PackageId
|
||||
/// </summary>
|
||||
[DataMember(Name = "package_id", EmitDefaultValue = false)]
|
||||
public string PackageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Notes
|
||||
/// </summary>
|
||||
[DataMember(Name = "notes", EmitDefaultValue = true)]
|
||||
public string Notes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Attachments
|
||||
/// </summary>
|
||||
[DataMember(Name = "attachments", EmitDefaultValue = true)]
|
||||
public List<Attachment> Attachments { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as Attachments should not be serialized given that it's read-only.
|
||||
/// </summary>
|
||||
/// <returns>false (boolean)</returns>
|
||||
public bool ShouldSerializeAttachments()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or Sets Created
|
||||
/// </summary>
|
||||
[DataMember(Name = "created", EmitDefaultValue = false)]
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Updated
|
||||
/// </summary>
|
||||
[DataMember(Name = "updated", EmitDefaultValue = true)]
|
||||
public DateTime? Updated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class PackageRelease {\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" VarVersion: ").Append(VarVersion).Append("\n");
|
||||
sb.Append(" PackageId: ").Append(PackageId).Append("\n");
|
||||
sb.Append(" Notes: ").Append(Notes).Append("\n");
|
||||
sb.Append(" Attachments: ").Append(Attachments).Append("\n");
|
||||
sb.Append(" Created: ").Append(Created).Append("\n");
|
||||
sb.Append(" Updated: ").Append(Updated).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
// VarVersion (string) maxLength
|
||||
if (this.VarVersion != null && this.VarVersion.Length > 45)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for VarVersion, length must be less than 45.", new [] { "VarVersion" });
|
||||
}
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Search
|
||||
/// </summary>
|
||||
[DataContract(Name = "Search")]
|
||||
public partial class Search : IValidatableObject
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Type
|
||||
/// </summary>
|
||||
[DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)]
|
||||
public SearchType Type { get; set; }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Search" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Search() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Search" /> class.
|
||||
/// </summary>
|
||||
/// <param name="type">type (required).</param>
|
||||
/// <param name="query">query (required).</param>
|
||||
/// <param name="page">page.</param>
|
||||
/// <param name="gameId">gameId.</param>
|
||||
public Search(SearchType type = default(SearchType), string query = default(string), int? page = default(int?), string gameId = default(string))
|
||||
{
|
||||
this.Type = type;
|
||||
// to ensure "query" is required (not null)
|
||||
if (query == null)
|
||||
{
|
||||
throw new ArgumentNullException("query is a required property for Search and cannot be null");
|
||||
}
|
||||
this.Query = query;
|
||||
this.Page = page;
|
||||
this.GameId = gameId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Query
|
||||
/// </summary>
|
||||
[DataMember(Name = "query", IsRequired = true, EmitDefaultValue = true)]
|
||||
public string Query { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Page
|
||||
/// </summary>
|
||||
[DataMember(Name = "page", EmitDefaultValue = true)]
|
||||
public int? Page { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets GameId
|
||||
/// </summary>
|
||||
[DataMember(Name = "game_id", EmitDefaultValue = true)]
|
||||
public string GameId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class Search {\n");
|
||||
sb.Append(" Type: ").Append(Type).Append("\n");
|
||||
sb.Append(" Query: ").Append(Query).Append("\n");
|
||||
sb.Append(" Page: ").Append(Page).Append("\n");
|
||||
sb.Append(" GameId: ").Append(GameId).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,117 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Tribufu.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// SubscriptionPrice
|
||||
/// </summary>
|
||||
[DataContract(Name = "SubscriptionPrice")]
|
||||
public partial class SubscriptionPrice : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SubscriptionPrice" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected SubscriptionPrice() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SubscriptionPrice" /> class.
|
||||
/// </summary>
|
||||
/// <param name="currency">currency (required).</param>
|
||||
/// <param name="amount">amount (required).</param>
|
||||
/// <param name="renewal">renewal.</param>
|
||||
public SubscriptionPrice(string currency = default(string), double amount = default(double), double? renewal = default(double?))
|
||||
{
|
||||
// to ensure "currency" is required (not null)
|
||||
if (currency == null)
|
||||
{
|
||||
throw new ArgumentNullException("currency is a required property for SubscriptionPrice and cannot be null");
|
||||
}
|
||||
this.Currency = currency;
|
||||
this.Amount = amount;
|
||||
this.Renewal = renewal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Currency
|
||||
/// </summary>
|
||||
[DataMember(Name = "currency", IsRequired = true, EmitDefaultValue = true)]
|
||||
public string Currency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Amount
|
||||
/// </summary>
|
||||
[DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)]
|
||||
public double Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Renewal
|
||||
/// </summary>
|
||||
[DataMember(Name = "renewal", EmitDefaultValue = true)]
|
||||
public double? Renewal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class SubscriptionPrice {\n");
|
||||
sb.Append(" Currency: ").Append(Currency).Append("\n");
|
||||
sb.Append(" Amount: ").Append(Amount).Append("\n");
|
||||
sb.Append(" Renewal: ").Append(Renewal).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
// Currency (string) maxLength
|
||||
if (this.Currency != null && this.Currency.Length > 3)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" });
|
||||
}
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -17,11 +17,6 @@
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="dotenv.net" />
|
||||
<PackageReference Include="JsonSubTypes" />
|
||||
<PackageReference Include="Newtonsoft.Json" />
|
||||
<PackageReference Include="Polly" />
|
||||
<PackageReference Include="RestSharp" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" />
|
||||
<ProjectReference Include="..\Tribufu.Generated\Tribufu.Generated.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
183
src/Tribufu/TribufuApi.cs
Normal file
183
src/Tribufu/TribufuApi.cs
Normal file
@ -0,0 +1,183 @@
|
||||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
using System.Net;
|
||||
using System.Runtime.InteropServices;
|
||||
using Tribufu.Generated.Api;
|
||||
using Tribufu.Generated.Client;
|
||||
|
||||
namespace Tribufu
|
||||
{
|
||||
/// <summary>
|
||||
/// Tribufu API
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Use this class to interact with the Tribufu API.
|
||||
/// </remarks>
|
||||
public class TribufuApi : TribufuGeneratedApi
|
||||
{
|
||||
/// <summary>
|
||||
/// The default base URL for the Tribufu API.
|
||||
/// </summary>
|
||||
public const string DefaultBaseUrl = "https://api.tribufu.com";
|
||||
|
||||
/// <summary>
|
||||
/// Create a <see cref="TribufuApi"/> with the default options.
|
||||
/// </summary>
|
||||
/// <returns><see cref="TribufuApi"/> instance with default configuration</returns>
|
||||
public TribufuApi() : this(string.Empty)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a <see cref="TribufuApi"/> with the given API key.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A API key gives you public read only access to the Tribufu API.
|
||||
/// </remarks>
|
||||
/// <param name="apiKey">The API key for authentication</param>
|
||||
/// <returns><see cref="TribufuApi"/> instance configured with the API key</returns>
|
||||
public TribufuApi(string apiKey) : base(CreateConfiguration(apiKey))
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a TribufuApi with the default options.
|
||||
/// </summary>
|
||||
/// <returns>TribufuApi instance with default configuration</returns>
|
||||
public static TribufuApi Default()
|
||||
{
|
||||
return new TribufuApi();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a <see cref="TribufuApi"/> with the given API key.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A API key gives you public read only access to the Tribufu API.
|
||||
/// </remarks>
|
||||
/// <param name="apiKey">The API key for authentication</param>
|
||||
/// <returns><see cref="TribufuApi"/> instance configured with the API key</returns>
|
||||
public static TribufuApi WithApiKey(string apiKey)
|
||||
{
|
||||
return new TribufuApi(apiKey);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to create a <see cref="TribufuApi"/> from environment variables.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This will only work if the environment variables are set.
|
||||
/// </remarks>
|
||||
/// <param name="prefix">A prefix for the environment variables. Default is "TRIBUFU".</param>
|
||||
/// <returns><see cref="TribufuApi"/> instance or null if environment variables not set</returns>
|
||||
/// <example>
|
||||
/// // Environment variable TRIBUFU_API_KEY must be set
|
||||
/// var api = TribufuApi.FromEnv();
|
||||
/// </example>
|
||||
public static TribufuApi? FromEnv(string? prefix = null)
|
||||
{
|
||||
prefix ??= "TRIBUFU";
|
||||
|
||||
var apiKey = Environment.GetEnvironmentVariable($"{prefix}_API_KEY");
|
||||
|
||||
if (!string.IsNullOrEmpty(apiKey))
|
||||
{
|
||||
return WithApiKey(apiKey);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a <see cref="TribufuApi"/> from environment variables or the default API.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This will fallback to the default API if the environment variables are not set.
|
||||
/// </remarks>
|
||||
/// <param name="prefix">A prefix for the environment variables. Default is "TRIBUFU".</param>
|
||||
/// <returns><see cref="TribufuApi"/> instance</returns>
|
||||
/// <example>
|
||||
/// // Environment variable TRIBUFU_API_KEY might be unset
|
||||
/// var api = TribufuApi.FromEnvOrDefault();
|
||||
/// </example>
|
||||
public static TribufuApi FromEnvOrDefault(string prefix = "TRIBUFU")
|
||||
{
|
||||
return FromEnv(prefix) ?? Default();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the version of the Tribufu API client.
|
||||
/// </summary>
|
||||
public static string GetVersion()
|
||||
{
|
||||
var version = typeof(TribufuApi).Assembly.GetName().Version;
|
||||
return $"{version?.Major}.{version?.Minor}.{version?.Build}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the user agent string for the Tribufu API client.
|
||||
/// </summary>
|
||||
private static string GetUserAgent()
|
||||
{
|
||||
var version = GetVersion();
|
||||
var frameworkDescription = RuntimeInformation.FrameworkDescription.Trim();
|
||||
var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier.Trim();
|
||||
return $"Tribufu/{version} ({frameworkDescription}; {runtimeIdentifier})";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the base URL for the Tribufu API.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The base URL can be set using the environment variable TRIBUFU_API_URL.
|
||||
/// The custom base URL is only used if debug mode is enabled.
|
||||
/// The default base URL is https://api.tribufu.com.
|
||||
/// </remarks>
|
||||
/// <returns>Base URL string</returns>
|
||||
private static string GetBaseUrl()
|
||||
{
|
||||
var baseUrl = Environment.GetEnvironmentVariable("TRIBUFU_API_URL");
|
||||
|
||||
if (DebugEnabled() && !string.IsNullOrEmpty(baseUrl))
|
||||
{
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
return DefaultBaseUrl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if debug mode is enabled.
|
||||
/// </summary>
|
||||
/// <returns>True if debug mode is enabled, otherwise false</returns>
|
||||
private static bool DebugEnabled()
|
||||
{
|
||||
#if DEBUG
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a configuration for the Tribufu API client.
|
||||
/// </summary>
|
||||
private static Configuration CreateConfiguration(string apiKey)
|
||||
{
|
||||
var config = new Configuration
|
||||
{
|
||||
BasePath = GetBaseUrl(),
|
||||
UserAgent = WebUtility.UrlEncode(GetUserAgent()),
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(apiKey))
|
||||
{
|
||||
config.AddApiKeyPrefix("Authorization", "ApiKey");
|
||||
config.AddApiKey("Authorization", apiKey);
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
}
|
||||
}
|
33
src/Tribufu/TribufuApiSingleton.cs
Normal file
33
src/Tribufu/TribufuApiSingleton.cs
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
namespace Tribufu
|
||||
{
|
||||
/// <summary>
|
||||
/// Tribufu API
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Helper class to get a singleton instance of the <see cref="TribufuApi"/>.
|
||||
/// </remarks>
|
||||
public static class TribufuApiSingleton
|
||||
{
|
||||
private static TribufuApi? _instance = null;
|
||||
|
||||
/// <summary>
|
||||
/// Get the singleton instance of <see cref="TribufuApi"/>.
|
||||
/// </summary>
|
||||
public static TribufuApi GetInstance()
|
||||
{
|
||||
_instance ??= TribufuApi.FromEnvOrDefault();
|
||||
return _instance;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset the singleton instance of <see cref="TribufuApi"/>.
|
||||
/// </summary>
|
||||
public static void ResetInstance()
|
||||
{
|
||||
_instance = null;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user