add user interface definition from dale

This commit is contained in:
Morgan McMillian 2018-11-20 14:38:01 -08:00
parent c224b081fa
commit da9a3a801a
4 changed files with 56 additions and 0 deletions

33
src/models/IUser.ts Normal file
View file

@ -0,0 +1,33 @@
import { IUserContent } from './user/IUserContent';
export interface IUser {
badge?: {
id: string,
name: string;
};
content: IUserContent;
counts: {
bookmarks: number,
clients: number,
followers: number,
following: number,
posts: number,
users: number;
};
created_at: string;
follows_you: boolean;
id: string;
locale: string;
name: string;
timezone: string;
type: string;
username: string;
you_blocked: boolean;
you_can_follow: boolean;
you_follow: boolean;
you_muted: boolean;
verified: {
domain: string,
link: string;
};
}

View file

@ -0,0 +1,6 @@
export interface IUserAvatarImage {
is_default: boolean;
height: number;
link: string;
width: number;
}

View file

@ -0,0 +1,11 @@
import { IUserAvatarImage } from './IUserAvatarImage';
import { IUserCoverImage } from './IUserCoverImage';
export interface IUserContent {
avatar_image: IUserAvatarImage;
cover_image: IUserCoverImage;
entities?: {};
html: string;
markdown_text: string;
text: string;
}

View file

@ -0,0 +1,6 @@
export interface IUserCoverImage {
link: string;
is_default: boolean;
width: number;
heigth: number;
}