Start working on documentation.

This commit is contained in:
Danila Fedorin 2020-05-13 13:36:32 -07:00
parent 55f0bec0b4
commit b18890851c
7 changed files with 56 additions and 1 deletions

View File

@ -4,6 +4,17 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.10.1"
}
}
apply plugin: 'org.jetbrains.dokka'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
@ -23,6 +34,11 @@ android {
}
}
dokka {
outputFormat = 'html'
outputDirectory = "$buildDir/dokka"
}
repositories {
mavenCentral()
google()

View File

@ -1,3 +1,10 @@
package com.danilafe.fencelessgrazing.model
/**
* Information returned from the `/collar/<id>/details` API endpoint.
*
* @param id the collar's internal unique identifier.
* @param name the collar's current designation in the system.
* @param stimulus the number of stimulus activation reports in the last 24 hours.
*/
data class CollarDetails(val id: Int, val name: String, val stimulus: Int)

View File

@ -1,3 +1,10 @@
package com.danilafe.fencelessgrazing.model
/**
* Component of the information returned from the `/collars/stats/distance` AP endpoint.
*
* @param name the current designation of the collar to which this data point belongs.
* @param id the unique identifier of the collar in the system.
* @param distance the distance, in kilometers, traveled by this collar.
*/
data class CollarDistance(val name: String, val id: Int, val distance: Float)

View File

@ -0,0 +1,9 @@
package com.danilafe.fencelessgrazing.model
/**
* GPS coordinate returned by many of the project's API endpoints.
*
* @param longitude the longitude of the GPS point.
* @param latitude the latitude of the GPS point.
*/
data class CollarPos(val longitude: String, val latitude: String)

View File

@ -1,4 +1,10 @@
package com.danilafe.fencelessgrazing.model
data class CollarPos(val longitude: String, val latitude: String)
/**
* Minimal information about one of the collars returned by the `/collars` API endpoints.
*
* @param id the internal identifier of the collar in the system.
* @param name the collar's current designation.
* @param pos the collar's most recent location.
*/
data class CollarSummary(val id: Int, val name: String, val pos: CollarPos)

View File

@ -1,3 +1,8 @@
package com.danilafe.fencelessgrazing.model
/**
* The result of a successful authentication via the `/login` endpoint.
*
* @param token the JWT authorization token to be used for future API requests.
*/
data class LoginResult(val token: String)

View File

@ -1,3 +1,8 @@
package com.danilafe.fencelessgrazing.model
/**
* A general polygon returned by many of the system's API endpoints.
*
* @param dataPoints the vertices of the polygon, in order.
*/
data class Polygon(val dataPoints : List<CollarPos>)