https://github.com/johnjohndoe/halfnarpclient
A Java library containing a parser and models for the Halfnarp API.
https://github.com/johnjohndoe/halfnarpclient
31c3 32c3 33c3 34c3 35c3 36c3 ccc halfnarp halfnarp-api jackson java rc3 retrofit2 schedule scr sha sha2017
Last synced: 2 months ago
JSON representation
A Java library containing a parser and models for the Halfnarp API.
- Host: GitHub
- URL: https://github.com/johnjohndoe/halfnarpclient
- Owner: johnjohndoe
- License: apache-2.0
- Created: 2014-11-30T13:29:13.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-03-31T13:28:27.000Z (about 3 years ago)
- Last Synced: 2025-03-24T18:21:15.379Z (3 months ago)
- Topics: 31c3, 32c3, 33c3, 34c3, 35c3, 36c3, ccc, halfnarp, halfnarp-api, jackson, java, rc3, retrofit2, schedule, scr, sha, sha2017
- Language: Java
- Homepage: https://github.com/johnjohndoe/HalfnarpClient
- Size: 558 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://travis-ci.com/johnjohndoe/HalfnarpClient) [](http://choosealicense.com/licenses/apache-2.0/) [](https://snyk.io/test/github/johnjohndoe/halfnarpclient?targetFile=build.gradle)
# Halfnarp Client
A Java library containing a parser and models for the Halfnarp API available here:
* http://halfnarp.events.ccc.de/-/talkpreferences
The source code of the API can be found here:
* https://github.com/tomster/halfnarp
## Demo application
Please note there is a Android demo application for this library available:
* https://github.com/johnjohndoe/HalfnarpClientDemo
## Usage
The library can be accessed via the `ApiModule` class.
```java
TalkPreferencesService service = ApiModule.getTalkPreferencesService(final String baseUrl);Call> getTalksCall = service.getTalks();
// Execute getTalks call to send a request to the webserver.Call createTalkPreferencesSuccessResponseCall =
mService.createTalkPreferences(talkIds);
// Execute createTalkPreferencesSuccessResponse call to send a request to the webserver.Call updateTalkPreferencesSuccessResponseCall =
mService.updateTalkPreferences(uniqueId, talkIds);
// Execute updateTalkPreferencesSuccessResponse call to send a request to the webserver.Call getTalkPreferencesSuccessResponseCall =
mService.getTalkPreferences(uniqueId);
// Execute getTalkPreferencesSuccessResponse call to send a request to the webserver.
```Make sure to define the following `packagingOptions` in the `build.gradle` of you app.
```groovy
packagingOptions {
pickFirst "META-INF/LICENSE"
pickFirst "META-INF/NOTICE"
}
```### Gradle build
To deploy the library to your local Maven repository run the following task:
```bash
$ ./gradlew publishToMavenLocal
```Then, to use the library in your project add the following to
your top level `build.gradle`:```
allprojects {
repositories {
mavenLocal()
}
}
```and to your application module `build.gradle`:
```groovy
dependencies {
implementation "info.metadude.java.library.halfnarp:halfnarp-client:$version"
}
```## Tests
Run the following command to execute all tests:
```groovy
$ ./gradlew clean test
```## Which applications are using this library?
* Schedule Conflict Resolvr - [Sources][scr-sources], [PlayStore][scr-playstore]
## Author
* [Tobias Preuss][tobias-preuss]
## License
Copyright 2015 - 2022 Tobias Preuss
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.[tobias-preuss]: https://github.com/johnjohndoe
[scr-sources]: https://github.com/ligi/SCR
[scr-playstore]: https://play.google.com/store/apps/details?id=org.ligi.scr