Skip to content

Latest commit

 

History

History
102 lines (69 loc) · 3.29 KB

File metadata and controls

102 lines (69 loc) · 3.29 KB

UsersAPI

All URIs are relative to https://finchapp.eastus.cloudapp.azure.com/api

Method HTTP request Description
registerIOSDevice POST /registerIOSDevice This route will be called once a user logs in on an iOS device and route body will contain the URL of the iOS device, this will be stored in the User model.
updateUser PUT /update/user This route receives a payload with requests to change data of a user

registerIOSDevice

    open class func registerIOSDevice(completion: @escaping (_ data: ApiError?, _ error: Error?) -> Void)

This route will be called once a user logs in on an iOS device and route body will contain the URL of the iOS device, this will be stored in the User model.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient


// This route will be called once a user logs in on an iOS device and route body will contain the URL of the iOS device, this will be stored in the User model.
UsersAPI.registerIOSDevice() { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

This endpoint does not need any parameter.

Return type

ApiError

Authorization

sidCookie

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateUser

    open class func updateUser(updateUserRequest: UpdateUserRequest, completion: @escaping (_ data: User?, _ error: Error?) -> Void)

This route receives a payload with requests to change data of a user

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient

let updateUserRequest = UpdateUserRequest(email: "email_example", password: "password_example", firstName: "firstName_example", lastName: "lastName_example", income: 123, netWorth: 123, location: Location(hasLocation: false, lat: 123, lon: 123), birthday: Date()) // UpdateUserRequest | 

// This route receives a payload with requests to change data of a user
UsersAPI.updateUser(updateUserRequest: updateUserRequest) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
updateUserRequest UpdateUserRequest

Return type

User

Authorization

sidCookie

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]