Skip to content

Commit

Permalink
Socioboard 3.0 update
Browse files Browse the repository at this point in the history
Socioboard 3.0 update
  • Loading branch information
swetasb committed Nov 20, 2017
1 parent 0ed96fa commit d7c66a4
Show file tree
Hide file tree
Showing 64 changed files with 126 additions and 3 deletions.
Binary file modified .vs/Socioboard/v14/.suo
Binary file not shown.
Binary file modified src/Api.Socioboard/bin/Debug/net451/Api.Socioboard.exe
Binary file not shown.
Binary file modified src/Api.Socioboard/bin/Debug/net451/Api.Socioboard.pdb
Binary file not shown.
Binary file modified src/Api.Socioboard/bin/Debug/net451/win7-x64/Api.Socioboard.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Api.Socioboard/obj/Debug/net451/.IncrementalCache

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/Api.Socioboard/obj/Debug/net451/dotnet-compile-csc.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\ValuesController.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\WebHookController.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\WebhookUserController.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\YoutubeGroupController.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\YoutubeReportController.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\Listening\FacebookGroupsController.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\Listening\LinkedInGroupController.cs"
Expand Down Expand Up @@ -295,6 +296,7 @@
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\TwitterReportsRepository.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\TwitterRepository.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\UploadVideo.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\YoutubeGroupRepository.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\YoutubeReportsRepository.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\BoardMeRepository\BoardMeRepository.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\BoardMeRepository\FacebookRepository.cs"
Expand Down
2 changes: 2 additions & 0 deletions src/Api.Socioboard/obj/Debug/net451/dotnet-compile.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\UserContr
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\ValuesController.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\WebHookController.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\WebhookUserController.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\YoutubeGroupController.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\YoutubeReportController.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\Listening\FacebookGroupsController.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Controllers\Listening\LinkedInGroupController.cs
Expand Down Expand Up @@ -299,6 +300,7 @@ D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\TaskRepo
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\TwitterReportsRepository.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\TwitterRepository.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\UploadVideo.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\YoutubeGroupRepository.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\YoutubeReportsRepository.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\BoardMeRepository\BoardMeRepository.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Api.Socioboard\Repositories\BoardMeRepository\FacebookRepository.cs
Expand Down
9 changes: 9 additions & 0 deletions src/Domain.Socioboard/Models/Mongo/MongoYoutubeComments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ public class MongoYoutubeComments
public string updatedTime { get; set; }
public string totalReplyCount { get; set; }
public string parentIdforReply { get; set; }
public bool active { get; set; }
public double publishTimeUnix { get; set; }


}

public class MongoYoutubeCommentsWtRepl
{
public MongoYoutubeComments _ParentComments { get; set; }
public List<MongoYoutubeComments> _ChildComments { get; set; }
}
}
21 changes: 21 additions & 0 deletions src/Domain.Socioboard/Models/YoutubeGroupInvite.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Domain.Socioboard.Models
{
public class YoutubeGroupInvite
{
public virtual Int64 Id { get; set; }
public virtual Int64 UserId { get; set; }
public virtual bool Owner { get; set; }
public virtual string OwnerName { get; set; }
public virtual string OwnerEmailid { get; set; }
public virtual bool Active { get; set; }
public virtual string SBUserName { get; set; }
public virtual string SBEmailId { get; set; }
public virtual string SBProfilePic { get; set; }
public virtual Int64 AccessSBUserId { get; set; }
}
}
Binary file modified src/Domain.Socioboard/bin/Debug/net451/Domain.Socioboard.dll
Binary file not shown.
Binary file modified src/Domain.Socioboard/bin/Debug/net451/Domain.Socioboard.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Domain.Socioboard/obj/Debug/net451/.IncrementalCache

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
"D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\TwitterRecentFollower.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\User.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\YoutubeChannel.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\YoutubeGroupInvite.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\Listening\FacebookGroupHashtagDetails.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\Listening\FacebookGroupPost.cs"
"D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\Listening\FacebookGroupPostComments.cs"
Expand Down
1 change: 1 addition & 0 deletions src/Domain.Socioboard/obj/Debug/net451/dotnet-compile.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\TwitterName
D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\TwitterRecentFollower.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\User.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\YoutubeChannel.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\YoutubeGroupInvite.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\Listening\FacebookGroupHashtagDetails.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\Listening\FacebookGroupPost.cs
D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Models\Listening\FacebookGroupPostComments.cs
Expand Down
Binary file modified src/Socioboard.Facebook/bin/Debug/net451/Domain.Socioboard.dll
Binary file not shown.
Binary file not shown.
Binary file modified src/Socioboard.Facebook/bin/Debug/net451/Socioboard.Facebook.dll
Binary file not shown.
Binary file modified src/Socioboard.Facebook/bin/Debug/net451/Socioboard.Facebook.pdb
Binary file not shown.
89 changes: 88 additions & 1 deletion src/Socioboard.Google/Youtube.Core/Video.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public string Post_Comments_toVideo(string refreshtoken, string VideoId, string
JObject JData = JObject.Parse(accesstoken_jdata);
string accesstoken = JData["access_token"].ToString();

commentText = commentText.Replace("\\", "\\\\").Replace("\"", "\\\""); ;
commentText = commentText.Replace("\\n", "######2525").Replace("\\", "\\\\").Replace("\"", "\\\"").Replace("######2525", "\\n"); ;

string RequestUrl = "https://content.googleapis.com/youtube/v3/commentThreads?part=snippet&key=" + accesstoken + "&alt=json";

Expand Down Expand Up @@ -375,5 +375,92 @@ public string Get_CommentsRepliesBy_CmParentId(string cmParentId, string key)

}

