sitesBeacons := client .SitesBeacons ()
SitesBeacons
Create Site Beacon
CreateSiteBeacon (
ctx context .Context ,
siteId uuid .UUID ,
body * models .Beacon ) (
models .ApiResponse [models .Beacon ],
error )
Parameter
Type
Tags
Description
siteId
uuid.UUID
Template, Required
-
body
*models.Beacon
Body, Optional
Request Body
models.Beacon
ctx := context .Background ()
siteId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
body := models.Beacon {
EddystoneInstance : models .ToPointer ("string" ),
EddystoneNamespace : models .ToPointer ("string" ),
EddystoneUrl : models .ToPointer ("string" ),
IbeaconMajor : models .ToPointer (0 ),
IbeaconMinor : models .ToPointer (0 ),
IbeaconUuid : models .ToPointer (uuid .MustParse ("b069b358-4c97-5319-1f8c-7c5ca64d6ab1" )),
Mac : models .ToPointer ("string" ),
Name : models .ToPointer ("string" ),
Power : models .ToPointer (0 ),
Type : models .ToPointer (models .BeaconTypeEnum ("eddystone-uid" )),
X : models .ToPointer (float64 (0 )),
Y : models .ToPointer (float64 (0 )),
}
apiResponse , err := sitesBeacons .CreateSiteBeacon (ctx , siteId , & body )
if err != nil {
log .Fatalln (err )
} else {
// Printing the result and response
fmt .Println (apiResponse .Data )
fmt .Println (apiResponse .Response .StatusCode )
}
Example Response (as JSON)
{
"created_time" : 0 ,
"eddystone_instance" : " string" ,
"eddystone_namespace" : " string" ,
"eddystone_url" : " string" ,
"ibeacon_major" : 0 ,
"ibeacon_minor" : 0 ,
"ibeacon_uuid" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"mac" : " string" ,
"map_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"modified_time" : 0 ,
"name" : " string" ,
"org_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"power" : 0 ,
"site_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"type" : " eddystone-uid" ,
"x" : 0 ,
"y" : 0
}
Delete Site Beacon
DeleteSiteBeacons (
ctx context .Context ,
siteId uuid .UUID ,
beaconId uuid .UUID ) (
http .Response ,
error )
Parameter
Type
Tags
Description
siteId
uuid.UUID
Template, Required
-
beaconId
uuid.UUID
Template, Required
-
``
ctx := context .Background ()
siteId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
beaconId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
resp , err := sitesBeacons .DeleteSiteBeacons (ctx , siteId , beaconId )
if err != nil {
log .Fatalln (err )
} else {
fmt .Println (resp .StatusCode )
}
Get Site Beacon Details
GetSiteBeacon (
ctx context .Context ,
siteId uuid .UUID ,
beaconId uuid .UUID ) (
models .ApiResponse [models .Beacon ],
error )
Parameter
Type
Tags
Description
siteId
uuid.UUID
Template, Required
-
beaconId
uuid.UUID
Template, Required
-
models.Beacon
ctx := context .Background ()
siteId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
beaconId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
apiResponse , err := sitesBeacons .GetSiteBeacon (ctx , siteId , beaconId )
if err != nil {
log .Fatalln (err )
} else {
// Printing the result and response
fmt .Println (apiResponse .Data )
fmt .Println (apiResponse .Response .StatusCode )
}
Example Response (as JSON)
{
"created_time" : 0 ,
"eddystone_instance" : " string" ,
"eddystone_namespace" : " string" ,
"eddystone_url" : " string" ,
"ibeacon_major" : 0 ,
"ibeacon_minor" : 0 ,
"ibeacon_uuid" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"mac" : " string" ,
"map_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"modified_time" : 0 ,
"name" : " string" ,
"org_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"power" : 0 ,
"site_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"type" : " eddystone-uid" ,
"x" : 0 ,
"y" : 0
}
Get List of Site Beacons
ListSiteBeacons (
ctx context .Context ,
siteId uuid .UUID ,
limit * int ,
page * int ) (
models.ApiResponse [[]models.Beacon ],
error )
Parameter
Type
Tags
Description
siteId
uuid.UUID
Template, Required
-
limit
*int
Query, Optional
Default : 100
Constraints : >= 0
page
*int
Query, Optional
Default : 1
Constraints : >= 1
[]models.Beacon
ctx := context .Background ()
siteId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
limit := 100
page := 1
apiResponse , err := sitesBeacons .ListSiteBeacons (ctx , siteId , & limit , & page )
if err != nil {
log .Fatalln (err )
} else {
// Printing the result and response
fmt .Println (apiResponse .Data )
fmt .Println (apiResponse .Response .StatusCode )
}
Example Response (as JSON)
[
{
"created_time" : 0 ,
"eddystone_instance" : " string" ,
"eddystone_namespace" : " string" ,
"eddystone_url" : " string" ,
"ibeacon_major" : 0 ,
"ibeacon_minor" : 0 ,
"ibeacon_uuid" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"mac" : " string" ,
"map_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"modified_time" : 0 ,
"name" : " string" ,
"org_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"power" : 0 ,
"site_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"type" : " eddystone-uid" ,
"x" : 0 ,
"y" : 0
}
]
Update Site Beacon
UpdateSiteBeacons (
ctx context .Context ,
siteId uuid .UUID ,
beaconId uuid .UUID ,
body * models .Beacon ) (
models .ApiResponse [models .Beacon ],
error )
Parameter
Type
Tags
Description
siteId
uuid.UUID
Template, Required
-
beaconId
uuid.UUID
Template, Required
-
body
*models.Beacon
Body, Optional
Request Body
models.Beacon
ctx := context .Background ()
siteId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
beaconId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
body := models.Beacon {
EddystoneInstance : models .ToPointer ("string" ),
EddystoneNamespace : models .ToPointer ("string" ),
EddystoneUrl : models .ToPointer ("string" ),
IbeaconMajor : models .ToPointer (0 ),
IbeaconMinor : models .ToPointer (0 ),
IbeaconUuid : models .ToPointer (uuid .MustParse ("b069b358-4c97-5319-1f8c-7c5ca64d6ab1" )),
Mac : models .ToPointer ("string" ),
Name : models .ToPointer ("string" ),
Power : models .ToPointer (0 ),
Type : models .ToPointer (models .BeaconTypeEnum ("eddystone-uid" )),
X : models .ToPointer (float64 (0 )),
Y : models .ToPointer (float64 (0 )),
}
apiResponse , err := sitesBeacons .UpdateSiteBeacons (ctx , siteId , beaconId , & body )
if err != nil {
log .Fatalln (err )
} else {
// Printing the result and response
fmt .Println (apiResponse .Data )
fmt .Println (apiResponse .Response .StatusCode )
}
Example Response (as JSON)
{
"created_time" : 0 ,
"eddystone_instance" : " string" ,
"eddystone_namespace" : " string" ,
"eddystone_url" : " string" ,
"ibeacon_major" : 0 ,
"ibeacon_minor" : 0 ,
"ibeacon_uuid" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"mac" : " string" ,
"map_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"modified_time" : 0 ,
"name" : " string" ,
"org_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"power" : 0 ,
"site_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"type" : " eddystone-uid" ,
"x" : 0 ,
"y" : 0
}