Skip to content

Commit

Permalink
Merge pull request #48 from Joe-noh/support-player-api
Browse files Browse the repository at this point in the history
Support Player API
  • Loading branch information
jsncmgs1 committed Jan 10, 2021
2 parents c7f46cf + edde0de commit 4fa1f6b
Show file tree
Hide file tree
Showing 11 changed files with 774 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

```elixir
def deps do
[{:spotify_ex, "~> 2.0.12"}]
[{:spotify_ex, "~> 2.1.0"}]
end
```

Expand Down
8 changes: 8 additions & 0 deletions lib/spotify/context.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
defmodule Spotify.Context do
defstruct ~w[
uri
href
external_urls
type
]a
end
11 changes: 11 additions & 0 deletions lib/spotify/currently_playing.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
defmodule Spotify.CurrentlyPlaying do
defstruct ~w[
actions
context
currently_playing_type
is_playing
item
progress_ms
timestamp
]a
end
11 changes: 11 additions & 0 deletions lib/spotify/device.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
defmodule Spotify.Device do
defstruct ~w[
id
is_active
is_private_session
is_restricted
name
type
volume_percent
]a
end
23 changes: 23 additions & 0 deletions lib/spotify/episode.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
defmodule Spotify.Episode do
defstruct ~w[
audio_preview_url
description
duration_ms
explicit
external_urls
href
id
images
is_externally_hosted
is_playable
language
languages
name
release_date
release_date_precision
resume_point
show
type
uri
]a
end
7 changes: 7 additions & 0 deletions lib/spotify/history.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
defmodule Spotify.History do
defstruct ~w[
track
played_at
context
]a
end
14 changes: 14 additions & 0 deletions lib/spotify/playback.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
defmodule Spotify.Playback do
defstruct ~w[
actions
context
currently_playing_type
device
is_playing
item
progress_ms
repeat_state
shuffle_state
timestamp
]a
end
Loading

0 comments on commit 4fa1f6b

Please sign in to comment.