sfgboxapi

<back to all web services

VarietiesLookup

The following routes are available for this service:
GET/varieties
import 'package:servicestack/servicestack.dart';

// @DataContract
class VarietiesLookup implements IConvertible
{
    // @DataMember(Order=2)
    int? tenantsId;

    // @DataMember(Order=3)
    int? zonesId;

    // @DataMember(Order=4)
    int? cropsId;

    // @DataMember(Order=5)
    String? name;

    // @DataMember(Order=6)
    String? about;

    // @DataMember(Order=7)
    int? heightsCm;

    // @DataMember(Order=8)
    bool? needSupport;

    // @DataMember(Order=9)
    bool? needStakes;

    // @DataMember(Order=10)
    bool? needTrellis;

    VarietiesLookup({this.tenantsId,this.zonesId,this.cropsId,this.name,this.about,this.heightsCm,this.needSupport,this.needStakes,this.needTrellis});
    VarietiesLookup.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        tenantsId = json['tenantsId'];
        zonesId = json['zonesId'];
        cropsId = json['cropsId'];
        name = json['name'];
        about = json['about'];
        heightsCm = json['heightsCm'];
        needSupport = json['needSupport'];
        needStakes = json['needStakes'];
        needTrellis = json['needTrellis'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'tenantsId': tenantsId,
        'zonesId': zonesId,
        'cropsId': cropsId,
        'name': name,
        'about': about,
        'heightsCm': heightsCm,
        'needSupport': needSupport,
        'needStakes': needStakes,
        'needTrellis': needTrellis
    };

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

TypeContext _ctx = TypeContext(library: 'api.sfgtec.com', types: <String, TypeInfo> {
    'VarietiesLookup': TypeInfo(TypeOf.Class, create:() => VarietiesLookup()),
});

Dart VarietiesLookup DTOs

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

HTTP + CSV

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

GET /varieties HTTP/1.1 
Host: api.sfgtec.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{Unable to show example output for type 'IEnumerable`1' using the custom 'csv' filter}Cannot dynamically create an instance of type 'System.Collections.Generic.IEnumerable`1[sfgboxapi.ServiceModel.VarietiesLookupResponse]'. Reason: Cannot create an instance of an interface.