Skip to content

Commit

Permalink
Merge f9cf17c into 1266b06
Browse files Browse the repository at this point in the history
  • Loading branch information
WinDrop authored Jan 15, 2018
2 parents 1266b06 + f9cf17c commit 3bde99a
Show file tree
Hide file tree
Showing 6 changed files with 323 additions and 46 deletions.
24 changes: 24 additions & 0 deletions src/ZendeskApi_v2/Models/Voice/CurrentQueueActivity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using System;

namespace ZendeskApi_v2.Models.Voice
{
public class CurrentQueueActivity
{
[JsonProperty("agents_online")]
public long AgentsOnline { get; set; }

[JsonProperty("calls_waiting")]
public long CallsWaiting { get; set; }

[JsonProperty("callbacks_waiting")]
public long CallbacksWaiting { get; set; }

[JsonProperty("average_wait_time")]
public long AverageWaitTime { get; set; }

[JsonProperty("longest_wait_time")]
public long LongestWaitTime { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ public class GroupAgentActivityResponse : GroupResponseBase
[JsonProperty("agents_activity")]
public IList<AgentActivity> AgentActivity { get; set; }
}
}
}
32 changes: 0 additions & 32 deletions src/ZendeskApi_v2/Models/Voice/HistoricalQueueActivity.cs

This file was deleted.

14 changes: 7 additions & 7 deletions src/ZendeskApi_v2/Requests/Voice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ public interface IVoice : ICore
bool OpenUserProfileInAgentBrowser(long agentId, long userId);
bool OpenTicketInAgentBrowser(long agentId, long ticketId);
GroupAgentActivityResponse GetVoiceAgentActivity();
HistoricalQueueActivityDetails GetHistoricalQueueActivity();
CurrentQueueActivity GetCurrentQueueActivity();

#endif

#if ASYNC
Task<bool> OpenUserProfileInAgentBrowserAsync(long agentId, long userId);
Task<bool> OpenTicketInAgentBrowserAsync(long agentId, long ticketId);
Task<GroupAgentActivityResponse> GetVoiceAgentActivityAsync();
Task<HistoricalQueueActivity> GetHistoricalQueueActivityAsync();
Task<CurrentQueueActivity> GetCurrentQueueActivityAsync();
#endif
}

Expand All @@ -32,7 +32,7 @@ class Voice : Core, IVoice
private const string tickets = "tickets";
private const string users = "users";
private const string agentsActivity = "channels/voice/stats/agents_activity";
private const string historicalQueueActivity = "channels/voice/stats/historical_queue_activity";
private const string currentQueueActivity = "channels/voice/stats/current_queue_activity";


public Voice(string yourZendeskUrl, string user, string password, string apiToken, string p_OAuthToken)
Expand All @@ -56,9 +56,9 @@ public GroupAgentActivityResponse GetVoiceAgentActivity()
return GenericGet<GroupAgentActivityResponse>(agentsActivity + ".json");
}

public HistoricalQueueActivityDetails GetHistoricalQueueActivity()
public CurrentQueueActivity GetCurrentQueueActivity()
{
return GenericGet<HistoricalQueueActivity>(historicalQueueActivity + ".json").Details;
return GenericGet<CurrentQueueActivity>(currentQueueActivity + ".json");
}

#endif
Expand All @@ -79,9 +79,9 @@ public async Task<GroupAgentActivityResponse> GetVoiceAgentActivityAsync()
return await GenericGetAsync<GroupAgentActivityResponse>(agentsActivity + ".json");
}

public async Task<HistoricalQueueActivity> GetHistoricalQueueActivityAsync()
public async Task<CurrentQueueActivity> GetCurrentQueueActivityAsync()
{
return await GenericGetAsync<HistoricalQueueActivity>(historicalQueueActivity + ".json");
return await GenericGetAsync<CurrentQueueActivity>(currentQueueActivity + ".json");
}
#endif
}
Expand Down
Loading

0 comments on commit 3bde99a

Please sign in to comment.