TechStacks!

<back to all web services

AppOverview

Site
The following routes are available for this service:
All Verbs/app-overview
<?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};


enum TechnologyTier : string
{
    case ProgrammingLanguage = 'ProgrammingLanguage';
    case Client = 'Client';
    case Http = 'Http';
    case Server = 'Server';
    case Data = 'Data';
    case SoftwareInfrastructure = 'SoftwareInfrastructure';
    case OperatingSystem = 'OperatingSystem';
    case HardwareInfrastructure = 'HardwareInfrastructure';
    case ThirdPartyServices = 'ThirdPartyServices';
}

// @DataContract
class Option implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="name")
        /** @var string|null */
        public ?string $name=null,

        // @DataMember(Name="title")
        /** @var string|null */
        public ?string $title=null,

        // @DataMember(Name="value")
        /** @var TechnologyTier|null */
        public ?TechnologyTier $value=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['title'])) $this->title = $o['title'];
        if (isset($o['value'])) $this->value = JsonConverters::from('TechnologyTier', $o['value']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->title)) $o['title'] = $this->title;
        if (isset($this->value)) $o['value'] = JsonConverters::to('TechnologyTier', $this->value);
        return empty($o) ? new class(){} : $o;
    }
}

class TechnologyInfo implements JsonSerializable
{
    public function __construct(
        /** @var TechnologyTier|null */
        public ?TechnologyTier $tier=null,
        /** @var string|null */
        public ?string $slug=null,
        /** @var string|null */
        public ?string $name=null,
        /** @var string|null */
        public ?string $logoUrl=null,
        /** @var int */
        public int $stacksCount=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['tier'])) $this->tier = JsonConverters::from('TechnologyTier', $o['tier']);
        if (isset($o['slug'])) $this->slug = $o['slug'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['logoUrl'])) $this->logoUrl = $o['logoUrl'];
        if (isset($o['stacksCount'])) $this->stacksCount = $o['stacksCount'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->tier)) $o['tier'] = JsonConverters::to('TechnologyTier', $this->tier);
        if (isset($this->slug)) $o['slug'] = $this->slug;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->logoUrl)) $o['logoUrl'] = $this->logoUrl;
        if (isset($this->stacksCount)) $o['stacksCount'] = $this->stacksCount;
        return empty($o) ? new class(){} : $o;
    }
}

class AppOverviewResponse implements JsonSerializable
{
    public function __construct(
        /** @var DateTime */
        public DateTime $created=new DateTime(),
        /** @var array<Option>|null */
        public ?array $allTiers=null,
        /** @var array<TechnologyInfo>|null */
        public ?array $topTechnologies=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['created'])) $this->created = JsonConverters::from('DateTime', $o['created']);
        if (isset($o['allTiers'])) $this->allTiers = JsonConverters::fromArray('Option', $o['allTiers']);
        if (isset($o['topTechnologies'])) $this->topTechnologies = JsonConverters::fromArray('TechnologyInfo', $o['topTechnologies']);
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->created)) $o['created'] = JsonConverters::to('DateTime', $this->created);
        if (isset($this->allTiers)) $o['allTiers'] = JsonConverters::toArray('Option', $this->allTiers);
        if (isset($this->topTechnologies)) $o['topTechnologies'] = JsonConverters::toArray('TechnologyInfo', $this->topTechnologies);
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        return empty($o) ? new class(){} : $o;
    }
}

class AppOverview implements IGet, JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $reload=null
    ) {
    }

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

PHP AppOverview DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /app-overview HTTP/1.1 
Host: techstacks.io 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"reload":false}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"created":"0001-01-01T00:00:00.0000000","allTiers":[{"name":"String","title":"String","value":"ProgrammingLanguage"}],"topTechnologies":[{"tier":"ProgrammingLanguage","slug":"String","name":"String","logoUrl":"String","stacksCount":0}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}