Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Lukas Wiest
unified-ticketing
Commits
6c5b1884
Verified
Commit
6c5b1884
authored
Nov 26, 2020
by
Lukas Wiest
🚂
Browse files
refactor(docs): api: write 'index'
parent
086f8d06
Pipeline
#1362
passed with stages
in 1 minute and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docs/api/index.md
View file @
6c5b1884
# Java-API
!!! todo
-
introductional text about library usage
-
api docs structure explanation
-
hint about no autogenerated JavaDoc, but manually written docs
This is the API-Documentation,
holding detailed information for each publicly available action you can do with each class.
Below the structure of the library is explained and some generic examples are shown.
## library structure
The library is structured into three packages:
1.
`de.hftstuttgart.unifiedticketing.core`
1.
`de.hftstuttgart.unifiedticketing.exceptions`
1.
`de.hftstuttgart.unifiedticketing.systems`
The core package contains the classes defining the generic API,
to be implemented by each supported system.
The systems package contains a sub-package per supported system,
which then holds the implementations of the core classes.
The exceptions package has some own exception types,
used throughout the lib.
For each package, this documentation provides a chapter in the navigation on the left.
## examples
!!! info
These examples are not specific to a certain system.
Therefore they can contain placeholders for system specific parts.
To get these parts, you'll have to go to the dedicated API-docs part.
??? example "create TicketSystem instance"
__from builder:__
```
java
TicketSystem
ts
=
TicketSystem
.
fromBuilder
()
.<
methods
specifying
connection
details
>
.
build
();
```
__from uri:__
```java
TicketSystem ts = TicketSystem.fromUri(<uri>);
```
??? example "searching tickets"
__without filters:__
```
java
ts
.
find
().
get
();
```
__only open tickets and explicit pagination:__
```java
ts.find()
.isOpen()
.setPage(1)
.setPageSize(10)
.get();
```
??? warning "default pagination"
many systems have an implicit default pagination enabled,
which could block you from simply getting _all_ tickets.
!!! tip
you can ask the `TicketSystem` object, to tell you if it uses a default pagination:
```java
ts.hasDefaultPagination();
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment