Skip to content

Commit

Permalink
整合Bing图片模型
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzhengyang committed Jun 12, 2019
1 parent 8db4299 commit 45f5ceb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions Azylee.Utils/Azylee.YeahWeb/Azylee.YeahWeb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<Compile Include="BaiDuWebAPI\IPLocationAPI\IPLocationTool.cs" />
<Compile Include="EmailUtils\EmailTool.cs" />
<Compile Include="ExtWebAPI\BingWebAPI\WallpaperUtils\WallpaperModel.cs" />
<Compile Include="ExtWebAPI\BingWebAPI\WallpaperUtils\WallpaperWebModel.cs" />
<Compile Include="ExtWebAPI\BingWebAPI\WallpaperUtils\WallpaperTool.cs" />
<Compile Include="FTPUtils\FTPTool.cs" />
<Compile Include="HttpUtils\MethodUtils\ExtendUtils\HeaderTool.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Azylee.YeahWeb.ExtWebAPI.BingWebAPI.WallpaperUtils
{
public class WallpaperModel
{
public string Name { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ public static class WallpaperTool
/// 获取今天的壁纸
/// </summary>
/// <returns></returns>
public static WallpaperModel GetToday()
public static WallpaperWebModel GetToday()
{
return GetSomeday(0);
}
/// <summary>
/// 获取昨天的壁纸
/// </summary>
/// <returns></returns>
public static WallpaperModel GetYesterday()
public static WallpaperWebModel GetYesterday()
{
return GetSomeday(1);
}
Expand All @@ -40,13 +40,13 @@ public static WallpaperModel GetYesterday()
/// </summary>
/// <param name="day"></param>
/// <returns></returns>
public static WallpaperModel GetSomeday(int day)
public static WallpaperWebModel GetSomeday(int day)
{
WallpaperModel model = null;
WallpaperWebModel model = null;
try
{
string rs = HttpTool.Get(string.Format(URL, day));
model = Json.String2Object<WallpaperModel>(rs);
model = Json.String2Object<WallpaperWebModel>(rs);
return model;
}
catch (Exception e) { return null; }
Expand Down

0 comments on commit 45f5ceb

Please sign in to comment.