[{"name":"Twitch.ClipsV2.Decode","comment":" Decoders for the Clips API at `clips.twitch.tv/api/v2/clips/` Note that this is an unofficial API, requests should be made with Http.send rather than Twitch.Helix.send.\r\n\r\n@docs Clip, clip, sampleClip\r\n","unions":[],"aliases":[{"name":"Clip","comment":" Record for decoded clip data.\r\n","args":[],"type":"{ broadcasterChannelUrl : String.String, broadcasterDisplayName : String.String, broadcasterId : String.String, broadcasterLogin : String.String, broadcasterLogo : String.String, broadcastId : String.String, curatorChannelUrl : String.String, curatorDisplayName : String.String, curatorId : String.String, curatorLogin : String.String, curatorLogo : String.String, previewImage : String.String, thumbnails : Dict.Dict String.String String.String, communities : List.List String.String, createdAt : Time.Posix, title : String.String, language : String.String, infoUrl : String.String, statusUrl : String.String, editUrl : String.String, vodId : Maybe.Maybe String.String, vodUrl : Maybe.Maybe String.String, vodOffset : Maybe.Maybe Basics.Int, vodPreviewImageUrl : Maybe.Maybe String.String, embedUrl : String.String, embedHtml : String.String, viewUrl : String.String, id : String.String, slug : String.String, duration : Basics.Float, views : Basics.Int }"}],"values":[{"name":"clip","comment":" Decoder for a single clip\r\n","type":"Json.Decode.Decoder Twitch.ClipsV2.Decode.Clip"},{"name":"sampleClip","comment":" Sample data\r\n","type":"String.String"}],"binops":[]},{"name":"Twitch.Helix","comment":" Helpers for sending Http requests to the Twitch Helix (\"new Twitch API\") endpoints.\r\n\r\n# Send a Request\r\n@docs send\r\n\r\n# Header Helpers\r\nUseful if you need to make your own Http call with additional headers.\r\n@docs twitchHeaders, authHeaders\r\n\r\n","unions":[],"aliases":[],"values":[{"name":"authHeaders","comment":" Creates the oauth header, given an oauth token.\r\n","type":"Maybe.Maybe String.String -> List.List Http.Header"},{"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.\r\n\r\n    fetchUserByNameUrl : String -> String\r\n    fetchUserByNameUrl login =\r\n      \"https://api.twitch.tv/helix/users?login=\" ++ login\r\n\r\n    fetchUserByName : String -> Cmd Msg\r\n    fetchUserByName login =\r\n      Twitch.Helix.send <|\r\n        { clientId = TwitchId.clientId\r\n        , auth = Nothing\r\n        , decoder = Twitch.Helix.Decode.users\r\n        , tagger = User\r\n        , url = (fetchUserByNameUrl login)\r\n        }\r\n","type":"{ clientId : String.String, auth : Maybe.Maybe 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.\r\n\r\n    Twitch.Helix.twitchHeaders clientId auth\r\n","type":"String.String -> Maybe.Maybe String.String -> List.List Http.Header"}],"binops":[]},{"name":"Twitch.Helix.Decode","comment":" Decoders for the Helix API.\r\n\r\n# Users\r\n@docs User, users\r\n\r\n# Follows\r\n@docs Follow, follows\r\n\r\n# Streams\r\n@docs Stream, streams\r\n\r\n# Games\r\n@docs Game, games\r\n\r\n# Videos\r\n@docs Video, VideoType, Viewable, videos\r\n\r\n# Clips\r\n@docs Clip, clips\r\n\r\n# Bits Leaderboard\r\n@docs BitsLeader, bitsLeaderboard\r\n\r\n# Subscriptions\r\n@docs Subscription, subscriptions\r\n\r\n# OAuth tokens\r\n@docs Token, token\r\n\r\n# Sample data\r\n@docs sampleToken, sampleUser, sampleStream, sampleGame, sampleFollow, sampleVideo, sampleClip, sampleBitsLeaderboard, sampleSubscription\r\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.\r\n","args":[],"cases":[["Upload",[]],["Archive",[]],["Highlight",[]],["Other",["String.String"]]]},{"name":"Viewable","comment":" Enumerted type for the viewable status\r\n","args":[],"cases":[["Public",[]],["Private",[]]]}],"aliases":[{"name":"BitsLeader","comment":" Record for a decoded bits leader.\r\n","args":[],"type":"{ userId : String.String, userName : String.String, rank : Basics.Int, score : Basics.Int }"},{"name":"Clip","comment":" Record for a decoded clip.\r\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\r\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\r\n","args":[],"type":"{ id : String.String, name : String.String, boxArtUrl : String.String }"},{"name":"Stream","comment":" Record for decoded Streams data\r\n","args":[],"type":"{ channelId : String.String, userId : String.String, gameId : String.String, communityIds : List.List String.String, title : String.String, viewerCount : Basics.Int, startedAt : Time.Posix, language : String.String, thumbnailUrl : String.String }"},{"name":"Subscription","comment":" Record for a decoded subscription.\r\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\r\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.\r\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.\r\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.\r\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.BitsLeader)"},{"name":"clips","comment":" Json Decoder for clips.\r\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.Clip)"},{"name":"follows","comment":" Json Decoder for follows\r\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.Follow)"},{"name":"games","comment":" Json Decoder for games\r\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.Game)"},{"name":"sampleBitsLeaderboard","comment":" Sample data for bits leaderboard.\r\n","type":"String.String"},{"name":"sampleClip","comment":" Sample data for a clip.\r\n","type":"String.String"},{"name":"sampleFollow","comment":" Sample data for follows\r\n","type":"String.String"},{"name":"sampleGame","comment":" Sample data for games\r\n","type":"String.String"},{"name":"sampleStream","comment":" Sample data for streams\r\n","type":"String.String"},{"name":"sampleSubscription","comment":" Sample data for subscriptions\r\n","type":"String.String"},{"name":"sampleToken","comment":" Sample OAuth token.\r\n","type":"String.String"},{"name":"sampleUser","comment":" Sample data for a user\r\n","type":"String.String"},{"name":"sampleVideo","comment":" Sample data for a video\r\n","type":"String.String"},{"name":"streams","comment":" Json Decoder from streams\r\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.Stream)"},{"name":"subscriptions","comment":" Json Decoder for subscriptions\r\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.Subscription)"},{"name":"token","comment":" Json Decoder for OAuth tokens.\r\n\r\n    userId = token\r\n      |> Maybe.andThen (Result.toMaybe << Jwt.decodeToken Twitch.Helix.Decode.token)\r\n      |> Maybe.map .sub\r\n","type":"Json.Decode.Decoder Twitch.Helix.Decode.Token"},{"name":"users","comment":" Json Decoder for users\r\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.User)"},{"name":"videos","comment":" Json Decoder for videos\r\n","type":"Json.Decode.Decoder (List.List Twitch.Helix.Decode.Video)"}],"binops":[]},{"name":"Twitch.Kraken","comment":" Helpers for sending Http requests to the Twitch Kraken (\"V5\") endpoints.\r\n\r\n# Send a Request\r\n@docs send\r\n\r\n# Header Helpers\r\nUseful if you need to make your own Http call with additional headers.\r\n@docs twitchHeaders, authHeaders\r\n\r\n","unions":[],"aliases":[],"values":[{"name":"authHeaders","comment":" Creates the oauth header, given an oauth token.\r\n","type":"Maybe.Maybe String.String -> List.List Http.Header"},{"name":"send","comment":" Send a basic request to the Twitch Kraken (\"V5\") 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.\r\n\r\n    fetchCommunityByNameUrl : String -> String\r\n    fetchCommunityByNameUrl login =\r\n      \"https://api.twitch.tv/kraken/communities?name=\" ++ name\r\n\r\n    fetchCommunityByName : String -> Cmd Msg\r\n    fetchCommunityByName name =\r\n      Twitch.Kraken.send <|\r\n        { clientId = TwitchId.clientId\r\n        , auth = Nothing\r\n        , decoder = Twitch.Kraken.Decode.community\r\n        , tagger = Community\r\n        , url = (fetchCommunityByNameUrl login)\r\n        }\r\n","type":"{ clientId : String.String, auth : Maybe.Maybe 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.\r\n\r\n    Twitch.Kraken.twitchHeaders clientId auth\r\n","type":"String.String -> Maybe.Maybe String.String -> List.List Http.Header"}],"binops":[]},{"name":"Twitch.Kraken.Decode","comment":" Decoders for the Kraken API.\r\n\r\n# Communities\r\n@docs Community, community\r\n\r\n# Subscriptions\r\n@docs Subscription, subscriptions, subscription\r\n\r\n# Sample data\r\n@docs sampleCommunity, sampleSubscriptions\r\n","unions":[],"aliases":[{"name":"Community","comment":" Record for decoded community.\r\n","args":[],"type":"{ id : String.String, avatarImageUrl : String.String, coverImageUrl : String.String, description : String.String, descriptionHtml : String.String, language : String.String, name : String.String, ownerId : String.String, rules : String.String, summary : String.String }"},{"name":"Subscription","comment":" Record for decoded community.\r\n","args":[],"type":"{ id : String.String, createdAt : Time.Posix, subPlan : String.String, subPlanName : String.String, userId : String.String, userBio : String.String, userCreatedAt : Time.Posix, userDisplayName : String.String, userLogo : String.String, userName : String.String, userType : String.String, userUpdatedAt : Time.Posix }"}],"values":[{"name":"community","comment":" Json Decoder for a community\r\n","type":"Json.Decode.Decoder Twitch.Kraken.Decode.Community"},{"name":"sampleCommunity","comment":" Sample data for a community.\r\n","type":"String.String"},{"name":"sampleSubscriptions","comment":" Sample data for a community.\r\n","type":"String.String"},{"name":"subscription","comment":" Json Decoder for a subscription\r\n","type":"Json.Decode.Decoder Twitch.Kraken.Decode.Subscription"},{"name":"subscriptions","comment":" Json Decoder for a subscriptions response\r\n","type":"Json.Decode.Decoder (List.List Twitch.Kraken.Decode.Subscription)"}],"binops":[]},{"name":"Twitch.Template","comment":" Helpers for filling in image and url templates received from API responses.\r\n\r\n@docs imageTemplateUrl, imagePercentTemplateUrl\r\n","unions":[],"aliases":[],"values":[{"name":"imagePercentTemplateUrl","comment":" Fills in templates with %{width} and %{height}.\r\n\r\n    Twitch.Template.imagePercentTemplateUrl 320 180 video.thumbnailUrl\r\n","type":"Basics.Int -> Basics.Int -> String.String -> String.String"},{"name":"imageTemplateUrl","comment":" Fills in templates with {width} and {height}.\r\n\r\n    Twitch.Template.imageTemplateUrl 168 95 stream.thumbnailUrl\r\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.\r\n\r\n# For target=id, does not include target login/display name\r\n\r\n@docs HostingTarget, hostingTarget, sampleHost\r\n\r\n# Full decode with target login/display name\r\n\r\n@docs Host, hosts\r\n\r\n","unions":[],"aliases":[{"name":"Host","comment":" Record for decoded host data with target name\r\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)\r\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)\r\n","type":"Json.Decode.Decoder (List.List Twitch.Tmi.Decode.HostingTarget)"},{"name":"hosts","comment":" Json decoder for hosts with target name\r\n","type":"Json.Decode.Decoder (List.List Twitch.Tmi.Decode.Host)"},{"name":"sampleHost","comment":" sample data for bootstrapping and testing\r\n","type":"String.String"}],"binops":[]}]