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
861721e4
Commit
861721e4
authored
Oct 28, 2019
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added plan types etc api methods
parent
6a91365e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
211 additions
and
12 deletions
+211
-12
IRoomParkMobileApi.kt
...ompark/data/repository/api/retrofit/IRoomParkMobileApi.kt
+201
-12
response.kt
...ual/roompark/data/repository/api/retrofit/raw/response.kt
+10
-0
No files found.
app/src/main/java/com/biganto/visual/roompark/data/repository/api/retrofit/IRoomParkMobileApi.kt
View file @
861721e4
package
com.biganto.visual.roompark.data.repository.api.retrofit
import
com.biganto.visual.roompark.data.repository.api.retrofit.raw.*
import
io.reactivex.Observable
import
retrofit2.Response
import
retrofit2.http.GET
import
retrofit2.http.POST
import
retrofit2.http.Query
...
...
@@ -41,33 +43,220 @@ interface IRoomParkMobileApi{
const
val
GET_APP_VERSION
=
"misc.appVersion"
//endregion
//region GetEstates
const
val
GET_ZONES_METHOD
=
"vr.getZones"
//region Authorization
const
val
AUTH_METHOD
=
"users.authorize"
const
val
EMAIL_AUTH_PARAM
=
"email"
const
val
PASSWORD_AUTH_PARAM
=
"password"
//endregion
//region GetToursOverview
const
val
GET_TOURS_METHOD
=
"vr.getTours"
//"tours.getList"
//const val PARENT_ESTATE_PARAM="id"
const
val
PARENT_ZONE_PARAM
=
"zone"
//region Subscription
const
val
SUBSCRIBE_METHOD
=
"users.subscribe"
const
val
UNSUBSCRIBE_METHOD
=
"users.unsubscribe"
const
val
DEVICE_TOKEN_SUBSCRIBTION_PARAM
=
"deviceToken"
const
val
TOPIC_SUBSCRIBTION_PARAM
=
"topic"
val
topicTypes
=
arrayOf
(
"deals"
,
"progress-1"
,
"progress-2"
,
"progress-3"
,
"progress-kindergarden"
,
"progress-school"
,
"progress-landscaping"
,
"news"
,
"blog"
,
"constructing-blog"
)
//endregion
//region GetDeals
const
val
DEALS_METHOD
=
"users.getDeals"
//endregion
//region GetFavorites
const
val
FAVORITES_METHOD
=
"users.getFavorites"
//endregion
//region GetFavorites
const
val
FEEDS_METHOD
=
"news.getFeeds"
//endregion
//region GetFavorites
const
val
GET_ARTICLES_PAGE_METHOD
=
"news.getArticlesList"
const
val
ARTICLES_PAGINATION_ALIAS_PARAM
=
"feed_alias"
const
val
ARTICLES_PAGINATION_PAGE_SIZE_PARAM
=
"pagesize "
const
val
ARTICLES_PAGINATION_PAGE_PARAM
=
"page"
//endregion
//region GetFavorites
const
val
GET_ARTICLE_METHOD
=
"news.getArticle"
const
val
ARTICLE_ID_PARAM
=
"article_id"
//endregion
//region GetAlbums
const
val
ALBUMS_METHOD
=
"progress.getAlbums"
const
val
PARENT_ALBUMD_ID_PARAM
=
"parent_id"
//endregion
//region GetAlbums
const
val
PHOTOS_METHOD
=
"progress.getPhotos"
const
val
PHOTOS_ALBUMD_ID_PARAM
=
"album_id"
//endregion
//region Get Plan Types
const
val
GET_PLAN_TYPES_METHOD
=
"estates.getPlanTypes"
const
val
PLAN_TYPES_ESTATE_ID_PARAM
=
"estate_id"
//endregion
//region Get Plan Types
const
val
GET_DIRECT_PLAN_METHOD
=
"estates.getPlan"
const
val
DIRECT_PLAN_ESTATE_ID_PARAM
=
"estate_id"
const
val
DIRECT_PLAN_TYPE_PARAM
=
"plan_type"
val
planTypes
=
arrayListOf
(
Pair
(
0
,
"проектная планировка"
),
Pair
(
1
,
"перепланировка №1"
),
Pair
(
2
,
"перепланировка №2"
)
)
const
val
DIRECT_PLAN_FURNITURE_PARAM
=
"furniture"
const
val
DIRECT_PLAN_SIZES_PARAM
=
"sizes"
const
val
DIRECT_PLAN_WALLS_PARAM
=
"walls"
const
val
DIRECT_PLAN_ELECTRIC_PARAM
=
"electric"
//endregion
//region Get MultitourId
const
val
GET_MULTITOUR_ID
=
"estates.getMultiTour"
const
val
MULTITOUR_BUILDING_NUMBER_PARAM
=
"building "
const
val
MULTITOUR_FLAT_NUMBER_PARAM
=
"number "
//endregion
}
@GET
(
"$API_URL$
GET_ZONES
_METHOD$DELIMITER"
)
@GET
(
"$API_URL$
AUTH
_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
,
@Query
(
EMAIL_AUTH_PARAM
)
email
:
String
,
@Query
(
PASSWORD_AUTH_PARAM
)
pwd
:
String
):
Observable
<
Response
<
AuthRaw
>>
@POST
(
"$API_URL${SUBSCRIBE_METHOD}OD$DELIMITER"
)
fun
subscribe
(
@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
(
AUTH_TOKEN
)
token
:
String
,
@Query
(
DEVICE_TOKEN_SUBSCRIBTION_PARAM
)
deviceToken
:
String
,
@Query
(
TOPIC_SUBSCRIBTION_PARAM
)
topic
:
String
):
Observable
<
Response
<
StatusResponse
>>
@POST
(
"$API_URL${UNSUBSCRIBE_METHOD}OD$DELIMITER"
)
fun
unsubscribe
(
@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
(
AUTH_TOKEN
)
token
:
String
,
@Query
(
DEVICE_TOKEN_SUBSCRIBTION_PARAM
)
deviceToken
:
String
,
@Query
(
TOPIC_SUBSCRIBTION_PARAM
)
topic
:
String
):
Observable
<
Response
<
StatusResponse
>>
@GET
(
"$API_URL$DEALS_METHOD$DELIMITER"
)
fun
getDeals
(
@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
(
AUTH_TOKEN
)
token
:
String
):
Observable
<
Response
<
List
<
DealRaw
>>>
@GET
(
"$API_URL$FAVORITES_METHOD$DELIMITER"
)
fun
getFavorites
(
@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
(
AUTH_TOKEN
)
token
:
String
):
Observable
<
Response
<
List
<
EstateRaw
>>>
@GET
(
"$API_URL$FEEDS_METHOD$DELIMITER"
)
fun
getFeeds
(
@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
>>
):
Observable
<
Response
<
List
<
FeedRaw
>>>
@GET
(
"$API_URL$GET_ARTICLES_PAGE_METHOD$DELIMITER"
)
fun
getArticlesPage
(
@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
(
ARTICLES_PAGINATION_ALIAS_PARAM
)
alias
:
String
,
@Query
(
ARTICLES_PAGINATION_PAGE_SIZE_PARAM
)
pageSize
:
Int
,
@Query
(
ARTICLES_PAGINATION_PAGE_PARAM
)
page
:
Int
):
Observable
<
Response
<
ArticlesListPaginationRaw
>>
@GET
(
"$API_URL$GET_ARTICLE_METHOD$DELIMITER"
)
fun
getArticle
(
@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
(
ARTICLE_ID_PARAM
)
id
:
Int
):
Observable
<
Response
<
ArticleRaw
>>
@GET
(
"$API_URL$ALBUMS_METHOD$DELIMITER"
)
fun
getAlbums
(
@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_ALBUMD_ID_PARAM
)
id
:
Int
?
):
Observable
<
Response
<
List
<
ImageAlbumRaw
>>>
@GET
(
"$API_URL$PHOTOS_METHOD$DELIMITER"
)
fun
getPhotos
(
@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
(
PHOTOS_ALBUMD_ID_PARAM
)
id
:
Int
):
Observable
<
Response
<
List
<
NewsPhotoRaw
>>>
@GET
(
"$API_URL$GET_PLAN_TYPES_METHOD$DELIMITER"
)
fun
getPlanTypes
(
@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
(
PLAN_TYPES_ESTATE_ID_PARAM
)
estateId
:
Int
):
Observable
<
Response
<
List
<
PlanTypeRaw
>>>
@GET
(
"$API_URL$GET_DIRECT_PLAN_METHOD$DELIMITER"
)
fun
getPlan
(
@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
(
DIRECT_PLAN_ESTATE_ID_PARAM
)
estate_id
:
Int
,
@Query
(
DIRECT_PLAN_TYPE_PARAM
)
planType
:
Int
,
@Query
(
DIRECT_PLAN_FURNITURE_PARAM
)
furniture
:
Int
,
@Query
(
DIRECT_PLAN_SIZES_PARAM
)
sizes
:
Int
,
@Query
(
DIRECT_PLAN_WALLS_PARAM
)
walls
:
Int
,
@Query
(
DIRECT_PLAN_ELECTRIC_PARAM
)
electric
:
Int
):
Observable
<
Response
<
List
<
PlanRaw
>>>
@GET
(
"$API_URL$GET_
TOURS_METHO
D$DELIMITER"
)
fun
get
ToursPreviewBy
Id
(
@GET
(
"$API_URL$GET_
MULTITOUR_I
D$DELIMITER"
)
fun
get
MultiTour
Id
(
@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
>>
@Query
(
MULTITOUR_BUILDING_NUMBER_PARAM
)
building
:
Int
,
@Query
(
MULTITOUR_FLAT_NUMBER_PARAM
)
flatNumber
:
Int
):
Observable
<
Response
<
List
<
PlanRaw
>>>
}
\ No newline at end of file
app/src/main/java/com/biganto/visual/roompark/data/repository/api/retrofit/raw/response.kt
View file @
861721e4
...
...
@@ -131,4 +131,14 @@ data class ResolutionRaw(
val
url
:
String
,
val
width
:
Int
,
val
height
:
Int
)
data class
PlanTypeRaw
(
val
plan_id
:
Int
,
val
title
:
String
,
val
features
:
List
<
String
>
)
data class
MultiTourRaw
(
val
multiTourId
:
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