Go-to-Light Service 4.0.0.2397 - 121 - API License to Cloud Demo

<back to all web services

RegisterCallback

Requires Authentication
The following routes are available for this service:
All Verbs/RegisterCallback
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class RegisterCallback implements JsonSerializable
{
    public function __construct(
        /** @description Callback on which to get registered (e.g. SetPosition) */
        // @ApiMember(Description="Callback on which to get registered (e.g. SetPosition)")
        /** @var string */
        public string $Name='',

        /** @description Callback URL */
        // @ApiMember(Description="Callback URL")
        /** @var string */
        public string $CallbackURL='',

        /** @description Optional: Callback username */
        // @ApiMember(Description="Optional: Callback username")
        /** @var string */
        public string $CallbackUsername='',

        /** @description Optional: Callback password */
        // @ApiMember(Description="Optional: Callback password")
        /** @var string */
        public string $CallbackPassword='',

        /** @description Optional: Callback authorization */
        // @ApiMember(Description="Optional: Callback authorization")
        /** @var string */
        public string $CallbackAuthorization='',

        /** @description Optional: niveau de détail souhaité pour les événements touch (rétro-compatibilité), interprété comme un masque de bits (Gestures=1, Detailed=2). 0 = Legacy (défaut, payload historique string position) ; 1 = Gestures (JSON: Click/DoubleClick/LongPress + durationMs) ; 2 = Detailed (JSON: position, edge Down/Up, timestampUtc, seq) ; 3 = Both (Gestures + Detailed). Absent ou 0 => comportement inchangé pour les clients existants. */
        // @ApiMember(Description="Optional: niveau de détail souhaité pour les événements touch (rétro-compatibilité), interprété comme un masque de bits (Gestures=1, Detailed=2). 0 = Legacy (défaut, payload historique string position) ; 1 = Gestures (JSON: Click/DoubleClick/LongPress + durationMs) ; 2 = Detailed (JSON: position, edge Down/Up, timestampUtc, seq) ; 3 = Both (Gestures + Detailed). Absent ou 0 => comportement inchangé pour les clients existants.")
        /** @var int */
        public int $DetailLevel=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['CallbackURL'])) $this->CallbackURL = $o['CallbackURL'];
        if (isset($o['CallbackUsername'])) $this->CallbackUsername = $o['CallbackUsername'];
        if (isset($o['CallbackPassword'])) $this->CallbackPassword = $o['CallbackPassword'];
        if (isset($o['CallbackAuthorization'])) $this->CallbackAuthorization = $o['CallbackAuthorization'];
        if (isset($o['DetailLevel'])) $this->DetailLevel = $o['DetailLevel'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->CallbackURL)) $o['CallbackURL'] = $this->CallbackURL;
        if (isset($this->CallbackUsername)) $o['CallbackUsername'] = $this->CallbackUsername;
        if (isset($this->CallbackPassword)) $o['CallbackPassword'] = $this->CallbackPassword;
        if (isset($this->CallbackAuthorization)) $o['CallbackAuthorization'] = $this->CallbackAuthorization;
        if (isset($this->DetailLevel)) $o['DetailLevel'] = $this->DetailLevel;
        return empty($o) ? new class(){} : $o;
    }
}

PHP RegisterCallback DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /RegisterCallback HTTP/1.1 
Host: clouddemo.pickeos.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Name":"String","CallbackURL":"String","CallbackUsername":"String","CallbackPassword":"String","CallbackAuthorization":"String","DetailLevel":0}