init
This commit is contained in:
63
.gitattributes
vendored
Normal file
63
.gitattributes
vendored
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
###############################################################################
|
||||||
|
# Set default behavior to automatically normalize line endings.
|
||||||
|
###############################################################################
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Set default behavior for command prompt diff.
|
||||||
|
#
|
||||||
|
# This is need for earlier builds of msysgit that does not have it on by
|
||||||
|
# default for csharp files.
|
||||||
|
# Note: This is only used by command line
|
||||||
|
###############################################################################
|
||||||
|
#*.cs diff=csharp
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Set the merge driver for project and solution files
|
||||||
|
#
|
||||||
|
# Merging from the command prompt will add diff markers to the files if there
|
||||||
|
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||||
|
# the diff markers are never inserted). Diff markers may cause the following
|
||||||
|
# file extensions to fail to load in VS. An alternative would be to treat
|
||||||
|
# these files as binary and thus will always conflict and require user
|
||||||
|
# intervention with every merge. To do so, just uncomment the entries below
|
||||||
|
###############################################################################
|
||||||
|
#*.sln merge=binary
|
||||||
|
#*.csproj merge=binary
|
||||||
|
#*.vbproj merge=binary
|
||||||
|
#*.vcxproj merge=binary
|
||||||
|
#*.vcproj merge=binary
|
||||||
|
#*.dbproj merge=binary
|
||||||
|
#*.fsproj merge=binary
|
||||||
|
#*.lsproj merge=binary
|
||||||
|
#*.wixproj merge=binary
|
||||||
|
#*.modelproj merge=binary
|
||||||
|
#*.sqlproj merge=binary
|
||||||
|
#*.wwaproj merge=binary
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# behavior for image files
|
||||||
|
#
|
||||||
|
# image files are treated as binary by default.
|
||||||
|
###############################################################################
|
||||||
|
#*.jpg binary
|
||||||
|
#*.png binary
|
||||||
|
#*.gif binary
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# diff behavior for common document formats
|
||||||
|
#
|
||||||
|
# Convert binary document formats to text before diffing them. This feature
|
||||||
|
# is only available from the command line. Turn it on by uncommenting the
|
||||||
|
# entries below.
|
||||||
|
###############################################################################
|
||||||
|
#*.doc diff=astextplain
|
||||||
|
#*.DOC diff=astextplain
|
||||||
|
#*.docx diff=astextplain
|
||||||
|
#*.DOCX diff=astextplain
|
||||||
|
#*.dot diff=astextplain
|
||||||
|
#*.DOT diff=astextplain
|
||||||
|
#*.pdf diff=astextplain
|
||||||
|
#*.PDF diff=astextplain
|
||||||
|
#*.rtf diff=astextplain
|
||||||
|
#*.RTF diff=astextplain
|
||||||
192
.gitignore
vendored
Normal file
192
.gitignore
vendored
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.sln.docstates
|
||||||
|
.vs
|
||||||
|
*.nupkg
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
x64/
|
||||||
|
build/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
|
||||||
|
# Roslyn cache directories
|
||||||
|
*.ide/
|
||||||
|
|
||||||
|
# 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 do note that will include unencrypted
|
||||||
|
## passwords
|
||||||
|
#*.pubxml
|
||||||
|
|
||||||
|
# NuGet Packages Directory
|
||||||
|
packages/*
|
||||||
|
## TODO: If the tool you use requires repositories.config
|
||||||
|
## uncomment the next line
|
||||||
|
#!packages/repositories.config
|
||||||
|
|
||||||
|
# Enable "build/" folder in the NuGet Packages folder since
|
||||||
|
# NuGet packages use it for MSBuild targets.
|
||||||
|
# This line needs to be after the ignore of the build folder
|
||||||
|
# (and the packages folder if the line above has been uncommented)
|
||||||
|
!packages/build/
|
||||||
|
|
||||||
|
# Windows Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Windows Store app package directory
|
||||||
|
AppPackages/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
sql/
|
||||||
|
*.Cache
|
||||||
|
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/
|
||||||
|
|
||||||
|
# LightSwitch generated files
|
||||||
|
GeneratedArtifacts/
|
||||||
|
_Pvt_Extensions/
|
||||||
|
ModelManifest.xml
|
||||||
21
LICENCE
Normal file
21
LICENCE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2015 Tommy Parnell
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
18
Readme.md
Normal file
18
Readme.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
## What is this?
|
||||||
|
|
||||||
|
A C# binding against the XVI sync API binding
|
||||||
|
|
||||||
|
## How to use?
|
||||||
|
|
||||||
|
basically new up a new `LodeStoneAPI();`
|
||||||
|
|
||||||
|
You can search for a character using the name/world, and then get the charater data from the id search results. Or you can find the ID by looking at the url of the character profile you are seraching for
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
var api = new LodestoneApi();
|
||||||
|
var res = api.SearchCharacter("Lucia Yokoyama", "Midgardsormr");
|
||||||
|
var data = api.GetCharacter(res.Data.First().Id);
|
||||||
|
var data = api.GetCharacter("8696200");
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
28
XIVSync.Net.sln
Normal file
28
XIVSync.Net.sln
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 14
|
||||||
|
VisualStudioVersion = 14.0.22823.1
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XIVSync.Net", "src\XIVSync.Net\XIVSync.Net.csproj", "{FBA5D29C-E988-4664-BF56-857B062B120F}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XIVSync.Net.UnitTests", "src\XIVSync.Net.UnitTests\XIVSync.Net.UnitTests.csproj", "{5DBCDAA2-83C0-48E5-828D-E8F3E7A05B16}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{FBA5D29C-E988-4664-BF56-857B062B120F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{FBA5D29C-E988-4664-BF56-857B062B120F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{FBA5D29C-E988-4664-BF56-857B062B120F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{FBA5D29C-E988-4664-BF56-857B062B120F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{5DBCDAA2-83C0-48E5-828D-E8F3E7A05B16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{5DBCDAA2-83C0-48E5-828D-E8F3E7A05B16}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{5DBCDAA2-83C0-48E5-828D-E8F3E7A05B16}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{5DBCDAA2-83C0-48E5-828D-E8F3E7A05B16}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
36
src/XIVSync.Net.UnitTests/Properties/AssemblyInfo.cs
Normal file
36
src/XIVSync.Net.UnitTests/Properties/AssemblyInfo.cs
Normal 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("XIVSync.Net.UnitTests")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("XIVSync.Net.UnitTests")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 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("5dbcdaa2-83c0-48e5-828d-e8f3e7a05b16")]
|
||||||
|
|
||||||
|
// 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")]
|
||||||
35
src/XIVSync.Net.UnitTests/Test.cs
Normal file
35
src/XIVSync.Net.UnitTests/Test.cs
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
namespace XIVSync.Net.UnitTests
|
||||||
|
{
|
||||||
|
|
||||||
|
[TestFixture]
|
||||||
|
public class Test
|
||||||
|
{
|
||||||
|
//TODO make real unit tests not really "does this work tests"
|
||||||
|
[Test]
|
||||||
|
public void DoesSearchWork()
|
||||||
|
{
|
||||||
|
var api = new LodestoneApi();
|
||||||
|
var res = api.SearchCharacter("Lucia Yokoyama", "Midgardsormr");
|
||||||
|
Assert.AreEqual(res.Ok, 1);
|
||||||
|
res = new LodestoneApi().SearchCharacter("Karalix Velatin", "Midgardsormr");
|
||||||
|
Assert.AreEqual(res.Ok, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void DoesGetCharacterWork()
|
||||||
|
{
|
||||||
|
var res = new LodestoneApi().GetCharacter("8696200");
|
||||||
|
Assert.AreEqual(res.Ok, 1);
|
||||||
|
res = new LodestoneApi().GetCharacter("8555950");
|
||||||
|
Assert.AreEqual(res.Ok, 1);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
67
src/XIVSync.Net.UnitTests/XIVSync.Net.UnitTests.csproj
Normal file
67
src/XIVSync.Net.UnitTests/XIVSync.Net.UnitTests.csproj
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="14.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>{5DBCDAA2-83C0-48E5-828D-E8F3E7A05B16}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>XIVSync.Net.UnitTests</RootNamespace>
|
||||||
|
<AssemblyName>XIVSync.Net.UnitTests</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5.2</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.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
|
||||||
|
<Private>True</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.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Test.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\XIVSync.Net\XIVSync.Net.csproj">
|
||||||
|
<Project>{fba5d29c-e988-4664-bf56-857b062b120f}</Project>
|
||||||
|
<Name>XIVSync.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>
|
||||||
4
src/XIVSync.Net.UnitTests/packages.config
Normal file
4
src/XIVSync.Net.UnitTests/packages.config
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="NUnit" version="2.6.4" targetFramework="net452" userInstalled="true" />
|
||||||
|
</packages>
|
||||||
212
src/XIVSync.Net/Character.cs
Normal file
212
src/XIVSync.Net/Character.cs
Normal file
@@ -0,0 +1,212 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace XIVSync.Net
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public class Classjob
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("icon")]
|
||||||
|
public string Icon { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("iconTimestamp")]
|
||||||
|
public string IconTimestamp { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("iconQueryString")]
|
||||||
|
public string IconQueryString { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("name")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("level")]
|
||||||
|
public object Level { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("exp_current")]
|
||||||
|
public object ExpCurrent { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("exp_level")]
|
||||||
|
public object ExpLevel { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("exp_total")]
|
||||||
|
public int ExpTotal { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public object Id { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("real_id")]
|
||||||
|
public int RealId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Minion
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("name")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("icon")]
|
||||||
|
public string Icon { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("iconTimestamp")]
|
||||||
|
public string IconTimestamp { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Mount
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("name")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("icon")]
|
||||||
|
public string Icon { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("iconTimestamp")]
|
||||||
|
public string IconTimestamp { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Event
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("character_id")]
|
||||||
|
public string CharacterId { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("time")]
|
||||||
|
public string Time { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("type")]
|
||||||
|
public string Type { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("jobclass")]
|
||||||
|
public string Jobclass { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("gained")]
|
||||||
|
public string Gained { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("old")]
|
||||||
|
public string Old { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("new")]
|
||||||
|
public string New { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("name")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("world")]
|
||||||
|
public string World { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("title")]
|
||||||
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("avatar")]
|
||||||
|
public string Avatar { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("avatarTimestamp")]
|
||||||
|
public string AvatarTimestamp { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("avatarHash")]
|
||||||
|
public string AvatarHash { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("portrait")]
|
||||||
|
public string Portrait { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("portraitTimestamp")]
|
||||||
|
public string PortraitTimestamp { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("bio")]
|
||||||
|
public string Bio { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("race")]
|
||||||
|
public string Race { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("clan")]
|
||||||
|
public string Clan { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("gender")]
|
||||||
|
public string Gender { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("nameday")]
|
||||||
|
public string Nameday { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("guardian")]
|
||||||
|
public string Guardian { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("guardianIcon")]
|
||||||
|
public string GuardianIcon { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("city")]
|
||||||
|
public string City { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("cityIcon")]
|
||||||
|
public string CityIcon { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[JsonProperty("freeCompany")]
|
||||||
|
public string FreeCompany { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("freeCompanyId")]
|
||||||
|
public string FreeCompanyId { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("freeCompanyIcon")]
|
||||||
|
public IList<string> FreeCompanyIcon { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("classjobs")]
|
||||||
|
public IList<Classjob> Classjobs { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("activeClass")]
|
||||||
|
public string ActiveClass { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("activeJob")]
|
||||||
|
public string ActiveJob { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("activeLevel")]
|
||||||
|
public string ActiveLevel { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("minions")]
|
||||||
|
public IList<Minion> Minions { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("mounts")]
|
||||||
|
public IList<Mount> Mounts { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("hash")]
|
||||||
|
public string Hash { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("events")]
|
||||||
|
public IList<Event> Events { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("all50")]
|
||||||
|
public bool All50 { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class LodestoneCharacter
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("ok")]
|
||||||
|
public int Ok { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("time")]
|
||||||
|
public int Time { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("msg")]
|
||||||
|
public string Msg { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("data")]
|
||||||
|
public Data Data { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("log")]
|
||||||
|
public object Log { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
28
src/XIVSync.Net/LodestoneApi.cs
Normal file
28
src/XIVSync.Net/LodestoneApi.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using System.Net;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using RestSharp;
|
||||||
|
|
||||||
|
namespace XIVSync.Net
|
||||||
|
{
|
||||||
|
public class LodestoneApi
|
||||||
|
{
|
||||||
|
readonly RestClient _client = new RestClient("http://xivsync.com/");
|
||||||
|
public LodestoneSearch SearchCharacter(string character, string server)
|
||||||
|
{
|
||||||
|
|
||||||
|
var req = new RestRequest("search/character", Method.GET);
|
||||||
|
req.AddParameter("name", character);
|
||||||
|
req.AddParameter("server", server);
|
||||||
|
var response = _client.Execute(req);
|
||||||
|
return response.StatusCode != HttpStatusCode.OK ? null : JsonConvert.DeserializeObject<LodestoneSearch>(response.Content);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LodestoneCharacter GetCharacter(string characterId)
|
||||||
|
{
|
||||||
|
var req = new RestRequest("character/get");
|
||||||
|
req.AddParameter("lodestone", characterId);
|
||||||
|
var response = _client.Execute(req);
|
||||||
|
return response.StatusCode != HttpStatusCode.OK ? null : JsonConvert.DeserializeObject<LodestoneCharacter>(response.Content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
41
src/XIVSync.Net/LodestoneSearch.cs
Normal file
41
src/XIVSync.Net/LodestoneSearch.cs
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace XIVSync.Net
|
||||||
|
{
|
||||||
|
public class Datum
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("name")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("world")]
|
||||||
|
public string World { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("avatar")]
|
||||||
|
public string Avatar { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class LodestoneSearch
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("ok")]
|
||||||
|
public int Ok { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("time")]
|
||||||
|
public int Time { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("msg")]
|
||||||
|
public string Msg { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("data")]
|
||||||
|
public IList<Datum> Data { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("log")]
|
||||||
|
public object Log { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
36
src/XIVSync.Net/Properties/AssemblyInfo.cs
Normal file
36
src/XIVSync.Net/Properties/AssemblyInfo.cs
Normal 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("XIVSync.Net")]
|
||||||
|
[assembly: AssemblyDescription("Unofficia API binding for XIVSync")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("Tommy Parnell")]
|
||||||
|
[assembly: AssemblyProduct("XIVSync.Net")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 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("fba5d29c-e988-4664-bf56-857b062b120f")]
|
||||||
|
|
||||||
|
// 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")]
|
||||||
68
src/XIVSync.Net/XIVSync.Net.csproj
Normal file
68
src/XIVSync.Net/XIVSync.Net.csproj
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="14.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>{FBA5D29C-E988-4664-BF56-857B062B120F}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>XIVSync.Net</RootNamespace>
|
||||||
|
<AssemblyName>XIVSync.Net</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
</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=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="RestSharp, Version=105.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||||
|
<Private>True</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.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Character.cs" />
|
||||||
|
<Compile Include="LodestoneApi.cs" />
|
||||||
|
<Compile Include="LodestoneSearch.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.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>
|
||||||
15
src/XIVSync.Net/XIVSync.Net.nuspec
Normal file
15
src/XIVSync.Net/XIVSync.Net.nuspec
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?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/XIVSync.Net</projectUrl>
|
||||||
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
|
<description>$description$</description>
|
||||||
|
<copyright>Copyright 2015</copyright>
|
||||||
|
<tags>FinalFantasy </tags>
|
||||||
|
</metadata>
|
||||||
|
</package>
|
||||||
5
src/XIVSync.Net/packages.config
Normal file
5
src/XIVSync.Net/packages.config
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" userInstalled="true" />
|
||||||
|
<package id="RestSharp" version="105.1.0" targetFramework="net45" userInstalled="true" />
|
||||||
|
</packages>
|
||||||
Reference in New Issue
Block a user