Skip to content

Commit deae11a

Browse files
committed
updated readme
1 parent 01973a3 commit deae11a

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,37 @@ There is no additional configuration needed!
2121

2222
### `ReportingClient`
2323
#### Methods
24+
* **constructor(ReportingClientOptions)**
25+
Creates a reporting client instance with the given `serverUrl`. Note this should be the root of your site where you host the REST service and should **not** include `/api/reports` in it.
26+
Also you can send `additionalHeaders` which will be sent with every request. Useful for sending authentication in case your reporting service requires authentication.
27+
* **getAvailableDocumentFormats(): Promise<DocumentFormat[]>**
28+
Gets an array of supported document export formats by the server. This method can be called without registering the client. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-general-api-get-document-formats))
29+
* **register(): Promise<void>**
30+
Registers the client with the server. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-api-register-client))
31+
* **unregister(): Promise<void>**
32+
Unregisters the client from the servers. You need to call this once you finished using the reporting client so it can free up resources on the server. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-api-unregister-client))
33+
* **getReportParameters(ReportSource): Promise<ReportParameter[]>**
34+
Gets info about the parameters for the given reports. Also can be used to check the validity of the given parameters for the given report. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-report-parameters-api-get-report-parameters))
35+
* **createInstance(ReportSource): Promise<ReportingInstance>**
36+
Creates a `ReportingInstance` that can be used to render and download reports from the server. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-report-instances-api-create-report-instance))
2437

2538
### `ReportingInstance`
2639
#### Methods
40+
* **createDocument(DocumentFormatKey): Promise<ReportingDocument>**
41+
Creates a `ReportingDocument` with the given export format. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-documents-api-request-document))
42+
* **destroy(): Promise<void>**
43+
Destroys the reporting instance from the server. It is important to call this method once you finish your work so it can free the resources on the server. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-report-instances-api-destroy-report-instance))
2744

2845
### `ReportingDocument`
2946
#### Methods
47+
* **getInfo(): Promise<DocumentInfo>**
48+
Gets info about the rendered report document, for example if it is ready on the server, how many pages it has, etc.([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-documents-api-get-document-info)
49+
* **download(File?): Promise<File>**
50+
Downloads the prepared document from the server. By default it names the file with `documentId` adds an appropriate extension and saves the file in the device specific temp folder. In case you need to save the file somewhere else, or need to name it differently you can send a `File` instance to this method.
51+
* **getPage(number): Promise<PageInfo>**
52+
Gets information about the given page. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-documents-api-get-document-info))
53+
* **destroy(): Promise<void>**
54+
Destroys the reporting document from the server. It is important to call this method once you finish your work so it can free the resources on the server. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-documents-api-destroy-document))
3055

3156
## Usage
3257
A typical usage scenario is when you want to generate a report on your server and the download the file in an appropriate format (for example a PDF document). Below is an example how you can make this. You start by creating a client with your server's URL. Then you register your client, create an instance and a document. Finally you download the document to the mobile device.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-telerik-reporting",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A helper library for accessing Telerik Reporting REST API",
55
"main": "telerik-reporting",
66
"typings": "telerik-reporting.d.ts",

0 commit comments

Comments
 (0)