Skip to content

Commit

Permalink
Improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
franklupo committed Sep 26, 2017
1 parent 58d4ddd commit 86601df
Show file tree
Hide file tree
Showing 3 changed files with 1,020 additions and 990 deletions.
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,41 @@
# eve2pve-api-java
ProxmoVE Client API JAVA

General
------------
[ProxmoxVE Api](https://pve.proxmox.com/pve-docs/api-viewer/)

#General
The client is generated from a JSON Api on ProxmoxVE.
The result is a complete response from server and converted in JSONObject.

[ProxmoxVE Api](https://pve.proxmox.com/pve-docs/api-viewer/)
#Main features
* Easy to learn
* Method named
* Full method generated from documentation
* Comment any method and parameters
* Parameters indexed eg [n] is structured in array index and value
* Tree structure
* client.getNodes().get("pve1").getQemu().vmlist().getJSONArray("data")
* Return data proxmox
* Return result status
* getStatusCode
* getReasonPhrase
* Method directry access
* get
* post
* put
* delete
* login return bool if access

Usage
-----
#Usage

```java

Client client = new Client("192.168.22", 8006);
client.login("root", "password", "pam");

System.out.println(client->get('/version'));
// same for put/post/delete

//loop nodes for
JSONArray nodes = client.getNodes().index().getJSONArray("data");
for (int i = 0; i < nodes.length(); i++) {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.enterpriseve.proxmoxve.api</groupId>
<artifactId>eve2pve-api-java</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down
Loading

0 comments on commit 86601df

Please sign in to comment.