| GET | /articles/types | Query article types | Query article types |
|---|
import 'package:servicestack/servicestack.dart';
class ArticleTypesQueryResponse implements IConvertible
{
/**
* The article type id
*/
// @ApiMember(Description="The article type id")
int? Id;
/**
* The article type name
*/
// @ApiMember(Description="The article type name")
String? Name;
/**
* The article type description
*/
// @ApiMember(Description="The article type description")
String? Description;
ArticleTypesQueryResponse({this.Id,this.Name,this.Description});
ArticleTypesQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Description = json['Description'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Description': Description
};
getTypeName() => "ArticleTypesQueryResponse";
TypeContext? context = _ctx;
}
// @ValidateRequest(Validator="IsAuthenticated")
class ArticleTypeQuery implements ICompany, IConvertible
{
/**
* The company id, if empty will use the company id for the user you are logged in with.
*/
// @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
String? CompanyId;
ArticleTypeQuery({this.CompanyId});
ArticleTypeQuery.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId
};
getTypeName() => "ArticleTypeQuery";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
'ArticleTypesQueryResponse': TypeInfo(TypeOf.Class, create:() => ArticleTypesQueryResponse()),
'ArticleTypeQuery': TypeInfo(TypeOf.Class, create:() => ArticleTypeQuery()),
});
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 /articles/types HTTP/1.1 Host: api.bokamera.se Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Id":0,"Name":"String","Description":"String"}