Updated APIv5 PageExtension API (markdown)

Risto Lahtela 2020-03-21 20:02:28 +02:00
parent cc162ae5e1
commit d461b8ab49

@ -1,8 +1,6 @@
![Plan Header](https://puu.sh/AXSg7/5f2f78c06c.jpg)
# Plan API version 5 - Page Extension API
> All links on this page have not been set yet
Page Extension API is for adding content to the Plan website.
It consists of these parts:
@ -178,7 +176,7 @@ Following Exceptions can be thrown for automated responses:
`Response` objects can be created using this builder.
Here are the methods of `ResponseBuilder`, consult [Javadoc]() for specifics of each method if necessary.
Here are the methods of `ResponseBuilder`, consult [Javadoc](https://plan-player-analytics.github.io/Plan/api/com/djrapitops/plan/delivery/web/resolver/ResponseBuilder.html) for specifics of each method if necessary.
```java
public class ResponseBuilder {
@ -261,8 +259,8 @@ Response.builder().redirectTo(location).build();
```
> 💡 **Tips**
> - Many Mime types are already defined in [`MimeType`-class]()
> - You can find more example uses in [`ResponseFactory`-class]()
> - Many Mime types are already defined in [`MimeType`-class](https://github.com/plan-player-analytics/Plan/blob/master/Plan/api/src/main/java/com/djrapitops/plan/delivery/web/resolver/MimeType.java#L19)
> - You can find more example uses in [`ResponseFactory`-class](https://github.com/plan-player-analytics/Plan/blob/master/Plan/common/src/main/java/com/djrapitops/plan/delivery/webserver/ResponseFactory.java#L56)
> - `setHeader(String, Object)` assumes headers that can have multiple values are split with `;` character
> - `setJSONContent(String)` assumes the String is UTF-8
> - You can use `WebResource` of `ResourceService` directly with `setContent(WebResource)`