All Verbs | /userinfo/{Id} |
---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using TechStacks.ServiceModel;
using TechStacks.ServiceModel.Types;
namespace TechStacks.ServiceModel
{
public partial class GetUserInfo
: IGet
{
public virtual int Id { get; set; }
public virtual string UserName { get; set; }
}
public partial class GetUserInfoResponse
{
public virtual int Id { get; set; }
public virtual string UserName { get; set; }
public virtual DateTime Created { get; set; }
public virtual string AvatarUrl { get; set; }
public virtual List<TechnologyStack> TechStacks { get; set; }
public virtual List<TechnologyStack> FavoriteTechStacks { get; set; }
public virtual List<Technology> FavoriteTechnologies { get; set; }
public virtual UserActivity UserActivity { get; set; }
public virtual ResponseStatus ResponseStatus { get; set; }
}
}
namespace TechStacks.ServiceModel.Types
{
public partial class Technology
: TechnologyBase
{
}
public partial class TechnologyBase
{
public virtual long Id { get; set; }
public virtual string Name { get; set; }
public virtual string VendorName { get; set; }
public virtual string VendorUrl { get; set; }
public virtual string ProductUrl { get; set; }
public virtual string LogoUrl { get; set; }
public virtual string Description { get; set; }
public virtual DateTime Created { get; set; }
public virtual string CreatedBy { get; set; }
public virtual DateTime LastModified { get; set; }
public virtual string LastModifiedBy { get; set; }
public virtual string OwnerId { get; set; }
public virtual string Slug { get; set; }
public virtual bool LogoApproved { get; set; }
public virtual bool IsLocked { get; set; }
public virtual TechnologyTier Tier { get; set; }
public virtual DateTime? LastStatusUpdate { get; set; }
public virtual int? OrganizationId { get; set; }
public virtual long? CommentsPostId { get; set; }
public virtual int ViewCount { get; set; }
public virtual int FavCount { get; set; }
}
public partial class TechnologyStack
: TechnologyStackBase
{
}
public partial class TechnologyStackBase
{
public virtual long Id { get; set; }
public virtual string Name { get; set; }
public virtual string VendorName { get; set; }
public virtual string Description { get; set; }
public virtual string AppUrl { get; set; }
public virtual string ScreenshotUrl { get; set; }
public virtual DateTime Created { get; set; }
public virtual string CreatedBy { get; set; }
public virtual DateTime LastModified { get; set; }
public virtual string LastModifiedBy { get; set; }
public virtual bool IsLocked { get; set; }
public virtual string OwnerId { get; set; }
public virtual string Slug { get; set; }
[StringLength(int.MaxValue)]
public virtual string Details { get; set; }
[StringLength(int.MaxValue)]
public virtual string DetailsHtml { get; set; }
public virtual DateTime? LastStatusUpdate { get; set; }
public virtual int? OrganizationId { get; set; }
public virtual long? CommentsPostId { get; set; }
public virtual int ViewCount { get; set; }
public virtual int FavCount { get; set; }
}
public enum TechnologyTier
{
ProgrammingLanguage,
Client,
Http,
Server,
Data,
SoftwareInfrastructure,
OperatingSystem,
HardwareInfrastructure,
ThirdPartyServices,
}
public partial class UserActivity
{
public virtual int Id { get; set; }
public virtual string UserName { get; set; }
public virtual int Karma { get; set; }
public virtual int TechnologyCount { get; set; }
public virtual int TechStacksCount { get; set; }
public virtual int PostsCount { get; set; }
public virtual int PostUpVotes { get; set; }
public virtual int PostDownVotes { get; set; }
public virtual int CommentUpVotes { get; set; }
public virtual int CommentDownVotes { get; set; }
public virtual int PostCommentsCount { get; set; }
public virtual int PinnedCommentCount { get; set; }
public virtual int PostReportCount { get; set; }
public virtual int PostCommentReportCount { get; set; }
public virtual DateTime Created { get; set; }
public virtual DateTime Modified { get; set; }
}
}
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 } } }