All Verbs | /overview |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UserInfo:
user_name: Optional[str] = None
avatar_url: Optional[str] = None
stacks_count: int = 0
class TechnologyTier(str, Enum):
PROGRAMMING_LANGUAGE = 'ProgrammingLanguage'
CLIENT = 'Client'
HTTP = 'Http'
SERVER = 'Server'
DATA = 'Data'
SOFTWARE_INFRASTRUCTURE = 'SoftwareInfrastructure'
OPERATING_SYSTEM = 'OperatingSystem'
HARDWARE_INFRASTRUCTURE = 'HardwareInfrastructure'
THIRD_PARTY_SERVICES = 'ThirdPartyServices'
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TechnologyInfo:
tier: Optional[TechnologyTier] = None
slug: Optional[str] = None
name: Optional[str] = None
logo_url: Optional[str] = None
stacks_count: int = 0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TechnologyStackBase:
id: int = 0
name: Optional[str] = None
vendor_name: Optional[str] = None
description: Optional[str] = None
app_url: Optional[str] = None
screenshot_url: Optional[str] = None
created: datetime.datetime = datetime.datetime(1, 1, 1)
created_by: Optional[str] = None
last_modified: datetime.datetime = datetime.datetime(1, 1, 1)
last_modified_by: Optional[str] = None
is_locked: bool = False
owner_id: Optional[str] = None
slug: Optional[str] = None
# @StringLength(2147483647)
details: Optional[str] = None
# @StringLength(2147483647)
details_html: Optional[str] = None
last_status_update: Optional[datetime.datetime] = None
organization_id: Optional[int] = None
comments_post_id: Optional[int] = None
view_count: int = 0
fav_count: int = 0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TechnologyBase:
id: int = 0
name: Optional[str] = None
vendor_name: Optional[str] = None
vendor_url: Optional[str] = None
product_url: Optional[str] = None
logo_url: Optional[str] = None
description: Optional[str] = None
created: datetime.datetime = datetime.datetime(1, 1, 1)
created_by: Optional[str] = None
last_modified: datetime.datetime = datetime.datetime(1, 1, 1)
last_modified_by: Optional[str] = None
owner_id: Optional[str] = None
slug: Optional[str] = None
logo_approved: bool = False
is_locked: bool = False
tier: Optional[TechnologyTier] = None
last_status_update: Optional[datetime.datetime] = None
organization_id: Optional[int] = None
comments_post_id: Optional[int] = None
view_count: int = 0
fav_count: int = 0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TechnologyInStack(TechnologyBase):
technology_id: int = 0
technology_stack_id: int = 0
justification: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TechStackDetails(TechnologyStackBase):
technology_choices: Optional[List[TechnologyInStack]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TechnologyStack(TechnologyStackBase):
pass
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class LabelInfo:
slug: Optional[str] = None
color: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CategoryInfo:
id: int = 0
name: Optional[str] = None
slug: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OrganizationInfo:
id: int = 0
name: Optional[str] = None
slug: Optional[str] = None
ref_id: Optional[int] = None
ref_source: Optional[str] = None
up_votes: Optional[int] = None
down_votes: Optional[int] = None
members_count: int = 0
rank: int = 0
disable_invites: Optional[bool] = None
lang: Optional[str] = None
post_types: Optional[List[str]] = None
moderator_post_types: Optional[List[str]] = None
locked: Optional[datetime.datetime] = None
labels: Optional[List[LabelInfo]] = None
categories: Optional[List[CategoryInfo]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OverviewResponse:
created: datetime.datetime = datetime.datetime(1, 1, 1)
top_users: Optional[List[UserInfo]] = None
top_technologies: Optional[List[TechnologyInfo]] = None
latest_tech_stacks: Optional[List[TechStackDetails]] = None
popular_tech_stacks: Optional[List[TechnologyStack]] = None
all_organizations: Optional[List[OrganizationInfo]] = None
top_technologies_by_tier: Optional[Dict[str, List[TechnologyInfo]]] = None
response_status: Optional[ResponseStatus] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Overview(IGet):
reload: bool = False
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /overview HTTP/1.1
Host: techstacks.io
Accept: application/json
Content-Type: application/json
Content-Length: length
{"reload":false}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"created":"0001-01-01T00:00:00.0000000","topUsers":[{"userName":"String","avatarUrl":"String","stacksCount":0}],"topTechnologies":[{"tier":"ProgrammingLanguage","slug":"String","name":"String","logoUrl":"String","stacksCount":0}],"latestTechStacks":[{"technologyChoices":[{"technologyId":0,"technologyStackId":0,"justification":"String","id":0,"name":"String","vendorName":"String","vendorUrl":"String","productUrl":"String","logoUrl":"String","description":"String","created":"0001-01-01T00:00:00.0000000","createdBy":"String","lastModified":"0001-01-01T00:00:00.0000000","lastModifiedBy":"String","ownerId":"String","slug":"String","logoApproved":false,"isLocked":false,"tier":"ProgrammingLanguage","lastStatusUpdate":"0001-01-01T00:00:00.0000000","organizationId":0,"commentsPostId":0,"viewCount":0,"favCount":0}],"id":0,"name":"String","vendorName":"String","description":"String","appUrl":"String","screenshotUrl":"String","created":"0001-01-01T00:00:00.0000000","createdBy":"String","lastModified":"0001-01-01T00:00:00.0000000","lastModifiedBy":"String","isLocked":false,"ownerId":"String","slug":"String","details":"String","detailsHtml":"String","lastStatusUpdate":"0001-01-01T00:00:00.0000000","organizationId":0,"commentsPostId":0,"viewCount":0,"favCount":0}],"popularTechStacks":[{"id":0,"name":"String","vendorName":"String","description":"String","appUrl":"String","screenshotUrl":"String","created":"0001-01-01T00:00:00.0000000","createdBy":"String","lastModified":"0001-01-01T00:00:00.0000000","lastModifiedBy":"String","isLocked":false,"ownerId":"String","slug":"String","details":"String","detailsHtml":"String","lastStatusUpdate":"0001-01-01T00:00:00.0000000","organizationId":0,"commentsPostId":0,"viewCount":0,"favCount":0}],"allOrganizations":[{"id":0,"name":"String","slug":"String","refId":0,"refSource":"String","upVotes":0,"downVotes":0,"membersCount":0,"rank":0,"disableInvites":false,"lang":"String","postTypes":["String"],"moderatorPostTypes":["String"],"locked":"0001-01-01T00:00:00.0000000","labels":[{"slug":"String","color":"String"}],"categories":[{"id":0,"name":"String","slug":"String"}]}],"topTechnologiesByTier":{"String":[{"tier":"ProgrammingLanguage","slug":"String","name":"String","logoUrl":"String","stacksCount":0}]},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}