add support for Query Follower\Following(s) ...
This commit is contained in:
@@ -144,6 +144,9 @@ namespace xIdentityService.Constants
|
|||||||
[StringValue("Account/Friendship/{destUser}/RejectRequest")]
|
[StringValue("Account/Friendship/{destUser}/RejectRequest")]
|
||||||
RejectRequest,
|
RejectRequest,
|
||||||
|
|
||||||
|
[StringValue("Account/Friendship/{destUser}/FriendshipInfo")]
|
||||||
|
FriendshipInfo,
|
||||||
|
|
||||||
[StringValue("Account/Friendship/{destUser}/IsFollower")]
|
[StringValue("Account/Friendship/{destUser}/IsFollower")]
|
||||||
IsFollower,
|
IsFollower,
|
||||||
|
|
||||||
@@ -159,6 +162,12 @@ namespace xIdentityService.Constants
|
|||||||
[StringValue("Account/Friendship/AllFollowers")]
|
[StringValue("Account/Friendship/AllFollowers")]
|
||||||
AllFollowers,
|
AllFollowers,
|
||||||
|
|
||||||
|
[StringValue("Account/Friendship/FollowersList")]
|
||||||
|
FollowersList,
|
||||||
|
|
||||||
|
[StringValue("Account/Friendship/QueryFollowers")]
|
||||||
|
QueryFollowers,
|
||||||
|
|
||||||
[StringValue("Account/Friendship/{destUser}/IsFollowing")]
|
[StringValue("Account/Friendship/{destUser}/IsFollowing")]
|
||||||
IsFollowing,
|
IsFollowing,
|
||||||
|
|
||||||
@@ -177,11 +186,8 @@ namespace xIdentityService.Constants
|
|||||||
[StringValue("Account/Friendship/FollowingsList")]
|
[StringValue("Account/Friendship/FollowingsList")]
|
||||||
FollowingsList,
|
FollowingsList,
|
||||||
|
|
||||||
[StringValue("Account/Friendship/FollowersList")]
|
[StringValue("Account/Friendship/QueryFollowings")]
|
||||||
FollowersList,
|
QueryFollowings,
|
||||||
|
|
||||||
[StringValue("Account/Friendship/{destUser}/FriendshipInfo")]
|
|
||||||
FriendshipInfo,
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -217,6 +217,11 @@ namespace xIdentityService.Interfaces
|
|||||||
string destUser
|
string destUser
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Task<XFriendshipInfoDto> GetFriendshipInfo(
|
||||||
|
XTokenResponse tokens,
|
||||||
|
string destUser
|
||||||
|
);
|
||||||
|
|
||||||
Task<bool> IsFollower(
|
Task<bool> IsFollower(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
@@ -236,6 +241,13 @@ namespace xIdentityService.Interfaces
|
|||||||
|
|
||||||
Task<IEnumerable<XFriendshipFollower>> GetAllFollowers(XTokenResponse tokens);
|
Task<IEnumerable<XFriendshipFollower>> GetAllFollowers(XTokenResponse tokens);
|
||||||
|
|
||||||
|
Task<IEnumerable<string>> GetFollowingList(XTokenResponse tokens);
|
||||||
|
|
||||||
|
Task<XQueryResult<XFriendDto>> QueryFollowers(
|
||||||
|
XQuery query,
|
||||||
|
XTokenResponse tokens
|
||||||
|
);
|
||||||
|
|
||||||
Task<bool> IsFollowing(
|
Task<bool> IsFollowing(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
@@ -255,13 +267,11 @@ namespace xIdentityService.Interfaces
|
|||||||
|
|
||||||
Task<IEnumerable<XFriendshipFollowing>> GetAllFollowings(XTokenResponse tokens);
|
Task<IEnumerable<XFriendshipFollowing>> GetAllFollowings(XTokenResponse tokens);
|
||||||
|
|
||||||
Task<IEnumerable<string>> GetFollowingList(XTokenResponse tokens);
|
|
||||||
|
|
||||||
Task<IEnumerable<string>> GetFollowersList(XTokenResponse tokens);
|
Task<IEnumerable<string>> GetFollowersList(XTokenResponse tokens);
|
||||||
|
|
||||||
Task<XFriendshipInfoDto> GetFriendshipInfo(
|
Task<XQueryResult<XFriendDto>> QueryFollowings(
|
||||||
XTokenResponse tokens,
|
XQuery query,
|
||||||
string destUser
|
XTokenResponse tokens
|
||||||
);
|
);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,18 @@ using System.Collections.Generic;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using xCommons.Extensions;
|
using xCommons.Extensions;
|
||||||
using xHttpService.Constants;
|
using xHttpService.Constants;
|
||||||
|
using xHttpService.Extensions;
|
||||||
using xIdentityModels.Constants;
|
using xIdentityModels.Constants;
|
||||||
using xIdentityModels.Dtos;
|
using xIdentityModels.Dtos;
|
||||||
using xIdentityModels.Models;
|
using xIdentityModels.Models;
|
||||||
using xIdentityModels.Navigations;
|
using xIdentityModels.Navigations;
|
||||||
using xIdentityService.Constants;
|
using xIdentityService.Constants;
|
||||||
|
using xModels.Dtos;
|
||||||
|
|
||||||
namespace xIdentityService.Providers {
|
namespace xIdentityService.Providers
|
||||||
public partial class XIdentityProvider {
|
{
|
||||||
|
public partial class XIdentityProvider
|
||||||
|
{
|
||||||
//
|
//
|
||||||
#region Friendship ...
|
#region Friendship ...
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -21,7 +25,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task<XFriendshipFollowing> Follow(
|
public async Task<XFriendshipFollowing> Follow(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -61,7 +66,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task<bool> Cancel(
|
public async Task<bool> Cancel(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -101,7 +107,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task UnFollowFollower(
|
public async Task UnFollowFollower(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -140,7 +147,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task UnFollowFollowing(
|
public async Task UnFollowFollowing(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -179,7 +187,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task<XFriendshipFollowing> Block(
|
public async Task<XFriendshipFollowing> Block(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -219,7 +228,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task<XFriendshipFollowing> UnBlock(
|
public async Task<XFriendshipFollowing> UnBlock(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -259,7 +269,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task<XFriendshipFollower> AcceptRequest(
|
public async Task<XFriendshipFollower> AcceptRequest(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -299,7 +310,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task<XFriendshipFollower> RejectRequest(
|
public async Task<XFriendshipFollower> RejectRequest(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -330,6 +342,47 @@ namespace xIdentityService.Providers {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get Friendship Info Model between Specific User and Current User
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tokens">Authentication Tokens</param>
|
||||||
|
/// <param name="destUser">a user identifier which represent destination user</param>
|
||||||
|
/// <returns>an instance of <see>XFriendshipInfoDto</see></returns>
|
||||||
|
public async Task<XFriendshipInfoDto> GetFriendshipInfo(
|
||||||
|
XTokenResponse tokens,
|
||||||
|
string destUser
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Validate Args ...
|
||||||
|
await validationProvider
|
||||||
|
.GroupValidationBuilder()
|
||||||
|
.AddNotNull(tokens)
|
||||||
|
.AddNotEmpty(
|
||||||
|
destUser,
|
||||||
|
tokens.AccessToken
|
||||||
|
)
|
||||||
|
.ValidateGroupAsync();
|
||||||
|
|
||||||
|
//
|
||||||
|
var client = GetRestClient(tokens);
|
||||||
|
|
||||||
|
//
|
||||||
|
var request = GetRestRequet(
|
||||||
|
XApiAccountEndpoint.FriendshipInfo,
|
||||||
|
@params: new Dictionary<string, string> { { XParam.XDestUser.GetStringValue (), destUser }
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
var response = await RunRestRequest<XFriendshipInfoDto>(
|
||||||
|
client,
|
||||||
|
request,
|
||||||
|
XHttpMethod.GET
|
||||||
|
);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check a User IsFollower of Requested User
|
/// Check a User IsFollower of Requested User
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -339,7 +392,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task<bool> IsFollower(
|
public async Task<bool> IsFollower(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -379,7 +433,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task<XFriendshipFollower> GetFollower(
|
public async Task<XFriendshipFollower> GetFollower(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -419,7 +474,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task<XFriendshipState> GetFollowerState(
|
public async Task<XFriendshipState> GetFollowerState(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -457,7 +513,8 @@ namespace xIdentityService.Providers {
|
|||||||
/// <returns>a collection of <see>XFriendshipFollower</see></returns>
|
/// <returns>a collection of <see>XFriendshipFollower</see></returns>
|
||||||
public async Task<IEnumerable<XFriendshipFollower>> GetFollowers(
|
public async Task<IEnumerable<XFriendshipFollower>> GetFollowers(
|
||||||
XTokenResponse tokens
|
XTokenResponse tokens
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -489,7 +546,8 @@ namespace xIdentityService.Providers {
|
|||||||
/// <returns>a collection of <see>XFriendshipFollower</see></returns>
|
/// <returns>a collection of <see>XFriendshipFollower</see></returns>
|
||||||
public async Task<IEnumerable<XFriendshipFollower>> GetAllFollowers(
|
public async Task<IEnumerable<XFriendshipFollower>> GetAllFollowers(
|
||||||
XTokenResponse tokens
|
XTokenResponse tokens
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -513,6 +571,76 @@ namespace xIdentityService.Providers {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Return Followers UserName's List of Current User
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tokens">Authentication Tokens</param>
|
||||||
|
/// <returns>a collection of UserNames</returns>
|
||||||
|
public async Task<IEnumerable<string>> GetFollowersList(
|
||||||
|
XTokenResponse tokens
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Validate Args ...
|
||||||
|
await validationProvider
|
||||||
|
.GroupValidationBuilder()
|
||||||
|
.AddNotNull(tokens)
|
||||||
|
.AddNotEmpty(tokens.AccessToken)
|
||||||
|
.ValidateGroupAsync();
|
||||||
|
|
||||||
|
//
|
||||||
|
var client = GetRestClient(tokens);
|
||||||
|
|
||||||
|
//
|
||||||
|
var request = GetRestRequet(XApiAccountEndpoint.FollowersList);
|
||||||
|
|
||||||
|
//
|
||||||
|
var response = await RunRestRequest<IEnumerable<string>>(
|
||||||
|
client,
|
||||||
|
request,
|
||||||
|
XHttpMethod.GET
|
||||||
|
);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Retrieve All User's Followers based on Query Model ...
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="query">Query Model Descriptor</param>
|
||||||
|
/// <param name="tokens">Requester User's Descriptor</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<XQueryResult<XFriendDto>> QueryFollowers(
|
||||||
|
XQuery query,
|
||||||
|
XTokenResponse tokens
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Validate Args ...
|
||||||
|
await validationProvider
|
||||||
|
.GroupValidationBuilder()
|
||||||
|
.AddNotNull(tokens)
|
||||||
|
.AddNotEmpty(tokens.AccessToken)
|
||||||
|
.ValidateGroupAsync();
|
||||||
|
|
||||||
|
//
|
||||||
|
var client = GetRestClient(tokens);
|
||||||
|
|
||||||
|
//
|
||||||
|
var request = GetRestRequet(XApiAccountEndpoint.QueryFollowers);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Attach XQuery to Request ...
|
||||||
|
request = request.AttachXQuery(query);
|
||||||
|
|
||||||
|
//
|
||||||
|
var response = await RunRestRequest<XQueryResult<XFriendDto>>(
|
||||||
|
client,
|
||||||
|
request,
|
||||||
|
XHttpMethod.GET
|
||||||
|
);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check a User is in Followings of Current User
|
/// Check a User is in Followings of Current User
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -522,7 +650,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task<bool> IsFollowing(
|
public async Task<bool> IsFollowing(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -562,7 +691,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task<XFriendshipFollowing> GetFollowing(
|
public async Task<XFriendshipFollowing> GetFollowing(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -603,7 +733,8 @@ namespace xIdentityService.Providers {
|
|||||||
public async Task<XFriendshipState> GetFollowingState(
|
public async Task<XFriendshipState> GetFollowingState(
|
||||||
XTokenResponse tokens,
|
XTokenResponse tokens,
|
||||||
string destUser
|
string destUser
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -641,7 +772,8 @@ namespace xIdentityService.Providers {
|
|||||||
/// <returns>a collection of <see>XFriendshipFollowing</see></returns>
|
/// <returns>a collection of <see>XFriendshipFollowing</see></returns>
|
||||||
public async Task<IEnumerable<XFriendshipFollowing>> GetFollowings(
|
public async Task<IEnumerable<XFriendshipFollowing>> GetFollowings(
|
||||||
XTokenResponse tokens
|
XTokenResponse tokens
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -673,7 +805,8 @@ namespace xIdentityService.Providers {
|
|||||||
/// <returns>a collection of <see>XFriendshipFollowing</see></returns>
|
/// <returns>a collection of <see>XFriendshipFollowing</see></returns>
|
||||||
public async Task<IEnumerable<XFriendshipFollowing>> GetAllFollowings(
|
public async Task<IEnumerable<XFriendshipFollowing>> GetAllFollowings(
|
||||||
XTokenResponse tokens
|
XTokenResponse tokens
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -704,7 +837,8 @@ namespace xIdentityService.Providers {
|
|||||||
/// <returns>a collection of UserNames</returns>
|
/// <returns>a collection of UserNames</returns>
|
||||||
public async Task<IEnumerable<string>> GetFollowingList(
|
public async Task<IEnumerable<string>> GetFollowingList(
|
||||||
XTokenResponse tokens
|
XTokenResponse tokens
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -729,13 +863,16 @@ namespace xIdentityService.Providers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return Followers UserName's List of Current User
|
/// Retrieve All User's Followings based on Query Model ...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="tokens">Authentication Tokens</param>
|
/// <param name="query">Query Model Descriptor</param>
|
||||||
/// <returns>a collection of UserNames</returns>
|
/// <param name="tokens">Requester User's Descriptor</param>
|
||||||
public async Task<IEnumerable<string>> GetFollowersList (
|
/// <returns></returns>
|
||||||
|
public async Task<XQueryResult<XFriendDto>> QueryFollowings(
|
||||||
|
XQuery query,
|
||||||
XTokenResponse tokens
|
XTokenResponse tokens
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
await validationProvider
|
await validationProvider
|
||||||
@@ -748,50 +885,14 @@ namespace xIdentityService.Providers {
|
|||||||
var client = GetRestClient(tokens);
|
var client = GetRestClient(tokens);
|
||||||
|
|
||||||
//
|
//
|
||||||
var request = GetRestRequet (XApiAccountEndpoint.FollowersList);
|
var request = GetRestRequet(XApiAccountEndpoint.QueryFollowings);
|
||||||
|
|
||||||
//
|
//
|
||||||
var response = await RunRestRequest<IEnumerable<string>> (
|
// Attach XQuery to Request ...
|
||||||
client,
|
request = request.AttachXQuery(query);
|
||||||
request,
|
|
||||||
XHttpMethod.GET
|
|
||||||
);
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get Friendship Info Model between Specific User and Current User
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="tokens">Authentication Tokens</param>
|
|
||||||
/// <param name="destUser">a user identifier which represent destination user</param>
|
|
||||||
/// <returns>an instance of <see>XFriendshipInfoDto</see></returns>
|
|
||||||
public async Task<XFriendshipInfoDto> GetFriendshipInfo (
|
|
||||||
XTokenResponse tokens,
|
|
||||||
string destUser
|
|
||||||
) {
|
|
||||||
//
|
|
||||||
// Validate Args ...
|
|
||||||
await validationProvider
|
|
||||||
.GroupValidationBuilder ()
|
|
||||||
.AddNotNull (tokens)
|
|
||||||
.AddNotEmpty (
|
|
||||||
destUser,
|
|
||||||
tokens.AccessToken
|
|
||||||
)
|
|
||||||
.ValidateGroupAsync ();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
var client = GetRestClient (tokens);
|
var response = await RunRestRequest<XQueryResult<XFriendDto>>(
|
||||||
|
|
||||||
//
|
|
||||||
var request = GetRestRequet (
|
|
||||||
XApiAccountEndpoint.FriendshipInfo,
|
|
||||||
@params : new Dictionary<string, string> { { XParam.XDestUser.GetStringValue (), destUser }
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
var response = await RunRestRequest<XFriendshipInfoDto> (
|
|
||||||
client,
|
client,
|
||||||
request,
|
request,
|
||||||
XHttpMethod.GET
|
XHttpMethod.GET
|
||||||
|
|||||||
Reference in New Issue
Block a user