You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-20Lines changed: 15 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -36,36 +36,36 @@ Please note that this library is still under development. Although it's function
36
36
<pre><code>npm install cloudways-js-client
37
37
</code></pre>
38
38
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>
41
40
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>
43
42
<p>Before performing any operations, initialize the API with your Cloudways account credentials:</p>
44
43
<div class="code-title">JavaScript:</div>
45
-
<pre><code>import { initializeCloudwaysApi } from 'cloudways-js-client';
44
+
<pre><code>import { initializeCloudwaysApi } from 'cloudways-js-client';
46
45
47
46
const email = '[email protected]'; // Replace with your Cloudways account email
48
47
const apiKey = 'your_api_key'; // Replace with your Cloudways API key
49
48
50
49
initializeCloudwaysApi(email, apiKey);
51
50
</code></pre>
52
51
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>
55
54
<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';
57
57
58
58
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.');
62
62
}
63
63
</code></pre>
64
64
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>
67
67
<div class="code-title">JavaScript:</div>
68
-
<pre><code>import { getServersList } from 'cloudways-js-client';
68
+
<pre><code>import { getServersList } from 'cloudways-js-client';
<p>For detailed usage examples and API documentation, please refer to the <ahref="https://developers.cloudways.com/docs/">documentation</a>.</p>
97
-
98
-
<h2>Contributing</h2>
99
-
100
-
<p>Contributions are welcome! Please follow the <ahref="https://github.com/code-gio/cloudways-js-client/blob/main/CONTRIBUTING.md">contribution guidelines</a> when making contributions to this project.</p>
101
-
102
97
<h2>Issues</h2>
103
98
104
99
<p>If you find any issues or have any feature requests, please open an <ahref="https://github.com/code-gio/cloudways-js-client/issues">issue</a> on GitHub.</p>
0 commit comments