Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
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
6a91365e
Commit
6a91365e
authored
Oct 28, 2019
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added api model raws
parent
180f697f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
216 additions
and
0 deletions
+216
-0
build.gradle
app/build.gradle
+9
-0
IRoomParkMobileApi.kt
...ompark/data/repository/api/retrofit/IRoomParkMobileApi.kt
+73
-0
response.kt
...ual/roompark/data/repository/api/retrofit/raw/response.kt
+134
-0
No files found.
app/build.gradle
View file @
6a91365e
...
@@ -121,6 +121,15 @@ dependencies {
...
@@ -121,6 +121,15 @@ dependencies {
implementation
"com.jakewharton.rxbinding3:rxbinding-material:$rxBindingVersion"
implementation
"com.jakewharton.rxbinding3:rxbinding-material:$rxBindingVersion"
//Retrofit2
implementation
'com.google.code.gson:gson:2.8.5'
implementation
'com.squareup.retrofit2:retrofit:2.6.1'
implementation
'com.squareup.retrofit2:converter-gson:2.3.0'
implementation
'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation
'com.squareup.okhttp3:logging-interceptor:3.12.2'
implementation
'com.squareup.okhttp3:okhttp-urlconnection:3.14.0'
//Tests
//Tests
testImplementation
'junit:junit:4.12'
testImplementation
'junit:junit:4.12'
androidTestImplementation
'androidx.test:runner:1.2.0'
androidTestImplementation
'androidx.test:runner:1.2.0'
...
...
app/src/main/java/com/biganto/visual/roompark/data/repository/api/retrofit/IRoomParkMobileApi.kt
0 → 100644
View file @
6a91365e
package
com.biganto.visual.roompark.data.repository.api.retrofit
import
io.reactivex.Observable
import
retrofit2.Response
import
retrofit2.http.GET
import
retrofit2.http.Query
/**
* Created by Vladislav Bogdashkin on 13.06.2018.
*/
interface
IRoomParkMobileApi
{
companion
object
{
// const val BASE_URL="https://stage.room-park.ru:38386"
const
val
BASE_URL
=
"https://room-park.ru"
//const val API_URL="api-novus/"
const
val
API_URL
=
"api/"
const
val
DELIMITER
=
"?"
const
val
CLIENT_TYPE_PARAM
=
"client"
const
val
CLIENT_VERSION_PARAM
=
"client_version"
const
val
API_VERSION_PARAM
=
"v"
const
val
AUTH_TOKEN
=
"auth_token"
const
val
LANG_PARAM
=
"lang"
const
val
DEFAULT_LANG_VALUE
=
"en"
const
val
DEFAULT_CLIENT_TYPE
=
"androidplayer"
//const val DEFAULT_CLIENT_TYPE="iosplayer"
const
val
OLD_CLIENT_TYPE
=
"mobileplayer"
const
val
DEFAULT_CLIENT_VERSION
=
"3.0"
const
val
DEFAULT_API_VERSION
=
"2.0"
//region AppInfo
const
val
GET_APP_VERSION
=
"misc.appVersion"
//endregion
//region GetEstates
const
val
GET_ZONES_METHOD
=
"vr.getZones"
//endregion
//region GetToursOverview
const
val
GET_TOURS_METHOD
=
"vr.getTours"
//"tours.getList"
//const val PARENT_ESTATE_PARAM="id"
const
val
PARENT_ZONE_PARAM
=
"zone"
//endregion
}
@GET
(
"$API_URL$GET_ZONES_METHOD$DELIMITER"
)
fun
authoriz
(
@Query
(
CLIENT_TYPE_PARAM
)
clientType
:
String
=
DEFAULT_CLIENT_TYPE
,
@Query
(
CLIENT_VERSION_PARAM
)
clientVersion
:
String
=
DEFAULT_CLIENT_VERSION
,
@Query
(
API_VERSION_PARAM
)
apiVersion
:
String
=
DEFAULT_API_VERSION
):
Observable
<
Response
<
String
>>
@GET
(
"$API_URL$GET_TOURS_METHOD$DELIMITER"
)
fun
getToursPreviewById
(
@Query
(
CLIENT_TYPE_PARAM
)
clientType
:
String
=
DEFAULT_CLIENT_TYPE
,
@Query
(
CLIENT_VERSION_PARAM
)
clientVersion
:
String
=
DEFAULT_CLIENT_VERSION
,
@Query
(
API_VERSION_PARAM
)
apiVersion
:
String
=
DEFAULT_API_VERSION
,
@Query
(
PARENT_ZONE_PARAM
)
id
:
String
):
Observable
<
Response
<
String
>>
}
\ No newline at end of file
app/src/main/java/com/biganto/visual/roompark/data/repository/api/retrofit/raw/response.kt
0 → 100644
View file @
6a91365e
package
com.biganto.visual.roompark.data.repository.api.retrofit.raw
import
java.util.*
/**
* Created by Vladislav Bogdashkin on 28.10.2019.
*/
data class
AuthRaw
(
val
token
:
String
,
val
id
:
Int
,
val
email
:
String
,
val
name
:
String
)
data class
StatusResponse
(
val
status
:
String
)
data class
DealRaw
(
val
id
:
Int
,
val
estate_id
:
Int
,
val
opportunity_sum
:
Int
,
val
payment_sum
:
Int
,
val
amount_pay_sum
:
Int
,
val
status_id
:
Int
,
val
manager
:
String
,
val
estate
:
EstateRaw
)
data class
EstateRaw
(
val
id
:
Int
,
val
type
:
String
,
val
number
:
String
,
val
common_info
:
CommonInfoRaw
,
val
plan_png
:
PlanRaw
?,
val
plan_jpg
:
PlanRaw
?,
val
url
:
String
,
val
album_id
:
Int
,
val
multitour_id
:
Int
?,
val
explications
:
List
<
ExplicationRaw
>?
)
data class
PlanRaw
(
val
url
:
String
,
val
width
:
Int
,
val
height
:
Int
)
data class
CommonInfoRaw
(
val
building
:
Int
,
val
section_begin
:
Int
,
val
floor
:
Int
,
val
floor_max
:
Int
,
val
area
:
Float
?,
val
area_living
:
Float
?,
val
kind
:
String
?,
val
decoration
:
String
?,
val
ceiling
:
Float
?,
val
windows_face
:
String
?,
val
direction
:
String
?,
val
price_meter
:
Int
?,
val
price
:
Int
?,
val
discount
:
Float
?,
val
doscount_amount
:
Int
?,
val
dependent
:
Boolean
?,
val
rooms
:
Int
?
)
data class
ExplicationRaw
(
val
plan_id
:
Int
,
val
items
:
List
<
EstateRoomRaw
>)
data class
EstateRoomRaw
(
val
title
:
String
,
val
living
:
Boolean
,
val
area
:
Float
)
data class
FeedRaw
(
val
id
:
Int
,
val
alias
:
String
,
val
title
:
String
)
data class
ArticlesListPaginationRaw
(
val
page
:
Int
,
val
pagesize
:
Int
,
val
total
:
Int
,
val
pages
:
Int
,
val
items
:
List
<
NewsArticleRaw
>
)
data class
NewsArticleRaw
(
val
id
:
Int
,
val
published
:
Date
,
val
title
:
String
,
val
announce
:
String
,
val
preview
:
String
?
)
data class
ArticleRaw
(
val
id
:
Int
,
val
published
:
Date
,
val
title
:
String
,
val
body
:
String
,
val
feed_alias
:
String
,
val
photo
:
List
<
NewsPhotoRaw
>?
)
data class
NewsPhotoRaw
(
val
title
:
String
,
val
url
:
String
)
data class
ImageAlbumRaw
(
val
id
:
Int
,
val
title
:
String
,
val
sort
:
Int
,
val
date
:
Date
,
val
parent_id
:
Int
)
data class
GalleryImageRaw
(
val
id
:
Int
,
val
title
:
String
,
val
description
:
String
,
val
sort
:
Int
,
val
album_id
:
Int
,
val
resolutions
:
List
<
ResolutionRaw
>
)
data class
ResolutionRaw
(
val
res_name
:
String
,
val
url
:
String
,
val
width
:
Int
,
val
height
:
Int
)
\ No newline at end of file
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