Trendsic Platform Service

<back to all web services

GetMyNavigationRequest

The following routes are available for this service:
GET,OPTIONS/v1/me/navigation
<?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 GetMyNavigationRequest implements IGet, JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        return empty($o) ? new class(){} : $o;
    }
}

class AppNavItem implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Id=null,
        /** @var string|null */
        public ?string $Title=null,
        /** @var string|null */
        public ?string $Href=null,
        /** @var string[]|null */
        public ?array $RequiresAll=null,
        /** @var string[]|null */
        public ?array $RequiresAny=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Title'])) $this->Title = $o['Title'];
        if (isset($o['Href'])) $this->Href = $o['Href'];
        if (isset($o['RequiresAll'])) $this->RequiresAll = JsonConverters::fromArray('string', $o['RequiresAll']);
        if (isset($o['RequiresAny'])) $this->RequiresAny = JsonConverters::fromArray('string', $o['RequiresAny']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Title)) $o['Title'] = $this->Title;
        if (isset($this->Href)) $o['Href'] = $this->Href;
        if (isset($this->RequiresAll)) $o['RequiresAll'] = JsonConverters::toArray('string', $this->RequiresAll);
        if (isset($this->RequiresAny)) $o['RequiresAny'] = JsonConverters::toArray('string', $this->RequiresAny);
        return empty($o) ? new class(){} : $o;
    }
}

class GetMyNavigationResponse implements JsonSerializable
{
    public function __construct(
        /** @var AppNavItem[]|null */
        public ?array $Items=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Items'])) $this->Items = JsonConverters::fromArray('AppNavItem', $o['Items']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Items)) $o['Items'] = JsonConverters::toArray('AppNavItem', $this->Items);
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetMyNavigationRequest DTOs

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

HTTP + JSV

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

GET /v1/me/navigation HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Items: 
	[
		{
			Id: String,
			Title: String,
			Href: String,
			RequiresAll: 
			[
				String
			],
			RequiresAny: 
			[
				String
			]
		}
	]
}