Skip to content

Commit

Permalink
Remove old method
Browse files Browse the repository at this point in the history
  • Loading branch information
kraxarn committed Feb 24, 2024
1 parent 5581793 commit edce0eb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
6 changes: 0 additions & 6 deletions lib/include/lib/spotify/api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ namespace lib
void album(const std::string &id,
lib::callback<lib::spt::album> &callback);

/**
* \deprecated Use with pagination instead
*/
void album_tracks(const lib::spt::album &album,
lib::callback<std::vector<lib::spt::track>> &callback);

void album_tracks(const spt::album &album,
const paged_callback<spt::track> &callback) const;

Expand Down
18 changes: 0 additions & 18 deletions lib/src/spotifyapi/albums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,6 @@ void lib::spt::api::album(const std::string &id, lib::callback<lib::spt::album>
get(lib::fmt::format("albums/{}", id), callback);
}

void lib::spt::api::album_tracks(const lib::spt::album &album,
lib::callback<std::vector<lib::spt::track>> &callback)
{
get_items(lib::fmt::format("albums/{}/tracks?limit=50", album.id),
[album, callback](const std::vector<lib::spt::track> &results)
{
std::vector<lib::spt::track> tracks;
tracks.reserve(results.size());
for (const auto &result: results)
{
lib::spt::track track = result;
track.album.name = album.name;
tracks.push_back(track);
}
callback(tracks);
});
}

void lib::spt::api::album_tracks(const spt::album &album, const paged_callback<spt::track> &callback) const
{
const auto albumName = album.name;
Expand Down

0 comments on commit edce0eb

Please sign in to comment.