Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
4 years ago
by
Lukas Wiest
Browse files
Options
Download
Email Patches
Plain Diff
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
Showing
1 changed file
docs/api/index.md
+64
-4
docs/api/index.md
with
64 additions
and
4 deletions
+64
-4
docs/api/index.md
+
64
-
4
View file @
6c5b1884
# Java-API
# Java-API
!!! todo
This is the API-Documentation,
-
introductional text about library usage
holding detailed information for each publicly available action you can do with each class.
-
api docs structure explanation
Below the structure of the library is explained and some generic examples are shown.
-
hint about no autogenerated JavaDoc, but manually written docs
## 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();
```
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets