Introduction
This is a test client for the Twinkler API. It calls each method of the Twinkler API and can be used to understand and test the Twinkler API. It also serves as a reference implementation for parties developing systems that interface with Twinkler.
Sign-in
A sign-in to Twinkler must be performed before any other API function is called. Sign-in can be via via email/password, Google or Facebook.
Signing-in by the test client is a two-step process. It starts with a sign-in to Firebase (documentation) using email/password, Google or Facebook credentials. The Firebase response, shown in Sign-in Details, includes an accessToken (a.k.a. idToken). The accessToken is sent to Twinkler for verification. Twinkler verifies the token with Firebase and returns a "success" result to the test client. Twinkler also sets a "session" cookie that is sent by the client in all subsequent transactions.
Location Finder
The Location Finder API has two commands - locfinderlocate and locfinderpng. The first command takes signal strengths for selected coverage and calculates a map of the most likely locations where that signal will be received. The second command returns a PNG file of the coverage map, which is suitable for displaying in a GIS application.
locfinderlocate is an HTTP POST to https://twinkler.io/twapi/locfinderlocate with the following JSON data:
sig_strs <int>[] -- list of signal strengths (negative numbers)
indoor_loss <int> -- building penetration loss; dBm (negative number, default 0)
One of the following must be present:
project_name <str> -- the project name
project_uid <str> -- the project UID
One of the following must be present:
pr_uids <str>[] -- list of coverage prediction UIDs
coverage_names <str>[] -- list of coverage prediction names
JSON data is returned:
result -- "success" or "failed"
lf_uid -- UID of the location finder image, used in the locfinderpng command
message -- "Best result is within nnn dBm of target values" if successful, otherwise an error message
best_dbm -- the lowest average signal strength difference
west -- boundary of location finder image
south -- boundary of location finder image
east -- boundary of location finder image
north -- boundary of location finder image
locfinderpng is an HTTP GET to https://twinkler.io/twapi/locfinderpng/<UID>/<color_scheme>, that returns a png showing the likelihood of location.
UID -- is the value returned by locfinderlocate
color_scheme -- "turbo", "color", "flame", "hotcold", "grey", "red", "green", "blue", "greymono", "redmono", "greenmono", "bluemono"
Sign-in with Email
Enter an email and password below and either sign in to an existing account or sign up
Sign-in with Google (via Popup)
Sign in with your Google account below.
null
Sign-in Details
currentUser
object value:null
Location Finder
Request to Twinkler
Coverage Identity: | Signal Strength |
---|---|
Response from Twinkler
Image returned by Twinkler
0
, 0