All Verbs | /userinfo/{Id} |
---|
import 'package:servicestack/servicestack.dart';
abstract class TechnologyStackBase
{
int? id;
String? name;
String? vendorName;
String? description;
String? appUrl;
String? screenshotUrl;
DateTime? created;
String? createdBy;
DateTime? lastModified;
String? lastModifiedBy;
bool? isLocked;
String? ownerId;
String? slug;
// @StringLength(2147483647)
String? details;
// @StringLength(2147483647)
String? detailsHtml;
DateTime? lastStatusUpdate;
int? organizationId;
int? commentsPostId;
int? viewCount;
int? favCount;
TechnologyStackBase({this.id,this.name,this.vendorName,this.description,this.appUrl,this.screenshotUrl,this.created,this.createdBy,this.lastModified,this.lastModifiedBy,this.isLocked,this.ownerId,this.slug,this.details,this.detailsHtml,this.lastStatusUpdate,this.organizationId,this.commentsPostId,this.viewCount,this.favCount});
TechnologyStackBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
vendorName = json['vendorName'];
description = json['description'];
appUrl = json['appUrl'];
screenshotUrl = json['screenshotUrl'];
created = JsonConverters.fromJson(json['created'],'DateTime',context!);
createdBy = json['createdBy'];
lastModified = JsonConverters.fromJson(json['lastModified'],'DateTime',context!);
lastModifiedBy = json['lastModifiedBy'];
isLocked = json['isLocked'];
ownerId = json['ownerId'];
slug = json['slug'];
details = json['details'];
detailsHtml = json['detailsHtml'];
lastStatusUpdate = JsonConverters.fromJson(json['lastStatusUpdate'],'DateTime',context!);
organizationId = json['organizationId'];
commentsPostId = json['commentsPostId'];
viewCount = json['viewCount'];
favCount = json['favCount'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'vendorName': vendorName,
'description': description,
'appUrl': appUrl,
'screenshotUrl': screenshotUrl,
'created': JsonConverters.toJson(created,'DateTime',context!),
'createdBy': createdBy,
'lastModified': JsonConverters.toJson(lastModified,'DateTime',context!),
'lastModifiedBy': lastModifiedBy,
'isLocked': isLocked,
'ownerId': ownerId,
'slug': slug,
'details': details,
'detailsHtml': detailsHtml,
'lastStatusUpdate': JsonConverters.toJson(lastStatusUpdate,'DateTime',context!),
'organizationId': organizationId,
'commentsPostId': commentsPostId,
'viewCount': viewCount,
'favCount': favCount
};
getTypeName() => "TechnologyStackBase";
TypeContext? context = _ctx;
}
class TechnologyStack extends TechnologyStackBase implements IConvertible
{
TechnologyStack();
TechnologyStack.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "TechnologyStack";
TypeContext? context = _ctx;
}
enum TechnologyTier
{
ProgrammingLanguage,
Client,
Http,
Server,
Data,
SoftwareInfrastructure,
OperatingSystem,
HardwareInfrastructure,
ThirdPartyServices,
}
abstract class TechnologyBase
{
int? id;
String? name;
String? vendorName;
String? vendorUrl;
String? productUrl;
String? logoUrl;
String? description;
DateTime? created;
String? createdBy;
DateTime? lastModified;
String? lastModifiedBy;
String? ownerId;
String? slug;
bool? logoApproved;
bool? isLocked;
TechnologyTier? tier;
DateTime? lastStatusUpdate;
int? organizationId;
int? commentsPostId;
int? viewCount;
int? favCount;
TechnologyBase({this.id,this.name,this.vendorName,this.vendorUrl,this.productUrl,this.logoUrl,this.description,this.created,this.createdBy,this.lastModified,this.lastModifiedBy,this.ownerId,this.slug,this.logoApproved,this.isLocked,this.tier,this.lastStatusUpdate,this.organizationId,this.commentsPostId,this.viewCount,this.favCount});
TechnologyBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
vendorName = json['vendorName'];
vendorUrl = json['vendorUrl'];
productUrl = json['productUrl'];
logoUrl = json['logoUrl'];
description = json['description'];
created = JsonConverters.fromJson(json['created'],'DateTime',context!);
createdBy = json['createdBy'];
lastModified = JsonConverters.fromJson(json['lastModified'],'DateTime',context!);
lastModifiedBy = json['lastModifiedBy'];
ownerId = json['ownerId'];
slug = json['slug'];
logoApproved = json['logoApproved'];
isLocked = json['isLocked'];
tier = JsonConverters.fromJson(json['tier'],'TechnologyTier',context!);
lastStatusUpdate = JsonConverters.fromJson(json['lastStatusUpdate'],'DateTime',context!);
organizationId = json['organizationId'];
commentsPostId = json['commentsPostId'];
viewCount = json['viewCount'];
favCount = json['favCount'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'vendorName': vendorName,
'vendorUrl': vendorUrl,
'productUrl': productUrl,
'logoUrl': logoUrl,
'description': description,
'created': JsonConverters.toJson(created,'DateTime',context!),
'createdBy': createdBy,
'lastModified': JsonConverters.toJson(lastModified,'DateTime',context!),
'lastModifiedBy': lastModifiedBy,
'ownerId': ownerId,
'slug': slug,
'logoApproved': logoApproved,
'isLocked': isLocked,
'tier': JsonConverters.toJson(tier,'TechnologyTier',context!),
'lastStatusUpdate': JsonConverters.toJson(lastStatusUpdate,'DateTime',context!),
'organizationId': organizationId,
'commentsPostId': commentsPostId,
'viewCount': viewCount,
'favCount': favCount
};
getTypeName() => "TechnologyBase";
TypeContext? context = _ctx;
}
class Technology extends TechnologyBase implements IConvertible
{
Technology();
Technology.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "Technology";
TypeContext? context = _ctx;
}
class UserActivity implements IConvertible
{
int? id;
String? userName;
int? karma;
int? technologyCount;
int? techStacksCount;
int? postsCount;
int? postUpVotes;
int? postDownVotes;
int? commentUpVotes;
int? commentDownVotes;
int? postCommentsCount;
int? pinnedCommentCount;
int? postReportCount;
int? postCommentReportCount;
DateTime? created;
DateTime? modified;
UserActivity({this.id,this.userName,this.karma,this.technologyCount,this.techStacksCount,this.postsCount,this.postUpVotes,this.postDownVotes,this.commentUpVotes,this.commentDownVotes,this.postCommentsCount,this.pinnedCommentCount,this.postReportCount,this.postCommentReportCount,this.created,this.modified});
UserActivity.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
userName = json['userName'];
karma = json['karma'];
technologyCount = json['technologyCount'];
techStacksCount = json['techStacksCount'];
postsCount = json['postsCount'];
postUpVotes = json['postUpVotes'];
postDownVotes = json['postDownVotes'];
commentUpVotes = json['commentUpVotes'];
commentDownVotes = json['commentDownVotes'];
postCommentsCount = json['postCommentsCount'];
pinnedCommentCount = json['pinnedCommentCount'];
postReportCount = json['postReportCount'];
postCommentReportCount = json['postCommentReportCount'];
created = JsonConverters.fromJson(json['created'],'DateTime',context!);
modified = JsonConverters.fromJson(json['modified'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'userName': userName,
'karma': karma,
'technologyCount': technologyCount,
'techStacksCount': techStacksCount,
'postsCount': postsCount,
'postUpVotes': postUpVotes,
'postDownVotes': postDownVotes,
'commentUpVotes': commentUpVotes,
'commentDownVotes': commentDownVotes,
'postCommentsCount': postCommentsCount,
'pinnedCommentCount': pinnedCommentCount,
'postReportCount': postReportCount,
'postCommentReportCount': postCommentReportCount,
'created': JsonConverters.toJson(created,'DateTime',context!),
'modified': JsonConverters.toJson(modified,'DateTime',context!)
};
getTypeName() => "UserActivity";
TypeContext? context = _ctx;
}
class GetUserInfoResponse implements IConvertible
{
int? id;
String? userName;
DateTime? created;
String? avatarUrl;
List<TechnologyStack>? techStacks;
List<TechnologyStack>? favoriteTechStacks;
List<Technology>? favoriteTechnologies;
UserActivity? userActivity;
ResponseStatus? responseStatus;
GetUserInfoResponse({this.id,this.userName,this.created,this.avatarUrl,this.techStacks,this.favoriteTechStacks,this.favoriteTechnologies,this.userActivity,this.responseStatus});
GetUserInfoResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
userName = json['userName'];
created = JsonConverters.fromJson(json['created'],'DateTime',context!);
avatarUrl = json['avatarUrl'];
techStacks = JsonConverters.fromJson(json['techStacks'],'List<TechnologyStack>',context!);
favoriteTechStacks = JsonConverters.fromJson(json['favoriteTechStacks'],'List<TechnologyStack>',context!);
favoriteTechnologies = JsonConverters.fromJson(json['favoriteTechnologies'],'List<Technology>',context!);
userActivity = JsonConverters.fromJson(json['userActivity'],'UserActivity',context!);
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'userName': userName,
'created': JsonConverters.toJson(created,'DateTime',context!),
'avatarUrl': avatarUrl,
'techStacks': JsonConverters.toJson(techStacks,'List<TechnologyStack>',context!),
'favoriteTechStacks': JsonConverters.toJson(favoriteTechStacks,'List<TechnologyStack>',context!),
'favoriteTechnologies': JsonConverters.toJson(favoriteTechnologies,'List<Technology>',context!),
'userActivity': JsonConverters.toJson(userActivity,'UserActivity',context!),
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "GetUserInfoResponse";
TypeContext? context = _ctx;
}
class GetUserInfo implements IGet, IConvertible
{
int? id;
String? userName;
GetUserInfo({this.id,this.userName});
GetUserInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
userName = json['userName'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'userName': userName
};
getTypeName() => "GetUserInfo";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'techstacks.io', types: <String, TypeInfo> {
'TechnologyStackBase': TypeInfo(TypeOf.AbstractClass),
'TechnologyStack': TypeInfo(TypeOf.Class, create:() => TechnologyStack()),
'TechnologyTier': TypeInfo(TypeOf.Enum, enumValues:TechnologyTier.values),
'TechnologyBase': TypeInfo(TypeOf.AbstractClass),
'Technology': TypeInfo(TypeOf.Class, create:() => Technology()),
'UserActivity': TypeInfo(TypeOf.Class, create:() => UserActivity()),
'GetUserInfoResponse': TypeInfo(TypeOf.Class, create:() => GetUserInfoResponse()),
'List<TechnologyStack>': TypeInfo(TypeOf.Class, create:() => <TechnologyStack>[]),
'List<Technology>': TypeInfo(TypeOf.Class, create:() => <Technology>[]),
'GetUserInfo': TypeInfo(TypeOf.Class, create:() => GetUserInfo()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /userinfo/{Id} HTTP/1.1
Host: techstacks.io
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: 0,
userName: String
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { id: 0, userName: String, created: 0001-01-01, avatarUrl: String, techStacks: [ { id: 0, name: String, vendorName: String, description: String, appUrl: String, screenshotUrl: String, created: 0001-01-01, createdBy: String, lastModified: 0001-01-01, lastModifiedBy: String, isLocked: False, ownerId: String, slug: String, details: String, detailsHtml: String, lastStatusUpdate: 0001-01-01, organizationId: 0, commentsPostId: 0, viewCount: 0, favCount: 0 } ], favoriteTechStacks: [ { id: 0, name: String, vendorName: String, description: String, appUrl: String, screenshotUrl: String, created: 0001-01-01, createdBy: String, lastModified: 0001-01-01, lastModifiedBy: String, isLocked: False, ownerId: String, slug: String, details: String, detailsHtml: String, lastStatusUpdate: 0001-01-01, organizationId: 0, commentsPostId: 0, viewCount: 0, favCount: 0 } ], favoriteTechnologies: [ { id: 0, name: String, vendorName: String, vendorUrl: String, productUrl: String, logoUrl: String, description: String, created: 0001-01-01, createdBy: String, lastModified: 0001-01-01, lastModifiedBy: String, ownerId: String, slug: String, logoApproved: False, isLocked: False, tier: ProgrammingLanguage, lastStatusUpdate: 0001-01-01, organizationId: 0, commentsPostId: 0, viewCount: 0, favCount: 0 } ], userActivity: { id: 0, userName: String, karma: 0, technologyCount: 0, techStacksCount: 0, postsCount: 0, postUpVotes: 0, postDownVotes: 0, commentUpVotes: 0, commentDownVotes: 0, postCommentsCount: 0, pinnedCommentCount: 0, postReportCount: 0, postCommentReportCount: 0, created: 0001-01-01, modified: 0001-01-01 }, responseStatus: { errorCode: String, message: String, stackTrace: String, errors: [ { errorCode: String, fieldName: String, message: String, meta: { String: String } } ], meta: { String: String } } }