This commit is contained in:
Tommy Parnell
2015-05-16 22:17:47 -04:00
parent 090d18e1c3
commit e2034f3341
16 changed files with 817 additions and 0 deletions

199
.gitignore vendored Normal file
View File

@@ -0,0 +1,199 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
*.DotSettings
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
**/.settings
NDependOut
*.ndproj
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
# Visual Studo 2015 cache/options directory
.vs/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding addin-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
*.[Cc]ache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt

28
NetrunnerDb.Net.sln Normal file
View File

@@ -0,0 +1,28 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetrunnerDb.Net", "src\NetrunnerDb.Net\NetrunnerDb.Net.csproj", "{1B508DCB-3207-4597-B938-9218D32A41A4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetrunnerDb.Net.Tests", "src\NetrunnerDb.Net.Tests\NetrunnerDb.Net.Tests.csproj", "{60115585-7F0E-438F-BC86-CCA9D6575062}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1B508DCB-3207-4597-B938-9218D32A41A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B508DCB-3207-4597-B938-9218D32A41A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B508DCB-3207-4597-B938-9218D32A41A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1B508DCB-3207-4597-B938-9218D32A41A4}.Release|Any CPU.Build.0 = Release|Any CPU
{60115585-7F0E-438F-BC86-CCA9D6575062}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{60115585-7F0E-438F-BC86-CCA9D6575062}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60115585-7F0E-438F-BC86-CCA9D6575062}.Release|Any CPU.ActiveCfg = Release|Any CPU
{60115585-7F0E-438F-BC86-CCA9D6575062}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

3
readme.md Normal file
View File

@@ -0,0 +1,3 @@
## What is this?
A simple API wrapper over the netrunner db. Still a WIP

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
namespace NetrunnerDb.Net.Tests
{
[TestFixture]
public class Class1
{
[Test]
[Ignore]
public void Tst()
{
var cool = new Repository().GetRequest<Cards>("tsb");
}
}
}

View File

