Field Squared API Services

<back to all web services

WeatherRequest

The following routes are available for this service:
GET/{Workspace}/Weather/{Lat}/{Lon}
import 'package:servicestack/servicestack.dart';

class WeatherRequest implements IConvertible
{
    String? Workspace;
    String? Lat;
    String? Lon;

    WeatherRequest({this.Workspace,this.Lat,this.Lon});
    WeatherRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Workspace = json['Workspace'];
        Lat = json['Lat'];
        Lon = json['Lon'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Workspace': Workspace,
        'Lat': Lat,
        'Lon': Lon
    };

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

TypeContext _ctx = TypeContext(library: 'dev.fieldsquared.com', types: <String, TypeInfo> {
    'WeatherRequest': TypeInfo(TypeOf.Class, create:() => WeatherRequest()),
});

Dart WeatherRequest 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 /{Workspace}/Weather/{Lat}/{Lon} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv