-
Set places visit status
Declaration
Swift
func set(items: [Checklist.Item], visited: Bool, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<Bool>)
Parameters
items
Places
visited
Whether visited
stub
Stub behaviour
then
Completion
-
Send contact form
Declaration
Swift
func contact(payload: ContactPayload, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<String>)
Parameters
payload
Post payload
stub
Stub behaviour
then
Completion
-
Load beaches
Declaration
Swift
func loadBeaches(then: @escaping NetworkCompletion<[PlaceJSON]> = { _ in })
-
Load brands
Declaration
Swift
func loadBrands(then: @escaping NetworkCompletion<[BrandJSON]> = { _ in })
-
Load checklists
Declaration
Swift
func loadChecklists(stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<Checked> = { _ in })
Parameters
stub
Stub behaviour
then
Completion
-
Load dive sites
Declaration
Swift
func loadDiveSites(then: @escaping NetworkCompletion<[PlaceJSON]> = { _ in })
-
Load golf courses
Declaration
Swift
func loadGolfCourses(then: @escaping NetworkCompletion<[PlaceJSON]> = { _ in })
-
Load hotels
Declaration
Swift
func loadHotels(then: @escaping NetworkCompletion<[HotelJSON]> = { _ in })
-
Load locations
Declaration
Swift
func loadLocations(then: @escaping NetworkCompletion<[LocationJSON]> = { _ in })
-
Load location photos
Declaration
Swift
func loadPhotos(location id: Int, reload: Bool, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<PhotosInfoJSON> = { _ in })
Parameters
id
Location ID
reload
Force reload
stub
Stub behaviour
then
Completion
-
Load logged in user photos
Declaration
Swift
func loadPhotos(page: Int, reload: Bool, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<PhotosPageInfoJSON> = { _ in })
Parameters
page
Index
reload
Force reload
stub
Stub behaviour
then
Completion
-
Load user photos
Declaration
Swift
func loadPhotos(profile id: Int, page: Int, reload: Bool, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<PhotosPageInfoJSON> = { _ in })
Parameters
id
User ID
page
Index
reload
Force reload
stub
Stub behaviour
then
Completion
-
Load location posts
Declaration
Swift
func loadPosts(location id: Int, reload: Bool, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<PostsJSON> = { _ in })
Parameters
id
Location ID
reload
Force reload
stub
Stub behaviour
then
Completion
-
Load user posts
Declaration
Swift
func loadPosts(user id: Int, reload: Bool, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<PostsJSON> = { _ in })
Parameters
id
User ID
reload
Force reload
stub
Stub behaviour
then
Completion
-
Load rankings
Declaration
Swift
func loadRankings(query: RankingsQuery, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<RankingsPageInfoJSON> = { _ in })
Parameters
query
Filter
stub
Stub behaviour
then
Completion
-
Load restaurants
Declaration
Swift
func loadRestaurants(then: @escaping NetworkCompletion<[RestaurantJSON]> = { _ in })
Parameters
then
Completion
-
Load scorecard
Declaration
Swift
func loadScorecard(list: Checklist, user id: Int, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<ScorecardJSON> = { _ in })
Parameters
list
Checklist
id
User ID
stub
Stub behaviour
then
Completion
-
Load settings
Declaration
Swift
func loadSettings(then: @escaping NetworkCompletion<SettingsJSON> = { _ in })
-
Load UN countries
Declaration
Swift
func loadUNCountries(then: @escaping NetworkCompletion<[LocationJSON]> = { _ in })
Parameters
then
Completion
-
Load user
Declaration
Swift
func loadUser(id: Int, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<UserJSON> = { _ in })
Parameters
id
User ID
stub
Stub behaviour
then
Completion
-
Load WHS
Declaration
Swift
func loadWHS(then: @escaping NetworkCompletion<[WHSJSON]> = { _ in })
Parameters
then
Completion
-
Load world map
Declaration
Swift
func loadWorldMap(then: @escaping NetworkCompletion<GeoJSON> = { _ in })
-
Update photo
Declaration
Swift
func photoUpdate(payload: PhotoUpdatePayload, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<Bool>)
Parameters
payload
PhotoUpdatePayload
stub
Stub behaviour
then
Completion
-
Delete photo
Declaration
Swift
func delete(photo: Int, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<Bool>)
Parameters
photo
Int
stub
Stub behaviour
then
Completion
-
Publish post
Declaration
Swift
func postPublish(payload: PostPayload, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<PostReply>)
Parameters
payload
Post payload
stub
Stub behaviour
then
Completion
-
Update post
Declaration
Swift
func postUpdate(payload: PostUpdatePayload, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<Bool>)
Parameters
payload
PostUpdatePayload
stub
Stub behaviour
then
Completion
-
Delete post
Declaration
Swift
func delete(post: Int, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<Bool>)
Parameters
post
Int
stub
Stub behaviour
then
Completion
-
Search countries
Declaration
Swift
func searchCountries(query: String = "", then: @escaping NetworkCompletion<[CountryJSON]>)
Parameters
query
Query
then
Completion
-
Search
Declaration
Swift
func search(query: String, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<SearchResultJSON>)
Parameters
query
Query
stub
Stub behaviour
then
Completion
-
Upload photo
Declaration
Swift
func upload(photo: Data, caption: String?, location id: Int?, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<PhotoReply>)
Parameters
photo
Data
caption
String
id
Location ID if any
stub
Stub behaviour
then
Completion
-
Delete user account
Declaration
Swift
func userDeleteAccount( stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<String> )
Parameters
stub
Stub behaviour
then
Completion
-
Load user, triggering visit rebuild to sort problems like 2020 country changes
Declaration
Swift
func userFix(id: Int, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<UserJSON> = { _ in })
Parameters
id
User ID
stub
Stub behaviour
then
Completion
-
Send reset password link
Declaration
Swift
func userForgotPassword( email: String, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<String> )
Parameters
email
Email
stub
Stub behaviour
then
Completion
-
Get logged in user info
Declaration
Swift
func userGetByToken( reload: Bool, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<UserJSON> = { _ in } )
Parameters
reload
Force reload
stub
Stub behaviour
then
Completion
-
Login user
Declaration
Swift
func userLogin(email: String, password: String, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<UserJSON>)
Parameters
email
Email
password
Password
stub
Stub behaviour
then
Completion
-
Register new user
Declaration
Swift
func userRegister(payload: RegistrationPayload, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<UserJSON>)
Parameters
payload
RegistrationPayload
stub
Stub behaviour
then
Completion
-
Update user info
Declaration
Swift
func userUpdate(payload: UserUpdatePayload, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<UserJSON>)
Parameters
payload
UserUpdatePayload
stub
Stub behaviour
then
Completion
-
Update user token
Declaration
Swift
func userUpdate(token: String, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<UserTokenReply>)
Parameters
token
String
stub
Stub behaviour
then
Completion
-
Resend verification email
Declaration
Swift
func userVerify(id: Int, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<String>)
Parameters
id
User ID
stub
Stub behaviour
then
Completion