Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Room Park Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav Bogdashkin
Room Park Android
Commits
c70a92c2
Commit
c70a92c2
authored
Apr 03, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix offers.getTours return type
parent
4168f8e7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
BigantoRetrofitRepository.kt
.../data/repository/api/biganto/BigantoRetrofitRepository.kt
+3
-1
IBigantoMobileApi.kt
...roompark/data/repository/api/biganto/IBigantoMobileApi.kt
+1
-2
RawData.kt
...isual/roompark/data/repository/api/biganto/raw/RawData.kt
+1
-1
No files found.
app/src/main/java/com/biganto/visual/roompark/data/repository/api/biganto/BigantoRetrofitRepository.kt
View file @
c70a92c2
...
@@ -63,8 +63,10 @@ class BigantoRetrofitRepository @Inject constructor(@Named("bigantoApi") retrof
...
@@ -63,8 +63,10 @@ class BigantoRetrofitRepository @Inject constructor(@Named("bigantoApi") retrof
override
fun
getOfferTours
(
multiTourId
:
Int
):
Observable
<
List
<
TourPreviewRaw
>>
=
override
fun
getOfferTours
(
multiTourId
:
Int
):
Observable
<
List
<
TourPreviewRaw
>>
=
api
api
.
getOfferTours
(
offerId
=
multiTourId
)
.
getOfferTours
(
offerId
=
multiTourId
)
.
compose
(
RetrofitResponseValidation
())
.
compose
(
RetrofitResponseValidation
())
.
map
{
it
.
data
[
multiTourId
]
?.
toList
()
?:
error
(
"No tours avaliable"
)}
.
map
{
it
[
multiTourId
.
toString
()]
?.
toList
()
?:
error
(
"No tours avaliable"
)}
.
doOnError
{
e
(
it
)
}
.
doOnError
{
e
(
it
)
}
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
Schedulers
.
io
())
}
}
...
...
app/src/main/java/com/biganto/visual/roompark/data/repository/api/biganto/IBigantoMobileApi.kt
View file @
c70a92c2
package
com.biganto.visual.roompark.data.repository.api.biganto
package
com.biganto.visual.roompark.data.repository.api.biganto
import
com.biganto.visual.roompark.data.repository.api.biganto.raw.AppVersionRaw
import
com.biganto.visual.roompark.data.repository.api.biganto.raw.AppVersionRaw
import
com.biganto.visual.roompark.data.repository.api.biganto.raw.OfferTours
import
com.biganto.visual.roompark.data.repository.api.biganto.raw.TourFilesDataRaw
import
com.biganto.visual.roompark.data.repository.api.biganto.raw.TourFilesDataRaw
import
com.biganto.visual.roompark.data.repository.api.biganto.raw.TourPreviewRaw
import
com.biganto.visual.roompark.data.repository.api.biganto.raw.TourPreviewRaw
import
com.google.gson.JsonArray
import
com.google.gson.JsonArray
...
@@ -147,7 +146,7 @@ interface IBigantoMobileApi {
...
@@ -147,7 +146,7 @@ interface IBigantoMobileApi {
@Query
(
API_VERSION_PARAM
)
apiVersion
:
String
=
DEFAULT_API_VERSION
,
@Query
(
API_VERSION_PARAM
)
apiVersion
:
String
=
DEFAULT_API_VERSION
,
@Query
(
LANG_PARAM
)
languageCode
:
String
=
Locale
.
getDefault
().
language
,
@Query
(
LANG_PARAM
)
languageCode
:
String
=
Locale
.
getDefault
().
language
,
@Query
(
OFFER_GET_TOURS_ID
)
offerId
:
Int
@Query
(
OFFER_GET_TOURS_ID
)
offerId
:
Int
):
Observable
<
Response
<
OfferTours
>>
):
Observable
<
Response
<
Map
<
String
,
List
<
TourPreviewRaw
>>
>>
@Streaming
@Streaming
@GET
@GET
...
...
app/src/main/java/com/biganto/visual/roompark/data/repository/api/biganto/raw/RawData.kt
View file @
c70a92c2
...
@@ -96,7 +96,7 @@ data class TourGetFilesRaw(
...
@@ -96,7 +96,7 @@ data class TourGetFilesRaw(
)
)
data class
OfferTours
(
data class
OfferTours
(
val
data
:
Map
<
Int
,
List
<
TourPreviewRaw
>>,
val
data
:
Map
<
String
,
List
<
TourPreviewRaw
>>,
val
errors
:
List
<
ErrorRaw
>?
val
errors
:
List
<
ErrorRaw
>?
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment