Skip to content

Commit

Permalink
Moving old projects to new layout, #26
Browse files Browse the repository at this point in the history
  • Loading branch information
MingweiSamuel committed Nov 11, 2019
1 parent a3954e3 commit 1e59cbf
Show file tree
Hide file tree
Showing 55 changed files with 168 additions and 167 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MingweiSamuel.Camille.ChampionV3;
using MingweiSamuel.Camille.Enums;
using Camille.RiotApi.ChampionV3;
using Camille.RiotApi.Enums;

namespace MingweiSamuel.Camille.Test
namespace Camille.RiotApi.Test
{
[TestClass]
public class ApiCancellationTest : ApiTest
{
[TestMethod]
[Ignore("Eats rate limit.")]
public async Task SummonerCancellationTest()
{
var tokenSource = new CancellationTokenSource();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MingweiSamuel.Camille.ChampionMasteryV4;
using MingweiSamuel.Camille.Enums;
using Camille.RiotApi.ChampionMasteryV4;
using Camille.RiotApi.Enums;

namespace MingweiSamuel.Camille.Test
namespace Camille.RiotApi.Test
{
[TestClass]
public class ApiChampionMasteryV4Test : ApiTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MingweiSamuel.Camille.ChampionV3;
using MingweiSamuel.Camille.Enums;
using Camille.RiotApi.ChampionV3;
using Camille.RiotApi.Enums;

namespace MingweiSamuel.Camille.Test
namespace Camille.RiotApi.Test
{
[TestClass]
public class ApiChampionTest : ApiTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MingweiSamuel.Camille.Enums;
using MingweiSamuel.Camille.SpectatorV4;
using Camille.RiotApi.Enums;
using Camille.RiotApi.SpectatorV4;

namespace MingweiSamuel.Camille.Test
namespace Camille.RiotApi.Test
{
[TestClass]
[Ignore("Unreliable")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MingweiSamuel.Camille.Enums;
using MingweiSamuel.Camille.LeagueV4;
using Camille.RiotApi.Enums;
using Camille.RiotApi.LeagueV4;

namespace MingweiSamuel.Camille.Test
namespace Camille.RiotApi.Test
{
[TestClass]
public class ApiLeagueV4Test : ApiTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MingweiSamuel.Camille.Enums;
using MingweiSamuel.Camille.MatchV4;
using Camille.RiotApi.Enums;
using Camille.RiotApi.MatchV4;

namespace MingweiSamuel.Camille.Test
namespace Camille.RiotApi.Test
{
[TestClass]
[Ignore("Requires updating")] // TODO
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MingweiSamuel.Camille.Enums;
using MingweiSamuel.Camille.SummonerV4;
using Camille.RiotApi.Enums;
using Camille.RiotApi.SummonerV4;

namespace MingweiSamuel.Camille.Test
namespace Camille.RiotApi.Test
{
[TestClass]
public class ApiSummonerTest : ApiTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.IO;

namespace MingweiSamuel.Camille.Test
namespace Camille.RiotApi.Test
{
public class ApiTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Camille\Camille.csproj" />
<ProjectReference Include="..\Camille.RiotApi\Camille.RiotApi.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="apikey.txt">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MingweiSamuel.Camille.Enums;
using Camille.RiotApi.Enums;

namespace MingweiSamuel.Camille.Test
namespace Camille.RiotApi.Test
{
[TestClass]
public class ChampionTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MingweiSamuel.Camille.Enums;
using Camille.RiotApi.Enums;

namespace MingweiSamuel.Camille.Test
namespace Camille.RiotApi.Test
{
[TestClass]
public class ReadmeExampleTest : ApiTest
Expand Down
File renamed without changes.
178 changes: 89 additions & 89 deletions Camille/Camille.csproj → Camille.RiotApi/Camille.RiotApi.csproj
Original file line number Diff line number Diff line change
@@ -1,89 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard1.1;net45;netcoreapp2.0;netstandard2.1;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<PackageId>MingweiSamuel.Camille</PackageId>
<RootNamespace>MingweiSamuel.Camille</RootNamespace>
<Version>3.0.0</Version>
<Authors>MingweiSamuel</Authors>
<Company>MingweiSamuel</Company>
<PackageLicenseUrl>https://www.gnu.org/licenses/gpl-3.0.txt</PackageLicenseUrl>
<Copyright>LGPLv3 2019</Copyright>
<PackageProjectUrl>https://github.com/MingweiSamuel/Camille</PackageProjectUrl>
<PackageIconUrl>http://ddragon.leagueoflegends.com/cdn/8.24.1/img/champion/Camille.png</PackageIconUrl>
<RepositoryUrl>https://github.com/MingweiSamuel/Camille</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Description>Riot Games API library. Fully rate limited, automatic retrying, thread-safe. V4 Supported.</Description>
<Summary>Riot Games API library. Fully rate limited, automatic retrying, thread-safe. V4 Supported.</Summary>
<PackageTags>riot games api league of legends camille riotsharp</PackageTags>
<PackageReleaseNotes>Updates for v4 leagues</PackageReleaseNotes>
<FileVersion>1.0.0.0</FileVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup>
<GenDir>gen</GenDir>
</PropertyGroup>

<!-- Camille using Newtonsoft.Json. -->
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.1' Or '$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'netcoreapp2.0' Or '$(TargetFramework)' == 'netcoreapp3.0'">
<DefineConstants>$(DefineConstants);USE_NEWTONSOFT</DefineConstants>
</PropertyGroup>
<!-- Camille using System.Text.Json. -->
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.1' Or '$(TargetFramework)' == 'netcoreapp3.1'">
<DefineConstants>$(DefineConstants);USE_SYSTEXTJSON</DefineConstants>
</PropertyGroup>

<!-- Newtonsoft & Nullable attributes from Nuget. -->
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1' Or '$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'netcoreapp2.0' Or '$(TargetFramework)' == 'netcoreapp3.0'">
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="Nullable" Version="1.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- System.Net.Http from Nuget. -->
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1' Or '$(TargetFramework)' == 'net45'">
<PackageReference Include="System.Net.Http" Version="4.3.3" />
</ItemGroup>
<!-- System.Text.Json from Nuget. -->
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="System.Text.Json" Version="4.6.0" />
</ItemGroup>
<!-- System.ComponentModel.DataAnnotations from Nuget. -->
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1' Or '$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="System.ComponentModel.Annotations" Version="4.6.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MingweiSamuel.TokenBucket" Version="1.0.1" />
</ItemGroup>


<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>

<Target Name="DownloadTemplateData">
<DownloadFile SourceUrl="http://www.mingweisamuel.com/riotapi-schema/openapi-3.0.0.json" DestinationFolder="$(GenDir)" DestinationFileName=".spec.json" ContinueOnError="true" />
<DownloadFile SourceUrl="http://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/champion-summary.json" DestinationFolder="$(GenDir)" DestinationFileName=".champion.json" ContinueOnError="true" />
<DownloadFile SourceUrl="http://static.developer.riotgames.com/docs/lol/seasons.json" DestinationFolder="$(GenDir)" DestinationFileName=".seasons.json" ContinueOnError="true" />
<DownloadFile SourceUrl="http://static.developer.riotgames.com/docs/lol/queues.json" DestinationFolder="$(GenDir)" DestinationFileName=".queues.json" ContinueOnError="true" />
<DownloadFile SourceUrl="http://static.developer.riotgames.com/docs/lol/maps.json" DestinationFolder="$(GenDir)" DestinationFileName=".maps.json" ContinueOnError="true" />
<DownloadFile SourceUrl="http://static.developer.riotgames.com/docs/lol/gameModes.json" DestinationFolder="$(GenDir)" DestinationFileName=".gameModes.json" ContinueOnError="true" />
<DownloadFile SourceUrl="http://static.developer.riotgames.com/docs/lol/gameTypes.json" DestinationFolder="$(GenDir)" DestinationFileName=".gameTypes.json" ContinueOnError="true" />
</Target>

<!-- On Windows DispatchToInnerBuilds is run due to multiple TargetFrameworks. -->
<Target Name="BuildTemplates" BeforeTargets="DispatchToInnerBuilds" DependsOnTargets="DownloadTemplateData">
<Exec WorkingDirectory="$(GenDir)" Command="node index.js" />
</Target>
<!-- On Unix/OSX DispatchToInnerBuilds is not run so we use GenerateTargetFrameworkMonikerAttribute. -->
<Target Name="BuildTemplatesUnix" BeforeTargets="GenerateTargetFrameworkMonikerAttribute" DependsOnTargets="BuildTemplates" Condition="$(OS) == 'Unix'">
<Message Text="Building templates on unix." />
</Target>

<Target Name="EchoEnviornment" BeforeTargets="Build">
<Message Text="$(TargetFramework) $(OS)" />
</Target>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard1.1;net45;netcoreapp2.0;netstandard2.1;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<PackageId>Camille.RiotApi</PackageId>
<RootNamespace>Camille.RiotApi</RootNamespace>
<Version>3.0.0</Version>
<Authors>MingweiSamuel</Authors>
<Company>MingweiSamuel</Company>
<PackageLicenseUrl>https://www.gnu.org/licenses/gpl-3.0.txt</PackageLicenseUrl>
<Copyright>LGPLv3 2019</Copyright>
<PackageProjectUrl>https://github.com/MingweiSamuel/Camille</PackageProjectUrl>
<PackageIconUrl>http://ddragon.leagueoflegends.com/cdn/8.24.1/img/champion/Camille.png</PackageIconUrl>
<RepositoryUrl>https://github.com/MingweiSamuel/Camille</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Description>Riot Games API library. Fully rate limited, automatic retrying, thread-safe. V4 Supported.</Description>
<Summary>Riot Games API library. Fully rate limited, automatic retrying, thread-safe. V4 Supported.</Summary>
<PackageTags>riot games api league of legends camille riotsharp</PackageTags>
<PackageReleaseNotes>Updates for v4 leagues</PackageReleaseNotes>
<FileVersion>1.0.0.0</FileVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup>
<GenDir>gen</GenDir>
</PropertyGroup>

<!-- Camille using Newtonsoft.Json. -->
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.1' Or '$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'netcoreapp2.0' Or '$(TargetFramework)' == 'netcoreapp3.0'">
<DefineConstants>$(DefineConstants);USE_NEWTONSOFT</DefineConstants>
</PropertyGroup>
<!-- Camille using System.Text.Json. -->
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.1' Or '$(TargetFramework)' == 'netcoreapp3.1'">
<DefineConstants>$(DefineConstants);USE_SYSTEXTJSON</DefineConstants>
</PropertyGroup>

<!-- Newtonsoft & Nullable attributes from Nuget. -->
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1' Or '$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'netcoreapp2.0' Or '$(TargetFramework)' == 'netcoreapp3.0'">
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="Nullable" Version="1.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- System.Net.Http from Nuget. -->
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1' Or '$(TargetFramework)' == 'net45'">
<PackageReference Include="System.Net.Http" Version="4.3.3" />
</ItemGroup>
<!-- System.Text.Json from Nuget. -->
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="System.Text.Json" Version="4.6.0" />
</ItemGroup>
<!-- System.ComponentModel.DataAnnotations from Nuget. -->
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1' Or '$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="System.ComponentModel.Annotations" Version="4.6.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MingweiSamuel.TokenBucket" Version="1.0.1" />
</ItemGroup>


<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>

<Target Name="DownloadTemplateData">
<DownloadFile SourceUrl="http://www.mingweisamuel.com/riotapi-schema/openapi-3.0.0.json" DestinationFolder="$(GenDir)" DestinationFileName=".spec.json" ContinueOnError="true" />
<DownloadFile SourceUrl="http://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/champion-summary.json" DestinationFolder="$(GenDir)" DestinationFileName=".champion.json" ContinueOnError="true" />
<DownloadFile SourceUrl="http://static.developer.riotgames.com/docs/lol/seasons.json" DestinationFolder="$(GenDir)" DestinationFileName=".seasons.json" ContinueOnError="true" />
<DownloadFile SourceUrl="http://static.developer.riotgames.com/docs/lol/queues.json" DestinationFolder="$(GenDir)" DestinationFileName=".queues.json" ContinueOnError="true" />
<DownloadFile SourceUrl="http://static.developer.riotgames.com/docs/lol/maps.json" DestinationFolder="$(GenDir)" DestinationFileName=".maps.json" ContinueOnError="true" />
<DownloadFile SourceUrl="http://static.developer.riotgames.com/docs/lol/gameModes.json" DestinationFolder="$(GenDir)" DestinationFileName=".gameModes.json" ContinueOnError="true" />
<DownloadFile SourceUrl="http://static.developer.riotgames.com/docs/lol/gameTypes.json" DestinationFolder="$(GenDir)" DestinationFileName=".gameTypes.json" ContinueOnError="true" />
</Target>

<!-- On Windows DispatchToInnerBuilds is run due to multiple TargetFrameworks. -->
<Target Name="BuildTemplates" BeforeTargets="DispatchToInnerBuilds" DependsOnTargets="DownloadTemplateData">
<Exec WorkingDirectory="$(GenDir)" Command="node index.js" />
</Target>
<!-- On Unix/OSX DispatchToInnerBuilds is not run so we use GenerateTargetFrameworkMonikerAttribute. -->
<Target Name="BuildTemplatesUnix" BeforeTargets="GenerateTargetFrameworkMonikerAttribute" DependsOnTargets="BuildTemplates" Condition="$(OS) == 'Unix'">
<Message Text="Building templates on unix." />
</Target>

<Target Name="EchoEnviornment" BeforeTargets="Build">
<Message Text="$(TargetFramework) $(OS)" />
</Target>
</Project>
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

using System.Collections.Generic;
using System.Linq;
using MingweiSamuel.Camille.Enums;
using Camille.RiotApi.Enums;

#if USE_NEWTONSOFT
using JsonPropertyAttribute = Newtonsoft.Json.JsonPropertyAttribute;
Expand Down Expand Up @@ -47,7 +47,7 @@ using JsonExtensionDataAttribute = System.Text.Json.Serialization.JsonExtensionD
}).sortBy(({ name }) => name);
}}
// {{= endpoint }}
namespace MingweiSamuel.Camille.{{= dotUtils.normalizeEndpointName(endpoint) }}
namespace Camille.RiotApi.{{= dotUtils.normalizeEndpointName(endpoint) }}
{
/// <summary>
/// {{= schemaName }} data object. This class is automatically generated.<para />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using System.Linq;
using MingweiSamuel.Camille.Enums;
using Camille.RiotApi.Enums;

namespace MingweiSamuel.Camille
namespace Camille.RiotApi
{
{{
const endpointGroups = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

using System.ComponentModel.DataAnnotations;

namespace MingweiSamuel.Camille.Enums
namespace Camille.RiotApi.Enums
{
/// <summary>
/// Champion enum based on ChampionIds.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

using System.ComponentModel.DataAnnotations;

namespace MingweiSamuel.Camille.Enums
namespace Camille.RiotApi.Enums
{
/// <summary>
/// GameModes enum based on gameModes.json.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

using System.ComponentModel.DataAnnotations;

namespace MingweiSamuel.Camille.Enums
namespace Camille.RiotApi.Enums
{
/// <summary>
/// GameTypes enum based on gameTypes.json.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

using System.ComponentModel.DataAnnotations;

namespace MingweiSamuel.Camille.Enums
namespace Camille.RiotApi.Enums
{
/// <summary>
/// Maps enum based on maps.json.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

using System.ComponentModel.DataAnnotations;

namespace MingweiSamuel.Camille.Enums
namespace Camille.RiotApi.Enums
{
/// <summary>
/// Queues enum based on queues.json.
Expand Down
Loading

0 comments on commit 1e59cbf

Please sign in to comment.