Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Kamila/lastfm_genre_api #86

Merged
merged 63 commits into from
Mar 17, 2022
Merged

Kamila/lastfm_genre_api #86

merged 63 commits into from
Mar 17, 2022

Conversation

kamilababayeva
Copy link
Collaborator

@kamilababayeva kamilababayeva commented Mar 16, 2022

LastfmGenre API

This PR is related to issue #70

This PR contains:

ch.sdp.vibester.api: LastfmApi: an api with a function querySongList(...) that will return list of songs within a given tag/genre
ch.sdp.vibester.api: LastfmHelper: a helper to combine songs from two Lastfm queries. This is done to have random songs each game.
ch.sdp.vibester.api: LastfmUri: a data class to build Uri to lastfm queries
ch.sdp.vibester.model: SongList: a class that represents an object retrieved from lastfm query
ch.sdp.vibester: GenreTemporary: an activity that is used to test the Genre API

In addition, the code is tested with a coverage of: [92]%

image

@kamilababayeva kamilababayeva linked an issue Mar 16, 2022 that may be closed by this pull request
private val BY_TAG = "tag.gettoptracks"
private val BY_CHART = "chart.gettoptracks"

override fun onCreate(savedInstanceState: Bundle?) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

@kamilababayeva kamilababayeva marked this pull request as ready for review March 16, 2022 16:27
@kamilababayeva kamilababayeva self-assigned this Mar 16, 2022
Copy link
Collaborator

@laurislopata laurislopata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for button text, maybe use @string so that it would be easier to reuse the same text. other than that LGTM

Copy link
Owner

@MaximeZmt MaximeZmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really Nice code 👍
There are some minor doc changes to do, but it should take seconds to solve.

import android.widget.ArrayAdapter
import android.widget.ListView
import ch.sdp.vibester.api.LastfmHelper

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some javadoc to describe the class would be great. Maybe the method too.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it's temporary so not mandatory

import org.json.JSONArray
import org.json.JSONObject
import java.lang.IllegalArgumentException

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe adding a class doc ?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does a song List represent. Also not a List. Doc may be important

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Javadoc looks good now

Copy link
Owner

@MaximeZmt MaximeZmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 👍

Copy link
Collaborator

@zwierski zwierski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. The code is well-documented.

@codeclimate
Copy link

codeclimate bot commented Mar 17, 2022

Code Climate has analyzed commit dcb4e45 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

The test coverage on the diff in this pull request is 97.1% (80% is the threshold).

This pull request will bring the total coverage in the repository to 94.4% (0.3% change).

View more on Code Climate.

@MaximeZmt MaximeZmt merged commit 576f8ea into main Mar 17, 2022
@MaximeZmt MaximeZmt deleted the kamila/genres_api branch March 17, 2022 22:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Find and an API to download music in genres(#69)
5 participants