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", _ => "", });
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(""); }
public async Task <Stream> GetStream(RibbitCommand command, string product) { return(await GetStream(CommandToPayload(command, product))); }