Skip to content

Commit b82a1a6

Browse files
authored
Merge pull request #849 from SachinAkash01/main
Refactor the Ballerina Docs for the Alfresco Connector
2 parents 617181d + 8f6417e commit b82a1a6

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

openapi/alfresco/Module.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,30 @@ This Alfresco Content Services REST APIs enable you to access to the core featur
77

88
Before using this connector in your Ballerina application, complete the following:
99

10-
* Create a [Alfresco Account](https://www.alfresco.com/try-alfresco-acs).
11-
* Obtain tokens by following [this guide](https://docs.alfresco.com/content-services/latest/develop/repo-ext-points/authentication/).
10+
* Create an [Alfresco Account](https://www.alfresco.com/try-alfresco-acs).
11+
* Once registered, you will receive an email with instructions to set up your Alfresco environment, including the default username and password. Use these credentials to access the Alfresco Content Services API.
12+
* Note: This connector only supports Basic Authentication (username/password) and does not require or support bearer tokens.
1213

1314
## Quickstart
1415

1516
To use the Alfresco connector in your Ballerina application, update the .bal file as follows:
1617

17-
### Step 1: Import connector
18+
### Step 1: Import the module
1819
First, import the `ballerinax/alfresco` module into the Ballerina project.
1920
```ballerina
2021
import ballerinax/alfresco;
2122
```
2223

2324
### Step 2: Create a new connector instance
24-
Create a `alfresco:ClientConfig` with the `Bearer_Token` obtained, and initialize the connector with it.
25+
Create a `alfresco:ConnectionConfig` using the Basic Authentication credentials (i.e: username and password), and initialize the connector with it.
2526
```ballerina
26-
alfresco:ClientConfig clientConfig = {
27+
configurable string username = ?;
28+
configurable string password = ?;
29+
30+
alfresco:ConnectionConfig clientConfig = {
2731
auth: {
28-
token: <Bearer_Token>
32+
username,
33+
password
2934
}
3035
};
3136
alfresco:Client baseClient = check new (clientConfig, serviceURL);
@@ -35,14 +40,15 @@ alfresco:Client baseClient = check new (clientConfig, serviceURL);
3540
1. Now you can use the operations available within the connector. Note that they are in the form of remote operations.
3641

3742
Following is an example on how to get list of comments in a particular node.
38-
39-
Retrieve list of comments in a particular node.
40-
4143
```ballerina
4244
public function main() returns error? {
4345
alfresco:CommentPaging response = check baseClient->listComments(nodeId);
4446
log:printInfo(response.toString());
4547
}
4648
```
4749
48-
2. Use `bal run` command to compile and run the Ballerina program.
50+
### Step 4: Run the Ballerina application
51+
Use the command below to run the Ballerina application
52+
```bash
53+
bal run
54+
```

0 commit comments

Comments
 (0)