Skip to content

Commit

Permalink
Merge pull request #13 from KamalikaSene/main
Browse files Browse the repository at this point in the history
Add the width to the images and add main function to the documentation
  • Loading branch information
NipunaRanasinghe authored Jul 6, 2024
2 parents b234dad + 234a329 commit 894f60f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,33 @@ Follow these steps to create a Discord developer account.

### Step 1: Login to Discord developer page

<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/discord-dev-page.png?raw=true" alt="Discord Dev Page">
<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/discord-dev-page.png?raw=true" alt="Discord Dev Page" style="width: 70%;">

Visit [Discord developer portal](https://discord.com/login?redirect_to=%2Fdevelopers) by logging into your Discord account.

If you do not have a Discord account already, [create a new discord account](https://discord.com/login) by clicking on the `Register` hyperlink below the `Log In` button when opening the Discord developer page.

<img src= "https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/create-acc.png?raw=true" alt="Create Discord Account">
<img src= "https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/create-acc.png?raw=true" alt="Create Discord Account" style="width: 70%;">

Complete the account creation process by including the relavant information in the given fields.

### Step 2: Make a new Discord application

<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/make-new-app.png?raw=true" alt="Make New Application">
<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/make-new-app.png?raw=true" alt="Make New Application" style="width: 70%;">

Once in the Discord developer portal is open, click on the `New Application` button as displayed above to start the process.

### Step 3: Name the Discord Application

<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/create-app.png?raw=true" alt="Name and Create the App">
<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/create-app.png?raw=true" alt="Name and Create the App" style="width: 70%;">

1. Proceed by giving the Discord Application a name and click on the terms of service.

2. Finally complete the naming process by clicking on the `next` button.

### Step 4: Obtain the Client ID and Client Secret

<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/obtain-client-id.png?raw=true" alt="Obtain Client ID and Secret">
<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/obtain-client-id.png?raw=true" alt="Obtain Client ID and Secret" style="width: 70%;">

Under the `OAuth2` section found on the left-sided list, locate the Client's Information as shown on the screen. To implement the functionalities provided by Discord's API, you will need the Client ID and Client Secret.

Expand Down Expand Up @@ -88,7 +88,9 @@ Now, utilize the available connector operations.
### Return linked third-party accounts of the user

```ballerina
ConnectedAccountResponse[] connectedAccounts = check cl->/users/\@me/connections();
public function main() returns error? {
ConnectedAccountResponse[] connectedAccounts = check discord->/users/\@me/connections();
}
````
### Step 4: Run the Ballerina application
Expand Down
14 changes: 8 additions & 6 deletions ballerina/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,33 @@ Follow these steps to create a Discord developer account.

### Step 1: Login to Discord developer page

<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/discord-dev-page.png?raw=true" alt="Discord Dev Page">
<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/discord-dev-page.png?raw=true" alt="Discord Dev Page" style="width: 70%;">

Visit [Discord developer portal](https://discord.com/login?redirect_to=%2Fdevelopers) by logging into your Discord account.

If you do not have a Discord account already, [create a new discord account](https://discord.com/login) by clicking on the `Register` hyperlink below the `Log In` button when opening the Discord developer page.

<img src= "https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/create-acc.png?raw=true" alt="Create Discord Account">
<img src= "https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/create-acc.png?raw=true" alt="Create Discord Account" style="width: 70%;">

Complete the account creation process by including the relavant information in the given fields.

### Step 2: Make a new Discord application

<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/make-new-app.png?raw=true" alt="Make New Application">
<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/make-new-app.png?raw=true" alt="Make New Application" style="width: 70%;">

Once in the Discord developer portal is open, click on the `New Application` button as displayed above to start the process.

### Step 3: Name the Discord Application

<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/create-app.png?raw=true" alt="Name and Create the App">
<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/create-app.png?raw=true" alt="Name and Create the App" style="width: 70%;">

1. Proceed by giving the Discord Application a name and click on the terms of service.

2. Finally complete the naming process by clicking on the `next` button.

### Step 4: Obtain the Client ID and Client Secret

<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/obtain-client-id.png?raw=true" alt="Obtain Client ID and Secret">
<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/obtain-client-id.png?raw=true" alt="Obtain Client ID and Secret" style="width: 70%;">

Under the `OAuth2` section found on the left-sided list, locate the Client's Information as shown on the screen. To implement the functionalities provided by Discord's API, you will need the Client ID and Client Secret.

Expand Down Expand Up @@ -78,7 +78,9 @@ Now, utilize the available connector operations.
### Return linked third-party accounts of the user

```ballerina
ConnectedAccountResponse[] connectedAccounts = check cl->/users/\@me/connections();
public function main() returns error? {
ConnectedAccountResponse[] connectedAccounts = check discord->/users/\@me/connections();
}
````
### Step 4: Run the Ballerina application
Expand Down
18 changes: 10 additions & 8 deletions ballerina/Package.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,33 @@ Follow these steps to create a Discord developer account.

### Step 1: Login to Discord developer page

<img src="https://github.com/HussainLatiff/module-ballerinax-discord/blob/main/docs/setup/resources/discord-dev-page.png?raw=true">
<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/discord-dev-page.png?raw=true" alt="Discord Dev Page" style="width: 70%;">

Visit [Discord developer portal](https://discord.com/login?redirect_to=%2Fdevelopers) by logging into your Discord account.
Visit [Discord developer portal](https://discord.com/login?redirect_to=%2Fdevelopers) by logging into your Discord account.

If you do not have a Discord account already, [create a new discord account](https://discord.com/login) by clicking on the `Register` hyperlink below the `Log In` button when opening the Discord developer page.

<img src= "https://github.com/HussainLatiff/module-ballerinax-discord/blob/main/docs/setup/resources/create-acc.png?raw=true">
<img src= "https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/create-acc.png?raw=true" alt="Create Discord Account" style="width: 70%;">

Complete the account creation process by including the relavant information in the given fields.

### Step 2: Make a new Discord application

<img src="https://github.com/HussainLatiff/module-ballerinax-discord/blob/main/docs/setup/resources/make-new-app.png?raw=true">
<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/make-new-app.png?raw=true" alt="Make New Application" style="width: 70%;">

Once in the Discord developer portal is open, click on the `New Application` button as displayed above to start the process.

### Step 3: Name the Discord Application
### Step 3: Name the Discord Application

<img src="https://github.com/HussainLatiff/module-ballerinax-discord/blob/main/docs/setup/resources/create-app.png?raw=true">
<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/create-app.png?raw=true" alt="Name and Create the App" style="width: 70%;">

1. Proceed by giving the Discord Application a name and click on the terms of service.

2. Finally complete the naming process by clicking on the `next` button.

### Step 4: Obtain the Client ID and Client Secret

<img src="https://github.com/HussainLatiff/module-ballerinax-discord/blob/main/docs/setup/resources/obtain-client-id.png?raw=true">
<img src="https://github.com/ballerina-platform/module-ballerinax-discord/blob/main/docs/setup/resources/obtain-client-id.png?raw=true" alt="Obtain Client ID and Secret" style="width: 70%;">

Under the `OAuth2` section found on the left-sided list, locate the Client's Information as shown on the screen. To implement the functionalities provided by Discord's API, you will need the Client ID and Client Secret.

Expand Down Expand Up @@ -78,7 +78,9 @@ Now, utilize the available connector operations.
### Return linked third-party accounts of the user

```ballerina
ConnectedAccountResponse[] connectedAccounts = check cl->/users/\@me/connections();
public function main() returns error? {
ConnectedAccountResponse[] connectedAccounts = check discord->/users/\@me/connections();
}
````
### Step 4: Run the Ballerina application
Expand Down

0 comments on commit 894f60f

Please sign in to comment.