Update deps, update to Gleam 0.32.2
This commit is contained in:
parent
899d63bb36
commit
769315b9c4
30 changed files with 76 additions and 75 deletions
|
@ -1 +1,2 @@
|
||||||
gleam 0.31.0
|
gleam 0.32.2
|
||||||
|
nodejs 20.9.0
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
name = "elektrofoni"
|
name = "elektrofoni"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
target = "javascript"
|
target = "javascript"
|
||||||
|
gleam = ">= 0.32.0"
|
||||||
|
|
||||||
# Fill out these fields if you intend to generate HTML documentation or publish
|
# Fill out these fields if you intend to generate HTML documentation or publish
|
||||||
# your project to the Hex package manager.
|
# your project to the Hex package manager.
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
|
|
||||||
packages = [
|
packages = [
|
||||||
{ name = "gleam_fetch", version = "0.2.1", build_tools = ["gleam"], requirements = ["gleam_http", "gleam_javascript", "gleam_stdlib"], otp_app = "gleam_fetch", source = "hex", outer_checksum = "F64E93C754D948B2D37ABC4ADD5482FE0FAED4B99C79E66012DDE96BEDC40544" },
|
{ name = "gleam_fetch", version = "0.2.1", build_tools = ["gleam"], requirements = ["gleam_http", "gleam_javascript", "gleam_stdlib"], otp_app = "gleam_fetch", source = "hex", outer_checksum = "F64E93C754D948B2D37ABC4ADD5482FE0FAED4B99C79E66012DDE96BEDC40544" },
|
||||||
{ name = "gleam_http", version = "3.5.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_http", source = "hex", outer_checksum = "FAE9AE3EB1CA90C2194615D20FFFD1E28B630E84DACA670B28D959B37BCBB02C" },
|
{ name = "gleam_http", version = "3.5.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_http", source = "hex", outer_checksum = "0B09AAE8EB547C4F2F2D3F8917A0A4D2EF75DFF0232389332BAFE19DBBFDB92B" },
|
||||||
{ name = "gleam_javascript", version = "0.6.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_javascript", source = "hex", outer_checksum = "BFEBB63ABE4A1694E07DEFD19B160C2980304B5D775A89D4B02E7DE7C9D8008B" },
|
{ name = "gleam_javascript", version = "0.6.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_javascript", source = "hex", outer_checksum = "BFEBB63ABE4A1694E07DEFD19B160C2980304B5D775A89D4B02E7DE7C9D8008B" },
|
||||||
{ name = "gleam_json", version = "0.6.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "thoas"], otp_app = "gleam_json", source = "hex", outer_checksum = "C6CC5BEECA525117E97D0905013AB3F8836537455645DDDD10FE31A511B195EF" },
|
{ name = "gleam_json", version = "0.6.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "thoas"], otp_app = "gleam_json", source = "hex", outer_checksum = "C6CC5BEECA525117E97D0905013AB3F8836537455645DDDD10FE31A511B195EF" },
|
||||||
{ name = "gleam_stdlib", version = "0.31.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "6D1BC5B4D4179B9FEE866B1E69FE180AC2CE485AD90047C0B32B2CA984052736" },
|
{ name = "gleam_stdlib", version = "0.32.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "07D64C26D014CF570F8ACADCE602761EA2E74C842D26F2FD49B0D61973D9966F" },
|
||||||
{ name = "gleeunit", version = "0.11.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "1397E5C4AC4108769EE979939AC39BF7870659C5AFB714630DEEEE16B8272AD5" },
|
{ name = "gleeunit", version = "0.11.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "1397E5C4AC4108769EE979939AC39BF7870659C5AFB714630DEEEE16B8272AD5" },
|
||||||
{ name = "lustre", version = "3.0.9", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "lustre", source = "hex", outer_checksum = "CBD20163B7CB7FA2AC2BCFBAB5A083B22AED9612B6522BE479E8FEF09C82A9E1" },
|
{ name = "lustre", version = "3.0.10", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "lustre", source = "hex", outer_checksum = "4D08E12E190FA9F469C1C766AEC66728518B3718D438EDDE28E94D5843B0A5A1" },
|
||||||
{ name = "plinth", version = "0.1.4", build_tools = ["gleam"], requirements = ["gleam_stdlib", "gleam_javascript"], otp_app = "plinth", source = "hex", outer_checksum = "43307A0271B8AC9B646B3C39F80D22C41DB4022CDAD67ABFAA555BB3F1321E2E" },
|
{ name = "plinth", version = "0.1.4", build_tools = ["gleam"], requirements = ["gleam_javascript", "gleam_stdlib"], otp_app = "plinth", source = "hex", outer_checksum = "43307A0271B8AC9B646B3C39F80D22C41DB4022CDAD67ABFAA555BB3F1321E2E" },
|
||||||
{ name = "thoas", version = "0.4.1", build_tools = ["rebar3"], requirements = [], otp_app = "thoas", source = "hex", outer_checksum = "4918D50026C073C4AB1388437132C77A6F6F7C8AC43C60C13758CC0ADCE2134E" },
|
{ name = "thoas", version = "0.4.1", build_tools = ["rebar3"], requirements = [], otp_app = "thoas", source = "hex", outer_checksum = "4918D50026C073C4AB1388437132C77A6F6F7C8AC43C60C13758CC0ADCE2134E" },
|
||||||
{ name = "varasto", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "plinth", "gleam_json"], otp_app = "varasto", source = "hex", outer_checksum = "0621E5BFD0B9B7F7D19B8FC6369C6E2EAC5C1F3858A1E5E51342F5BCE10C3728" },
|
{ name = "varasto", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_json", "gleam_stdlib", "plinth"], otp_app = "varasto", source = "hex", outer_checksum = "0621E5BFD0B9B7F7D19B8FC6369C6E2EAC5C1F3858A1E5E51342F5BCE10C3728" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[requirements]
|
[requirements]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
//// The library stores the music library retrieved from iBroadcast.
|
//// The library stores the music library retrieved from iBroadcast.
|
||||||
|
|
||||||
import gleam/map.{Map}
|
import gleam/map.{type Map}
|
||||||
import elekf/library/track.{Track}
|
import elekf/library/track.{type Track}
|
||||||
import elekf/library/album.{Album}
|
import elekf/library/album.{type Album}
|
||||||
import elekf/library/artist.{Artist}
|
import elekf/library/artist.{type Artist}
|
||||||
|
|
||||||
pub type Library {
|
pub type Library {
|
||||||
Library(
|
Library(
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import gleam/list
|
import gleam/list
|
||||||
import elekf/library.{Library}
|
import elekf/library.{type Library}
|
||||||
import elekf/library/album.{Album}
|
import elekf/library/album.{type Album}
|
||||||
|
|
||||||
/// Get the individual tracks in an album.
|
/// Get the individual tracks in an album.
|
||||||
pub fn get_tracks(library: Library, album: Album) {
|
pub fn get_tracks(library: Library, album: Album) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import gleam/string
|
import gleam/string
|
||||||
import ibroadcast/library/library.{Album as APIAlbum}
|
import ibroadcast/library/library.{type Album as APIAlbum}
|
||||||
import elekf/library/album.{Album}
|
import elekf/library/album.{Album}
|
||||||
|
|
||||||
/// Converts API album response to library format.
|
/// Converts API album response to library format.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import gleam/string
|
import gleam/string
|
||||||
import ibroadcast/library/library.{Artist as APIArtist}
|
import ibroadcast/library/library.{type Artist as APIArtist}
|
||||||
import elekf/library/artist.{Artist}
|
import elekf/library/artist.{Artist}
|
||||||
|
|
||||||
/// Converts API artist response to library format.
|
/// Converts API artist response to library format.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import gleam/list
|
import gleam/list
|
||||||
import gleam/map.{Map}
|
import gleam/map.{type Map}
|
||||||
import ibroadcast/library/library.{Library as APILibrary} as api_library
|
import ibroadcast/library/library.{type Library as APILibrary} as api_library
|
||||||
import elekf/library.{Library}
|
import elekf/library.{Library}
|
||||||
import elekf/transfer/album
|
import elekf/transfer/album
|
||||||
import elekf/transfer/artist
|
import elekf/transfer/artist
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import gleam/string
|
import gleam/string
|
||||||
import ibroadcast/library/library.{Track as APITrack}
|
import ibroadcast/library/library.{type Track as APITrack}
|
||||||
import elekf/library/track.{Track}
|
import elekf/library/track.{Track}
|
||||||
|
|
||||||
/// Converts API track response to library format.
|
/// Converts API track response to library format.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import gleam/result
|
import gleam/result
|
||||||
import gleam/order.{Eq, Gt, Lt, Order}
|
import gleam/order.{type Order, Eq, Gt, Lt}
|
||||||
import gleam/dynamic.{DecodeError, Dynamic}
|
import gleam/dynamic.{type DecodeError, type Dynamic, DecodeError}
|
||||||
|
|
||||||
pub type Date
|
pub type Date
|
||||||
|
|
||||||
|
|
|
@ -10,17 +10,17 @@ import lustre/element/html.{button, div, nav, p}
|
||||||
import lustre/attribute
|
import lustre/attribute
|
||||||
import lustre/effect
|
import lustre/effect
|
||||||
import lustre/event
|
import lustre/event
|
||||||
import elekf/web/common.{PlayQueue}
|
import elekf/web/common.{type PlayQueue}
|
||||||
import ibroadcast/library/library as library_api
|
import ibroadcast/library/library as library_api
|
||||||
import ibroadcast/authed_request.{RequestConfig}
|
import ibroadcast/authed_request.{type RequestConfig, RequestConfig}
|
||||||
import elekf/api/base_request_config.{base_request_config}
|
import elekf/api/base_request_config.{base_request_config}
|
||||||
import elekf/utils/http
|
import elekf/utils/http
|
||||||
import elekf/library.{Library}
|
import elekf/library.{type Library}
|
||||||
import elekf/library/artist.{Artist}
|
import elekf/library/artist.{type Artist}
|
||||||
import elekf/library/track.{Track}
|
import elekf/library/track.{type Track}
|
||||||
import elekf/transfer/library as library_transfer
|
import elekf/transfer/library as library_transfer
|
||||||
import elekf/web/components/player
|
import elekf/web/components/player
|
||||||
import elekf/web/components/library_item.{LibraryItem}
|
import elekf/web/components/library_item.{type LibraryItem}
|
||||||
import elekf/web/components/library_view
|
import elekf/web/components/library_view
|
||||||
import elekf/web/components/library_views/tracks_view
|
import elekf/web/components/library_views/tracks_view
|
||||||
import elekf/web/components/library_views/artists_view
|
import elekf/web/components/library_views/artists_view
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import elekf/library/track.{Track}
|
import elekf/library/track.{type Track}
|
||||||
import elekf/api/auth/models as auth_models
|
import elekf/api/auth/models as auth_models
|
||||||
|
|
||||||
/// A queue of tracks to play, with their IDs.
|
/// A queue of tracks to play, with their IDs.
|
||||||
|
|
|
@ -12,13 +12,13 @@ import lustre/element.{text}
|
||||||
import lustre/element/html.{div, h3}
|
import lustre/element/html.{div, h3}
|
||||||
import lustre/attribute
|
import lustre/attribute
|
||||||
import lustre/event
|
import lustre/event
|
||||||
import elekf/library.{Library}
|
import elekf/library.{type Library}
|
||||||
import elekf/library/track.{Track}
|
import elekf/library/track.{type Track}
|
||||||
import elekf/library/artist.{Artist}
|
import elekf/library/artist.{type Artist}
|
||||||
import elekf/web/events/start_play
|
import elekf/web/events/start_play
|
||||||
import elekf/web/events/show_artist
|
import elekf/web/events/show_artist
|
||||||
import elekf/web/components/search
|
import elekf/web/components/search
|
||||||
import elekf/web/components/library_item.{LibraryItem}
|
import elekf/web/components/library_item.{type LibraryItem}
|
||||||
import elekf/web/common
|
import elekf/web/common
|
||||||
|
|
||||||
/// Function to get the data of the view from the library.
|
/// Function to get the data of the view from the library.
|
||||||
|
|
|
@ -9,10 +9,10 @@ import lustre/attribute
|
||||||
import lustre/event
|
import lustre/event
|
||||||
import ibroadcast/artwork
|
import ibroadcast/artwork
|
||||||
import elekf/library
|
import elekf/library
|
||||||
import elekf/library/album.{Album}
|
import elekf/library/album.{type Album}
|
||||||
import elekf/library/album_utils
|
import elekf/library/album_utils
|
||||||
import elekf/web/components/library_view.{Model, StartPlay}
|
import elekf/web/components/library_view.{type Model, StartPlay}
|
||||||
import elekf/web/components/library_item.{LibraryItem}
|
import elekf/web/components/library_item.{type LibraryItem}
|
||||||
|
|
||||||
pub fn view(
|
pub fn view(
|
||||||
model: Model(Album),
|
model: Model(Album),
|
||||||
|
@ -32,7 +32,6 @@ pub fn view(
|
||||||
[
|
[
|
||||||
attribute.id("album-list-" <> int.to_string(album_id)),
|
attribute.id("album-list-" <> int.to_string(album_id)),
|
||||||
attribute.class("library-item album-item"),
|
attribute.class("library-item album-item"),
|
||||||
attribute.type_("button"),
|
|
||||||
event.on_click(StartPlay(tracks, 0)),
|
event.on_click(StartPlay(tracks, 0)),
|
||||||
attribute.attribute("role", "button"),
|
attribute.attribute("role", "button"),
|
||||||
],
|
],
|
||||||
|
|
|
@ -5,11 +5,11 @@ import gleam/list
|
||||||
import gleam/map
|
import gleam/map
|
||||||
import gleam/option
|
import gleam/option
|
||||||
import lustre/attribute
|
import lustre/attribute
|
||||||
import elekf/library.{Library}
|
import elekf/library.{type Library}
|
||||||
import elekf/library/album.{Album}
|
import elekf/library/album.{type Album}
|
||||||
import elekf/library/album_utils
|
import elekf/library/album_utils
|
||||||
import elekf/web/components/library_view
|
import elekf/web/components/library_view
|
||||||
import elekf/web/components/library_item.{LibraryItem}
|
import elekf/web/components/library_item.{type LibraryItem}
|
||||||
import elekf/web/components/library_views/album_item
|
import elekf/web/components/library_views/album_item
|
||||||
import elekf/web/common
|
import elekf/web/common
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,10 @@ import lustre/element.{text}
|
||||||
import lustre/attribute
|
import lustre/attribute
|
||||||
import lustre/event
|
import lustre/event
|
||||||
import ibroadcast/artwork
|
import ibroadcast/artwork
|
||||||
import elekf/library.{Library}
|
import elekf/library.{type Library}
|
||||||
import elekf/library/artist.{Artist}
|
import elekf/library/artist.{type Artist}
|
||||||
import elekf/web/components/library_view.{Model, ShowArtist}
|
import elekf/web/components/library_view.{type Model, ShowArtist}
|
||||||
import elekf/web/components/library_item.{LibraryItem}
|
import elekf/web/components/library_item.{type LibraryItem}
|
||||||
import elekf/web/common
|
import elekf/web/common
|
||||||
|
|
||||||
const component_name = "artists-view"
|
const component_name = "artists-view"
|
||||||
|
|
|
@ -11,12 +11,12 @@ import lustre/element/html.{div, header}
|
||||||
import lustre/element.{text}
|
import lustre/element.{text}
|
||||||
import lustre/attribute
|
import lustre/attribute
|
||||||
import lustre/effect
|
import lustre/effect
|
||||||
import elekf/library.{Library}
|
import elekf/library.{type Library}
|
||||||
import elekf/library/album.{Album}
|
import elekf/library/album.{type Album}
|
||||||
import elekf/library/album_utils
|
import elekf/library/album_utils
|
||||||
import elekf/library/artist.{Artist}
|
import elekf/library/artist.{type Artist}
|
||||||
import elekf/web/components/library_view
|
import elekf/web/components/library_view
|
||||||
import elekf/web/components/library_item.{LibraryItem}
|
import elekf/web/components/library_item.{type LibraryItem}
|
||||||
import elekf/web/components/library_views/album_item
|
import elekf/web/components/library_views/album_item
|
||||||
import elekf/web/common
|
import elekf/web/common
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,10 @@ import lustre/element/html.{div, h3, p}
|
||||||
import lustre/element.{text}
|
import lustre/element.{text}
|
||||||
import lustre/attribute
|
import lustre/attribute
|
||||||
import lustre/event
|
import lustre/event
|
||||||
import elekf/library.{Library}
|
import elekf/library.{type Library}
|
||||||
import elekf/library/track.{Track}
|
import elekf/library/track.{type Track}
|
||||||
import elekf/web/components/library_view.{Model, StartPlay}
|
import elekf/web/components/library_view.{type Model, StartPlay}
|
||||||
import elekf/web/components/library_item.{LibraryItem}
|
import elekf/web/components/library_item.{type LibraryItem}
|
||||||
import elekf/web/common
|
import elekf/web/common
|
||||||
|
|
||||||
const component_name = "tracks-view"
|
const component_name = "tracks-view"
|
||||||
|
|
|
@ -12,9 +12,9 @@ import elektrofoni
|
||||||
import elekf/web/common
|
import elekf/web/common
|
||||||
import elekf/web/components/icon.{Alt, icon}
|
import elekf/web/components/icon.{Alt, icon}
|
||||||
import elekf/web/components/track_length.{track_length}
|
import elekf/web/components/track_length.{track_length}
|
||||||
import elekf/library/track.{Track}
|
import elekf/library/track.{type Track}
|
||||||
import elekf/utils/date
|
import elekf/utils/date
|
||||||
import ibroadcast/authed_request.{RequestConfig}
|
import ibroadcast/authed_request.{type RequestConfig}
|
||||||
import ibroadcast/streaming
|
import ibroadcast/streaming
|
||||||
|
|
||||||
pub type PlayState {
|
pub type PlayState {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import gleam/result
|
import gleam/result
|
||||||
import gleam/dynamic
|
import gleam/dynamic
|
||||||
import lustre/event
|
import lustre/event
|
||||||
import elekf/library/artist.{Artist}
|
import elekf/library/artist.{type Artist}
|
||||||
import elekf/web/components/library_item.{LibraryItem}
|
import elekf/web/components/library_item.{type LibraryItem}
|
||||||
import elekf/utils/custom_event.{CustomEvent}
|
import elekf/utils/custom_event.{type CustomEvent}
|
||||||
|
|
||||||
const event_name = "show-artist"
|
const event_name = "show-artist"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import gleam/result
|
import gleam/result
|
||||||
import gleam/dynamic
|
import gleam/dynamic
|
||||||
import lustre/event
|
import lustre/event
|
||||||
import elekf/web/common.{PlayQueue}
|
import elekf/web/common.{type PlayQueue}
|
||||||
import elekf/utils/custom_event.{CustomEvent}
|
import elekf/utils/custom_event.{type CustomEvent}
|
||||||
|
|
||||||
const event_name = "start-play"
|
const event_name = "start-play"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import lustre/effect.{Effect}
|
import lustre/effect.{type Effect}
|
||||||
|
|
||||||
/// Update child view of a given view.
|
/// Update child view of a given view.
|
||||||
///
|
///
|
||||||
|
|
|
@ -2,9 +2,9 @@ import gleam/dynamic
|
||||||
import gleam/result
|
import gleam/result
|
||||||
import gleam/json
|
import gleam/json
|
||||||
import gleam/javascript/promise
|
import gleam/javascript/promise
|
||||||
import ibroadcast/request_params.{RequestParams}
|
import ibroadcast/request_params.{type RequestParams}
|
||||||
import ibroadcast/request.{DecodeFailed, RequestConfig, ResponseError}
|
import ibroadcast/request.{type RequestConfig, type ResponseError, DecodeFailed}
|
||||||
import ibroadcast/http.{Requestor}
|
import ibroadcast/http.{type Requestor}
|
||||||
import ibroadcast/servers
|
import ibroadcast/servers
|
||||||
|
|
||||||
pub type Session {
|
pub type Session {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import gleam/json
|
import gleam/json
|
||||||
import ibroadcast/request_params.{RequestParams}
|
import ibroadcast/request_params.{type RequestParams}
|
||||||
|
|
||||||
pub fn request_params() -> RequestParams {
|
pub fn request_params() -> RequestParams {
|
||||||
[#("mode", json.string("logout"))]
|
[#("mode", json.string("logout"))]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import gleam/uri
|
import gleam/uri
|
||||||
import gleam/json
|
import gleam/json
|
||||||
import ibroadcast/http.{Requestor}
|
import ibroadcast/http.{type Requestor}
|
||||||
import ibroadcast/request_params.{RequestParams}
|
import ibroadcast/request_params.{type RequestParams}
|
||||||
import ibroadcast/request
|
import ibroadcast/request
|
||||||
import ibroadcast/utils
|
import ibroadcast/utils
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import gleam/javascript/promise
|
import gleam/javascript/promise
|
||||||
import gleam/json
|
import gleam/json
|
||||||
import gleam/map.{Map}
|
import gleam/map.{type Map}
|
||||||
import gleam/dynamic
|
import gleam/dynamic
|
||||||
import gleam/result
|
import gleam/result
|
||||||
import gleam/option
|
import gleam/option
|
||||||
import ibroadcast/servers
|
import ibroadcast/servers
|
||||||
import ibroadcast/request.{DecodeFailed}
|
import ibroadcast/request.{DecodeFailed}
|
||||||
import ibroadcast/authed_request.{RequestConfig}
|
import ibroadcast/authed_request.{type RequestConfig}
|
||||||
import ibroadcast/request_params.{RequestParams}
|
import ibroadcast/request_params.{type RequestParams}
|
||||||
import ibroadcast/http.{Requestor}
|
import ibroadcast/http.{type Requestor}
|
||||||
import ibroadcast/map_format
|
import ibroadcast/map_format
|
||||||
|
|
||||||
pub type Album {
|
pub type Album {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import gleam/result
|
import gleam/result
|
||||||
import gleam/map.{Map}
|
import gleam/map.{type Map}
|
||||||
import gleam/int
|
import gleam/int
|
||||||
import gleam/dynamic.{Decoder}
|
import gleam/dynamic.{type Decoder}
|
||||||
|
|
||||||
/// This decoder will attempt to decode a gleam `Map` using the provided decoders.
|
/// This decoder will attempt to decode a gleam `Map` using the provided decoders.
|
||||||
/// If either a key or a value fails to decode, that entry is just ignored.
|
/// If either a key or a value fails to decode, that entry is just ignored.
|
||||||
|
|
|
@ -5,10 +5,10 @@ import gleam/http/request
|
||||||
import gleam/javascript/promise
|
import gleam/javascript/promise
|
||||||
import gleam/json
|
import gleam/json
|
||||||
import ibroadcast/utils
|
import ibroadcast/utils
|
||||||
import ibroadcast/http.{Requestor}
|
import ibroadcast/http.{type Requestor}
|
||||||
import ibroadcast/app_info.{AppInfo}
|
import ibroadcast/app_info.{type AppInfo}
|
||||||
import ibroadcast/device_info.{DeviceInfo}
|
import ibroadcast/device_info.{type DeviceInfo}
|
||||||
import ibroadcast/request_params.{RequestParams}
|
import ibroadcast/request_params.{type RequestParams}
|
||||||
|
|
||||||
pub type RequestConfig {
|
pub type RequestConfig {
|
||||||
RequestConfig(app_info: AppInfo, device_info: DeviceInfo)
|
RequestConfig(app_info: AppInfo, device_info: DeviceInfo)
|
||||||
|
|
|
@ -2,7 +2,7 @@ import gleam/string
|
||||||
import gleam/int
|
import gleam/int
|
||||||
import gleam/uri
|
import gleam/uri
|
||||||
import gleam/option
|
import gleam/option
|
||||||
import ibroadcast/authed_request.{RequestConfig}
|
import ibroadcast/authed_request.{type RequestConfig}
|
||||||
|
|
||||||
pub fn form_url(
|
pub fn form_url(
|
||||||
track_file: String,
|
track_file: String,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import gleam/map
|
import gleam/map
|
||||||
import gleam/list
|
import gleam/list
|
||||||
import ibroadcast/request_params.{RequestParams}
|
import ibroadcast/request_params.{type RequestParams}
|
||||||
|
|
||||||
/// Combine two request parameter lists into one, later values override former.
|
/// Combine two request parameter lists into one, later values override former.
|
||||||
pub fn combine_params(params: List(RequestParams)) -> RequestParams {
|
pub fn combine_params(params: List(RequestParams)) -> RequestParams {
|
||||||
|
|
Loading…
Reference in a new issue