GalaxyMobile Client API

<back to all web services

Test

The following routes are available for this service:
GET/testSimple test method to confirm the services are working
<?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 TestResult implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $WasSuccessful=null,
        /** @var string|null */
        public ?string $Description=null
    ) {
    }

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

class TestResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Environment=null,
        /** @var array<string,TestResult>|null */
        public ?array $Tests=null,
        /** @var bool|null */
        public ?bool $WasSuccessful=null,
        /** @var string|null */
        public ?string $DB=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Environment'])) $this->Environment = $o['Environment'];
        if (isset($o['Tests'])) $this->Tests = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','TestResult']), $o['Tests']);
        if (isset($o['WasSuccessful'])) $this->WasSuccessful = $o['WasSuccessful'];
        if (isset($o['DB'])) $this->DB = $o['DB'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Environment)) $o['Environment'] = $this->Environment;
        if (isset($this->Tests)) $o['Tests'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','TestResult']), $this->Tests);
        if (isset($this->WasSuccessful)) $o['WasSuccessful'] = $this->WasSuccessful;
        if (isset($this->DB)) $o['DB'] = $this->DB;
        return empty($o) ? new class(){} : $o;
    }
}

class Test implements JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        return empty($o) ? new class(){} : $o;
    }
}

PHP Test 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.

GET /test HTTP/1.1 
Host: galaxymobile.api.client.prod.86degrees.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Environment":"String","Tests":{"String":{"WasSuccessful":false,"Description":"String"}},"WasSuccessful":false,"DB":"String"}