| GET | /api/v1/marketplace/animals |
|---|
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 DashboardAnimal implements IConvertible
{
String? id;
String? description;
String? image;
String? type;
String? price;
String? cityRegionName;
String? priceType;
DashboardAnimal({this.id,this.description,this.image,this.type,this.price,this.cityRegionName,this.priceType});
DashboardAnimal.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() => "DashboardAnimal";
TypeContext? context = _ctx;
}
class GetMarketplaceAnimalsResponse extends BaseResponse implements IConvertible
{
List<DashboardAnimal>? animals;
String? offset;
GetMarketplaceAnimalsResponse({this.animals,this.offset});
GetMarketplaceAnimalsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
animals = JsonConverters.fromJson(json['animals'],'List<DashboardAnimal>',context!);
offset = json['offset'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'animals': JsonConverters.toJson(animals,'List<DashboardAnimal>',context!),
'offset': offset
});
getTypeName() => "GetMarketplaceAnimalsResponse";
TypeContext? context = _ctx;
}
class GetMarketplaceAnimals implements IGet, IConvertible
{
int? countryId;
int? categoryId;
int? regionId;
int? typeId;
int? pageSize;
String? offset;
GetMarketplaceAnimals({this.countryId,this.categoryId,this.regionId,this.typeId,this.pageSize,this.offset});
GetMarketplaceAnimals.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
countryId = json['countryId'];
categoryId = json['categoryId'];
regionId = json['regionId'];
typeId = json['typeId'];
pageSize = json['pageSize'];
offset = json['offset'];
return this;
}
Map<String, dynamic> toJson() => {
'countryId': countryId,
'categoryId': categoryId,
'regionId': regionId,
'typeId': typeId,
'pageSize': pageSize,
'offset': offset
};
getTypeName() => "GetMarketplaceAnimals";
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()),
'DashboardAnimal': TypeInfo(TypeOf.Class, create:() => DashboardAnimal()),
'GetMarketplaceAnimalsResponse': TypeInfo(TypeOf.Class, create:() => GetMarketplaceAnimalsResponse()),
'List<DashboardAnimal>': TypeInfo(TypeOf.Class, create:() => <DashboardAnimal>[]),
'GetMarketplaceAnimals': TypeInfo(TypeOf.Class, create:() => GetMarketplaceAnimals()),
});
Dart GetMarketplaceAnimals DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/v1/marketplace/animals HTTP/1.1 Host: pecuario-backend.develsystems.com Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"animals":[{"id":"String","description":"String","image":"String","type":"String","price":"String","cityRegionName":"String","priceType":"String"}],"offset":"String"}