-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from NicolasConstant/develop
0.2.0 PR
- Loading branch information
Showing
14 changed files
with
164 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace BirdsiteLive.Common.Settings | ||
{ | ||
public class LogsSettings | ||
{ | ||
public string Type { get; set; } | ||
public string InstrumentationKey { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using BirdsiteLive.DAL.Contracts; | ||
using BirdsiteLive.Models.StatisticsModels; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace BirdsiteLive.Controllers | ||
{ | ||
public class StatisticsController : Controller | ||
{ | ||
private readonly ITwitterUserDal _twitterUserDal; | ||
private readonly IFollowersDal _followersDal; | ||
|
||
#region Ctor | ||
public StatisticsController(ITwitterUserDal twitterUserDal, IFollowersDal followersDal) | ||
{ | ||
_twitterUserDal = twitterUserDal; | ||
_followersDal = followersDal; | ||
} | ||
#endregion | ||
|
||
public async Task<IActionResult> Index() | ||
{ | ||
var stats = new Statistics | ||
{ | ||
FollowersCount = await _followersDal.GetFollowersCountAsync(), | ||
TwitterUserCount = await _twitterUserDal.GetTwitterUsersCountAsync() | ||
}; | ||
return View(stats); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace BirdsiteLive.Models.StatisticsModels | ||
{ | ||
public class Statistics | ||
{ | ||
public int FollowersCount { get; set; } | ||
public int TwitterUserCount { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@model BirdsiteLive.Models.StatisticsModels.Statistics | ||
|
||
@{ | ||
ViewBag.Title = "Statistics"; | ||
} | ||
|
||
<h2>Statistics</h2> | ||
|
||
<ul> | ||
<li>Twitter Users: @Model.TwitterUserCount</li> | ||
<li>Followers: @Model.FollowersCount</li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters