- 
                  
                  
Set places visit status
Declaration
Swift
func set(items: [Checklist.Item], visited: Bool, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<Bool>)Parameters
itemsPlaces
visitedWhether visited
stubStub behaviour
thenCompletion
 - 
                  
                  
Send contact form
Declaration
Swift
func contact(payload: ContactPayload, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<String>)Parameters
payloadPost payload
stubStub behaviour
thenCompletion
 - 
                  
                  
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
stubStub behaviour
thenCompletion
 - 
                  
                  
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
idLocation ID
reloadForce reload
stubStub behaviour
thenCompletion
 - 
                  
                  
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
pageIndex
reloadForce reload
stubStub behaviour
thenCompletion
 - 
                  
                  
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
idUser ID
pageIndex
reloadForce reload
stubStub behaviour
thenCompletion
 - 
                  
                  
Load location posts
Declaration
Swift
func loadPosts(location id: Int, reload: Bool, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<PostsJSON> = { _ in })Parameters
idLocation ID
reloadForce reload
stubStub behaviour
thenCompletion
 - 
                  
                  
Load user posts
Declaration
Swift
func loadPosts(user id: Int, reload: Bool, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<PostsJSON> = { _ in })Parameters
idUser ID
reloadForce reload
stubStub behaviour
thenCompletion
 - 
                  
                  
Load rankings
Declaration
Swift
func loadRankings(query: RankingsQuery, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<RankingsPageInfoJSON> = { _ in })Parameters
queryFilter
stubStub behaviour
thenCompletion
 - 
                  
                  
Load restaurants
Declaration
Swift
func loadRestaurants(then: @escaping NetworkCompletion<[RestaurantJSON]> = { _ in })Parameters
thenCompletion
 - 
                  
                  
Load scorecard
Declaration
Swift
func loadScorecard(list: Checklist, user id: Int, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<ScorecardJSON> = { _ in })Parameters
listChecklist
idUser ID
stubStub behaviour
thenCompletion
 - 
                  
                  
Load settings
Declaration
Swift
func loadSettings(then: @escaping NetworkCompletion<SettingsJSON> = { _ in }) - 
                  
                  
Load UN countries
Declaration
Swift
func loadUNCountries(then: @escaping NetworkCompletion<[LocationJSON]> = { _ in })Parameters
thenCompletion
 - 
                  
                  
Load user
Declaration
Swift
func loadUser(id: Int, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<UserJSON> = { _ in })Parameters
idUser ID
stubStub behaviour
thenCompletion
 - 
                  
                  
Load WHS
Declaration
Swift
func loadWHS(then: @escaping NetworkCompletion<[WHSJSON]> = { _ in })Parameters
thenCompletion
 - 
                  
                  
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
payloadPhotoUpdatePayload
stubStub behaviour
thenCompletion
 - 
                  
                  
Delete photo
Declaration
Swift
func delete(photo: Int, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<Bool>)Parameters
photoInt
stubStub behaviour
thenCompletion
 - 
                  
                  
Publish post
Declaration
Swift
func postPublish(payload: PostPayload, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<PostReply>)Parameters
payloadPost payload
stubStub behaviour
thenCompletion
 - 
                  
                  
Update post
Declaration
Swift
func postUpdate(payload: PostUpdatePayload, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<Bool>)Parameters
payloadPostUpdatePayload
stubStub behaviour
thenCompletion
 - 
                  
                  
Delete post
Declaration
Swift
func delete(post: Int, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<Bool>)Parameters
postInt
stubStub behaviour
thenCompletion
 - 
                  
                  
Search countries
Declaration
Swift
func searchCountries(query: String = "", then: @escaping NetworkCompletion<[CountryJSON]>)Parameters
queryQuery
thenCompletion
 - 
                  
                  
Search
Declaration
Swift
func search(query: String, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<SearchResultJSON>)Parameters
queryQuery
stubStub behaviour
thenCompletion
 - 
                  
                  
Upload photo
Declaration
Swift
func upload(photo: Data, caption: String?, location id: Int?, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<PhotoReply>)Parameters
photoData
captionString
idLocation ID if any
stubStub behaviour
thenCompletion
 - 
                  
                  
Delete user account
Declaration
Swift
func userDeleteAccount( stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<String> )Parameters
stubStub behaviour
thenCompletion
 - 
                  
                  
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
idUser ID
stubStub behaviour
thenCompletion
 - 
                  
                  
Send reset password link
Declaration
Swift
func userForgotPassword( email: String, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<String> )Parameters
emailEmail
stubStub behaviour
thenCompletion
 - 
                  
                  
Get logged in user info
Declaration
Swift
func userGetByToken( reload: Bool, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<UserJSON> = { _ in } )Parameters
reloadForce reload
stubStub behaviour
thenCompletion
 - 
                  
                  
Login user
Declaration
Swift
func userLogin(email: String, password: String, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<UserJSON>)Parameters
emailEmail
passwordPassword
stubStub behaviour
thenCompletion
 - 
                  
                  
Register new user
Declaration
Swift
func userRegister(payload: RegistrationPayload, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<UserJSON>)Parameters
payloadRegistrationPayload
stubStub behaviour
thenCompletion
 - 
                  
                  
Update user info
Declaration
Swift
func userUpdate(payload: UserUpdatePayload, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<UserJSON>)Parameters
payloadUserUpdatePayload
stubStub behaviour
thenCompletion
 - 
                  
                  
Update user token
Declaration
Swift
func userUpdate(token: String, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<UserTokenReply>)Parameters
tokenString
stubStub behaviour
thenCompletion
 - 
                  
                  
Resend verification email
Declaration
Swift
func userVerify(id: Int, stub: @escaping MTPProvider.StubClosure = MTPProvider.neverStub, then: @escaping NetworkCompletion<String>)Parameters
idUser ID
stubStub behaviour
thenCompletion
 
            View on GitHub
          
      MTPNetworkController Class Reference