Skip to content

Commit b7c86bd

Browse files
committed
2 parents 1de492c + f1526e1 commit b7c86bd

File tree

4 files changed

+34
-37
lines changed

4 files changed

+34
-37
lines changed

.changeset/ninety-camels-relax.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# cloudways-js-client
22

3+
## 0.0.41
4+
5+
### Patch Changes
6+
7+
- 751eb08: updated readme file
8+
39
## 0.0.40
410

511
### Patch Changes

README.md

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -39,64 +39,60 @@ Please note that this library is still under development. Although it's function
3939
<h2>Usage</h2>
4040

4141
<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>
42-
<p>Before performing any operations, initialize the API with your Cloudways account credentials:</p>
43-
<div class="code-title">JavaScript:</div>
44-
<pre><code>import { initializeCloudwaysApi } from 'cloudways-js-client';
42+
<p>Before performing any operations, initialize the API with your Cloudways account credentials:</p>
43+
44+
```javascript
45+
import { initializeCloudwaysApi } from 'cloudways-js-client';
4546

4647
const email = 'your_email@example.com'; // Replace with your Cloudways account email
4748
const apiKey = 'your_api_key'; // Replace with your Cloudways API key
4849

4950
initializeCloudwaysApi(email, apiKey);
50-
</code></pre>
51-
51+
```
5252
<h3>Deleting a Server</h3>
5353
<p>To delete a server, use the <code>deleteServer</code> function. Ensure you have the correct server ID:</p>
54-
<div class="code-title">JavaScript:</div>
5554

56-
<pre><code>import { deleteServer } from 'cloudways-js-client';
55+
```javascript
56+
import { deleteServer } from "cloudways-js-client";
5757

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

6565
<h3>Getting the List of Servers</h3>
6666
<p>You can retrieve the list of servers associated with your account using the <code>getServersList</code> function:</p>
67-
<div class="code-title">JavaScript:</div>
68-
<pre><code>import { getServersList } from 'cloudways-js-client';
67+
68+
```javascript
69+
import { getServersList } from "cloudways-js-client";
6970

7071
async function listServers() {
71-
try {
72-
const servers = await getServersList();
73-
console.log('Servers List:', servers);
74-
} catch (error) {
75-
console.error('Error fetching servers list:', error);
76-
}
72+
try {
73+
const servers = await getServersList();
74+
console.log("Servers List:", servers);
75+
} catch (error) {
76+
console.error("Error fetching servers list:", error);
77+
}
7778
}
7879

7980
listServers();
80-
</code></pre>
81-
82-
<h3>Combining Operations</h3>
83-
<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>
84-
<div class="code-title">JavaScript:</div>
85-
86-
<pre><code>
87-
```javascript
81+
```
8882

89-
async function deleteServerAndGetList() {
83+
<h3>Combining Operations</h3>
84+
<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>
9085

91-
const serverId = 12345; // Replace with the server ID to delete
92-
await deleteServer(serverId);
93-
console.log('Server deleted successfully.');
94-
console.log('Updated Servers List:', await getServersList());
86+
```javascript
87+
async function deleteServerAndGetList() {
88+
const serverId = 12345; // Replace with the server ID to delete
89+
await deleteServer(serverId);
90+
console.log("Server deleted successfully.");
91+
console.log("Updated Servers List:", await getServersList());
9592
}
9693

9794
deleteServerAndGetList();
9895
```
99-
</code></pre>
10096

10197
<h2>Issues</h2>
10298

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "git",
55
"url": "git+https://github.com/code-gio/cloudways-js-client.git"
66
},
7-
"version": "0.0.40",
7+
"version": "0.0.41",
88
"description": "A client library to power your applications with Cloudways API",
99
"main": "dist/index.js",
1010
"module": "dist/index.mjs",

0 commit comments

Comments
 (0)