PeerCastStation.UI.HTTP.APIHost.APIContext.GetChannelStatus C# (CSharp) Method

GetChannelStatus() private method

private GetChannelStatus ( string channelId ) : Newtonsoft.Json.Linq.JObject
channelId string
return Newtonsoft.Json.Linq.JObject
      private JObject GetChannelStatus(string channelId)
      {
        var channel = GetChannel(channelId);
        var res = new JObject();
        res["status"]          = channel.Status.ToString();
        res["source"]          = channel.SourceUri!=null ? channel.SourceUri.ToString() : null;
        res["uptime"]          = (int)channel.Uptime.TotalSeconds;
        res["localRelays"]     = channel.LocalRelays;
        res["localDirects"]    = channel.LocalDirects;
        res["totalRelays"]     = channel.TotalRelays;
        res["totalDirects"]    = channel.TotalDirects;
        res["isBroadcasting"]  = channel.IsBroadcasting;
        res["isRelayFull"]     = channel.IsRelayFull;
        res["isDirectFull"]    = channel.IsDirectFull;
        res["isReceiving"]     = channel.SelfNode.IsReceiving;
        return res;
      }