public string replyToComment(string refreshtoken, string parentid, string commentText)
{
oAuthTokenYoutube objoAuthTokenYoutube = new oAuthTokenYoutube(_clientId, _clientSecret, _redirectUrl);
oAuthToken objoauth = new oAuthToken(_clientId, _clientSecret, _redirectUrl);

string accesstoken_jdata = objoauth.GetAccessToken(refreshtoken);
JObject JData = JObject.Parse(accesstoken_jdata);
string accesstoken = JData["access_token"].ToString();

commentText = commentText.Replace("\\n", "######2525").Replace("\\", "\\\\").Replace("\"", "\\\"").Replace("######2525", "\\n"); ;

string RequestUrl = "https://www.googleapis.com/youtube/v3/comments?part=snippet&key=" + accesstoken + "&alt=json";

string postdata = "{\"snippet\":{\"parentId\":\"" + parentid + "\",\"textOriginal\":\"" + commentText + "\"}}";

Uri path = new Uri(RequestUrl);
string[] header = { "Authorization", "X-JavaScript-User-Agent" };
string[] val = { "Bearer " + accesstoken, "Google APIs Explorer" };
string response = string.Empty;


try
{
response = objoAuthTokenYoutube.Post_WebRequest(Socioboard.GoogleLib.Authentication.oAuthToken.Method.POST, RequestUrl, postdata, header, val);
}
catch (Exception Err)
{
Console.Write(Err.StackTrace);
}



return response;
}

public string deletesaComment(string refreshtoken, string commentId)
{
oAuthTokenYoutube objoAuthTokenYoutube = new oAuthTokenYoutube(_clientId, _clientSecret, _redirectUrl);
oAuthToken objoauth = new oAuthToken(_clientId, _clientSecret, _redirectUrl);

string accesstoken_jdata = objoauth.GetAccessToken(refreshtoken);
JObject JData = JObject.Parse(accesstoken_jdata);
string accesstoken = JData["access_token"].ToString();

string RequestUrl = "https://www.googleapis.com/youtube/v3/comments?id=" + commentId + "&key=" + accesstoken + "&alt=json";


Uri path = new Uri(RequestUrl);
string[] header = { "Authorization", "X-JavaScript-User-Agent" };
string[] val = { "Bearer " + accesstoken, "Google APIs Explorer" };
string response = string.Empty;
try
{
response = objoAuthTokenYoutube.WebRequestHeader(path, header, val, Socioboard.GoogleLib.Authentication.oAuthToken.Method.DELETE.ToString());
}
catch (Exception Err)
{
Console.Write(Err.StackTrace);
}


return response;
}

public string RejectAComment(string refreshtoken, string commmentId)
{
oAuthTokenYoutube objoAuthTokenYoutube = new oAuthTokenYoutube(_clientId, _clientSecret, _redirectUrl);
oAuthToken objoauth = new oAuthToken(_clientId, _clientSecret, _redirectUrl);
string accesstoken_jdata = objoauth.GetAccessToken(refreshtoken);
JObject JData = JObject.Parse(accesstoken_jdata);
string accesstoken = JData["access_token"].ToString();
string RequestUrl = "https://www.googleapis.com/youtube/v3/comments/setModerationStatus?id=" + commmentId + "&moderationStatus=rejected&key=" + accesstoken + "&alt=json";
string postdata = "";
Uri path = new Uri(RequestUrl);
string[] header = { "Authorization", "X-JavaScript-User-Agent" };
string[] val = { "Bearer " + accesstoken, "Google APIs Explorer" };
string response = string.Empty;
try
{
response = objoAuthTokenYoutube.Post_WebRequest(Socioboard.GoogleLib.Authentication.oAuthToken.Method.POST, RequestUrl, postdata, header, val);
}
catch (Exception Err)
{
Console.Write(Err.StackTrace);
}
return response;
}
}
}
Binary file modified src/Socioboard.Google/bin/Debug/net451/Socioboard.Google.dll
Binary file not shown.
Binary file modified src/Socioboard.Google/bin/Debug/net451/Socioboard.Google.pdb
Binary file not shown.
Binary file modified src/Socioboard/bin/Debug/net451/Socioboard.exe
Binary file not shown.
Binary file modified src/Socioboard/bin/Debug/net451/Socioboard.pdb
Binary file not shown.
Binary file modified src/Socioboard/bin/Debug/net451/win7-x64/Domain.Socioboard.dll
Binary file not shown.
Binary file not shown.
Binary file modified src/Socioboard/bin/Debug/net451/win7-x64/Socioboard.Facebook.dll
Binary file not shown.
Binary file modified src/Socioboard/bin/Debug/net451/win7-x64/Socioboard.Facebook.pdb
Binary file not shown.
Binary file modified src/Socioboard/bin/Debug/net451/win7-x64/Socioboard.exe
Binary file not shown.
Binary file modified src/Socioboard/bin/Debug/net451/win7-x64/Socioboard.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit d7c66a4

Please sign in to comment.