Skip to content

Commit

Permalink
Merge pull request #139 from plivo/phlo_mpc_changes
Browse files Browse the repository at this point in the history
move phlo MPC inside Phlo namespace
  • Loading branch information
nixonsam authored Aug 21, 2020
2 parents ab8933f + 3b18373 commit 0ba40b4
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# Change Log

## [v4.10.2](https://github.com/plivo/plivo-dotnet/tree/v4.10.2) (2020-08-19)
- Internal changes in PHLO for MultiPartyCall component.

## [v4.10.1](https://github.com/plivo/plivo-dotnet/tree/v4.10.1) (2020-08-14)
- Add exception handling for non-JSON error responses and statusCode 401.
## [v4.10.0](https://github.com/plivo/plivo-dotnet/tree/v4.10.0) (2020-08-06)
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Plivo.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard1.3</TargetFrameworks>
<ReleaseVersion>4.10.1</ReleaseVersion>
<ReleaseVersion>4.10.2</ReleaseVersion>
<Version />
<Authors>Plivo SDKs Team</Authors>
<Owners>Plivo Inc.</Owners>
Expand Down
3 changes: 2 additions & 1 deletion src/Plivo/Plivo.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
<summary>A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML</summary>
<description>A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML</description>
<id>Plivo</id>
<version>4.10.1</version>
<version>4.10.2</version>
<title>Plivo</title>
<authors>Plivo SDKs Team</authors>
<owners>Plivo, Inc.</owners>
<licenseUrl>https://github.com/plivo/plivo-dotnet/blob/master/LICENSE.txt</licenseUrl>
<projectUrl>http://github.com/plivo/plivo-dotnet</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes>
* 4.10.2 Internal changes in PHLO for MultiPartyCall component.
* 4.10.1 Added exception handling for non json error responses and statuscode 401.
* 4.10.0 Add retries to multiple regions for voice requests.
* 4.9.1 Fix List Call Details response.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Plivo.Resource.Member
namespace Plivo.Resource.Phlo.Member
{
public class Member: Resource
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Plivo.Client;
using System.Threading.Tasks;

namespace Plivo.Resource.Member
namespace Plivo.Resource.Phlo.Member
{
public class MemberInterface: ResourceInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using System;
using Plivo.Exception;
using Plivo.Resource.Member;

namespace Plivo.Resource.MultiPartyCall
namespace Plivo.Resource.Phlo.MultiPartyCall
{
public class MultiPartyCall : Node.Node
{
public Lazy<MemberInterface> _member;
private MemberInterface MemberI => _member.Value;
public Lazy<Member.MemberInterface> _member;
private Member.MemberInterface MemberI => _member.Value;

public BaseResponse Call(string triggerSource, string to, string role)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
using System.Threading.Tasks;
using Plivo.Client;
using Plivo.Exception;
using Plivo.Resource.Member;

namespace Plivo.Resource.MultiPartyCall
namespace Plivo.Resource.Phlo.MultiPartyCall
{
public class MultiPartyCallInterface : ResourceInterface
{
Expand All @@ -22,7 +21,7 @@ public class MultiPartyCallInterface : ResourceInterface
/// </summary>
private string _nodeId;

private MemberInterface MemberI { get; set; }
private Member.MemberInterface MemberI { get; set; }

public MultiPartyCallInterface(HttpClient client, string phloId) : base(client)
{
Expand All @@ -41,7 +40,7 @@ public MultiPartyCall Get(string phloId, string nodeId)
_nodeId = nodeId;
var multiPartyCall = Task.Run(async () => await GetResource<MultiPartyCall>($"/{_nodeType}/{_nodeId}", new Dictionary<string, object>()).ConfigureAwait(false)).Result;
multiPartyCall.Interface = this;
multiPartyCall._member = new Lazy<MemberInterface>(() => new MemberInterface(Client, phloId, _nodeType, _nodeId));
multiPartyCall._member = new Lazy<Member.MemberInterface>(() => new Member.MemberInterface(Client, phloId, _nodeType, _nodeId));
return multiPartyCall;
}

Expand Down
5 changes: 2 additions & 3 deletions src/Plivo/Resource/Phlo/Phlo.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using Plivo.Exception;
using Plivo.Resource.MultiPartyCall;
using Plivo.Resource.Node;

namespace Plivo.Resource.Phlo
Expand All @@ -25,9 +24,9 @@ public class Phlo :Resource


public Lazy<NodeInterface> _node;
public Lazy<MultiPartyCallInterface> _multiPartyCall;
public Lazy<MultiPartyCall.MultiPartyCallInterface> _multiPartyCall;
public NodeInterface NodeI => _node.Value;
public MultiPartyCallInterface MultiPartyCallI => _multiPartyCall.Value;
public MultiPartyCall.MultiPartyCallInterface MultiPartyCallI => _multiPartyCall.Value;

public MultiPartyCall.MultiPartyCall MultiPartyCall(string nodeId)
{
Expand Down
7 changes: 3 additions & 4 deletions src/Plivo/Resource/Phlo/PhloInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Threading.Tasks;
using Plivo.Exception;
using Plivo.Client;
using Plivo.Resource.MultiPartyCall;
using Plivo.Resource.Node;

namespace Plivo.Resource.Phlo
Expand Down Expand Up @@ -51,7 +50,7 @@ internal PhloInterface(HttpClient client, string authId, string authToken) : bas
}

private NodeInterface NodeI { get; set; }
private MultiPartyCallInterface MultiPartyCallI { get; set; }
private MultiPartyCall.MultiPartyCallInterface MultiPartyCallI { get; set; }

public PhloRunCallResponse Run(Dictionary<string, object> data = null)
{
Expand All @@ -76,7 +75,7 @@ public MultiPartyCall.MultiPartyCall MultiPartyCall( string nodeId)
{
throw new PlivoValidationException("nodeId is mandatory, can not be null or empty");
}
return ((MultiPartyCallInterface)MultiPartyCallI)
return ((MultiPartyCall.MultiPartyCallInterface)MultiPartyCallI)
.Get(_phloId, nodeId);
}

Expand All @@ -90,7 +89,7 @@ public Phlo Get(string phloId)
var phlo = Task.Run(async () => await GetResource<Phlo>("phlo/" + phloId, new Dictionary<string, object>()).ConfigureAwait(false)).Result;
phlo.Interface = this;
phlo._node = new Lazy<NodeInterface>(() => new NodeInterface(Client, phloId));
phlo._multiPartyCall = new Lazy<MultiPartyCallInterface>(() => new MultiPartyCallInterface(Client, phloId));
phlo._multiPartyCall = new Lazy<MultiPartyCall.MultiPartyCallInterface>(() => new MultiPartyCall.MultiPartyCallInterface(Client, phloId));
return phlo;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class Version
/// <summary>
/// DotNet SDK version
/// </summary>
public const string SdkVersion = "4.10.1";
public const string SdkVersion = "4.10.2";
/// <summary>
/// Plivo API version
/// </summary>
Expand Down

0 comments on commit 0ba40b4

Please sign in to comment.