mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-12-16 23:29:47 +00:00
Ajout webapp
This commit is contained in:
parent
43b181a1b5
commit
c28fd4657f
8 changed files with 246 additions and 2 deletions
|
|
@ -9,9 +9,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AideDeJeu.iOS", "AideDeJeu\
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AideDeJeu.UWP", "AideDeJeu\AideDeJeu.UWP\AideDeJeu.UWP.csproj", "{7E8B5E35-7000-487A-A5C6-E87376F81631}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AideDeJeu.UWP", "AideDeJeu\AideDeJeu.UWP\AideDeJeu.UWP.csproj", "{7E8B5E35-7000-487A-A5C6-E87376F81631}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AideDeJeu", "AideDeJeu\AideDeJeu\AideDeJeu.csproj", "{C0597D88-5C09-4314-80A3-64712B02D0E9}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AideDeJeu", "AideDeJeu\AideDeJeu\AideDeJeu.csproj", "{C0597D88-5C09-4314-80A3-64712B02D0E9}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AideDeJeuLib", "AideDeJeu\AideDeJeuLib\AideDeJeuLib.csproj", "{948BB32D-BAB8-485D-8A6F-BE5391E824A3}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AideDeJeuLib", "AideDeJeu\AideDeJeuLib\AideDeJeuLib.csproj", "{948BB32D-BAB8-485D-8A6F-BE5391E824A3}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AideDeJeuWeb", "AideDeJeu\AideDeJeuWeb\AideDeJeuWeb.csproj", "{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|
@ -301,6 +303,54 @@ Global
|
||||||
{948BB32D-BAB8-485D-8A6F-BE5391E824A3}.Release|x64.Build.0 = Release|Any CPU
|
{948BB32D-BAB8-485D-8A6F-BE5391E824A3}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{948BB32D-BAB8-485D-8A6F-BE5391E824A3}.Release|x86.ActiveCfg = Release|Any CPU
|
{948BB32D-BAB8-485D-8A6F-BE5391E824A3}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{948BB32D-BAB8-485D-8A6F-BE5391E824A3}.Release|x86.Build.0 = Release|Any CPU
|
{948BB32D-BAB8-485D-8A6F-BE5391E824A3}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Release|ARM.Build.0 = Release|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Release|iPhone.Build.0 = Release|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{D5065DC7-7B51-4D25-8FA5-DDF0F3E6FCE4}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
||||||
23
AideDeJeu/AideDeJeuWeb/AideDeJeuWeb.csproj
Normal file
23
AideDeJeu/AideDeJeuWeb/AideDeJeuWeb.csproj
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="wwwroot\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.6" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\AideDeJeuLib\AideDeJeuLib.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
52
AideDeJeu/AideDeJeuWeb/Controllers/ValuesController.cs
Normal file
52
AideDeJeu/AideDeJeuWeb/Controllers/ValuesController.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using AideDeJeuLib.Spells;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace AideDeJeuWeb.Controllers
|
||||||
|
{
|
||||||
|
[Route("api/[controller]")]
|
||||||
|
public class ValuesController : Controller
|
||||||
|
{
|
||||||
|
// GET api/values
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IEnumerable<Spell>> Get()
|
||||||
|
{
|
||||||
|
var scrapper = new SpellsScrappers();
|
||||||
|
var spells = await scrapper.GetSpells();
|
||||||
|
//var spellIds = spells.Select(spell => spell.Id);
|
||||||
|
//var fullspells = await scrapper.GetSpells(spellIds);
|
||||||
|
return spells;
|
||||||
|
//return await scrapper.GetSpellIds("");
|
||||||
|
//return await new SpellsScrappers().GetSpells();
|
||||||
|
//return new string[] { "value1", "value2" };
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET api/values/5
|
||||||
|
[HttpGet("{id}")]
|
||||||
|
public string Get(int id)
|
||||||
|
{
|
||||||
|
return "value";
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST api/values
|
||||||
|
[HttpPost]
|
||||||
|
public void Post([FromBody]string value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// PUT api/values/5
|
||||||
|
[HttpPut("{id}")]
|
||||||
|
public void Put(int id, [FromBody]string value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// DELETE api/values/5
|
||||||
|
[HttpDelete("{id}")]
|
||||||
|
public void Delete(int id)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
25
AideDeJeu/AideDeJeuWeb/Program.cs
Normal file
25
AideDeJeu/AideDeJeuWeb/Program.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace AideDeJeuWeb
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
BuildWebHost(args).Run();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IWebHost BuildWebHost(string[] args) =>
|
||||||
|
WebHost.CreateDefaultBuilder(args)
|
||||||
|
.UseStartup<Startup>()
|
||||||
|
.Build();
|
||||||
|
}
|
||||||
|
}
|
||||||
29
AideDeJeu/AideDeJeuWeb/Properties/launchSettings.json
Normal file
29
AideDeJeu/AideDeJeuWeb/Properties/launchSettings.json
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
"iisSettings": {
|
||||||
|
"windowsAuthentication": false,
|
||||||
|
"anonymousAuthentication": true,
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:58892/",
|
||||||
|
"sslPort": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profiles": {
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IISExpress",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "api/values",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AideDeJeuWeb": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "api/values",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "http://localhost:58893/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
40
AideDeJeu/AideDeJeuWeb/Startup.cs
Normal file
40
AideDeJeu/AideDeJeuWeb/Startup.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
|
namespace AideDeJeuWeb
|
||||||
|
{
|
||||||
|
public class Startup
|
||||||
|
{
|
||||||
|
public Startup(IConfiguration configuration)
|
||||||
|
{
|
||||||
|
Configuration = configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IConfiguration Configuration { get; }
|
||||||
|
|
||||||
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||||
|
public void ConfigureServices(IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddMvc();
|
||||||
|
}
|
||||||
|
|
||||||
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
|
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
||||||
|
{
|
||||||
|
if (env.IsDevelopment())
|
||||||
|
{
|
||||||
|
app.UseDeveloperExceptionPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
app.UseMvc();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
10
AideDeJeu/AideDeJeuWeb/appsettings.Development.json
Normal file
10
AideDeJeu/AideDeJeuWeb/appsettings.Development.json
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"IncludeScopes": false,
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Debug",
|
||||||
|
"System": "Information",
|
||||||
|
"Microsoft": "Information"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
15
AideDeJeu/AideDeJeuWeb/appsettings.json
Normal file
15
AideDeJeu/AideDeJeuWeb/appsettings.json
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"IncludeScopes": false,
|
||||||
|
"Debug": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Console": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Warning"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue