public ZohoDocument GetDocuments() { if (_doc == null) { _doc = new ZohoDocument(); _doc.Childs.AddRange(DownloadDocumentInfo()); _doc.Childs.AddRange(DownloadSheetsInfo()); } return(_doc); }
public MemoryStream GetDocumentStream(ZohoDocument document, string ext) { if (document == null) { throw new ArgumentNullException("document"); } if (ext == null) { ext = _defFormats[document.Kind]; } var urlPattern = ZohoDocumentDownloadUrl; if (document.Kind == ZohoDocumentKind.Sheet) { urlPattern = ZohoSheetsDownloadUrl; } return(new MemoryStream(GetClient().DownloadData(CreateUrl(string.Format(urlPattern, ext, document.Id))))); }
public MemoryStream GetDocumentStream(ZohoDocument document) { return(GetDocumentStream(document, null)); }