Skip to content

Commit

Permalink
Socioboard 3.0
Browse files Browse the repository at this point in the history
Github Commit
---------------------
bugs fixes and minor improvement :
=================================
1.schduled repeatation issue fixed
2.rss news taking more time to load data
fixed
3.image not coming while schdule and
composing rss news
4.added socioboard chrome plug in home page.
5.icon issue in dashboard fixed
6.link shareathon implementation.
7.rss feed data services modification for custome posting.
  • Loading branch information
socioboard committed Apr 3, 2017
1 parent 1ee91d0 commit f3dabb8
Show file tree
Hide file tree
Showing 134 changed files with 2,500 additions and 303 deletions.
Binary file modified .vs/Socioboard/v14/.suo
Binary file not shown.
29 changes: 28 additions & 1 deletion src/Api.Socioboard/Controllers/GoogleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ public IActionResult GetYoutubeAccount(string code, long groupId, long userId)
try
{
List<Domain.Socioboard.ViewModels.YoutubeProfiles> lstYoutubeProfiles = new List<Domain.Socioboard.ViewModels.YoutubeProfiles>();
lstYoutubeProfiles = Helper.GoogleHelper.GetYoutubeAccount(code, _appSettings);
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
lstYoutubeProfiles = Helper.GoogleHelper.GetYoutubeAccount(code, _appSettings,dbr);
List<Domain.Socioboard.Models.Groupprofiles> lstGrpProfiles = Repositories.GroupProfilesRepository.getGroupProfiles(groupId, _redisCache, dbr);
lstGrpProfiles = lstGrpProfiles.Where(t => t.profileType == Domain.Socioboard.Enum.SocialProfileType.YouTube).ToList();
string[] lstStr = lstGrpProfiles.Select(t => t.profileId).ToArray();
Expand Down Expand Up @@ -646,5 +646,32 @@ public IActionResult GetYTChannelsSB(long groupId)
}
return Ok(lstYoutubeChannel);
}


[HttpPost("AddYoutubeFeed")]
public IActionResult AddYoutubeFeed(string accesstoken, string channelid)
{
//connected to gplusrepository for add data in mongodb
Repositories.GplusRepository.InitialYtFeedsAdd(channelid, accesstoken, _appSettings, _logger);
Repositories.GplusRepository.InitialYtCommentsAdd(channelid, accesstoken, _appSettings, _logger);
return Ok("");
}


//Fetch youtube videos data from MongoDB

[HttpGet("GetYTVideos")]
public IActionResult GetYTVideos(string ChannelId)
{
return Ok(Repositories.GplusRepository.GetYoutubeFeeds(ChannelId, _redisCache, _appSettings));

}

[HttpGet("GetYtVdoComments")]
public IActionResult GetYtVdoComments(string VideoId)
{
return Ok(Repositories.GplusRepository.GetYoutubeComments(VideoId, _redisCache, _appSettings));

}
}
}
12 changes: 9 additions & 3 deletions src/Api.Socioboard/Controllers/LinkedInController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,15 @@ public IActionResult AddLinkedInPages(long groupId, long userId)
_oauth.ConsumerKey = _appSettings.LinkedinApiKey;
_oauth.ConsumerSecret = _appSettings.LinkedinSecretKey;
_oauth.Token = lindata[1];
dynamic profile = Helper.LinkedInHelper.GetCompanyPageData(_oauth, lindata[0]);

i = Repositories.LinkedInAccountRepository.AddLinkedInCompantPage(_oauth, profile, dbr, userId, groupId, lindata[1], _redisCache, _appSettings, _logger);
try
{
dynamic profile = Helper.LinkedInHelper.GetCompanyPageData(_oauth, lindata[0]);
i = Repositories.LinkedInAccountRepository.AddLinkedInCompantPage(_oauth, profile, dbr, userId, groupId, lindata[1], _redisCache, _appSettings, _logger);
}
catch (Exception ex)
{
return Ok("something went wrong while adding pages");
}

}
if (i == 1)
Expand Down
20 changes: 17 additions & 3 deletions src/Api.Socioboard/Controllers/RssFeedController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,32 @@ public IActionResult RssNewsFeedsUrl(long userId, string keyword )
{
DatabaseRepository dbr = new DatabaseRepository(_logger, _env);
string res = Repositories.RssNewsContentsRepository.AddRssContentsUrl(keyword, userId, _appSettings, dbr);
return Ok(res);
if(res == "added successfully")
{
DatabaseRepository bdr = new DatabaseRepository(_logger,_env);

List<Domain.Socioboard.Models.Mongo.RssNewsContentsFeeds> lstcontent = Repositories.RssNewsContentsRepository.GetRssNewsFeeds(userId,keyword,_appSettings);
//getRssNewsFeedsContents(userId,keyword);
return Ok(lstcontent);
}
else
{

return Ok("Data already added");
}


}


[HttpGet("getRssNewsFeedsContents")]
public IActionResult getRssNewsFeedsContents(string userId, string keyword)
public IActionResult getRssNewsFeedsContents(long userId, string keyword)
{

DatabaseRepository dbr = new DatabaseRepository(_logger, _env);
List<Domain.Socioboard.Models.Mongo.RssNewsContentsFeeds> lstRss = Repositories.RssNewsContentsRepository.GetRssNewsFeeds(userId,keyword, _appSettings);
// lstRss = lstRss.Where(t => !string.IsNullOrEmpty(t.Message)).ToList();
return Ok(lstRss);
return Ok(lstRss.ToList());


}
Expand Down
13 changes: 13 additions & 0 deletions src/Api.Socioboard/Controllers/ShareathonController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ public IActionResult DeleteGroupShareathon(string GroupShareathodId)
string pagedata = Repositories.ShareathonRepository.DeleteGroupShareathon(GroupShareathodId, _appSettings);
return Ok(pagedata);
}
[HttpPost("DeleteLinkShareathon")]
public IActionResult DeleteLinkShareathon(string LinkShareathodId)
{
string pagedata = Repositories.ShareathonRepository.DeleteLinkShareathon(LinkShareathodId, _appSettings);
return Ok(pagedata);
}

[HttpGet("UsergroupShareathon")]
public IActionResult UsergroupShareathon(long userId)
Expand All @@ -83,6 +89,13 @@ public IActionResult UsergroupShareathon(long userId)
return Ok(lstPageShareathon);
}

[HttpGet("UserLinkShareathon")]
public IActionResult UserLinkShareathon(long userId)
{
List<Domain.Socioboard.Models.Mongo.LinkShareathon> lstPageShareathon = Repositories.ShareathonRepository.LinkShareathonByUserId(userId, _appSettings, _redisCache);
return Ok(lstPageShareathon);
}


/// <summary>
/// To group post with selected facebook profiles in a given period of time
Expand Down
Loading

0 comments on commit f3dabb8

Please sign in to comment.