| GET | /api/v1/marketplace/lands |
|---|
import 'package:servicestack/servicestack.dart';
class Status implements IConvertible
{
String? message;
int? statusCode;
Status({this.message,this.statusCode});
Status.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
message = json['message'];
statusCode = json['statusCode'];
return this;
}
Map<String, dynamic> toJson() => {
'message': message,
'statusCode': statusCode
};
getTypeName() => "Status";
TypeContext? context = _ctx;
}
class BaseResponse implements IConvertible
{
Status? status;
BaseResponse({this.status});
BaseResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
status = JsonConverters.fromJson(json['status'],'Status',context!);
return this;
}
Map<String, dynamic> toJson() => {
'status': JsonConverters.toJson(status,'Status',context!)
};
getTypeName() => "BaseResponse";
TypeContext? context = _ctx;
}
class DashboardLand implements IConvertible
{
String? id;
String? description;
String? image;
String? type;
String? price;
String? cityRegionName;
String? priceType;
DashboardLand({this.id,this.description,this.image,this.type,this.price,this.cityRegionName,this.priceType});
DashboardLand.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
description = json['description'];
image = json['image'];
type = json['type'];
price = json['price'];
cityRegionName = json['cityRegionName'];
priceType = json['priceType'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'description': description,
'image': image,
'type': type,
'price': price,
'cityRegionName': cityRegionName,
'priceType': priceType
};
getTypeName() => "DashboardLand";
TypeContext? context = _ctx;
}
class GetMarketplaceLandsResponse extends BaseResponse implements IConvertible
{
List<DashboardLand>? lands;
String? offset;
GetMarketplaceLandsResponse({this.lands,this.offset});
GetMarketplaceLandsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
lands = JsonConverters.fromJson(json['lands'],'List<DashboardLand>',context!);
offset = json['offset'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'lands': JsonConverters.toJson(lands,'List<DashboardLand>',context!),
'offset': offset
});
getTypeName() => "GetMarketplaceLandsResponse";
TypeContext? context = _ctx;
}
class GetMarketplaceLands implements IGet, IConvertible
{
int? countryId;
int? regionId;
int? pageSize;
String? offset;
GetMarketplaceLands({this.countryId,this.regionId,this.pageSize,this.offset});
GetMarketplaceLands.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
countryId = json['countryId'];
regionId = json['regionId'];
pageSize = json['pageSize'];
offset = json['offset'];
return this;
}
Map<String, dynamic> toJson() => {
'countryId': countryId,
'regionId': regionId,
'pageSize': pageSize,
'offset': offset
};
getTypeName() => "GetMarketplaceLands";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'pecuario_backend.develsystems.com', types: <String, TypeInfo> {
'Status': TypeInfo(TypeOf.Class, create:() => Status()),
'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()),
'DashboardLand': TypeInfo(TypeOf.Class, create:() => DashboardLand()),
'GetMarketplaceLandsResponse': TypeInfo(TypeOf.Class, create:() => GetMarketplaceLandsResponse()),
'List<DashboardLand>': TypeInfo(TypeOf.Class, create:() => <DashboardLand>[]),
'GetMarketplaceLands': TypeInfo(TypeOf.Class, create:() => GetMarketplaceLands()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/v1/marketplace/lands HTTP/1.1 Host: pecuario-backend.develsystems.com Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"lands":[{"id":"String","description":"String","image":"String","type":"String","price":"String","cityRegionName":"String","priceType":"String"}],"offset":"String"}