Skip to content

Commit

Permalink
Released version 4.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
GovindMalviya committed May 26, 2017
1 parent 8915de4 commit 101b526
Show file tree
Hide file tree
Showing 323 changed files with 34,333 additions and 9,550 deletions.
43 changes: 41 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,43 @@
> **LoginRadius .NET SDK Change Log** provides information regarding what has changed, more specifically what changes, improvements and bug fix has been made to the SDK. For more details please refer to the [LoginRadius API Documention](http://apidocs.loginradius.com/docs/aspnet)
> **LoginRadius .NET SDK Change Log** provides information regarding what has changed, more specifically what changes, improvements and bug fix has been made to the SDK. For more details please refer to the [LoginRadius API Documention](https://docs.loginradius.com/api/v2/sdk-libraries/aspnet)
Version 4.0.2

Released on May 25, 2017

- Bug Fixes.
- Performance improvement.


<br>
See the documentation [here](https://docs.loginradius.com/api/v2/sdk-libraries/aspnet)

=============================================================
Version 4.0.1

Released on May 15, 2017

- Bug Fixes.


Version 4.0.0

Released on May 15, 2017

Enhancements

Updated with V2 APIs
- Added new multiple APIs for better user experience.
- Improved structure and naming convention
- Improved security feature
- Added Phone Authentication APIs to handle phone login,registration and verification etc.
- Added APIs for two factore authentication
- Added web hook APIs
- Add start and end time for SOTT to validate it for long time frame.
- Add API to get server time for SOTT if don't pass the start and end time.
- Improved SOTT feature.
- Add Email prompt auto login APIs.
- Add Role Context and additional permission APIs


### Version 3.1.1
Released on **June 27, 2016**
Expand All @@ -24,4 +63,4 @@ Released on **March 15, 2017**
##### Bug Fixes

- Added missing parameter in register API.
- Added email verification
- Added email verification
22 changes: 22 additions & 0 deletions LoginRadiusSDK.V2/LoginRadiusSDK.V2.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoginRadiusSDK.V2", "LoginRadiusSDK.V2\LoginRadiusSDK.V2.csproj", "{89A00BD2-25AD-41FD-B859-D780CB817CD2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{89A00BD2-25AD-41FD-B859-D780CB817CD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89A00BD2-25AD-41FD-B859-D780CB817CD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89A00BD2-25AD-41FD-B859-D780CB817CD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89A00BD2-25AD-41FD-B859-D780CB817CD2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
using System.Collections;
using LoginRadiusSDK.V2.Entity;
using LoginRadiusSDK.V2.Models;
using LoginRadiusSDK.V2.Models.UserProfile;
using LoginRadiusSDK.V2.Util;
using static LoginRadiusSDK.V2.Util.LoginRadiusArgumentValidator;
using LoginRadiusSDK.V2.Models.CustomerManagement.Identity;

namespace LoginRadiusSDK.V2.Api.AdvancedSocial
{
public class AdvancedSocialEntity : LoginRadiusResource
{
public ApiResponse<LoginRadiusAccessToken> GetFacebookAccessToken(string facebookToken)
{
Validate(new ArrayList {facebookToken});
var additionalQueryParams = new QueryParameters {["fb_access_token"] = facebookToken};
return ConfigureAndExecute<LoginRadiusAccessToken>(RequestType.AdvancedSocial,
HttpMethod.Get, "access_token/facebook", additionalQueryParams);
}

public ApiResponse<LoginRadiusAccessToken> GetTwitterAccessToken(string twitterToken, string twitterTokenSecret)
{
Validate(new ArrayList {twitterToken, twitterTokenSecret});
var additionalQueryParams =
new QueryParameters {["tw_access_token"] = twitterToken, ["tw_token_secret"] = twitterTokenSecret};
return ConfigureAndExecute<LoginRadiusAccessToken>(RequestType.AdvancedSocial,
HttpMethod.Get, "access_token/twitter", additionalQueryParams);
}

public ApiResponse<LoginRadiusSocialUserProfile> GetRefreshUserProfile(string accessToken)
{
Validate(new ArrayList {accessToken});
var additionalQueryParams = new QueryParameters {["access_token"] = accessToken};
return ConfigureAndExecute<LoginRadiusSocialUserProfile>(RequestType.AdvancedSocial, HttpMethod.Get,
"userprofile/refresh", additionalQueryParams);
}

public ApiResponse<AccessTokenResponse> GetRefreshToken(string accessToken)
{
Validate(new ArrayList {accessToken});
var additionalQueryParams = new QueryParameters {["access_token"] = accessToken};
return ConfigureAndExecute<AccessTokenResponse>(RequestType.AdvancedSocial, HttpMethod.Get,
"access_token/refresh", additionalQueryParams);
}

public ApiResponse<ShortUrlResponse> GetShortenUri(string uri)
{
Validate(new ArrayList {uri});
var additionalQueryParams = new QueryParameters {["url"] = uri};
return ConfigureAndExecute<ShortUrlResponse>(RequestType.AdvancedSharing, HttpMethod.Get, null,
additionalQueryParams);
}

public ApiResponse<LoginRadiusStatusStats> GetTrackableStatus(string postId)
{
Validate(new ArrayList {postId});
var additionalQueryParams = new QueryParameters {["postid"] = postId};
return ConfigureAndExecute<LoginRadiusStatusStats>(RequestType.AdvancedSocial, HttpMethod.Get,
"status/trackable", additionalQueryParams);
}

//public ApiResponse<TrackableStatusPostResponse> GetUpdateTrackableStatus(string accessToken,
// TrackableStatusUpdateModel trackableStatusUpdate)
//{
// Validate(new ArrayList {accessToken, trackableStatusUpdate});
// var additionalQueryParams = new QueryParameters {["access_token"] = accessToken};
// //.AddRange(additionalQueryParams, trackableStatusUpdate.ConvertToJson());
// return ConfigureAndExecute<TrackableStatusPostResponse>(RequestType.AdvancedSocial, HttpMethod.Post,
// "status/trackable", additionalQueryParams, trackableStatusUpdate.ConvertToJson());
//}

public ApiResponse<TrackableStatusPostResponse> PostUpdateTrackableStatus(string accessToken,
TrackableStatusUpdateModel trackableStatusUpdate)
{
Validate(new ArrayList {accessToken, trackableStatusUpdate});
var additionalQueryParams = new QueryParameters {["access_token"] = accessToken};
return ConfigureAndExecute<TrackableStatusPostResponse>(RequestType.AdvancedSocial, HttpMethod.Post,
"status/trackable", additionalQueryParams, trackableStatusUpdate.ConvertToJson());
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.IO;
using System.Configuration;


// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860

namespace LoginradiusSdk.Entity.AppSettings
{
public static class LoginRadiusAppSettings
{
private static string _AppKey;
private static string _AppSecret;
private static string _AppName;

public static void AppSettingInitialization(string AppKey, string AppSecret, string AppName)
{
_AppKey = AppKey;
_AppSecret = AppSecret;
_AppName = AppName;
}

public static string AppKey
{
get
{
if (string.IsNullOrEmpty(_AppKey))
{
_AppKey = ConfigurationManager.AppSettings["loginradius:apikey"];
if (string.IsNullOrEmpty(_AppKey))
{
throw new Exception("apikey not found in application.json");
}
}
return _AppKey;
}
set { _AppKey = value; }
}

public static string AppSecret
{
get
{
if (string.IsNullOrEmpty(_AppSecret))
{
_AppSecret = ConfigurationManager.AppSettings["loginradius:apisecret"];
if (string.IsNullOrEmpty(_AppSecret))
{
throw new Exception("apisecret not found in application.json");
}
}
return _AppSecret;
}
set { _AppSecret = value; }
}

public static string AppName
{
get
{
if (string.IsNullOrEmpty(_AppName))
{
_AppName = ConfigurationManager.AppSettings["loginradius:appname"];
if (string.IsNullOrEmpty(_AppName))
{
throw new Exception("appname not found in application.json");
}
}
return _AppName;
}

set { _AppName = value; }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
using System.Collections;
using System.Collections.Generic;
using LoginRadiusSDK.V2.Models;
using LoginRadiusSDK.V2.Util;

namespace LoginRadiusSDK.V2.Api
{
public class CloudStorageEntity : LoginRadiusResource
{

/// <summary>
/// This API allows you to query your LoginRadius Cloud Storage and retrieve up to 20 user records.
/// </summary>
/// <param name="select"> Fields included in the Query, default all fields, Optional: can be null or empty string</param>
/// <param name="from">LoginRadius Table that details are being retrieved from, for now users only supported </param>
/// <param name="where">Filter for data based on condition,Optional: can be null or empty string </param>
/// <param name="orderBy">Determines ascending order of returned data,Optional: can be null or empty string</param>
/// <param name="skip">Ignores the specified amount of values used to page through responses, value must be positive and default value is 0, Optional: can be null or empty string</param>
/// <param name="limit">Determines size of dataset returned. default value is 20 and max value is 20, Optional: can be null or empty string</param>
/// <returns></returns>
public ApiResponse<LoginRadiusIdentityUserList> GetUserList(string select = "", string from = "", string where = "",
string orderBy = "", string skip = "",
string limit = "")
{
var postRequest = new BodyParameters
{
{"From", string.IsNullOrWhiteSpace(from) ? "users" : from}
};
if (!string.IsNullOrWhiteSpace(select))
{
postRequest.Add("Select", select);
}
if (!string.IsNullOrWhiteSpace(where))
{
postRequest.Add("Where", where);
}
if (!string.IsNullOrWhiteSpace(orderBy))
{
postRequest.Add("OrderBy", orderBy);
}
if (!string.IsNullOrWhiteSpace(skip))
{
postRequest.Add("Skip", skip);
}
if (!string.IsNullOrWhiteSpace(limit))
{
postRequest.Add("Limit", limit);
}
return ConfigureAndExecute<LoginRadiusIdentityUserList>(RequestType.Cloud, HttpMethod.Post,
"identity",
postRequest.ConvertToJson());
}

/// <summary>
/// This API is used to query the aggregation data from your LoginRadius cloud storage.
/// </summary>
/// <param name="from">From Date in format of (mm/dd/yyyy).</param>
/// <param name="to">To Date in format of (mm/dd/yyyy).</param>
/// <param name="firstDatapoint">Aggregation Field, supported are: os, browser, device, country, city, provider, emailType, friendsCount </param>
/// <param name="statsType">Type of users should apply to i.e. NewUser, ActiveUser, Login</param>
/// <returns></returns>
public ApiResponse<LoginRadiusQueryDataModel> GetQueryAggregationData(string from, string to, string firstDatapoint,
string statsType)
{
LoginRadiusArgumentValidator.Validate(new ArrayList {from, to, firstDatapoint, statsType});
var additionalQueryParams = new QueryParameters
{
{"from", from},
{"to", to}
};
var postRequest = new BodyParameters
{
{"firstDatapoint", firstDatapoint},
{"statsType", statsType}
};
return ConfigureAndExecute<LoginRadiusQueryDataModel>(RequestType.Cloud, HttpMethod.Post,
"insights", additionalQueryParams,
postRequest.ConvertToJson());
}
}
}
Loading

0 comments on commit 101b526

Please sign in to comment.