From da9a3a801afea762d854e8d8bcf0193c0cec1a3b Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Tue, 20 Nov 2018 14:38:01 -0800 Subject: [PATCH] add user interface definition from dale --- src/models/IUser.ts | 33 +++++++++++++++++++++++++++++ src/models/user/IUserAvatarImage.ts | 6 ++++++ src/models/user/IUserContent.ts | 11 ++++++++++ src/models/user/IUserCoverImage.ts | 6 ++++++ 4 files changed, 56 insertions(+) create mode 100644 src/models/IUser.ts create mode 100644 src/models/user/IUserAvatarImage.ts create mode 100644 src/models/user/IUserContent.ts create mode 100644 src/models/user/IUserCoverImage.ts diff --git a/src/models/IUser.ts b/src/models/IUser.ts new file mode 100644 index 0000000..3d3736d --- /dev/null +++ b/src/models/IUser.ts @@ -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; + }; +} diff --git a/src/models/user/IUserAvatarImage.ts b/src/models/user/IUserAvatarImage.ts new file mode 100644 index 0000000..47e1df1 --- /dev/null +++ b/src/models/user/IUserAvatarImage.ts @@ -0,0 +1,6 @@ +export interface IUserAvatarImage { + is_default: boolean; + height: number; + link: string; + width: number; +} diff --git a/src/models/user/IUserContent.ts b/src/models/user/IUserContent.ts new file mode 100644 index 0000000..20e2339 --- /dev/null +++ b/src/models/user/IUserContent.ts @@ -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; +} diff --git a/src/models/user/IUserCoverImage.ts b/src/models/user/IUserCoverImage.ts new file mode 100644 index 0000000..2068425 --- /dev/null +++ b/src/models/user/IUserCoverImage.ts @@ -0,0 +1,6 @@ +export interface IUserCoverImage { + link: string; + is_default: boolean; + width: number; + heigth: number; +}