Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cadox8 committed Jun 27, 2020
1 parent 2f8fd08 commit ebb2b0d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/actions/get_alerts.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,25 @@ api.php?action=getAlerts&value=JohnDoe&hash=d8e8fca2dc0f896fd7cb4cb0031ba249
```php
api.php?action=getAlerts&value=JohnDoe&type=fetchAll&hash=d8e8fca2dc0f896fd7cb4cb0031ba249
```
```java
public class Xen {
public static void main(String... args) {
final XenAPI api = new XenAPI("e65ef8da-ca6a-437c-ab8b-4b2e9e86cd10", "http://localhost/forum");

final Request r = RequestBuilder.newRequest(RequestType.GET_ALERTS).addParam(RequestParam.VALUE_STRING, "cadox8").addParam(RequestParam.TYPE_STRING, "fetchAll").addParam(RequestParam.HASH, "cadox8:JDJhJDEwJEd4U2xRQUNNTVJnTzFOM282anZYd08wRk1DTC52NFJtYWtDVHZaNHo1SUZvR0hzUVpLTkU2").createRequest();

api.getReply(r, (Callback<AlertsReply>) (failCause, result) -> {
try {
result.checkError();
if (failCause != null) failCause.printStackTrace();
System.out.println("Result: " + result.toString());
} catch (ArgsErrorException e) {
e.printStackTrace();
}
});
}
}
```
#### Reply
```json
{
Expand Down

0 comments on commit ebb2b0d

Please sign in to comment.