https://github.com/angpysha/diploma_bridge
A bridge library which will be used at raspberry pi project and Android application
https://github.com/angpysha/diploma_bridge
crud iot java raspberry-pi restful
Last synced: 6 months ago
JSON representation
A bridge library which will be used at raspberry pi project and Android application
- Host: GitHub
- URL: https://github.com/angpysha/diploma_bridge
- Owner: angpysha
- License: apache-2.0
- Created: 2017-11-27T19:21:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-09-18T19:32:04.000Z (almost 7 years ago)
- Last Synced: 2024-12-30T11:56:07.132Z (over 1 year ago)
- Topics: crud, iot, java, raspberry-pi, restful
- Language: Java
- Homepage: https://angpysha.github.io/diploma_bridge/
- Size: 629 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Diploma bridge library
[](https://opensource.org/licenses/Apache-2.0)
[](https://travis-ci.org/angpysha/diploma_bridge)
[](https://github.com/angpysha/diploma_bridge)
[](https://github.com/angpysha/diploma_bridge)
[](https://github.com/angpysha/diploma_bridge/tags)
[](https://coveralls.io/github/angpysha/diploma_bridge?branch=master)
The library, which contains API and models for interaction Raspberry Pi app
and Android app with server.
## Requirements
- JDK 8
- IntelliJ IDEA (or other IDE with gradle support)
- Git
## Installation
### With Maven
```$xslt
io.github.angpysha
diploma_bridge
0.5
```
### With Gradle
```$xslt
compile 'io.github.angpysha:diploma_bridge:0.5'
```
## Getting started
1. Create data model, which extends from **Entity** class, model for entity searching, which extends from EntitySearch and provide data send from your Raspberry Pi to web server.
Data model:
```$xslt
public class DHT11 extends Entity {
//declare your propeties here
}
```
Data search:
```$xslt
public class DhtSearch extends SearchEntity {
//declare your propeties here
}
```
2. You must implement these apis on your web server:
```$xslt
search; get; add; update; delete; last; datecount;
```
3. Create controller class:
Example:
```$xslt
public class DhtController extends BaseController{
public DhtController() {
SEARCH_URL = "/dhts/search";
GET_URL = "/dhts/get";
ADD_URL = "/dhts/add";
UPDATE_URL="/dhts/update";
DELETE_URL="/dhts/delete";
GET_LAST_URL = "/dhts/last";
GET_SIZE_URL = "/dhts/datecount";
}
}
```
4. You should also implement GetCount method for every controller
Now you can use methods from controller to get info.
## License
This project is licensing by Apache 2 license. See [LICENSE](https://github.com/angpysha/diploma_bridge/blob/master/LICENSE)