lexicon-python 0.1.0__tar.gz → 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lexicon-python
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Python client for the Lexicon DJ API
5
5
  Author-email: Garrison Burger <burgerga123@gmail.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "lexicon-python"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "Python client for the Lexicon DJ API"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -134,18 +134,24 @@ class LexiconClient:
134
134
  def get_playlist_by_path(
135
135
  self,
136
136
  playlist_path: Sequence[str],
137
- playlist_type: Optional[int] = None,
137
+ playlist_type: int,
138
138
  *,
139
139
  timeout: Optional[int] = None,
140
140
  ) -> dict | None:
141
141
  """
142
142
  Get a playlist from the Lexicon library by its folder path.
143
143
  Via ``/v1/playlist-by-path`` endpoint.
144
+
145
+ playlist_path:
146
+ Sequence of folder/playlist names from the root.
147
+ E.g. ``["Genres", "Drum & Bass", "Dancefloor"]``.
148
+
149
+ playlist_type:
150
+ ``1=Folder``, ``2=Playlist``, ``3=Smartlist``.
144
151
  """
145
152
  endpoint = self._build_url("/v1/playlist-by-path")
146
153
  params: list[tuple[str, object]] = [("path", part) for part in playlist_path]
147
- if playlist_type is not None:
148
- params.append(("type", playlist_type))
154
+ params.append(("type", playlist_type))
149
155
 
150
156
  try:
151
157
  response = requests.get(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lexicon-python
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Python client for the Lexicon DJ API
5
5
  Author-email: Garrison Burger <burgerga123@gmail.com>
6
6
  License-Expression: MIT
@@ -149,7 +149,7 @@ class LexiconApiTests(unittest.TestCase):
149
149
  return DummyErrorResponse(error_payload)
150
150
 
151
151
  with patch("lexicon.lexicon.requests.get", fake_get):
152
- playlist = self.client.get_playlist_by_path(playlist_path)
152
+ playlist = self.client.get_playlist_by_path(playlist_path, playlist_type=2)
153
153
 
154
154
  self.assertIsNone(playlist)
155
155
 
File without changes
File without changes
File without changes