public IActionResult Index() { // create a ReportingCloud object with stored API-Key ReportingCloud rc = new ReportingCloud(RCSettings.APIKey); // return a list of templates return(View(rc.ListTemplates())); }
public List <Template> Get(string name) { var templates = connector.ListTemplates(); return(templates .Where(template => string.IsNullOrEmpty(name) || template.TemplateName.IndexOf(name, StringComparison.OrdinalIgnoreCase) >= 0) .ToList()); }
// GET: Home public ActionResult Index() { string sApiKey = "vt9BNpa7SCPK6gSVhBPaPMZk6tlVPlYaAnO9RaghRe8"; ReportingCloud rc = new ReportingCloud(sApiKey); List <Template> templates = rc.ListTemplates(); return(View(templates)); }
public void ListTemplatesTest() { try { ReportingCloud rc = new ReportingCloud(sUsername, sPassword, uriBasePath); // list all templates List <Template> templates = rc.ListTemplates(); } catch (Exception exc) { Assert.Fail(exc.Message); } }
public void ShareDocumentTest() { try { ReportingCloud rc = new ReportingCloud(sUsername, sPassword, uriBasePath); List <Template> lTemplates = rc.ListTemplates(); string sSharedHash = rc.ShareDocument(lTemplates[0].TemplateName); // check, if images are created Assert.IsFalse(sSharedHash.Length == 0); } catch (Exception exc) { Assert.Fail(exc.Message); } }