Skip to content

Commit 98e1c55

Browse files
committed
Redact small doc on README.
1 parent fde0c4f commit 98e1c55

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
11
# OVH API Java
22

3-
This is a small wrapper for the OVH API in Java. It aims to provide tools to handle the most off-putting part of using this API.
3+
This is a small wrapper for the OVH API in Java. It aims to provide tools to handle the most off-putting part of using this API.
4+
5+
## Installation
6+
7+
If you have a Maven installation, navigate to the folder in which you cloned the repo, and type :
8+
9+
```bash
10+
mvn package
11+
```
12+
13+
to compile and package the sources into a JAR file (usual output directory is 'target'). To install the packages inside your local Maven repository, type :
14+
15+
```bash
16+
mvn install
17+
```
18+
19+
## Sample usage
20+
21+
Include the Jar file as a dependency, then import the classes :
22+
23+
```java
24+
import fr.rabian.ovhApi.core.beans.*;
25+
```
26+
27+
You can then create an application and its manager, and get your first consumer :
28+
29+
```java
30+
Application a = new Application(AK, AS, Endpoint.ovh_eu);
31+
AppManager am = a.getAppManager();
32+
Consumer c;
33+
34+
ScopeElement g = new ScopeElement("GET", "/*");
35+
List<ScopeElement> scope = new ArrayList<>();
36+
scope.add(g);
37+
38+
try {
39+
c = am.getConsumer(scope, "");
40+
System.out.println(nc.getConsumerKey());
41+
Scanner in = new Scanner(System.in);
42+
String wait = in.nextLine();
43+
System.out.println(am.sendGetReq("/me", c));
44+
} catch (NOKResponseException e) {
45+
e.printStackTrace();
46+
}
47+
```
48+
49+
## License
50+
51+
This software is licensed under GNU GPL v3 license. Check the license file for details.
52+

0 commit comments

Comments
 (0)