Skip to content

Commit 8f2c4e3

Browse files
committed
updated read me file
1 parent d5859c8 commit 8f2c4e3

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

.changeset/plenty-taxis-return.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"cloudways-js-client": patch
3+
---
4+
5+
updated read me file

README.md

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,36 +36,36 @@ Please note that this library is still under development. Although it's function
3636
<pre><code>npm install cloudways-js-client
3737
</code></pre>
3838

39-
<h2>Usage</h2>
40-
<p>The Cloudways JS Client library makes it easy to interact with the Cloudways API for various operations. Below are some examples to help you get started.</p>
39+
<h2>Usage</h2>
4140

42-
<h3>Initializing the API</h3>
41+
<p>The Cloudways JS Client library makes it easy to interact with the Cloudways API for various operations. Below are some examples to help you get started.</p> <h3>Initializing the API</h3>
4342
<p>Before performing any operations, initialize the API with your Cloudways account credentials:</p>
4443
<div class="code-title">JavaScript:</div>
45-
<pre><code>import { initializeCloudwaysApi } from 'cloudways-js-client';
44+
<pre><code>import { initializeCloudwaysApi } from 'cloudways-js-client';
4645

4746
const email = '[email protected]'; // Replace with your Cloudways account email
4847
const apiKey = 'your_api_key'; // Replace with your Cloudways API key
4948

5049
initializeCloudwaysApi(email, apiKey);
5150
</code></pre>
5251

53-
<h3>Deleting a Server</h3>
54-
<p>To delete a server, use the <code>deleteServer</code> function. Ensure you have the correct server ID:</p>
52+
<h3>Deleting a Server</h3>
53+
<p>To delete a server, use the <code>deleteServer</code> function. Ensure you have the correct server ID:</p>
5554
<div class="code-title">JavaScript:</div>
56-
<pre><code>import { deleteServer } from 'cloudways-js-client';
55+
56+
<pre><code>import { deleteServer } from 'cloudways-js-client';
5757

5858
async function deleteServerA() {
59-
const serverId = 12345; // Replace with the server ID you want to delete
60-
await deleteServer(serverId);
61-
console.log('Server deleted successfully.');
59+
const serverId = 12345; // Replace with the server ID you want to delete
60+
await deleteServer(serverId);
61+
console.log('Server deleted successfully.');
6262
}
6363
</code></pre>
6464

65-
<h3>Getting the List of Servers</h3>
66-
<p>You can retrieve the list of servers associated with your account using the <code>getServersList</code> function:</p>
65+
<h3>Getting the List of Servers</h3>
66+
<p>You can retrieve the list of servers associated with your account using the <code>getServersList</code> function:</p>
6767
<div class="code-title">JavaScript:</div>
68-
<pre><code>import { getServersList } from 'cloudways-js-client';
68+
<pre><code>import { getServersList } from 'cloudways-js-client';
6969

7070
async function listServers() {
7171
try {
@@ -79,9 +79,10 @@ console.error('Error fetching servers list:', error);
7979
listServers();
8080
</code></pre>
8181

82-
<h3>Combining Operations</h3>
82+
<h3>Combining Operations</h3>
8383
<p>You can combine these functions to perform multiple operations. For example, to delete a server and then get the updated list of servers:</p>
8484
<div class="code-title">JavaScript:</div>
85+
8586
<pre><code>async function deleteServerAndGetList() {
8687

8788
const serverId = 12345; // Replace with the server ID to delete
@@ -93,12 +94,6 @@ console.log('Updated Servers List:', await getServersList());
9394
deleteServerAndGetList();
9495
</code></pre>
9596

96-
<p>For detailed usage examples and API documentation, please refer to the <a href="https://developers.cloudways.com/docs/">documentation</a>.</p>
97-
98-
<h2>Contributing</h2>
99-
100-
<p>Contributions are welcome! Please follow the <a href="https://github.com/code-gio/cloudways-js-client/blob/main/CONTRIBUTING.md">contribution guidelines</a> when making contributions to this project.</p>
101-
10297
<h2>Issues</h2>
10398

10499
<p>If you find any issues or have any feature requests, please open an <a href="https://github.com/code-gio/cloudways-js-client/issues">issue</a> on GitHub.</p>

0 commit comments

Comments
 (0)