Currently, client libraries are written for the following languages:
Creating a New Client Library
This is an overview of what should be included in the client library, such as:
- Classes that should be created
- HTTP Endpoints to communicate with
All client libraries should follow this format, though small variations are expected because not every language works the same.
Classes
Because some classes use other classes, the optimal creation order would be:
AbsoluteDistance, PercentDistance DegreesRotation, RadiansRotation Equation, Location ColorContainer, PreparedColorContainer AnimationToRunParams, RunningAnimationParams AnimationParameter AnimationInfo NewAnimationGroupInfo StripInfo Section
AbsoluteDistance
| Parameter | Type | Default |
x | Double | 0.0 |
y | Double | 0.0 |
z | Double | 0.0 |
AnimationInfo
| Parameter | Type | Default |
name | String | "" |
abbr | String | "" |
description | String | "" |
runCountDefault | Int | 0 |
minimumColors | Int | 0 |
unlimitedColors | Boolean | false |
dimensionality | Set<String> | setOf() |
intParams | List<AnimationParameter<Int>> | listOf() |
doubleParams | List<AnimationParameter<Double>> | listOf() |
stringParams | List<AnimationParameter<String>> | listOf() |
locationParams | List<AnimationParameter<Location>> | listOf() |
distanceParams | List<AnimationParameter<AbsoluteDistance/PercentDistance>> | listOf() |
rotationParams | List<AnimationParameter<DegreesRotation/RadiansRotation>> | listOf() |
equationParams | List<AnimationParameter<Equation>> | listOf() |
AnimationParameter<T>
| Parameter | Type | Default |
name | String | "" |
description | String | "" |
default | T? | null |
AnimationToRunParams
| Parameter | Type | Default |
animation | String | "" |
colors | List<ColorContainer/PreparedColorContainer> | listOf() |
id | String | "" |
section | String | "" |
runCount | Int | 0 |
intParams | Map<String, Int> | mapOf() |
doubleParams | Map<String, Double> | mapOf() |
stringParams | Map<String, String> | mapOf() |
locationParams | Map<String, Location> | mapOf() |
distanceParams | Map<String, AbsoluteDistance/PercentDistance> | mapOf() |
rotationParams | Map<String, DegreesRotation/RadiansRotation> | mapOf() |
equationParams | Map<String, Equation> | mapOf() |
ColorContainer
| Parameter | Type | Default |
colors | List<Int> | listOf() |
DegreesRotation
| Parameter | Type | Default |
xRotation | Double | 0.0 |
yRotation | Double | 0.0 |
zRotation | Double | 0.0 |
rotationOrder | List<String> | listOf("ROTATE_Z", "ROTATE_X" |
Equation
| Parameter | Type | Default |
coefficients | List<Int> | listOf() |
Location
| Parameter | Type | Default |
x | Double | 0.0 |
y | Double | 0.0 |
z | Double | 0.0 |
NewAnimationGroupInfo
| Parameter | Type |
groupType | String |
groupInfo | AnimationInfo |
animationList | List<String> |
PreparedColorContainer
| Parameter | Type |
colors | List<int> |
originalColors | List<int> |
RadiansRotation
| Parameter | Type | Default |
xRotation | Double | 0.0 |
yRotation | Double | 0.0 |
zRotation | Double | 0.0 |
rotationOrder | List<String> | listOf("ROTATE_Z", "ROTATE_X") |
RunningAnimationParams
| Parameter | Type | Default |
animationName | String | "" |
colors | List<PreparedColorContainer> | |
id | String | "" |
section | String | "" |
runCount | Int | 0 |
intParams | Map<String, Int> | mapOf() |
doubleParams | Map<String, Double> | mapOf() |
stringParams | Map<String, String> | mapOf() |
locationParams | Map<String, Location> | mapOf() |
distanceParams | Map<String, AbsoluteDistance> | mapOf() |
rotationParams | Map<String, RadiansRotation> | mapOf() |
equationParams | Map<String, Equation> | mapOf() |
sourceParams | AnimationToRunParams | |
StripInfo
| Parameter | Type | Default |
numLEDs | Int | 0 |
pin | Int? | null |
renderDelay | Int | 10 |
isRenderLoggingEnabled | Boolean | false |
renderLogFile | String | "" |
rendersBetweenLogSaves | Int | 1000 |
is1DSupported | Boolean | true |
is2DSupported | Boolean | false |
is3DSupported | Boolean | false |
ledLocations | List<Location> | listOf() |
Section
| Parameter | Type | Default |
name | String | "" |
pixels | List<Int> | listOf() |
parentSectionName | String | "" |
HTTP Endpoints
| Method | Endpoint | Function | Parameter | Return |
| GET | /animation/{name} | getAnimationInfo | String | AnimationInfo |
| GET | /animations | getSupportedAnimations | | List<AnimationInfo> |
| GET | /animations/map | getSupportedAnimationsMap | | Map<String, AnimationInfo> |
| GET | /animations/names | getSupportedAnimationsNames | | List<String> |
| POST | /animations/newGroup | createNewGroup | NewAnimationGroupInfo | AnimationInfo |
| GET | /running | getRunningAnimations | | Map<String, RunningAnimationParams> |
| GET | /running/ids | getRunningAnimationsIds | | List<String> |
| GET | /running/{id} | getRunningAnimationParams | String | RunningAnimationParams |
| DELETE | /running/{id} | endAnimation | String | RunningAnimationParams |
| GET | /section/{name} | getSection | String | Section |
| GET | /sections | getSections | | List<Section> |
| POST | /sections | createNewSection | Section | Section |
| GET | /sections/map | getSectionsMap | | Map<String, Section> |
| POST | /start | startAnimation | AnimationToRunParams | RunningAnimationParams |
| POST | /strip/clear | clearStrip | | void |
| GET | /strip/color | getCurrentStripColor | | List<int> |
| GET | /strip/info | getStripInfo | | StripInfo |
Additional Functions
| Function | Parameter | Operation |
endAnimation or endAnimationFromParams | RunningAnimationParams | calls endAnimation with param.id |
getFullStripSection | | calls getSection with "fullStrip" |
Table of contents