示例#1
0
 private string CommandToPayload(RibbitCommand command, string product)
 {
     return(command switch
     {
         RibbitCommand.Bgdl => $"v1/products/{product}/bgdl",
         RibbitCommand.CDNs => $"v1/products/{product}/cdns",
         RibbitCommand.Summary => $"v1/products/summary",
         RibbitCommand.Versions => $"v1/products/{product}/versions",
         _ => "",
     });
示例#2
0
        private string CommandToPayload(RibbitCommand command, string product)
        {
            switch (command)
            {
            case RibbitCommand.Bgdl:
                return($"v1/products/{product}/bgdl");

            case RibbitCommand.CDNs:
                return($"v1/products/{product}/cdns");

            case RibbitCommand.Summary:
                return($"v1/products/summary");

            case RibbitCommand.Versions:
                return($"v1/products/{product}/versions");
            }

            return("");
        }
示例#3
0
 public async Task <Stream> GetStream(RibbitCommand command, string product)
 {
     return(await GetStream(CommandToPayload(command, product)));
 }