start with entities and first endpoint (appMetadata)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OnePeek.Api
|
||||
{
|
||||
public abstract class ApiBase
|
||||
{
|
||||
public ApiBase()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ namespace OnePeek.Api
|
||||
/// </summary>
|
||||
internal class ApiHttpClient : IDisposable
|
||||
{
|
||||
internal static ApiHttpClient instance = null;
|
||||
private static ApiHttpClient instance = null;
|
||||
|
||||
/// <summary>
|
||||
/// Get Singleton of ApiHttpCient
|
||||
@@ -19,7 +19,7 @@ namespace OnePeek.Api
|
||||
/// <summary>
|
||||
/// Client for HTTP communication
|
||||
/// </summary>
|
||||
protected readonly HttpClient httpClient;
|
||||
private readonly HttpClient httpClient;
|
||||
|
||||
|
||||
public ApiHttpClient()
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using OnePeek.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OnePeek.Api
|
||||
{
|
||||
public class AppMetadataEndpoint : ApiBase
|
||||
{
|
||||
public async Task<AppMetadata> GetMetadata(StoreType store, StoreCultureType storeCulture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,9 @@
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ApiBase.cs" />
|
||||
<Compile Include="ApiHttpClient.cs" />
|
||||
<Compile Include="AppMetadataEndpoint.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -50,6 +52,14 @@
|
||||
<Name>OnePeek.Entities</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Threading.Tasks">
|
||||
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\portable-net45+win8+wpa81\Microsoft.Threading.Tasks.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Threading.Tasks.Extensions">
|
||||
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\portable-net45+win8+wpa81\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
||||
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
|
||||
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OnePeek.Entities
|
||||
{
|
||||
public class AppMetadata
|
||||
{
|
||||
public DateTime? StoreDataModifiedDate { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Urn { get; set; }
|
||||
|
||||
public string Id { get; set; }
|
||||
|
||||
public DateTime ReleaseDate { get; set; }
|
||||
|
||||
public string Summary { get; set; }
|
||||
|
||||
public string UpdateSummary { get; set; }
|
||||
|
||||
public AppVisibilityStatus VisibilityStatus { get; set; }
|
||||
|
||||
public AppPublisher Publisher { get; set; }
|
||||
|
||||
public AppRating Rating { get; set; }
|
||||
|
||||
public bool IsUniversal { get; set; }
|
||||
}
|
||||
|
||||
public enum AppVisibilityStatus
|
||||
{
|
||||
Unknown,
|
||||
Live
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace OnePeek.Entities
|
||||
{
|
||||
public class AppPublisher
|
||||
{
|
||||
[DataMember(Name = "publisherid")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[DataMember(Name = "publisherguid")]
|
||||
public string Uid { get; set; }
|
||||
|
||||
[DataMember(Name = "publisher")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[DataMember(Name = "publisherurl")]
|
||||
public Uri Url { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OnePeek.Entities
|
||||
{
|
||||
public class AppRating
|
||||
{
|
||||
[DataMember(Name = "averageuserrating")]
|
||||
public float AverageRating { get; set; }
|
||||
|
||||
[DataMember(Name = "userratingcount")]
|
||||
public int RatingCount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -37,8 +37,13 @@
|
||||
<!-- A reference to the entire .NET Framework is automatically included -->
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AppMetadata.cs" />
|
||||
<Compile Include="AppPublisher.cs" />
|
||||
<Compile Include="AppRating.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="StoreCulture.cs" />
|
||||
<Compile Include="StoreCultureTypeEnum.cs" />
|
||||
<Compile Include="StoreTypeEnum.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
@@ -4,6 +4,8 @@ namespace OnePeek.Entities
|
||||
{
|
||||
public class StoreCulture
|
||||
{
|
||||
public StoreCultureType Type { get; set; }
|
||||
|
||||
public string Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace OnePeek.Entities
|
||||
{
|
||||
public enum StoreCultureType
|
||||
{
|
||||
Unknown,
|
||||
EN_US,
|
||||
DE_AT,
|
||||
DE_DE
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace OnePeek.Entities
|
||||
{
|
||||
public enum StoreType
|
||||
{
|
||||
WindowsPhone8,
|
||||
Windows8,
|
||||
Windows10
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@ VisualStudioVersion = 14.0.22310.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OnePeek.Api", "OnePeek.Api\OnePeek.Api.csproj", "{843AAC40-1D0F-49D1-A6E1-CF6B7A5DB7EB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OnePeek.Entities", "OnePeek.Entities\OnePeek.Entities.csproj", "{D45D6378-3ED0-4445-94FE-21F62C1DF4E6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -14,6 +16,10 @@ Global
|
||||
{843AAC40-1D0F-49D1-A6E1-CF6B7A5DB7EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{843AAC40-1D0F-49D1-A6E1-CF6B7A5DB7EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{843AAC40-1D0F-49D1-A6E1-CF6B7A5DB7EB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D45D6378-3ED0-4445-94FE-21F62C1DF4E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D45D6378-3ED0-4445-94FE-21F62C1DF4E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D45D6378-3ED0-4445-94FE-21F62C1DF4E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D45D6378-3ED0-4445-94FE-21F62C1DF4E6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Reference in New Issue
Block a user