module Mastodon.Model exposing ( AccessTokenResult , AppRegistration , Account , AccountMoved , AccountNotificationDate , Application , Attachment , Client , Context , Emoji , Error(..) , Field , HashtagHistory , Hashtag , Mention , Notification , NotificationAggregate , Reblog(..) , Relationship , Tag , PollId(..) , PollOption , Poll , SearchResults , Source , Status , StatusId(..) , StatusRequestBody ) type alias AccountId = String type alias AuthCode = String type alias ClientId = String type alias ClientSecret = String type alias Server = String type StatusId = StatusId String type alias StatusCode = Int type alias StatusMsg = String type alias Token = String type Error = MastodonError StatusCode StatusMsg String | ServerError StatusCode StatusMsg String | TimeoutError | NetworkError type alias AccessTokenResult = { server : Server , accessToken : Token } type alias AppRegistration = { server : Server , scope : String , client_id : ClientId , client_secret : ClientSecret , id : String , redirect_uri : String } type alias Emoji = { shortcode : String , url : String , static_url : String , visible_in_picker : Bool } type alias Field = { name : String , value : String , verified_at : String } type alias Account = { acct : String , avatar : String , avatar_static : String , created_at : String , last_status_at : String , display_name : String , followers_count : Int , following_count : Int , header : String , header_static : String , id : AccountId , locked : Bool , bot : Bool , note : String , statuses_count : Int , url : String , username : String , source : Source , emojis : List Emoji , fields : List Field , moved : AccountMoved } type alias AccountMoved = -- Minimal account to avoid recursive type alias { acct : String , avatar : String , display_name : String , header : String , id : AccountId , locked : Bool , bot : Bool , username : String , url : String , note : String } type alias Application = { name : String , website : Maybe String } type alias Attachment = -- type_: -- "image", "video", "gifv" { id : String , type_ : String , url : String , remote_url : String , preview_url : String , text_url : Maybe String } type alias Client = { server : Server , token : Token , account : Maybe Account } type alias Context = { ancestors : List Status , descendants : List Status } type alias Mention = { id : AccountId , url : String , username : String , acct : String } type alias Notification = {- - id: The notification ID - type_: One of: "mention", "reblog", "favourite", "follow", "follow_request", "poll", "status" - created_at: The time the notification was created - account: The Account sending the notification to the user - status: The Status associated with the notification, if applicable -} { id : String , type_ : String , created_at : String , account : Account , status : Maybe Status } type alias AccountNotificationDate = { account : Account , created_at : String } type alias NotificationAggregate = { id : String , type_ : String , status : Maybe Status , accounts : List AccountNotificationDate , created_at : String } type Reblog = Reblog Status type alias Relationship = { id : String , blocking : Bool , followed_by : Bool , following : Bool , muting : Bool , requested : Bool } type alias HashtagHistory = { day : String , uses : String , accounts : String } type alias Hashtag = { name : String , url : String , history : List HashtagHistory } type PollId = PollId String type alias PollOption = { title : String , votes_count : Int } type alias Poll = { id : PollId , expired : Bool , voted : Bool , votes_count : Int , options : List PollOption } type alias SearchResults = { accounts : List Account , statuses : List Status , hashtags : List Hashtag } type alias Source = { privacy : String , sensitive : Bool , language : String , note : String , fields : List Field , follow_requests_count : Int } type alias Status = { account : Account , application : Maybe Application , content : String , created_at : String , favourited : Maybe Bool , favourites_count : Int , id : StatusId , in_reply_to_account_id : Maybe String , in_reply_to_id : Maybe StatusId , media_attachments : List Attachment , mentions : List Mention , reblog : Maybe Reblog , reblogged : Maybe Bool , reblogs_count : Int , sensitive : Maybe Bool , spoiler_text : String , tags : List Tag , uri : String , url : Maybe String , visibility : String , poll : Poll , pinned : Bool -- Not a real value, used to show pinned indicator } type alias StatusRequestBody = -- status: The text of the status -- in_reply_to_id: local ID of the status you want to reply to -- sensitive: set this to mark the media of the status as NSFW -- spoiler_text: text to be shown as a warning before the actual content -- visibility: either "direct", "private", "unlisted" or "public" { status : String , in_reply_to_id : Maybe StatusId , spoiler_text : Maybe String , sensitive : Bool , visibility : String , media_ids : List String } type alias Tag = { name : String , url : String }