@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{60115585-7F0E-438F-BC86-CCA9D6575062}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NetrunnerDb.Net.Tests</RootNamespace>
<AssemblyName>NetrunnerDb.Net.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.core">
<HintPath>..\..\packages\NUnitTestAdapter.2.0.0\lib\nunit.core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="nunit.core.interfaces">
<HintPath>..\..\packages\NUnitTestAdapter.2.0.0\lib\nunit.core.interfaces.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="nunit.util">
<HintPath>..\..\packages\NUnitTestAdapter.2.0.0\lib\nunit.util.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="NUnit.VisualStudio.TestAdapter">
<HintPath>..\..\packages\NUnitTestAdapter.2.0.0\lib\NUnit.VisualStudio.TestAdapter.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NetrunnerDb.Net\NetrunnerDb.Net.csproj">
<Project>{1b508dcb-3207-4597-b938-9218d32a41a4}</Project>
<Name>NetrunnerDb.Net</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("NetrunnerDb.Net.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("NetrunnerDb.Net.Tests")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("adcc42b0-2006-4037-87f8-d0cc4fd3104c")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="2.6.4" targetFramework="net45" />
<package id="NUnitTestAdapter" version="2.0.0" targetFramework="net45" />
</packages>

View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{1B508DCB-3207-4597-B938-9218D32A41A4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NetrunnerDb.Net</RootNamespace>
<AssemblyName>NetrunnerDb.Net</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="RestSharp, Version=105.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Responses\Cards.cs" />
<Compile Include="Responses\IRequest.cs" />
<Compile Include="Repository.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Responses\Set.cs" />
<Compile Include="Responses\Sets.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<projectUrl>https://github.com/tparnell8/NetrunnerDb.Net</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
<releaseNotes>Basic NetrunnerDb Wrapper</releaseNotes>
<copyright>Copyright 2015</copyright>
<tags>Netrunner</tags>
</metadata>
</package>

View File

@@ -0,0 +1,37 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("NetrunnerDb.Net")]
[assembly: AssemblyDescription("C# NetrunnerDb API Wrapper")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Tommy Parnell")]
[assembly: AssemblyProduct("NetrunnerDb.Net")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a0b3379d-894a-4ded-9c77-17a349b4668b")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: InternalsVisibleTo("NetrunnerDb.Net.Tests")]

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using RestSharp;
namespace NetrunnerDb.Net
{
public class Repository
{
public IList<TResult> GetRequest<TResult>(string param)
where TResult : class, IRequest, new()
{
var s = new TResult();
var request = new RestRequest(){
Resource = s.EndPoint(param)};
var client = new RestClient("http://netrunnerdb.com");
var response = client.Execute(request);
return JsonConvert.DeserializeObject<IList<TResult>>(response.Content);
}
}
}

View File

@@ -0,0 +1,124 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace NetrunnerDb.Net
{
public class Cards : IRequest
{
[JsonProperty("last-modified")]
public DateTime LastModified { get; set; }
[JsonProperty("code")]
public string Code { get; set; }
[JsonProperty("title")]
public string Title { get; set; }
[JsonProperty("type")]
public string Type { get; set; }
[JsonProperty("type_code")]
public string TypeCode { get; set; }
[JsonProperty("subtype")]
public string Subtype { get; set; }
[JsonProperty("subtype_code")]
public string SubtypeCode { get; set; }
[JsonProperty("text")]
public string Text { get; set; }
[JsonProperty("baselink")]
public int Baselink { get; set; }
[JsonProperty("faction")]
public string Faction { get; set; }
[JsonProperty("faction_code")]
public string FactionCode { get; set; }
[JsonProperty("faction_letter")]
public string FactionLetter { get; set; }
[JsonProperty("flavor")]
public string Flavor { get; set; }
[JsonProperty("illustrator")]
public string Illustrator { get; set; }
[JsonProperty("influencelimit")]
public int Influencelimit { get; set; }
[JsonProperty("minimumdecksize")]
public int Minimumdecksize { get; set; }
[JsonProperty("number")]
public int Number { get; set; }
[JsonProperty("quantity")]
public int Quantity { get; set; }
[JsonProperty("setname")]
public string Setname { get; set; }
[JsonProperty("set_code")]
public string SetCode { get; set; }
[JsonProperty("side")]
public string Side { get; set; }
[JsonProperty("side_code")]
public string SideCode { get; set; }
[JsonProperty("uniqueness")]
public bool Uniqueness { get; set; }
[JsonProperty("limited")]
public bool Limited { get; set; }
[JsonProperty("cyclenumber")]
public int Cyclenumber { get; set; }
[JsonProperty("ancurLink")]
public string AncurLink { get; set; }
[JsonProperty("url")]
public string Url { get; set; }
[JsonProperty("imagesrc")]
public string Imagesrc { get; set; }
[JsonProperty("cost")]
public int? Cost { get; set; }
[JsonProperty("factioncost")]
public int? Factioncost { get; set; }
[JsonProperty("memoryunits")]
public int? Memoryunits { get; set; }
[JsonProperty("strength")]
public int? Strength { get; set; }
[JsonProperty("advancementcost")]
public int? Advancementcost { get; set; }
[JsonProperty("agendapoints")]
public int? Agendapoints { get; set; }
[JsonProperty("trash")]
public int? Trash { get; set; }
public string EndPoint(string parameter = "")
{
return "/api/cards/";
}
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NetrunnerDb.Net
{
public interface IRequest
{
string EndPoint(string parameter = "");
}
}

View File

@@ -0,0 +1,114 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace NetrunnerDb.Net
{
public class Set : IRequest
{
[JsonProperty("last-modified")]
public DateTime LastModified { get; set; }
[JsonProperty("code")]
public string Code { get; set; }
[JsonProperty("title")]
public string Title { get; set; }
[JsonProperty("type")]
public string Type { get; set; }
[JsonProperty("type_code")]
public string TypeCode { get; set; }
[JsonProperty("subtype")]
public string Subtype { get; set; }
[JsonProperty("subtype_code")]
public string SubtypeCode { get; set; }
[JsonProperty("text")]
public string Text { get; set; }
[JsonProperty("cost")]
public int Cost { get; set; }
[JsonProperty("faction")]
public string Faction { get; set; }
[JsonProperty("faction_code")]
public string FactionCode { get; set; }
[JsonProperty("faction_letter")]
public string FactionLetter { get; set; }
[JsonProperty("factioncost")]
public int Factioncost { get; set; }
[JsonProperty("flavor")]
public string Flavor { get; set; }
[JsonProperty("illustrator")]
public string Illustrator { get; set; }
[JsonProperty("number")]
public int Number { get; set; }
[JsonProperty("quantity")]
public int Quantity { get; set; }
[JsonProperty("setname")]
public string Setname { get; set; }
[JsonProperty("set_code")]
public string SetCode { get; set; }
[JsonProperty("side")]
public string Side { get; set; }
[JsonProperty("side_code")]
public string SideCode { get; set; }
[JsonProperty("uniqueness")]
public bool Uniqueness { get; set; }
[JsonProperty("limited")]
public bool Limited { get; set; }
[JsonProperty("cyclenumber")]
public int Cyclenumber { get; set; }
[JsonProperty("ancurLink")]
public string AncurLink { get; set; }
[JsonProperty("url")]
public string Url { get; set; }
[JsonProperty("imagesrc")]
public string Imagesrc { get; set; }
[JsonProperty("influencelimit")]
public int? Influencelimit { get; set; }
[JsonProperty("minimumdecksize")]
public int? Minimumdecksize { get; set; }
[JsonProperty("advancementcost")]
public int? Advancementcost { get; set; }
[JsonProperty("agendapoints")]
public int? Agendapoints { get; set; }
[JsonProperty("trash")]
public int? Trash { get; set; }
public string EndPoint(string parameter = "")
{
return string.Format("/api/set/{0}", parameter);
}
}
}

View File

@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace NetrunnerDb.Net
{
public class Sets : IRequest
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("code")]
public string Code { get; set; }
[JsonProperty("number")]
public int Number { get; set; }
[JsonProperty("cyclenumber")]
public int Cyclenumber { get; set; }
[JsonProperty("available")]
public string Available { get; set; }
[JsonProperty("known")]
public int Known { get; set; }
[JsonProperty("total")]
public int Total { get; set; }
[JsonProperty("url")]
public string Url { get; set; }
public string EndPoint(string parameter = "")
{
return "/api/sets/";
}
}
}

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
<package id="RestSharp" version="105.1.0" targetFramework="net45" />
</packages>