TechStacks!

<back to all web services

GetConfig

Site
The following routes are available for this service:
All Verbs/config
import 'package:servicestack/servicestack.dart';

enum TechnologyTier
{
    ProgrammingLanguage,
    Client,
    Http,
    Server,
    Data,
    SoftwareInfrastructure,
    OperatingSystem,
    HardwareInfrastructure,
    ThirdPartyServices,
}

// @DataContract
class Option implements IConvertible
{
    // @DataMember(Name="name")
    String? name;

    // @DataMember(Name="title")
    String? title;

    // @DataMember(Name="value")
    TechnologyTier? value;

    Option({this.name,this.title,this.value});
    Option.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        title = json['title'];
        value = JsonConverters.fromJson(json['value'],'TechnologyTier',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'title': title,
        'value': JsonConverters.toJson(value,'TechnologyTier',context!)
    };

    getTypeName() => "Option";
    TypeContext? context = _ctx;
}

class GetConfigResponse implements IConvertible
{
    List<Option>? allTiers;
    List<Option>? allPostTypes;
    List<Option>? allFlagTypes;

    GetConfigResponse({this.allTiers,this.allPostTypes,this.allFlagTypes});
    GetConfigResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        allTiers = JsonConverters.fromJson(json['allTiers'],'List<Option>',context!);
        allPostTypes = JsonConverters.fromJson(json['allPostTypes'],'List<Option>',context!);
        allFlagTypes = JsonConverters.fromJson(json['allFlagTypes'],'List<Option>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'allTiers': JsonConverters.toJson(allTiers,'List<Option>',context!),
        'allPostTypes': JsonConverters.toJson(allPostTypes,'List<Option>',context!),
        'allFlagTypes': JsonConverters.toJson(allFlagTypes,'List<Option>',context!)
    };

    getTypeName() => "GetConfigResponse";
    TypeContext? context = _ctx;
}

class GetConfig implements IGet, IConvertible
{
    GetConfig();
    GetConfig.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "GetConfig";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'techstacks.io', types: <String, TypeInfo> {
    'TechnologyTier': TypeInfo(TypeOf.Enum, enumValues:TechnologyTier.values),
    'Option': TypeInfo(TypeOf.Class, create:() => Option()),
    'GetConfigResponse': TypeInfo(TypeOf.Class, create:() => GetConfigResponse()),
    'List<Option>': TypeInfo(TypeOf.Class, create:() => <Option>[]),
    'GetConfig': TypeInfo(TypeOf.Class, create:() => GetConfig()),
});

Dart GetConfig 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 /config HTTP/1.1 
Host: techstacks.io 
Accept: application/json
Content-Type: application/json
Content-Length: length

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

{"allTiers":[{"name":"String","title":"String","value":"ProgrammingLanguage"}],"allPostTypes":[{"name":"String","title":"String","value":"ProgrammingLanguage"}],"allFlagTypes":[{"name":"String","title":"String","value":"ProgrammingLanguage"}]}