Verified Commit 086f8d06 authored by Lukas Wiest's avatar Lukas Wiest 🚂
Browse files

refactor(docs): home: write 'usage'

parent 1d96606b
# Usage
!!! todo
- Write how to add dependency to pom
- Write what repo config in pom needed
## Add as dependency in own project
This library can be used as maven dependency in an own project.
!!! attention
As it is not published to maven central,
but the GitLab integrated package registry,
you must configure an additional repository in your pom.
__repository config:__
```xml
<repository>
<id>unified-ticketing</id>
<url>https://transfer.hft-stuttgart.de/gitlab/api/v4/projects/154/packages/maven</url>
</repository>
```
__dependency information:__
```xml
<dependency>
<groupId>de.hftstuttgart</groupId>
<artifactId>unified-ticketing</artifactId>
<version>0.1.0</version>
</dependency>
```
??? tip "example how your pom should look like"
```xml
<project>
<!-- [...] -->
<dependencies>
<!-- [...] -->
<dependency>
<groupId>de.hftstuttgart</groupId>
<artifactId>unified-ticketing</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>
<!-- [...] -->
<repositories>
<!-- [...] -->
<repository>
<id>gitlab-maven</id>
<url>https://transfer.hft-stuttgart.de/gitlab/api/v4/projects/154/packages/maven</url>
</repository>
</repositories>
<!-- [...] -->
</project>
```
## Use in code
There are two central classes: `TicketSystem` and `Ticket`.
The majority of the library is written with the fluent-api design pattern.
To begin, you'll need an instance of `TicketSystem`.
This can be done, by calling the builder mechanism or pass a URI with all needed information.
Using this `TicketSystem` object you can search for tickets in the connected space,
change and save them or create new tickets.
To get full details of the available API, please switch to the [API docs](../api/index.md).
There you can find information and examples regarding the generic parts of the library,
as-well as system specific information, e.g. how an URI instantiation string has to look like, etc.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment