Skip to content

Latest commit

 

History

History
428 lines (296 loc) · 12.1 KB

ActivityAPI.md

File metadata and controls

428 lines (296 loc) · 12.1 KB

ActivityAPI

All URIs are relative to https://api.lamp.digital

Method HTTP request Description
activityAll GET /activity Get the set of all activities.
activityAllByParticipant GET /participant/{participant_id}/activity Get all activities for a participant.
activityAllByResearcher GET /researcher/{researcher_id}/activity Get all activities for a researcher.
activityAllByStudy GET /study/{study_id}/activity Get all activities in a study.
activityCreate POST /study/{study_id}/activity Create a new Activity under the given Study.
activityDelete DELETE /activity/{activity_id} Delete an Activity.
activityUpdate PUT /activity/{activity_id} Update an Activity's settings.
activityView GET /activity/{activity_id} Get a single activity, by identifier.

activityAll

    open class func activityAll(transform: String? = nil, completion: @escaping (_ data: [Any]?, _ error: Error?) -> Void)

Get the set of all activities.

Get the set of all activities.

Example

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

let transform = "transform_example" // String |  (optional)

// Get the set of all activities.
ActivityAPI.activityAll(transform: transform) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
transform String [optional]

Return type

[Any]

Authorization

Authorization

HTTP request headers

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

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

activityAllByParticipant

    open class func activityAllByParticipant(participantId: String, transform: String? = nil, completion: @escaping (_ data: [Any]?, _ error: Error?) -> Void)

Get all activities for a participant.

Get the set of all activities available to a participant, by participant identifier.

Example

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

let participantId = "participantId_example" // String | 
let transform = "transform_example" // String |  (optional)

// Get all activities for a participant.
ActivityAPI.activityAllByParticipant(participantId: participantId, transform: transform) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
participantId String
transform String [optional]

Return type

[Any]

Authorization

Authorization

HTTP request headers

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

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

activityAllByResearcher

    open class func activityAllByResearcher(researcherId: String, transform: String? = nil, completion: @escaping (_ data: [Any]?, _ error: Error?) -> Void)

Get all activities for a researcher.

Get the set of all activities available to participants of any study conducted by a researcher, by researcher identifier.

Example

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

let researcherId = "researcherId_example" // String | 
let transform = "transform_example" // String |  (optional)

// Get all activities for a researcher.
ActivityAPI.activityAllByResearcher(researcherId: researcherId, transform: transform) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
researcherId String
transform String [optional]

Return type

[Any]

Authorization

Authorization

HTTP request headers

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

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

activityAllByStudy

    open class func activityAllByStudy(studyId: String, transform: String? = nil, completion: @escaping (_ data: [Any]?, _ error: Error?) -> Void)

Get all activities in a study.

Get the set of all activities available to participants of a single study, by study identifier.

Example

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

let studyId = "studyId_example" // String | 
let transform = "transform_example" // String |  (optional)

// Get all activities in a study.
ActivityAPI.activityAllByStudy(studyId: studyId, transform: transform) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
studyId String
transform String [optional]

Return type

[Any]

Authorization

Authorization

HTTP request headers

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

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

activityCreate

    open class func activityCreate(studyId: String, activity: Activity, completion: @escaping (_ data: String?, _ error: Error?) -> Void)

Create a new Activity under the given Study.

Create a new Activity under the given Study.

Example

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

let studyId = "studyId_example" // String | 
let activity = Activity(_id: "_id_example", spec: "spec_example", name: "name_example", schedule: DurationIntervalLegacy(repeatType: "repeatType_example", date: 123, customTimes: [123]), settings: 123) // Activity | 

// Create a new Activity under the given Study.
ActivityAPI.activityCreate(studyId: studyId, activity: activity) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
studyId String
activity Activity

Return type

String

Authorization

Authorization

HTTP request headers

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

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

activityDelete

    open class func activityDelete(activityId: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void)

Delete an Activity.

Delete an Activity.

Example

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

let activityId = "activityId_example" // String | 

// Delete an Activity.
ActivityAPI.activityDelete(activityId: activityId) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
activityId String

Return type

String

Authorization

Authorization

HTTP request headers

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

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

activityUpdate

    open class func activityUpdate(activityId: String, activity: Activity, completion: @escaping (_ data: String?, _ error: Error?) -> Void)

Update an Activity's settings.

Update an Activity's settings.

Example

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

let activityId = "activityId_example" // String | 
let activity = Activity(_id: "_id_example", spec: "spec_example", name: "name_example", schedule: DurationIntervalLegacy(repeatType: "repeatType_example", date: 123, customTimes: [123]), settings: 123) // Activity | 

// Update an Activity's settings.
ActivityAPI.activityUpdate(activityId: activityId, activity: activity) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
activityId String
activity Activity

Return type

String

Authorization

Authorization

HTTP request headers

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

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

activityView

    open class func activityView(activityId: String, transform: String? = nil, completion: @escaping (_ data: [Any]?, _ error: Error?) -> Void)

Get a single activity, by identifier.

Get a single activity, by identifier.

Example

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

let activityId = "activityId_example" // String | 
let transform = "transform_example" // String |  (optional)

// Get a single activity, by identifier.
ActivityAPI.activityView(activityId: activityId, transform: transform) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
activityId String
transform String [optional]

Return type

[Any]

Authorization

Authorization

HTTP request headers

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

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