[{"name":"Twitch.Helix","comment":" Helpers for sending Http requests to the Twitch Helix (\"new Twitch API\") endpoints.\n\n# Send a Request\n@docs send\n\n# Header Helpers\nUseful if you need to make your own Http call with additional headers.\n@docs twitchHeaders\n\n","unions":[],"aliases":[],"values":[{"name":"send","comment":" Send a basic request to the Twitch Helix (\"new Twitch API\") endpoints. Lightweight wrapper around Http, so you can go back to basics if something else is needed. Auth is a token received from an oauth loop.\n\n    fetchUserByNameUrl : String -> String\n    fetchUserByNameUrl login =\n      \"https://api.twitch.tv/helix/users?login=\" ++ login\n\n    fetchUserByName : String -> String -> Cmd Msg\n    fetchUserByName auth login =\n      Twitch.Helix.send <|\n        { clientId = TwitchId.clientId\n        , auth = auth\n        , decoder = Twitch.Helix.Decode.users\n        , tagger = User\n        , url = (fetchUserByNameUrl login)\n        }\n","type":"{ clientId : String.String, auth : String.String, decoder : Json.Decode.Decoder a, tagger : Result.Result Http.Error a -> msg, url : String.String } -> Platform.Cmd.Cmd msg"},{"name":"twitchHeaders","comment":" Creates the client-id and outh headers.\n\n    Twitch.Helix.twitchHeaders clientId auth\n","type":"String.String -> String.String -> List.List Http.Header"}],"binops":[]},{"name":"Twitch.Helix.Decode","comment":" Decoders for the Helix API.\n\n# Users\n@docs User, users\n\n# Follows\n@docs Follow, follows\n\n# Streams\n@docs Stream, streams\n\n# Games\n@docs Game, games\n\n# Videos\n@docs Video, VideoType, Viewable, videos\n\n# Clips\n@docs Clip, clips\n\n# Bits Leaderboard\n@docs BitsLeader, bitsLeaderboard\n\n# Subscriptions\n@docs Subscription, subscriptions\n\n# OAuth tokens\n@docs Token, token\n\n# Sample data\n@docs sampleToken, sampleUser, sampleStream, sampleGame, sampleFollow, sampleVideo, sampleClip, sampleBitsLeaderboard, sampleSubscription\n","unions":[{"name":"VideoType","comment":" Enumerated type for video_type attribute, does include an escape hatch in case other types are added in the future.\n","args":[],"cases":[["Upload",[]],["Archive",[]],["Highlight",[]],["Other",["String.String"]]]},{"name":"Viewable","comment":" Enumerted type for the viewable status\n","args":[],"cases":[["Public",[]],["Private",[]]]}],"aliases":[{"name":"BitsLeader","comment":" Record for a decoded bits leader.\n","args":[],"type":"{ userId : String.String, userName : String.String, rank : Basics.Int, score : Basics.Int }"},{"name":"Clip","comment":" Record for a decoded clip.\n","args":[],"type":"{ id : String.String, url : String.String, embedUrl : String.String, broadcasterId : String.String, creatorId : String.String, videoId : String.String, gameId : String.String, language : String.String, title : String.String, viewCount : Basics.Int, createdAt : Time.Posix, thumbnailUrl : String.String }"},{"name":"Follow","comment":" Record for a decoded follow\n","args":[],"type":"{ fromId : String.String, fromName : String.String, toId : String.String, toName : String.String, followedAt : Time.Posix }"},{"name":"Game","comment":" Record for decoded Game\n","args":[],"type":"{ id : String.String, name : String.String, boxArtUrl : String.String }"},{"name":"Stream","comment":" Record for decoded Streams data\n","args":[],"type":"{ channelId : String.String, userId : String.String, userName : String.String, gameId : String.String, title : String.String, viewerCount : Basics.Int, startedAt : Time.Posix, language : String.String, thumbnailUrl : String.String, tagIds : List.List String.String }"},{"name":"Subscription","comment":" Record for a decoded subscription.\n","args":[],"type":"{ broadcasterId : String.String, broadcasterName : String.String, isGift : Basics.Bool, tier : String.String, planName : String.String, userId : String.String, userName : String.String }"},{"name":"Token","comment":" Record for decoded OAuth tokens\n","args":[],"type":"{ sub : String.String, iss : String.String, aud : String.String, exp : Basics.Int, iat : Basics.Int }"},{"name":"User","comment":" Record for decoded users.\n","args":[],"type":"{ id : String.String, login : String.String, displayName : String.String, userType : String.String, broadcasterType : String.String, description : String.String, profileImageUrl : String.String, offlineImageUrl : String.String, viewCount : Basics.Int, email : Maybe.Maybe String.String }"},{"name":"Video","comment":" Record for decoded videos. viewable, video_type, and duration are lightly interpreted.\n","args":[],"type":"{ id : String.String, userId : String.String, title : String.String, description : String.String, createdAt : Time.Posix, publishedAt : Time.Posix, url : String.String, thumbnailUrl : String.String, viewable : Twitch.Helix.Decode.Viewable, viewCount : Basics.Int, language : String.String, videoType : Twitch.Helix.Decode.VideoType, duration : Basics.Int }"}],"values":[{"name":"bitsLeaderboard","comment":" Json Decoder for bits leaderboard.\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.BitsLeader)"},{"name":"clips","comment":" Json Decoder for clips.\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.Clip)"},{"name":"follows","comment":" Json Decoder for follows\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.Follow)"},{"name":"games","comment":" Json Decoder for games\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.Game)"},{"name":"sampleBitsLeaderboard","comment":" Sample data for bits leaderboard.\n","type":"String.String"},{"name":"sampleClip","comment":" Sample data for a clip.\n","type":"String.String"},{"name":"sampleFollow","comment":" Sample data for follows\n","type":"String.String"},{"name":"sampleGame","comment":" Sample data for games\n","type":"String.String"},{"name":"sampleStream","comment":" Sample data for streams\n","type":"String.String"},{"name":"sampleSubscription","comment":" Sample data for subscriptions\n","type":"String.String"},{"name":"sampleToken","comment":" Sample OAuth token.\n","type":"String.String"},{"name":"sampleUser","comment":" Sample data for a user\n","type":"String.String"},{"name":"sampleVideo","comment":" Sample data for a video\n","type":"String.String"},{"name":"streams","comment":" Json Decoder from streams\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.Stream)"},{"name":"subscriptions","comment":" Json Decoder for subscriptions\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.Subscription)"},{"name":"token","comment":" Json Decoder for OAuth tokens.\n\n    userId = token\n      |> Maybe.andThen (Result.toMaybe << Jwt.decodeToken Twitch.Helix.Decode.token)\n      |> Maybe.map .sub\n","type":"Json.Decode.Decoder Twitch.Helix.Decode.Token"},{"name":"users","comment":" Json Decoder for users\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.User)"},{"name":"videos","comment":" Json Decoder for videos\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.Video)"}],"binops":[]},{"name":"Twitch.Id.Decode","comment":" Decoders for the ID (oauth) API\n\n# App OAuth (OAuth Client Credentials Flow)\n@docs AppOAuth, appOAuth\n\n# Sample data\n@docs sampleAppOAuth\n\n","unions":[],"aliases":[{"name":"AppOAuth","comment":" Record for App OAuth access tokens\n","args":[],"type":"{ accessToken : String.String, expiresIn : Basics.Int, scope : List.List String.String, tokenType : String.String }"}],"values":[{"name":"appOAuth","comment":" Decoder for App OAuth access token\n","type":"Json.Decode.Decoder Twitch.Id.Decode.AppOAuth"},{"name":"sampleAppOAuth","comment":" Sample data for App OAuth access token\n","type":"String.String"}],"binops":[]},{"name":"Twitch.Template","comment":" Helpers for filling in image and url templates received from API responses.\n\n@docs imageTemplateUrl, imagePercentTemplateUrl\n","unions":[],"aliases":[],"values":[{"name":"imagePercentTemplateUrl","comment":" Fills in templates with %{width} and %{height}.\n\n    Twitch.Template.imagePercentTemplateUrl 320 180 video.thumbnailUrl\n","type":"Basics.Int -> Basics.Int -> String.String -> String.String"},{"name":"imageTemplateUrl","comment":" Fills in templates with {width} and {height}.\n\n    Twitch.Template.imageTemplateUrl 168 95 stream.thumbnailUrl\n","type":"Basics.Int -> Basics.Int -> String.String -> String.String"}],"binops":[]},{"name":"Twitch.Tmi.Decode","comment":" Decoders for the TMI API at `tmi.twitch.tv/hosts` Note that this is an unofficial API, requests should be made with Http.send rather than Twitch.Helix.send. Furthermore, TMI does not provide cross-origin headers, so a cross-origin proxy may be required.\n\n# For target=id, does not include target login/display name\n\n@docs HostingTarget, hostingTarget, sampleHost\n\n# Full decode with target login/display name\n\n@docs Host, hosts\n\n","unions":[],"aliases":[{"name":"Host","comment":" Record for decoded host data with target name\n","args":[],"type":"{ hostId : String.String, targetId : String.String, hostLogin : String.String, targetLogin : String.String, hostDisplayName : String.String, targetDisplayName : String.String }"},{"name":"HostingTarget","comment":" Record for decoded host data without target name (target=id)\n","args":[],"type":"{ hostId : String.String, targetId : String.String, hostLogin : String.String, hostDisplayName : String.String }"}],"values":[{"name":"hostingTarget","comment":" Json decoder for hosts without target name (target=id)\n","type":"Json.Decode.Decoder (List.List Twitch.Tmi.Decode.HostingTarget)"},{"name":"hosts","comment":" Json decoder for hosts with target name\n","type":"Json.Decode.Decoder (List.List Twitch.Tmi.Decode.Host)"},{"name":"sampleHost","comment":" sample data for bootstrapping and testing\n","type":"String.String"}],"binops":[]}]