Skip to content

Commit

Permalink
refactor using linter, e.g. categories
Browse files Browse the repository at this point in the history
  • Loading branch information
tanja04 committed Jul 11, 2024
1 parent 71e7f45 commit 5c9024a
Show file tree
Hide file tree
Showing 71 changed files with 425 additions and 405 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Class {
}

{
#category : #'as yet unclassified',
#'squeak_changestamp' : 'TL 7/8/2024 16:29'
#category : #baseline,
#'squeak_changestamp' : 'TL 7/11/2024 19:56'
}
BaselineOfSpotifyConnect >> baseline: spec [

Expand All @@ -22,8 +22,7 @@ BaselineOfSpotifyConnect >> baseline: spec [
baseline: 'Squot' with: [
spec repository: 'github://hpi-swa/Squot:mapper/src'].
spec
package: 'SpotifyConnect' with: [spec requires: #('Squot')];
yourself.
package: 'SpotifyConnect' with: [spec requires: #('Squot')].
spec
group: 'default' with: #('SpotifyConnect');
group: 'tests' with: #('SpotifyConnect');
Expand Down
2 changes: 1 addition & 1 deletion src/SpotifyConnect/SPOCAlbum.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SPOCAlbum >> equals: anAlbum [
]

{
#category : #'event handling',
#category : #'event-handling',
#'squeak_changestamp' : 'TL 7/8/2024 19:22'
}
SPOCAlbum >> onClick: anApp [
Expand Down
21 changes: 6 additions & 15 deletions src/SpotifyConnect/SPOCApiEndpoint.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ SPOCApiEndpoint class >> cannotRefreshErrorMessage [
^ 'Refreshing Access Token failed'
]

{
#category : #constants,
#'squeak_changestamp' : 'OW 7/7/2024 16:28'
}
SPOCApiEndpoint class >> gitRepoName [

^ 'SpotifyConnect'
]

{
#category : #constants,
#'squeak_changestamp' : 'OW 7/7/2024 16:37'
Expand Down Expand Up @@ -133,7 +124,7 @@ SPOCApiEndpoint >> executeRequest: request withParams: aParameterDictionary [
]

{
#category : #'api-call',
#category : #response,
#'squeak_changestamp' : 'TL 6/10/2024 03:39'
}
SPOCApiEndpoint >> executeTest [
Expand All @@ -142,7 +133,7 @@ SPOCApiEndpoint >> executeTest [
]

{
#category : #initialization,
#category : #'initialize-release',
#'squeak_changestamp' : 'TL 6/10/2024 03:39'
}
SPOCApiEndpoint >> initialize [
Expand All @@ -153,13 +144,13 @@ SPOCApiEndpoint >> initialize [
]

{
#category : #accessing,
#'squeak_changestamp' : 'OW 7/7/2024 16:41'
#category : #response,
#'squeak_changestamp' : 'TL 7/11/2024 20:04'
}
SPOCApiEndpoint >> loadMockdataFromAsset: anAsset [

^ ((GitAssetLoader for: self class gitRepoName)
loadPlaintext: self class mockdataBasepath , anAsset) readStream
^ ((GitAssetLoader for: SPOCApp gitRepoName)
loadPlaintext: self class mockdataBasepath, anAsset) readStream
]

{
Expand Down
2 changes: 1 addition & 1 deletion src/SpotifyConnect/SPOCApiNext.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SPOCApiNext >> skipToNextOn: aDevice [
]

{
#category : #'api-call',
#category : #response,
#'squeak_changestamp' : 'VE 7/9/2024 11:51'
}
SPOCApiNext >> tinkerReponseContent: aContentStream [
Expand Down
2 changes: 1 addition & 1 deletion src/SpotifyConnect/SPOCApiPause.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SPOCApiPause >> pauseOn: aDevice [
]

{
#category : #'api-call',
#category : #response,
#'squeak_changestamp' : 'VE 7/9/2024 11:49'
}
SPOCApiPause >> tinkerReponseContent: aContentStream [
Expand Down
11 changes: 6 additions & 5 deletions src/SpotifyConnect/SPOCApiPlay.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ SPOCApiPlay >> endpointMethod [

{
#category : #'api-call',
#'squeak_changestamp' : 'TL 7/11/2024 16:51'
#'squeak_changestamp' : 'TL 7/11/2024 19:14'
}
SPOCApiPlay >> executeRequest: request withParams: aParamDictionary [

Expand All @@ -83,7 +83,8 @@ SPOCApiPlay >> executeRequest: request withParams: aParamDictionary [
(aParamDictionary size = 2)
ifTrue: [data := self buildDataWithTrack: (aParamDictionary at: #uris)]
ifFalse: [(aParamDictionary includesKey: #context_uri)
ifTrue: [data := self buildDataWithContext: (aParamDictionary at: #context_uri) andTrack: (aParamDictionary at: #uris)]].
ifTrue: [data := self buildDataWithContext: (aParamDictionary at: #context_uri)
andTrack: (aParamDictionary at: #uris)]].
request headerAt: 'Content-Length' put: data size.
(data isEmpty)
ifTrue: [^ self client sendRequest: request]
Expand Down Expand Up @@ -112,7 +113,7 @@ SPOCApiPlay >> playTrack: aString on: aDevice [
]

{
#category : #parameters,
#category : #'api-call',
#'squeak_changestamp' : 'MH 7/7/2024 15:26'
}
SPOCApiPlay >> playTrack: aString withAlbum: anotherString on: aDevice [
Expand All @@ -124,7 +125,7 @@ SPOCApiPlay >> playTrack: aString withAlbum: anotherString on: aDevice [
]

{
#category : #parameters,
#category : #'api-call',
#'squeak_changestamp' : 'MH 7/7/2024 15:27'
}
SPOCApiPlay >> playTrack: aString withPlaylist: anotherString on: aDevice [
Expand All @@ -136,7 +137,7 @@ SPOCApiPlay >> playTrack: aString withPlaylist: anotherString on: aDevice [
]

{
#category : #parameters,
#category : #response,
#'squeak_changestamp' : 'VE 7/9/2024 11:51'
}
SPOCApiPlay >> tinkerReponseContent: aContentStream [
Expand Down
2 changes: 1 addition & 1 deletion src/SpotifyConnect/SPOCApiPrevious.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SPOCApiPrevious >> skipToPreviousOn: aDevice [
]

{
#category : #'api-call',
#category : #response,
#'squeak_changestamp' : 'VE 7/9/2024 11:51'
}
SPOCApiPrevious >> tinkerReponseContent: aContentStream [
Expand Down
6 changes: 4 additions & 2 deletions src/SpotifyConnect/SPOCApiRecentlyPlayed.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ SPOCApiRecentlyPlayed >> endpointMethod [

{
#category : #'api-call',
#'squeak_changestamp' : 'TL 7/7/2024 01:20'
#'squeak_changestamp' : 'TL 7/11/2024 19:13'
}
SPOCApiRecentlyPlayed >> executeRequest: request withParams: aParameterDictionary [

request rawUrl: (request rawUrl, '?limit=', (aParameterDictionary at: #limit), '&before=', (aParameterDictionary at: #before)).
request rawUrl: (request rawUrl,
'?limit=', (aParameterDictionary at: #limit),
'&before=', (aParameterDictionary at: #before)).
^ self client sendRequest: request
]

Expand Down
7 changes: 5 additions & 2 deletions src/SpotifyConnect/SPOCApiSearch.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ SPOCApiSearch >> endpointMethod [

{
#category : #'api-call',
#'squeak_changestamp' : 'TL 7/7/2024 01:19'
#'squeak_changestamp' : 'TL 7/11/2024 19:14'
}
SPOCApiSearch >> executeRequest: request withParams: aParameterDictionary [

request rawUrl: (request rawUrl, '?q=', (aParameterDictionary at: #input), '&type=', (aParameterDictionary at: #type), '&limit=', (aParameterDictionary at: #limit)).
request rawUrl: (request rawUrl,
'?q=', (aParameterDictionary at: #input),
'&type=', (aParameterDictionary at: #type),
'&limit=', (aParameterDictionary at: #limit)).
^ self client sendRequest: request
]

Expand Down
6 changes: 4 additions & 2 deletions src/SpotifyConnect/SPOCApiVolume.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ SPOCApiVolume >> endpointMethod [

{
#category : #'api-call',
#'squeak_changestamp' : 'TL 6/10/2024 03:28'
#'squeak_changestamp' : 'TL 7/11/2024 19:14'
}
SPOCApiVolume >> executeRequest: request withParams: aParameterDictionary [

request rawUrl: (request rawUrl, '?volume_percent=', (aParameterDictionary at: #volume_percent), '&device_id=', (aParameterDictionary at: #device_id));
request rawUrl: (request rawUrl,
'?volume_percent=', (aParameterDictionary at: #volume_percent),
'&device_id=', (aParameterDictionary at: #device_id));
headerAt: 'Content-Length' put: 0.
^ self client sendRequest: request
]
Loading

0 comments on commit 5c9024a

Please sign in to comment.