From 83d76768b9ba7a5363080285803282645d246748 Mon Sep 17 00:00:00 2001 From: "Mike P. Sinn" Date: Fri, 3 Nov 2017 22:53:58 -0500 Subject: [PATCH] 5.8.1103 --- README.md | 305 +- autoload.php | 6 +- composer.json | 2 +- docs/Api/AnalyticsApi.md | 442 ++ docs/Api/ApplicationEndpointsApi.md | 795 --- docs/Api/AuthenticationApi.md | 219 +- docs/Api/ConnectorsApi.md | 346 +- docs/Api/CorrelationsApi.md | 699 --- docs/Api/MeasurementsApi.md | 707 +-- docs/Api/NotificationsApi.md | 90 + docs/Api/OrganizationsApi.md | 67 - docs/Api/PairsApi.md | 162 - docs/Api/RemindersApi.md | 322 +- docs/Api/StudyApi.md | 50 + docs/Api/TagsApi.md | 112 - docs/Api/UnitsApi.md | 117 +- docs/Api/UserApi.md | 85 +- docs/Api/VariablesApi.md | 507 +- docs/Api/VotesApi.md | 114 - .../{MeasurementSource.md => Animation.md} | 4 +- ...eminderNotificationSnooze.md => Button.md} | 5 +- docs/Model/Chart.md | 18 + docs/Model/ChartConfig.md | 16 + ...inderNotificationSkip.md => ChartStyle.md} | 4 +- docs/Model/Column.md | 14 + docs/Model/CommonResponse.md | 3 +- docs/Model/CommonVariable.md | 136 + ...nerUserField.md => CommonVariableArray.md} | 3 +- docs/Model/Connection.md | 20 - docs/Model/Connector.md | 33 +- docs/Model/ConnectorArray.md | 9 + docs/Model/ConnectorInfo.md | 13 - docs/Model/ConnectorInfoHistoryItem.md | 13 - docs/Model/ConnectorInstruction.md | 2 +- docs/Model/Correlation.md | 227 +- docs/Model/CorrelationArray.md | 9 + docs/Model/Credential.md | 15 - docs/Model/Credit.md | 10 + docs/Model/DataSource.md | 22 + docs/Model/Explanation.md | 14 + docs/Model/ExplanationStartTracking.md | 12 + ...edResponse.md => GetConnectorsResponse.md} | 7 +- docs/Model/GetCorrelationsDataResponse.md | 11 + docs/Model/GetCorrelationsResponse.md | 13 + docs/Model/GetMeasurementsResponse.md | 43 + docs/Model/GetMeasurementsResponseArray.md | 9 + docs/Model/GetPairsResponse.md | 15 + docs/Model/GetPairsResponseArray.md | 9 + docs/Model/GetPublicVariablesResponse.md | 68 + docs/Model/GetPublicVariablesResponseArray.md | 9 + docs/Model/GetStudyDataResponse.md | 19 + docs/Model/GetStudyResponse.md | 28 + ...tTrackingReminderNotificationsResponse.md} | 8 +- docs/Model/GetTrackingRemindersResponse.md | 70 + .../GetTrackingRemindersResponseArray.md | 9 + docs/Model/Highchart.md | 13 + docs/Model/HighchartArray.md | 9 + docs/Model/Hover.md | 12 + docs/Model/Image.md | 12 + docs/Model/InlineResponse20011.md | 11 - docs/Model/InlineResponse2003.md | 11 - docs/Model/InlineResponse2004.md | 11 - docs/Model/InlineResponse2005.md | 11 - docs/Model/InlineResponse2007.md | 11 - docs/Model/InlineResponse2008.md | 11 - docs/Model/InlineResponse2009.md | 11 - docs/Model/JsonErrorResponse.md | 2 +- docs/Model/Lang.md | 10 + docs/Model/Legend.md | 10 + docs/Model/{HumanTime.md => Loading.md} | 8 +- ... => LocalDailyReminderNotificationTime.md} | 5 +- ...LocalDailyReminderNotificationTimeArray.md | 9 + ...ReminderNotificationTimesForAllReminder.md | 10 + ...derNotificationTimesForAllReminderArray.md | 9 + .../Model/{InlineResponse200.md => Marker.md} | 7 +- docs/Model/Measurement.md | 50 +- docs/Model/MeasurementArray.md | 9 + docs/Model/MeasurementDelete.md | 2 +- .../{ValueObject.md => MeasurementItem.md} | 4 +- docs/Model/MeasurementRange.md | 11 - docs/Model/MeasurementSet.md | 8 +- docs/Model/MeasurementUpdate.md | 4 +- docs/Model/Option.md | 19 + docs/Model/Pair.md | 20 + docs/Model/{VariablesNew.md => PairArray.md} | 2 +- ...se2006.md => PairsOfAveragesForAllUser.md} | 6 +- docs/Model/PairsOfAveragesForAllUserArray.md | 9 + docs/Model/ParticipantInstruction.md | 11 + docs/Model/Permission.md | 16 - .../{InlineResponse2002.md => PlotOption.md} | 6 +- docs/Model/PostCorrelation.md | 2 +- docs/Model/PostMeasurementsDataResponse.md | 10 + docs/Model/PostMeasurementsResponse.md | 13 + docs/Model/PostStudyPublishResponse.md | 11 + .../PostTrackingRemindersDataResponse.md | 12 + docs/Model/PostTrackingRemindersResponse.md | 13 + docs/Model/PostUserSettingsDataResponse.md | 10 + docs/Model/PostUserSettingsResponse.md | 13 + docs/Model/PostVote.md | 12 - docs/Model/ProcessedDailyMeasurement.md | 22 + docs/Model/Scatter.md | 12 + docs/Model/Scope.md | 10 + docs/Model/ScopeArray.md | 9 + docs/Model/Series.md | 15 + docs/Model/State.md | 10 + docs/Model/Study.md | 20 + docs/Model/Subtitle.md | 10 + docs/Model/Text.md | 18 + .../Model/{InlineResponse2001.md => Title.md} | 6 +- docs/Model/Tooltip.md | 11 + docs/Model/TrackingReminder.md | 81 +- docs/Model/TrackingReminderArray.md | 9 + docs/Model/TrackingReminderDelete.md | 2 +- docs/Model/TrackingReminderNotification.md | 73 +- ...TrackingReminderNotificationActionArray.md | 13 + .../TrackingReminderNotificationArray.md | 9 + ...md => TrackingReminderNotificationPost.md} | 5 +- ...ckingReminderNotificationTrackAllAction.md | 13 + .../TrackingReminderNotificationsArray.md | 9 + docs/Model/TrackingRemindersArray.md | 9 + docs/Model/Unit.md | 14 +- docs/Model/UnitArray.md | 9 + docs/Model/UnitCategory.md | 2 + docs/Model/Update.md | 17 - docs/Model/User.md | 46 +- docs/Model/UserStudy.md | 129 + docs/Model/UserTag.md | 2 +- docs/Model/UserTokenRequest.md | 11 - docs/Model/UserTokenSuccessfulResponse.md | 12 - ...erTokenSuccessfulResponseInnerUserField.md | 11 - docs/Model/UserVariable.md | 176 +- docs/Model/UserVariableArray.md | 9 + docs/Model/UserVariableRelationship.md | 26 - docs/Model/UserVariables.md | 20 - docs/Model/Variable.md | 41 - docs/Model/VariableCategory.md | 28 + docs/Model/VariableCategoryArray.md | 9 + docs/Model/VariableNew.md | 14 - docs/Model/VariableUserSource.md | 17 - docs/Model/Vote.md | 14 +- docs/Model/XAxi.md | 15 + docs/Model/YAxi.md | 14 + git_push.sh | 6 +- lib/Api/AnalyticsApi.php | 889 +++ lib/Api/ApplicationEndpointsApi.php | 1766 ------ lib/Api/AuthenticationApi.php | 412 +- lib/Api/ConnectorsApi.php | 656 +-- lib/Api/CorrelationsApi.php | 1452 ----- lib/Api/MeasurementsApi.php | 1424 ++--- lib/Api/NotificationsApi.php | 217 + lib/Api/OrganizationsApi.php | 215 - lib/Api/PairsApi.php | 429 -- lib/Api/RemindersApi.php | 633 +-- lib/Api/StudyApi.php | 157 + lib/Api/TagsApi.php | 276 - lib/Api/UnitsApi.php | 204 +- lib/Api/UserApi.php | 195 +- lib/Api/VariablesApi.php | 1080 ++-- lib/Api/VotesApi.php | 279 - lib/ApiClient.php | 12 +- lib/ApiException.php | 6 +- lib/Configuration.php | 40 +- lib/Model/Animation.php | 248 + lib/Model/Button.php | 281 + lib/Model/Chart.php | 512 ++ lib/Model/ChartConfig.php | 446 ++ lib/Model/ChartStyle.php | 248 + lib/Model/Column.php | 380 ++ lib/Model/CommonResponse.php | 74 +- lib/Model/CommonVariable.php | 4201 ++++++++++++++ lib/Model/CommonVariableArray.php | 223 + lib/Model/Connection.php | 489 -- lib/Model/Connector.php | 783 ++- lib/Model/ConnectorArray.php | 223 + lib/Model/ConnectorInfo.php | 331 -- lib/Model/ConnectorInfoHistoryItem.php | 331 -- lib/Model/ConnectorInstruction.php | 63 +- lib/Model/ConversionStep.php | 44 +- lib/Model/Correlation.php | 4852 ++++++++++++++--- lib/Model/CorrelationArray.php | 223 + lib/Model/Credential.php | 359 -- lib/Model/Credit.php | 248 + lib/Model/DataSource.php | 644 +++ lib/Model/Explanation.php | 380 ++ lib/Model/ExplanationStartTracking.php | 314 ++ lib/Model/GetConnectorsResponse.php | 335 ++ lib/Model/GetCorrelationsDataResponse.php | 281 + lib/Model/GetCorrelationsResponse.php | 335 ++ lib/Model/GetMeasurementsResponse.php | 1133 ++++ lib/Model/GetMeasurementsResponseArray.php | 223 + lib/Model/GetPairsResponse.php | 377 ++ lib/Model/GetPairsResponseArray.php | 223 + lib/Model/GetPublicVariablesResponse.php | 1808 ++++++ lib/Model/GetPublicVariablesResponseArray.php | 223 + lib/Model/GetStudyDataResponse.php | 545 ++ lib/Model/GetStudyResponse.php | 740 +++ ...tTrackingReminderNotificationsResponse.php | 335 ++ lib/Model/GetTrackingRemindersResponse.php | 1874 +++++++ .../GetTrackingRemindersResponseArray.php | 223 + lib/Model/Highchart.php | 323 ++ lib/Model/HighchartArray.php | 223 + lib/Model/Hover.php | 314 ++ lib/Model/HumanTime.php | 281 - lib/Model/Image.php | 314 ++ lib/Model/InlineResponse200.php | 255 - lib/Model/InlineResponse2001.php | 255 - lib/Model/InlineResponse20010.php | 255 - lib/Model/InlineResponse20011.php | 255 - lib/Model/InlineResponse20012.php | 255 - lib/Model/InlineResponse2002.php | 255 - lib/Model/InlineResponse2003.php | 255 - lib/Model/InlineResponse2004.php | 255 - lib/Model/InlineResponse2005.php | 255 - lib/Model/InlineResponse2006.php | 255 - lib/Model/InlineResponse2007.php | 255 - lib/Model/InlineResponse2008.php | 255 - lib/Model/InlineResponse2009.php | 255 - lib/Model/JsonErrorResponse.php | 66 +- lib/Model/Lang.php | 248 + lib/Model/Legend.php | 248 + lib/Model/Loading.php | 314 ++ .../LocalDailyReminderNotificationTime.php | 242 + ...ocalDailyReminderNotificationTimeArray.php | 223 + ...eminderNotificationTimesForAllReminder.php | 242 + ...erNotificationTimesForAllReminderArray.php | 223 + lib/Model/Marker.php | 314 ++ lib/Model/Measurement.php | 1222 ++++- lib/Model/MeasurementArray.php | 223 + lib/Model/MeasurementDelete.php | 76 +- lib/Model/MeasurementItem.php | 308 ++ lib/Model/MeasurementRange.php | 261 - lib/Model/MeasurementSet.php | 184 +- lib/Model/MeasurementSource.php | 235 - lib/Model/MeasurementUpdate.php | 84 +- lib/Model/Option.php | 545 ++ lib/Model/Pair.php | 560 ++ lib/Model/PairArray.php | 223 + lib/Model/Pairs.php | 19 +- lib/Model/PairsOfAveragesForAllUser.php | 269 + lib/Model/PairsOfAveragesForAllUserArray.php | 223 + lib/Model/ParticipantInstruction.php | 269 + lib/Model/Permission.php | 427 -- lib/Model/PlotOption.php | 281 + lib/Model/PostCorrelation.php | 74 +- lib/Model/PostMeasurementsDataResponse.php | 242 + lib/Model/PostMeasurementsResponse.php | 335 ++ lib/Model/PostStudyPublishResponse.php | 269 + .../PostTrackingRemindersDataResponse.php | 296 + lib/Model/PostTrackingRemindersResponse.php | 335 ++ lib/Model/PostUserSettingsDataResponse.php | 242 + lib/Model/PostUserSettingsResponse.php | 335 ++ lib/Model/PostVote.php | 299 - lib/Model/ProcessedDailyMeasurement.php | 644 +++ lib/Model/Scatter.php | 314 ++ lib/Model/Scope.php | 242 + lib/Model/ScopeArray.php | 223 + lib/Model/Series.php | 413 ++ lib/Model/State.php | 248 + lib/Model/Study.php | 566 ++ lib/Model/Subtitle.php | 248 + lib/Model/Text.php | 458 ++ lib/Model/Title.php | 281 + lib/Model/Tooltip.php | 281 + lib/Model/TrackingReminder.php | 1837 ++++++- lib/Model/TrackingReminderArray.php | 223 + lib/Model/TrackingReminderDelete.php | 21 +- lib/Model/TrackingReminderNotification.php | 1750 +++++- ...rackingReminderNotificationActionArray.php | 347 ++ .../TrackingReminderNotificationArray.php | 223 + .../TrackingReminderNotificationPost.php | 345 ++ .../TrackingReminderNotificationSkip.php | 235 - .../TrackingReminderNotificationSnooze.php | 235 - .../TrackingReminderNotificationTrack.php | 261 - ...kingReminderNotificationTrackAllAction.php | 347 ++ .../TrackingReminderNotificationsArray.php | 223 + lib/Model/TrackingRemindersArray.php | 223 + lib/Model/Unit.php | 374 +- lib/Model/UnitArray.php | 223 + lib/Model/UnitCategory.php | 81 +- lib/Model/Update.php | 423 -- lib/Model/User.php | 1151 +++- lib/Model/UserStudy.php | 3455 ++++++++++++ lib/Model/UserTag.php | 93 +- lib/Model/UserTokenFailedResponse.php | 299 - lib/Model/UserTokenRequest.php | 261 - lib/Model/UserTokenRequestInnerUserField.php | 229 - lib/Model/UserTokenSuccessfulResponse.php | 299 - ...rTokenSuccessfulResponseInnerUserField.php | 267 - lib/Model/UserVariable.php | 3900 ++++++++++--- lib/Model/UserVariableArray.php | 223 + lib/Model/UserVariableDelete.php | 19 +- lib/Model/UserVariableRelationship.php | 717 --- lib/Model/UserVariables.php | 501 -- lib/Model/ValueObject.php | 293 - lib/Model/Variable.php | 1236 ----- lib/Model/VariableCategory.php | 783 ++- lib/Model/VariableCategoryArray.php | 223 + lib/Model/VariableNew.php | 390 -- lib/Model/VariableUserSource.php | 441 -- lib/Model/VariablesNew.php | 211 - lib/Model/Vote.php | 216 +- lib/Model/VoteDelete.php | 20 +- lib/Model/XAxi.php | 413 ++ lib/Model/YAxi.php | 380 ++ lib/ObjectSerializer.php | 23 +- test/Api/AnalyticsApiTest.php | 144 + test/Api/ApplicationEndpointsApiTest.php | 178 - test/Api/AuthenticationApiTest.php | 54 +- test/Api/ConnectorsApiTest.php | 82 +- test/Api/CorrelationsApiTest.php | 211 - test/Api/MeasurementsApiTest.php | 146 +- test/Api/NotificationsApiTest.php | 94 + test/Api/OrganizationsApiTest.php | 90 - test/Api/PairsApiTest.php | 101 - test/Api/RemindersApiTest.php | 66 +- test/Api/StudyApiTest.php | 84 + test/Api/TagsApiTest.php | 101 - test/Api/UnitsApiTest.php | 34 +- test/Api/UserApiTest.php | 25 +- test/Api/VariablesApiTest.php | 85 +- test/Api/VotesApiTest.php | 101 - test/Model/AnimationTest.php | 86 + test/Model/ButtonTest.php | 93 + test/Model/ChartConfigTest.php | 128 + test/Model/ChartStyleTest.php | 86 + test/Model/ChartTest.php | 142 + test/Model/ColumnTest.php | 114 + test/Model/CommonResponseTest.php | 24 +- test/Model/CommonVariableArrayTest.php | 79 + test/Model/CommonVariableTest.php | 968 ++++ test/Model/ConnectionTest.php | 173 - test/Model/ConnectorArrayTest.php | 79 + test/Model/ConnectorInfoHistoryItemTest.php | 117 - test/Model/ConnectorInfoTest.php | 117 - test/Model/ConnectorInstructionTest.php | 23 +- test/Model/ConnectorTest.php | 173 +- test/Model/ConversionStepTest.php | 14 +- test/Model/CorrelationArrayTest.php | 79 + test/Model/CorrelationTest.php | 1000 +++- test/Model/CredentialTest.php | 133 - test/Model/CreditTest.php | 86 + test/Model/DataSourceTest.php | 170 + test/Model/ExplanationStartTrackingTest.php | 100 + test/Model/ExplanationTest.php | 114 + test/Model/GetConnectorsResponseTest.php | 107 + .../Model/GetCorrelationsDataResponseTest.php | 93 + test/Model/GetCorrelationsResponseTest.php | 107 + .../GetMeasurementsResponseArrayTest.php | 79 + test/Model/GetMeasurementsResponseTest.php | 317 ++ test/Model/GetPairsResponseArrayTest.php | 79 + test/Model/GetPairsResponseTest.php | 121 + .../GetPublicVariablesResponseArrayTest.php | 79 + test/Model/GetPublicVariablesResponseTest.php | 492 ++ test/Model/GetStudyDataResponseTest.php | 149 + test/Model/GetStudyResponseTest.php | 212 + ...ckingReminderNotificationsResponseTest.php | 107 + .../GetTrackingRemindersResponseArrayTest.php | 79 + .../GetTrackingRemindersResponseTest.php | 506 ++ test/Model/HighchartArrayTest.php | 79 + test/Model/HighchartTest.php | 107 + test/Model/HoverTest.php | 100 + test/Model/HumanTimeTest.php | 109 - test/Model/ImageTest.php | 100 + test/Model/InlineResponse20010Test.php | 101 - test/Model/InlineResponse20011Test.php | 101 - test/Model/InlineResponse20012Test.php | 101 - test/Model/InlineResponse2001Test.php | 101 - test/Model/InlineResponse2002Test.php | 101 - test/Model/InlineResponse2003Test.php | 101 - test/Model/InlineResponse2004Test.php | 101 - test/Model/InlineResponse2005Test.php | 101 - test/Model/InlineResponse2006Test.php | 101 - test/Model/InlineResponse2007Test.php | 101 - test/Model/InlineResponse2008Test.php | 101 - test/Model/InlineResponse2009Test.php | 101 - test/Model/InlineResponse200Test.php | 101 - test/Model/JsonErrorResponseTest.php | 22 +- test/Model/LangTest.php | 86 + test/Model/LegendTest.php | 86 + test/Model/LoadingTest.php | 100 + ...DailyReminderNotificationTimeArrayTest.php | 79 + ...LocalDailyReminderNotificationTimeTest.php | 86 + ...tificationTimesForAllReminderArrayTest.php | 79 + ...derNotificationTimesForAllReminderTest.php | 86 + test/Model/MarkerTest.php | 100 + test/Model/MeasurementArrayTest.php | 79 + test/Model/MeasurementDeleteTest.php | 22 +- test/Model/MeasurementItemTest.php | 100 + test/Model/MeasurementRangeTest.php | 101 - test/Model/MeasurementSetTest.php | 38 +- test/Model/MeasurementSourceTest.php | 93 - test/Model/MeasurementTest.php | 282 +- test/Model/MeasurementUpdateTest.php | 28 +- test/Model/OptionTest.php | 149 + test/Model/PairArrayTest.php | 79 + test/Model/PairTest.php | 156 + .../PairsOfAveragesForAllUserArrayTest.php | 79 + test/Model/PairsOfAveragesForAllUserTest.php | 93 + test/Model/PairsTest.php | 13 +- test/Model/ParticipantInstructionTest.php | 93 + test/Model/PermissionTest.php | 141 - test/Model/PlotOptionTest.php | 93 + test/Model/PostCorrelationTest.php | 24 +- .../PostMeasurementsDataResponseTest.php | 86 + test/Model/PostMeasurementsResponseTest.php | 107 + test/Model/PostStudyPublishResponseTest.php | 93 + .../PostTrackingRemindersDataResponseTest.php | 100 + .../PostTrackingRemindersResponseTest.php | 107 + .../PostUserSettingsDataResponseTest.php | 86 + test/Model/PostUserSettingsResponseTest.php | 107 + test/Model/PostVoteTest.php | 109 - test/Model/ProcessedDailyMeasurementTest.php | 170 + test/Model/ScatterTest.php | 100 + test/Model/ScopeArrayTest.php | 79 + test/Model/ScopeTest.php | 86 + test/Model/SeriesTest.php | 121 + test/Model/StateTest.php | 86 + test/Model/StudyTest.php | 156 + test/Model/SubtitleTest.php | 86 + test/Model/TextTest.php | 142 + test/Model/TitleTest.php | 93 + test/Model/TooltipTest.php | 93 + test/Model/TrackingReminderArrayTest.php | 79 + test/Model/TrackingReminderDeleteTest.php | 13 +- ...ingReminderNotificationActionArrayTest.php | 107 + .../TrackingReminderNotificationArrayTest.php | 79 + .../TrackingReminderNotificationPostTest.php | 100 + .../TrackingReminderNotificationSkipTest.php | 93 - ...TrackingReminderNotificationSnoozeTest.php | 93 - .../TrackingReminderNotificationTest.php | 386 +- ...ReminderNotificationTrackAllActionTest.php | 107 + .../TrackingReminderNotificationTrackTest.php | 101 - ...TrackingReminderNotificationsArrayTest.php | 79 + test/Model/TrackingReminderTest.php | 399 +- test/Model/TrackingRemindersArrayTest.php | 79 + test/Model/UnitArrayTest.php | 79 + test/Model/UnitCategoryTest.php | 23 +- test/Model/UnitTest.php | 80 +- test/Model/UpdateTest.php | 149 - test/Model/UserStudyTest.php | 919 ++++ test/Model/UserTagTest.php | 27 +- test/Model/UserTest.php | 273 +- test/Model/UserTokenFailedResponseTest.php | 109 - .../UserTokenRequestInnerUserFieldTest.php | 93 - test/Model/UserTokenRequestTest.php | 101 - ...enSuccessfulResponseInnerUserFieldTest.php | 101 - .../Model/UserTokenSuccessfulResponseTest.php | 109 - test/Model/UserVariableArrayTest.php | 79 + test/Model/UserVariableDeleteTest.php | 13 +- test/Model/UserVariableRelationshipTest.php | 221 - test/Model/UserVariableTest.php | 888 ++- test/Model/UserVariablesTest.php | 173 - test/Model/ValueObjectTest.php | 109 - test/Model/VariableCategoryArrayTest.php | 79 + test/Model/VariableCategoryTest.php | 203 +- test/Model/VariableNewTest.php | 125 - test/Model/VariableTest.php | 341 -- test/Model/VariableUserSourceTest.php | 149 - test/Model/VariablesNewTest.php | 85 - test/Model/VoteDeleteTest.php | 14 +- test/Model/VoteTest.php | 48 +- test/Model/XAxiTest.php | 121 + test/Model/YAxiTest.php | 114 + 463 files changed, 72078 insertions(+), 33378 deletions(-) create mode 100644 docs/Api/AnalyticsApi.md delete mode 100644 docs/Api/ApplicationEndpointsApi.md delete mode 100644 docs/Api/CorrelationsApi.md create mode 100644 docs/Api/NotificationsApi.md delete mode 100644 docs/Api/OrganizationsApi.md delete mode 100644 docs/Api/PairsApi.md create mode 100644 docs/Api/StudyApi.md delete mode 100644 docs/Api/TagsApi.md delete mode 100644 docs/Api/VotesApi.md rename docs/Model/{MeasurementSource.md => Animation.md} (77%) rename docs/Model/{TrackingReminderNotificationSnooze.md => Button.md} (69%) create mode 100644 docs/Model/Chart.md create mode 100644 docs/Model/ChartConfig.md rename docs/Model/{TrackingReminderNotificationSkip.md => ChartStyle.md} (73%) create mode 100644 docs/Model/Column.md create mode 100644 docs/Model/CommonVariable.md rename docs/Model/{UserTokenRequestInnerUserField.md => CommonVariableArray.md} (76%) delete mode 100644 docs/Model/Connection.md create mode 100644 docs/Model/ConnectorArray.md delete mode 100644 docs/Model/ConnectorInfo.md delete mode 100644 docs/Model/ConnectorInfoHistoryItem.md create mode 100644 docs/Model/CorrelationArray.md delete mode 100644 docs/Model/Credential.md create mode 100644 docs/Model/Credit.md create mode 100644 docs/Model/DataSource.md create mode 100644 docs/Model/Explanation.md create mode 100644 docs/Model/ExplanationStartTracking.md rename docs/Model/{UserTokenFailedResponse.md => GetConnectorsResponse.md} (60%) create mode 100644 docs/Model/GetCorrelationsDataResponse.md create mode 100644 docs/Model/GetCorrelationsResponse.md create mode 100644 docs/Model/GetMeasurementsResponse.md create mode 100644 docs/Model/GetMeasurementsResponseArray.md create mode 100644 docs/Model/GetPairsResponse.md create mode 100644 docs/Model/GetPairsResponseArray.md create mode 100644 docs/Model/GetPublicVariablesResponse.md create mode 100644 docs/Model/GetPublicVariablesResponseArray.md create mode 100644 docs/Model/GetStudyDataResponse.md create mode 100644 docs/Model/GetStudyResponse.md rename docs/Model/{InlineResponse20012.md => GetTrackingReminderNotificationsResponse.md} (59%) create mode 100644 docs/Model/GetTrackingRemindersResponse.md create mode 100644 docs/Model/GetTrackingRemindersResponseArray.md create mode 100644 docs/Model/Highchart.md create mode 100644 docs/Model/HighchartArray.md create mode 100644 docs/Model/Hover.md create mode 100644 docs/Model/Image.md delete mode 100644 docs/Model/InlineResponse20011.md delete mode 100644 docs/Model/InlineResponse2003.md delete mode 100644 docs/Model/InlineResponse2004.md delete mode 100644 docs/Model/InlineResponse2005.md delete mode 100644 docs/Model/InlineResponse2007.md delete mode 100644 docs/Model/InlineResponse2008.md delete mode 100644 docs/Model/InlineResponse2009.md create mode 100644 docs/Model/Lang.md create mode 100644 docs/Model/Legend.md rename docs/Model/{HumanTime.md => Loading.md} (61%) rename docs/Model/{InlineResponse20010.md => LocalDailyReminderNotificationTime.md} (65%) create mode 100644 docs/Model/LocalDailyReminderNotificationTimeArray.md create mode 100644 docs/Model/LocalDailyReminderNotificationTimesForAllReminder.md create mode 100644 docs/Model/LocalDailyReminderNotificationTimesForAllReminderArray.md rename docs/Model/{InlineResponse200.md => Marker.md} (63%) create mode 100644 docs/Model/MeasurementArray.md rename docs/Model/{ValueObject.md => MeasurementItem.md} (96%) delete mode 100644 docs/Model/MeasurementRange.md create mode 100644 docs/Model/Option.md create mode 100644 docs/Model/Pair.md rename docs/Model/{VariablesNew.md => PairArray.md} (94%) rename docs/Model/{InlineResponse2006.md => PairsOfAveragesForAllUser.md} (63%) create mode 100644 docs/Model/PairsOfAveragesForAllUserArray.md create mode 100644 docs/Model/ParticipantInstruction.md delete mode 100644 docs/Model/Permission.md rename docs/Model/{InlineResponse2002.md => PlotOption.md} (64%) create mode 100644 docs/Model/PostMeasurementsDataResponse.md create mode 100644 docs/Model/PostMeasurementsResponse.md create mode 100644 docs/Model/PostStudyPublishResponse.md create mode 100644 docs/Model/PostTrackingRemindersDataResponse.md create mode 100644 docs/Model/PostTrackingRemindersResponse.md create mode 100644 docs/Model/PostUserSettingsDataResponse.md create mode 100644 docs/Model/PostUserSettingsResponse.md delete mode 100644 docs/Model/PostVote.md create mode 100644 docs/Model/ProcessedDailyMeasurement.md create mode 100644 docs/Model/Scatter.md create mode 100644 docs/Model/Scope.md create mode 100644 docs/Model/ScopeArray.md create mode 100644 docs/Model/Series.md create mode 100644 docs/Model/State.md create mode 100644 docs/Model/Study.md create mode 100644 docs/Model/Subtitle.md create mode 100644 docs/Model/Text.md rename docs/Model/{InlineResponse2001.md => Title.md} (71%) create mode 100644 docs/Model/Tooltip.md create mode 100644 docs/Model/TrackingReminderArray.md create mode 100644 docs/Model/TrackingReminderNotificationActionArray.md create mode 100644 docs/Model/TrackingReminderNotificationArray.md rename docs/Model/{TrackingReminderNotificationTrack.md => TrackingReminderNotificationPost.md} (60%) create mode 100644 docs/Model/TrackingReminderNotificationTrackAllAction.md create mode 100644 docs/Model/TrackingReminderNotificationsArray.md create mode 100644 docs/Model/TrackingRemindersArray.md create mode 100644 docs/Model/UnitArray.md delete mode 100644 docs/Model/Update.md create mode 100644 docs/Model/UserStudy.md delete mode 100644 docs/Model/UserTokenRequest.md delete mode 100644 docs/Model/UserTokenSuccessfulResponse.md delete mode 100644 docs/Model/UserTokenSuccessfulResponseInnerUserField.md create mode 100644 docs/Model/UserVariableArray.md delete mode 100644 docs/Model/UserVariableRelationship.md delete mode 100644 docs/Model/UserVariables.md delete mode 100644 docs/Model/Variable.md create mode 100644 docs/Model/VariableCategoryArray.md delete mode 100644 docs/Model/VariableNew.md delete mode 100644 docs/Model/VariableUserSource.md create mode 100644 docs/Model/XAxi.md create mode 100644 docs/Model/YAxi.md create mode 100644 lib/Api/AnalyticsApi.php delete mode 100644 lib/Api/ApplicationEndpointsApi.php delete mode 100644 lib/Api/CorrelationsApi.php create mode 100644 lib/Api/NotificationsApi.php delete mode 100644 lib/Api/OrganizationsApi.php delete mode 100644 lib/Api/PairsApi.php create mode 100644 lib/Api/StudyApi.php delete mode 100644 lib/Api/TagsApi.php delete mode 100644 lib/Api/VotesApi.php create mode 100644 lib/Model/Animation.php create mode 100644 lib/Model/Button.php create mode 100644 lib/Model/Chart.php create mode 100644 lib/Model/ChartConfig.php create mode 100644 lib/Model/ChartStyle.php create mode 100644 lib/Model/Column.php create mode 100644 lib/Model/CommonVariable.php create mode 100644 lib/Model/CommonVariableArray.php delete mode 100644 lib/Model/Connection.php create mode 100644 lib/Model/ConnectorArray.php delete mode 100644 lib/Model/ConnectorInfo.php delete mode 100644 lib/Model/ConnectorInfoHistoryItem.php create mode 100644 lib/Model/CorrelationArray.php delete mode 100644 lib/Model/Credential.php create mode 100644 lib/Model/Credit.php create mode 100644 lib/Model/DataSource.php create mode 100644 lib/Model/Explanation.php create mode 100644 lib/Model/ExplanationStartTracking.php create mode 100644 lib/Model/GetConnectorsResponse.php create mode 100644 lib/Model/GetCorrelationsDataResponse.php create mode 100644 lib/Model/GetCorrelationsResponse.php create mode 100644 lib/Model/GetMeasurementsResponse.php create mode 100644 lib/Model/GetMeasurementsResponseArray.php create mode 100644 lib/Model/GetPairsResponse.php create mode 100644 lib/Model/GetPairsResponseArray.php create mode 100644 lib/Model/GetPublicVariablesResponse.php create mode 100644 lib/Model/GetPublicVariablesResponseArray.php create mode 100644 lib/Model/GetStudyDataResponse.php create mode 100644 lib/Model/GetStudyResponse.php create mode 100644 lib/Model/GetTrackingReminderNotificationsResponse.php create mode 100644 lib/Model/GetTrackingRemindersResponse.php create mode 100644 lib/Model/GetTrackingRemindersResponseArray.php create mode 100644 lib/Model/Highchart.php create mode 100644 lib/Model/HighchartArray.php create mode 100644 lib/Model/Hover.php delete mode 100644 lib/Model/HumanTime.php create mode 100644 lib/Model/Image.php delete mode 100644 lib/Model/InlineResponse200.php delete mode 100644 lib/Model/InlineResponse2001.php delete mode 100644 lib/Model/InlineResponse20010.php delete mode 100644 lib/Model/InlineResponse20011.php delete mode 100644 lib/Model/InlineResponse20012.php delete mode 100644 lib/Model/InlineResponse2002.php delete mode 100644 lib/Model/InlineResponse2003.php delete mode 100644 lib/Model/InlineResponse2004.php delete mode 100644 lib/Model/InlineResponse2005.php delete mode 100644 lib/Model/InlineResponse2006.php delete mode 100644 lib/Model/InlineResponse2007.php delete mode 100644 lib/Model/InlineResponse2008.php delete mode 100644 lib/Model/InlineResponse2009.php create mode 100644 lib/Model/Lang.php create mode 100644 lib/Model/Legend.php create mode 100644 lib/Model/Loading.php create mode 100644 lib/Model/LocalDailyReminderNotificationTime.php create mode 100644 lib/Model/LocalDailyReminderNotificationTimeArray.php create mode 100644 lib/Model/LocalDailyReminderNotificationTimesForAllReminder.php create mode 100644 lib/Model/LocalDailyReminderNotificationTimesForAllReminderArray.php create mode 100644 lib/Model/Marker.php create mode 100644 lib/Model/MeasurementArray.php create mode 100644 lib/Model/MeasurementItem.php delete mode 100644 lib/Model/MeasurementRange.php delete mode 100644 lib/Model/MeasurementSource.php create mode 100644 lib/Model/Option.php create mode 100644 lib/Model/Pair.php create mode 100644 lib/Model/PairArray.php create mode 100644 lib/Model/PairsOfAveragesForAllUser.php create mode 100644 lib/Model/PairsOfAveragesForAllUserArray.php create mode 100644 lib/Model/ParticipantInstruction.php delete mode 100644 lib/Model/Permission.php create mode 100644 lib/Model/PlotOption.php create mode 100644 lib/Model/PostMeasurementsDataResponse.php create mode 100644 lib/Model/PostMeasurementsResponse.php create mode 100644 lib/Model/PostStudyPublishResponse.php create mode 100644 lib/Model/PostTrackingRemindersDataResponse.php create mode 100644 lib/Model/PostTrackingRemindersResponse.php create mode 100644 lib/Model/PostUserSettingsDataResponse.php create mode 100644 lib/Model/PostUserSettingsResponse.php delete mode 100644 lib/Model/PostVote.php create mode 100644 lib/Model/ProcessedDailyMeasurement.php create mode 100644 lib/Model/Scatter.php create mode 100644 lib/Model/Scope.php create mode 100644 lib/Model/ScopeArray.php create mode 100644 lib/Model/Series.php create mode 100644 lib/Model/State.php create mode 100644 lib/Model/Study.php create mode 100644 lib/Model/Subtitle.php create mode 100644 lib/Model/Text.php create mode 100644 lib/Model/Title.php create mode 100644 lib/Model/Tooltip.php create mode 100644 lib/Model/TrackingReminderArray.php create mode 100644 lib/Model/TrackingReminderNotificationActionArray.php create mode 100644 lib/Model/TrackingReminderNotificationArray.php create mode 100644 lib/Model/TrackingReminderNotificationPost.php delete mode 100644 lib/Model/TrackingReminderNotificationSkip.php delete mode 100644 lib/Model/TrackingReminderNotificationSnooze.php delete mode 100644 lib/Model/TrackingReminderNotificationTrack.php create mode 100644 lib/Model/TrackingReminderNotificationTrackAllAction.php create mode 100644 lib/Model/TrackingReminderNotificationsArray.php create mode 100644 lib/Model/TrackingRemindersArray.php create mode 100644 lib/Model/UnitArray.php delete mode 100644 lib/Model/Update.php create mode 100644 lib/Model/UserStudy.php delete mode 100644 lib/Model/UserTokenFailedResponse.php delete mode 100644 lib/Model/UserTokenRequest.php delete mode 100644 lib/Model/UserTokenRequestInnerUserField.php delete mode 100644 lib/Model/UserTokenSuccessfulResponse.php delete mode 100644 lib/Model/UserTokenSuccessfulResponseInnerUserField.php create mode 100644 lib/Model/UserVariableArray.php delete mode 100644 lib/Model/UserVariableRelationship.php delete mode 100644 lib/Model/UserVariables.php delete mode 100644 lib/Model/ValueObject.php delete mode 100644 lib/Model/Variable.php create mode 100644 lib/Model/VariableCategoryArray.php delete mode 100644 lib/Model/VariableNew.php delete mode 100644 lib/Model/VariableUserSource.php delete mode 100644 lib/Model/VariablesNew.php create mode 100644 lib/Model/XAxi.php create mode 100644 lib/Model/YAxi.php create mode 100644 test/Api/AnalyticsApiTest.php delete mode 100644 test/Api/ApplicationEndpointsApiTest.php delete mode 100644 test/Api/CorrelationsApiTest.php create mode 100644 test/Api/NotificationsApiTest.php delete mode 100644 test/Api/OrganizationsApiTest.php delete mode 100644 test/Api/PairsApiTest.php create mode 100644 test/Api/StudyApiTest.php delete mode 100644 test/Api/TagsApiTest.php delete mode 100644 test/Api/VotesApiTest.php create mode 100644 test/Model/AnimationTest.php create mode 100644 test/Model/ButtonTest.php create mode 100644 test/Model/ChartConfigTest.php create mode 100644 test/Model/ChartStyleTest.php create mode 100644 test/Model/ChartTest.php create mode 100644 test/Model/ColumnTest.php create mode 100644 test/Model/CommonVariableArrayTest.php create mode 100644 test/Model/CommonVariableTest.php delete mode 100644 test/Model/ConnectionTest.php create mode 100644 test/Model/ConnectorArrayTest.php delete mode 100644 test/Model/ConnectorInfoHistoryItemTest.php delete mode 100644 test/Model/ConnectorInfoTest.php create mode 100644 test/Model/CorrelationArrayTest.php delete mode 100644 test/Model/CredentialTest.php create mode 100644 test/Model/CreditTest.php create mode 100644 test/Model/DataSourceTest.php create mode 100644 test/Model/ExplanationStartTrackingTest.php create mode 100644 test/Model/ExplanationTest.php create mode 100644 test/Model/GetConnectorsResponseTest.php create mode 100644 test/Model/GetCorrelationsDataResponseTest.php create mode 100644 test/Model/GetCorrelationsResponseTest.php create mode 100644 test/Model/GetMeasurementsResponseArrayTest.php create mode 100644 test/Model/GetMeasurementsResponseTest.php create mode 100644 test/Model/GetPairsResponseArrayTest.php create mode 100644 test/Model/GetPairsResponseTest.php create mode 100644 test/Model/GetPublicVariablesResponseArrayTest.php create mode 100644 test/Model/GetPublicVariablesResponseTest.php create mode 100644 test/Model/GetStudyDataResponseTest.php create mode 100644 test/Model/GetStudyResponseTest.php create mode 100644 test/Model/GetTrackingReminderNotificationsResponseTest.php create mode 100644 test/Model/GetTrackingRemindersResponseArrayTest.php create mode 100644 test/Model/GetTrackingRemindersResponseTest.php create mode 100644 test/Model/HighchartArrayTest.php create mode 100644 test/Model/HighchartTest.php create mode 100644 test/Model/HoverTest.php delete mode 100644 test/Model/HumanTimeTest.php create mode 100644 test/Model/ImageTest.php delete mode 100644 test/Model/InlineResponse20010Test.php delete mode 100644 test/Model/InlineResponse20011Test.php delete mode 100644 test/Model/InlineResponse20012Test.php delete mode 100644 test/Model/InlineResponse2001Test.php delete mode 100644 test/Model/InlineResponse2002Test.php delete mode 100644 test/Model/InlineResponse2003Test.php delete mode 100644 test/Model/InlineResponse2004Test.php delete mode 100644 test/Model/InlineResponse2005Test.php delete mode 100644 test/Model/InlineResponse2006Test.php delete mode 100644 test/Model/InlineResponse2007Test.php delete mode 100644 test/Model/InlineResponse2008Test.php delete mode 100644 test/Model/InlineResponse2009Test.php delete mode 100644 test/Model/InlineResponse200Test.php create mode 100644 test/Model/LangTest.php create mode 100644 test/Model/LegendTest.php create mode 100644 test/Model/LoadingTest.php create mode 100644 test/Model/LocalDailyReminderNotificationTimeArrayTest.php create mode 100644 test/Model/LocalDailyReminderNotificationTimeTest.php create mode 100644 test/Model/LocalDailyReminderNotificationTimesForAllReminderArrayTest.php create mode 100644 test/Model/LocalDailyReminderNotificationTimesForAllReminderTest.php create mode 100644 test/Model/MarkerTest.php create mode 100644 test/Model/MeasurementArrayTest.php create mode 100644 test/Model/MeasurementItemTest.php delete mode 100644 test/Model/MeasurementRangeTest.php delete mode 100644 test/Model/MeasurementSourceTest.php create mode 100644 test/Model/OptionTest.php create mode 100644 test/Model/PairArrayTest.php create mode 100644 test/Model/PairTest.php create mode 100644 test/Model/PairsOfAveragesForAllUserArrayTest.php create mode 100644 test/Model/PairsOfAveragesForAllUserTest.php create mode 100644 test/Model/ParticipantInstructionTest.php delete mode 100644 test/Model/PermissionTest.php create mode 100644 test/Model/PlotOptionTest.php create mode 100644 test/Model/PostMeasurementsDataResponseTest.php create mode 100644 test/Model/PostMeasurementsResponseTest.php create mode 100644 test/Model/PostStudyPublishResponseTest.php create mode 100644 test/Model/PostTrackingRemindersDataResponseTest.php create mode 100644 test/Model/PostTrackingRemindersResponseTest.php create mode 100644 test/Model/PostUserSettingsDataResponseTest.php create mode 100644 test/Model/PostUserSettingsResponseTest.php delete mode 100644 test/Model/PostVoteTest.php create mode 100644 test/Model/ProcessedDailyMeasurementTest.php create mode 100644 test/Model/ScatterTest.php create mode 100644 test/Model/ScopeArrayTest.php create mode 100644 test/Model/ScopeTest.php create mode 100644 test/Model/SeriesTest.php create mode 100644 test/Model/StateTest.php create mode 100644 test/Model/StudyTest.php create mode 100644 test/Model/SubtitleTest.php create mode 100644 test/Model/TextTest.php create mode 100644 test/Model/TitleTest.php create mode 100644 test/Model/TooltipTest.php create mode 100644 test/Model/TrackingReminderArrayTest.php create mode 100644 test/Model/TrackingReminderNotificationActionArrayTest.php create mode 100644 test/Model/TrackingReminderNotificationArrayTest.php create mode 100644 test/Model/TrackingReminderNotificationPostTest.php delete mode 100644 test/Model/TrackingReminderNotificationSkipTest.php delete mode 100644 test/Model/TrackingReminderNotificationSnoozeTest.php create mode 100644 test/Model/TrackingReminderNotificationTrackAllActionTest.php delete mode 100644 test/Model/TrackingReminderNotificationTrackTest.php create mode 100644 test/Model/TrackingReminderNotificationsArrayTest.php create mode 100644 test/Model/TrackingRemindersArrayTest.php create mode 100644 test/Model/UnitArrayTest.php delete mode 100644 test/Model/UpdateTest.php create mode 100644 test/Model/UserStudyTest.php delete mode 100644 test/Model/UserTokenFailedResponseTest.php delete mode 100644 test/Model/UserTokenRequestInnerUserFieldTest.php delete mode 100644 test/Model/UserTokenRequestTest.php delete mode 100644 test/Model/UserTokenSuccessfulResponseInnerUserFieldTest.php delete mode 100644 test/Model/UserTokenSuccessfulResponseTest.php create mode 100644 test/Model/UserVariableArrayTest.php delete mode 100644 test/Model/UserVariableRelationshipTest.php delete mode 100644 test/Model/UserVariablesTest.php delete mode 100644 test/Model/ValueObjectTest.php create mode 100644 test/Model/VariableCategoryArrayTest.php delete mode 100644 test/Model/VariableNewTest.php delete mode 100644 test/Model/VariableTest.php delete mode 100644 test/Model/VariableUserSourceTest.php delete mode 100644 test/Model/VariablesNewTest.php create mode 100644 test/Model/XAxiTest.php create mode 100644 test/Model/YAxiTest.php diff --git a/README.md b/README.md index 00b5298..499bde3 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # QuantiModoClient -Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: -- API version: 2.0 -- Package version: 5.0.4 +- API version: 5.8.100414 +- Package version: 5.8.1103 - Build package: io.swagger.codegen.languages.PhpClientCodegen ## Requirements @@ -57,34 +57,22 @@ Please follow the [installation procedure](#installation--usage) and then run th setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); +// Configure API key authorization: access_token +QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('access_token', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$api_instance = new QuantiModo\Client\Api\ApplicationEndpointsApi(); -$access_token = "access_token_example"; // string | Application's OAuth2 access token -$user_id = 56; // int | User's id -$connector_id = 56; // int | The id for the connector data source for which the connection is connected -$connect_status = "connect_status_example"; // string | Indicates whether a connector is currently connected to a service for a user. -$connect_error = "connect_error_example"; // string | Error message if there is a problem with authorizing this connection. -$update_requested_at = "update_requested_at_example"; // string | Time at which an update was requested by a user. -$update_status = "update_status_example"; // string | Indicates whether a connector is currently updated. -$update_error = "update_error_example"; // string | Indicates if there was an error during the update. -$last_successful_updated_at = "last_successful_updated_at_example"; // string | The time at which the connector was last successfully updated. -$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. -$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. -$sort = "sort_example"; // string | Sort by given field. If the field is prefixed with '-', it will sort in descending order. +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 +QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$api_instance = new QuantiModo\Client\Api\AnalyticsApi(); +$body = new \QuantiModo\Client\Model\VoteDelete(); // \QuantiModo\Client\Model\VoteDelete | The cause and effect variable names for the predictor vote to be deleted. +$user_id = 3.4; // float | User's id try { - $result = $api_instance->v2ApplicationConnectionsGet($access_token, $user_id, $connector_id, $connect_status, $connect_error, $update_requested_at, $update_status, $update_error, $last_successful_updated_at, $created_at, $updated_at, $limit, $offset, $sort); + $result = $api_instance->deleteVote($body, $user_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ApplicationEndpointsApi->v2ApplicationConnectionsGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AnalyticsApi->deleteVote: ', $e->getMessage(), PHP_EOL; } ?> @@ -96,183 +84,180 @@ All URIs are relative to *https://app.quantimo.do/api* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*ApplicationEndpointsApi* | [**v2ApplicationConnectionsGet**](docs/Api/ApplicationEndpointsApi.md#v2applicationconnectionsget) | **GET** /v2/application/connections | Get all Connections -*ApplicationEndpointsApi* | [**v2ApplicationCredentialsGet**](docs/Api/ApplicationEndpointsApi.md#v2applicationcredentialsget) | **GET** /v2/application/credentials | Get all Credentials -*ApplicationEndpointsApi* | [**v2ApplicationMeasurementsGet**](docs/Api/ApplicationEndpointsApi.md#v2applicationmeasurementsget) | **GET** /v2/application/measurements | Get measurements for all users using your application -*ApplicationEndpointsApi* | [**v2ApplicationTrackingRemindersGet**](docs/Api/ApplicationEndpointsApi.md#v2applicationtrackingremindersget) | **GET** /v2/application/trackingReminders | Get tracking reminders -*ApplicationEndpointsApi* | [**v2ApplicationUpdatesGet**](docs/Api/ApplicationEndpointsApi.md#v2applicationupdatesget) | **GET** /v2/application/updates | Get all Updates -*ApplicationEndpointsApi* | [**v2ApplicationUserVariableRelationshipsGet**](docs/Api/ApplicationEndpointsApi.md#v2applicationuservariablerelationshipsget) | **GET** /v2/application/userVariableRelationships | Get all UserVariableRelationships -*ApplicationEndpointsApi* | [**v2ApplicationUserVariablesGet**](docs/Api/ApplicationEndpointsApi.md#v2applicationuservariablesget) | **GET** /v2/application/userVariables | Get all UserVariables -*ApplicationEndpointsApi* | [**v2ApplicationVariableUserSourcesGet**](docs/Api/ApplicationEndpointsApi.md#v2applicationvariableusersourcesget) | **GET** /v2/application/variableUserSources | Get all VariableUserSources -*ApplicationEndpointsApi* | [**v2ApplicationVotesGet**](docs/Api/ApplicationEndpointsApi.md#v2applicationvotesget) | **GET** /v2/application/votes | Get all Votes -*AuthenticationApi* | [**v2AuthSocialAuthorizeCodeGet**](docs/Api/AuthenticationApi.md#v2authsocialauthorizecodeget) | **GET** /v2/auth/social/authorizeCode | Second Step in Social Authentication flow with JWT Token -*AuthenticationApi* | [**v2AuthSocialAuthorizeTokenGet**](docs/Api/AuthenticationApi.md#v2authsocialauthorizetokenget) | **GET** /v2/auth/social/authorizeToken | Native Social Authentication -*AuthenticationApi* | [**v2AuthSocialLoginGet**](docs/Api/AuthenticationApi.md#v2authsocialloginget) | **GET** /v2/auth/social/login | First Setp in Social Authentication flow with JWT Token -*AuthenticationApi* | [**v2Oauth2AccessTokenGet**](docs/Api/AuthenticationApi.md#v2oauth2accesstokenget) | **GET** /v2/oauth2/access_token | Get a user access token -*AuthenticationApi* | [**v2OauthAuthorizeGet**](docs/Api/AuthenticationApi.md#v2oauthauthorizeget) | **GET** /v2/oauth/authorize | Request Authorization Code -*ConnectorsApi* | [**v1ConnectJsGet**](docs/Api/ConnectorsApi.md#v1connectjsget) | **GET** /v1/connect.js | Get embeddable connect javascript -*ConnectorsApi* | [**v1ConnectMobileGet**](docs/Api/ConnectorsApi.md#v1connectmobileget) | **GET** /v1/connect/mobile | Mobile connect page -*ConnectorsApi* | [**v1ConnectorsConnectorConnectGet**](docs/Api/ConnectorsApi.md#v1connectorsconnectorconnectget) | **GET** /v1/connectors/{connector}/connect | Obtain a token from 3rd party data source -*ConnectorsApi* | [**v1ConnectorsConnectorConnectInstructionsGet**](docs/Api/ConnectorsApi.md#v1connectorsconnectorconnectinstructionsget) | **GET** /v1/connectors/{connector}/connectInstructions | Connection Instructions -*ConnectorsApi* | [**v1ConnectorsConnectorConnectParameterGet**](docs/Api/ConnectorsApi.md#v1connectorsconnectorconnectparameterget) | **GET** /v1/connectors/{connector}/connectParameter | Connect Parameter -*ConnectorsApi* | [**v1ConnectorsConnectorDisconnectGet**](docs/Api/ConnectorsApi.md#v1connectorsconnectordisconnectget) | **GET** /v1/connectors/{connector}/disconnect | Delete stored connection info -*ConnectorsApi* | [**v1ConnectorsConnectorInfoGet**](docs/Api/ConnectorsApi.md#v1connectorsconnectorinfoget) | **GET** /v1/connectors/{connector}/info | Get connector info for user -*ConnectorsApi* | [**v1ConnectorsConnectorUpdateGet**](docs/Api/ConnectorsApi.md#v1connectorsconnectorupdateget) | **GET** /v1/connectors/{connector}/update | Sync with data source -*ConnectorsApi* | [**v1ConnectorsListGet**](docs/Api/ConnectorsApi.md#v1connectorslistget) | **GET** /v1/connectors/list | List of Connectors -*CorrelationsApi* | [**v1AggregatedCorrelationsGet**](docs/Api/CorrelationsApi.md#v1aggregatedcorrelationsget) | **GET** /v1/aggregatedCorrelations | Get aggregated correlations -*CorrelationsApi* | [**v1AggregatedCorrelationsPost**](docs/Api/CorrelationsApi.md#v1aggregatedcorrelationspost) | **POST** /v1/aggregatedCorrelations | Store or Update a Correlation -*CorrelationsApi* | [**v1CorrelationsGet**](docs/Api/CorrelationsApi.md#v1correlationsget) | **GET** /v1/correlations | Get correlations -*CorrelationsApi* | [**v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet**](docs/Api/CorrelationsApi.md#v1organizationsorganizationidusersuseridvariablesvariablenamecausesget) | **GET** /v1/organizations/{organizationId}/users/{userId}/variables/{variableName}/causes | Search user correlations for a given cause -*CorrelationsApi* | [**v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet**](docs/Api/CorrelationsApi.md#v1organizationsorganizationidusersuseridvariablesvariablenameeffectsget) | **GET** /v1/organizations/{organizationId}/users/{userId}/variables/{variableName}/effects | Search user correlations for a given cause -*CorrelationsApi* | [**v1PublicCorrelationsSearchSearchGet**](docs/Api/CorrelationsApi.md#v1publiccorrelationssearchsearchget) | **GET** /v1/public/correlations/search/{search} | Get average correlations for variables containing search term -*CorrelationsApi* | [**v1VariablesVariableNameCausesGet**](docs/Api/CorrelationsApi.md#v1variablesvariablenamecausesget) | **GET** /v1/variables/{variableName}/causes | Search user correlations for a given effect -*CorrelationsApi* | [**v1VariablesVariableNameEffectsGet**](docs/Api/CorrelationsApi.md#v1variablesvariablenameeffectsget) | **GET** /v1/variables/{variableName}/effects | Search user correlations for a given cause -*CorrelationsApi* | [**v1VariablesVariableNamePublicCausesGet**](docs/Api/CorrelationsApi.md#v1variablesvariablenamepubliccausesget) | **GET** /v1/variables/{variableName}/public/causes | Search public correlations for a given effect -*CorrelationsApi* | [**v1VariablesVariableNamePublicEffectsGet**](docs/Api/CorrelationsApi.md#v1variablesvariablenamepubliceffectsget) | **GET** /v1/variables/{variableName}/public/effects | Search public correlations for a given cause -*CorrelationsApi* | [**v1VotesDeletePost**](docs/Api/CorrelationsApi.md#v1votesdeletepost) | **POST** /v1/votes/delete | Delete vote -*CorrelationsApi* | [**v1VotesPost**](docs/Api/CorrelationsApi.md#v1votespost) | **POST** /v1/votes | Post or update vote -*MeasurementsApi* | [**v1MeasurementSourcesGet**](docs/Api/MeasurementsApi.md#v1measurementsourcesget) | **GET** /v1/measurementSources | Get measurement sources -*MeasurementsApi* | [**v1MeasurementSourcesPost**](docs/Api/MeasurementsApi.md#v1measurementsourcespost) | **POST** /v1/measurementSources | Add a data source -*MeasurementsApi* | [**v1MeasurementsDailyGet**](docs/Api/MeasurementsApi.md#v1measurementsdailyget) | **GET** /v1/measurements/daily | Get daily measurements for this user -*MeasurementsApi* | [**v1MeasurementsDeletePost**](docs/Api/MeasurementsApi.md#v1measurementsdeletepost) | **POST** /v1/measurements/delete | Delete a measurement -*MeasurementsApi* | [**v1MeasurementsGet**](docs/Api/MeasurementsApi.md#v1measurementsget) | **GET** /v1/measurements | Get measurements for this user -*MeasurementsApi* | [**v1MeasurementsPost**](docs/Api/MeasurementsApi.md#v1measurementspost) | **POST** /v1/measurements | Post a new set or update existing measurements to the database -*MeasurementsApi* | [**v1MeasurementsRangeGet**](docs/Api/MeasurementsApi.md#v1measurementsrangeget) | **GET** /v1/measurementsRange | Get measurements range for this user -*MeasurementsApi* | [**v1MeasurementsUpdatePost**](docs/Api/MeasurementsApi.md#v1measurementsupdatepost) | **POST** /v1/measurements/update | Update a measurement -*MeasurementsApi* | [**v2MeasurementsCsvGet**](docs/Api/MeasurementsApi.md#v2measurementscsvget) | **GET** /v2/measurements/csv | Get Measurements CSV -*MeasurementsApi* | [**v2MeasurementsIdDelete**](docs/Api/MeasurementsApi.md#v2measurementsiddelete) | **DELETE** /v2/measurements/{id} | Delete Measurement -*MeasurementsApi* | [**v2MeasurementsIdGet**](docs/Api/MeasurementsApi.md#v2measurementsidget) | **GET** /v2/measurements/{id} | Get Measurement -*MeasurementsApi* | [**v2MeasurementsIdPut**](docs/Api/MeasurementsApi.md#v2measurementsidput) | **PUT** /v2/measurements/{id} | Update Measurement -*MeasurementsApi* | [**v2MeasurementsRequestCsvPost**](docs/Api/MeasurementsApi.md#v2measurementsrequestcsvpost) | **POST** /v2/measurements/request_csv | Post Request for Measurements CSV -*MeasurementsApi* | [**v2MeasurementsRequestPdfPost**](docs/Api/MeasurementsApi.md#v2measurementsrequestpdfpost) | **POST** /v2/measurements/request_pdf | Post Request for Measurements PDF -*MeasurementsApi* | [**v2MeasurementsRequestXlsPost**](docs/Api/MeasurementsApi.md#v2measurementsrequestxlspost) | **POST** /v2/measurements/request_xls | Post Request for Measurements XLS -*OrganizationsApi* | [**v1OrganizationsOrganizationIdUsersPost**](docs/Api/OrganizationsApi.md#v1organizationsorganizationiduserspost) | **POST** /v1/organizations/{organizationId}/users | Get user tokens for existing users, create new users -*PairsApi* | [**v1PairsCsvGet**](docs/Api/PairsApi.md#v1pairscsvget) | **GET** /v1/pairsCsv | Get pairs -*PairsApi* | [**v1PairsGet**](docs/Api/PairsApi.md#v1pairsget) | **GET** /v1/pairs | Get pairs -*RemindersApi* | [**v1TrackingReminderNotificationsGet**](docs/Api/RemindersApi.md#v1trackingremindernotificationsget) | **GET** /v1/trackingReminderNotifications | Get specific pending tracking reminders -*RemindersApi* | [**v1TrackingReminderNotificationsSkipPost**](docs/Api/RemindersApi.md#v1trackingremindernotificationsskippost) | **POST** /v1/trackingReminderNotifications/skip | Skip a pending tracking reminder -*RemindersApi* | [**v1TrackingReminderNotificationsSnoozePost**](docs/Api/RemindersApi.md#v1trackingremindernotificationssnoozepost) | **POST** /v1/trackingReminderNotifications/snooze | Snooze a pending tracking reminder -*RemindersApi* | [**v1TrackingReminderNotificationsTrackPost**](docs/Api/RemindersApi.md#v1trackingremindernotificationstrackpost) | **POST** /v1/trackingReminderNotifications/track | Track a pending tracking reminder -*RemindersApi* | [**v1TrackingRemindersDeletePost**](docs/Api/RemindersApi.md#v1trackingremindersdeletepost) | **POST** /v1/trackingReminders/delete | Delete tracking reminder -*RemindersApi* | [**v1TrackingRemindersGet**](docs/Api/RemindersApi.md#v1trackingremindersget) | **GET** /v1/trackingReminders | Get repeating tracking reminder settings -*RemindersApi* | [**v1TrackingRemindersPost**](docs/Api/RemindersApi.md#v1trackingreminderspost) | **POST** /v1/trackingReminders | Store a Tracking Reminder -*TagsApi* | [**v1UserTagsDeletePost**](docs/Api/TagsApi.md#v1usertagsdeletepost) | **POST** /v1/userTags/delete | Delete user tag or ingredient -*TagsApi* | [**v1UserTagsPost**](docs/Api/TagsApi.md#v1usertagspost) | **POST** /v1/userTags | Post or update user tags or ingredients -*UnitsApi* | [**v1UnitCategoriesGet**](docs/Api/UnitsApi.md#v1unitcategoriesget) | **GET** /v1/unitCategories | Get unit categories -*UnitsApi* | [**v1UnitsGet**](docs/Api/UnitsApi.md#v1unitsget) | **GET** /v1/units | Get all available units -*UnitsApi* | [**v1UnitsVariableGet**](docs/Api/UnitsApi.md#v1unitsvariableget) | **GET** /v1/unitsVariable | Units for Variable -*UserApi* | [**v1OrganizationsOrganizationIdUsersPost**](docs/Api/UserApi.md#v1organizationsorganizationiduserspost) | **POST** /v1/organizations/{organizationId}/users | Get user tokens for existing users, create new users -*UserApi* | [**v1UserMeGet**](docs/Api/UserApi.md#v1usermeget) | **GET** /v1/user/me | Get all available units for variableGet authenticated user -*VariablesApi* | [**v1PublicVariablesGet**](docs/Api/VariablesApi.md#v1publicvariablesget) | **GET** /v1/public/variables | Get public variables -*VariablesApi* | [**v1PublicVariablesSearchSearchGet**](docs/Api/VariablesApi.md#v1publicvariablessearchsearchget) | **GET** /v1/public/variables/search/{search} | Get top 5 PUBLIC variables with the most correlations -*VariablesApi* | [**v1UserVariablesDeletePost**](docs/Api/VariablesApi.md#v1uservariablesdeletepost) | **POST** /v1/userVariables/delete | Delete All Measurements For Variable -*VariablesApi* | [**v1UserVariablesPost**](docs/Api/VariablesApi.md#v1uservariablespost) | **POST** /v1/userVariables | Update User Settings for a Variable -*VariablesApi* | [**v1UserVariablesResetPost**](docs/Api/VariablesApi.md#v1uservariablesresetpost) | **POST** /v1/userVariables/reset | Reset user settings for a variable to defaults -*VariablesApi* | [**v1VariableCategoriesGet**](docs/Api/VariablesApi.md#v1variablecategoriesget) | **GET** /v1/variableCategories | Variable categories -*VariablesApi* | [**v1VariablesGet**](docs/Api/VariablesApi.md#v1variablesget) | **GET** /v1/variables | Get variables with user's settings -*VariablesApi* | [**v1VariablesPost**](docs/Api/VariablesApi.md#v1variablespost) | **POST** /v1/variables | Create Variables -*VariablesApi* | [**v1VariablesSearchSearchGet**](docs/Api/VariablesApi.md#v1variablessearchsearchget) | **GET** /v1/variables/search/{search} | Get variables by search query -*VariablesApi* | [**v1VariablesVariableNameGet**](docs/Api/VariablesApi.md#v1variablesvariablenameget) | **GET** /v1/variables/{variableName} | Get info about a variable -*VotesApi* | [**v1VotesDeletePost**](docs/Api/VotesApi.md#v1votesdeletepost) | **POST** /v1/votes/delete | Delete vote -*VotesApi* | [**v1VotesPost**](docs/Api/VotesApi.md#v1votespost) | **POST** /v1/votes | Post or update vote +*AnalyticsApi* | [**deleteVote**](docs/Api/AnalyticsApi.md#deletevote) | **DELETE** /v3/votes/delete | Delete vote +*AnalyticsApi* | [**getAggregatedCorrelations**](docs/Api/AnalyticsApi.md#getaggregatedcorrelations) | **GET** /v3/aggregatedCorrelations | Get aggregated correlations +*AnalyticsApi* | [**getStudy**](docs/Api/AnalyticsApi.md#getstudy) | **GET** /v4/study | Get Study +*AnalyticsApi* | [**getUserCorrelationExplanations**](docs/Api/AnalyticsApi.md#getusercorrelationexplanations) | **GET** /v3/correlations/explanations | Get correlation explanations +*AnalyticsApi* | [**getUserCorrelations**](docs/Api/AnalyticsApi.md#getusercorrelations) | **GET** /v3/correlations | Get correlations +*AnalyticsApi* | [**postAggregatedCorrelations**](docs/Api/AnalyticsApi.md#postaggregatedcorrelations) | **POST** /v3/aggregatedCorrelations | Store or Update a Correlation +*AnalyticsApi* | [**postVote**](docs/Api/AnalyticsApi.md#postvote) | **POST** /v3/votes | Post or update vote +*AuthenticationApi* | [**getAccessToken**](docs/Api/AuthenticationApi.md#getaccesstoken) | **GET** /v3/oauth2/token | Get a user access token +*AuthenticationApi* | [**getOauthAuthorizationCode**](docs/Api/AuthenticationApi.md#getoauthauthorizationcode) | **GET** /v3/oauth2/authorize | Request Authorization Code +*AuthenticationApi* | [**postGoogleIdToken**](docs/Api/AuthenticationApi.md#postgoogleidtoken) | **POST** /v3/googleIdToken | Post GoogleIdToken +*ConnectorsApi* | [**connectConnector**](docs/Api/ConnectorsApi.md#connectconnector) | **GET** /v3/connectors/{connectorName}/connect | Obtain a token from 3rd party data source +*ConnectorsApi* | [**disconnectConnector**](docs/Api/ConnectorsApi.md#disconnectconnector) | **GET** /v3/connectors/{connectorName}/disconnect | Delete stored connection info +*ConnectorsApi* | [**getConnectors**](docs/Api/ConnectorsApi.md#getconnectors) | **GET** /v3/connectors/list | List of Connectors +*ConnectorsApi* | [**getIntegrationJs**](docs/Api/ConnectorsApi.md#getintegrationjs) | **GET** /v3/integration.js | Get embeddable connect javascript +*ConnectorsApi* | [**getMobileConnectPage**](docs/Api/ConnectorsApi.md#getmobileconnectpage) | **GET** /v3/connect/mobile | Mobile connect page +*ConnectorsApi* | [**updateConnector**](docs/Api/ConnectorsApi.md#updateconnector) | **GET** /v3/connectors/{connectorName}/update | Sync with data source +*MeasurementsApi* | [**deleteMeasurement**](docs/Api/MeasurementsApi.md#deletemeasurement) | **DELETE** /v3/measurements/delete | Delete a measurement +*MeasurementsApi* | [**getMeasurements**](docs/Api/MeasurementsApi.md#getmeasurements) | **GET** /v3/measurements | Get measurements for this user +*MeasurementsApi* | [**getPairs**](docs/Api/MeasurementsApi.md#getpairs) | **GET** /v3/pairs | Get pairs of measurements for correlational analysis +*MeasurementsApi* | [**measurementExportRequest**](docs/Api/MeasurementsApi.md#measurementexportrequest) | **POST** /v2/measurements/exportRequest | Post Request for Measurements CSV +*MeasurementsApi* | [**postMeasurements**](docs/Api/MeasurementsApi.md#postmeasurements) | **POST** /v3/measurements/post | Post a new set or update existing measurements to the database +*MeasurementsApi* | [**v3MeasurementsUpdatePost**](docs/Api/MeasurementsApi.md#v3measurementsupdatepost) | **POST** /v3/measurements/update | Update a measurement +*NotificationsApi* | [**getNotificationPreferences**](docs/Api/NotificationsApi.md#getnotificationpreferences) | **GET** /v3/notificationPreferences | Get NotificationPreferences +*NotificationsApi* | [**postDeviceTokens**](docs/Api/NotificationsApi.md#postdevicetokens) | **POST** /v3/deviceTokens | Post DeviceTokens +*RemindersApi* | [**deleteTrackingReminder**](docs/Api/RemindersApi.md#deletetrackingreminder) | **DELETE** /v3/trackingReminders/delete | Delete tracking reminder +*RemindersApi* | [**getTrackingReminderNotifications**](docs/Api/RemindersApi.md#gettrackingremindernotifications) | **GET** /v3/trackingReminderNotifications | Get specific tracking reminder notifications +*RemindersApi* | [**getTrackingReminders**](docs/Api/RemindersApi.md#gettrackingreminders) | **GET** /v3/trackingReminders | Get repeating tracking reminder settings +*RemindersApi* | [**postTrackingReminderNotifications**](docs/Api/RemindersApi.md#posttrackingremindernotifications) | **POST** /v3/trackingReminderNotifications | Snooze, skip, or track a tracking reminder notification +*RemindersApi* | [**postTrackingReminders**](docs/Api/RemindersApi.md#posttrackingreminders) | **POST** /v3/trackingReminders | Store a Tracking Reminder +*StudyApi* | [**postStudyPublish**](docs/Api/StudyApi.md#poststudypublish) | **POST** /v3/study/publish | Post Study Publish +*UnitsApi* | [**getUnitCategories**](docs/Api/UnitsApi.md#getunitcategories) | **GET** /v3/unitCategories | Get unit categories +*UnitsApi* | [**getUnits**](docs/Api/UnitsApi.md#getunits) | **GET** /v3/units | Get units +*UserApi* | [**getUser**](docs/Api/UserApi.md#getuser) | **GET** /v3/user | Get user info +*UserApi* | [**postUserSettings**](docs/Api/UserApi.md#postusersettings) | **POST** /v3/userSettings | Post UserSettings +*VariablesApi* | [**deleteUserTag**](docs/Api/VariablesApi.md#deleteusertag) | **DELETE** /v3/userTags/delete | Delete user tag or ingredient +*VariablesApi* | [**deleteUserVariable**](docs/Api/VariablesApi.md#deleteuservariable) | **DELETE** /v3/userVariables/delete | Delete All Measurements For Variable +*VariablesApi* | [**getCommonVariables**](docs/Api/VariablesApi.md#getcommonvariables) | **GET** /v3/public/variables | Get common variables with aggregated instead of user-specific data +*VariablesApi* | [**getUserVariables**](docs/Api/VariablesApi.md#getuservariables) | **GET** /v3/userVariables | Get variables along with related user-specific analysis settings and statistics +*VariablesApi* | [**getVariableCategories**](docs/Api/VariablesApi.md#getvariablecategories) | **GET** /v3/variableCategories | Variable categories +*VariablesApi* | [**postUserTags**](docs/Api/VariablesApi.md#postusertags) | **POST** /v3/userTags | Post or update user tags or ingredients +*VariablesApi* | [**postUserVariables**](docs/Api/VariablesApi.md#postuservariables) | **POST** /v3/userVariables | Update User Settings for a Variable +*VariablesApi* | [**resetUserVariableSettings**](docs/Api/VariablesApi.md#resetuservariablesettings) | **POST** /v3/userVariables/reset | Reset user settings for a variable to defaults ## Documentation For Models + - [Animation](docs/Model/Animation.md) + - [Button](docs/Model/Button.md) + - [Chart](docs/Model/Chart.md) + - [ChartConfig](docs/Model/ChartConfig.md) + - [ChartStyle](docs/Model/ChartStyle.md) + - [Column](docs/Model/Column.md) - [CommonResponse](docs/Model/CommonResponse.md) - - [Connection](docs/Model/Connection.md) + - [CommonVariable](docs/Model/CommonVariable.md) + - [CommonVariableArray](docs/Model/CommonVariableArray.md) - [Connector](docs/Model/Connector.md) - - [ConnectorInfo](docs/Model/ConnectorInfo.md) - - [ConnectorInfoHistoryItem](docs/Model/ConnectorInfoHistoryItem.md) + - [ConnectorArray](docs/Model/ConnectorArray.md) - [ConnectorInstruction](docs/Model/ConnectorInstruction.md) - [ConversionStep](docs/Model/ConversionStep.md) - [Correlation](docs/Model/Correlation.md) - - [Credential](docs/Model/Credential.md) - - [HumanTime](docs/Model/HumanTime.md) - - [InlineResponse200](docs/Model/InlineResponse200.md) - - [InlineResponse2001](docs/Model/InlineResponse2001.md) - - [InlineResponse20010](docs/Model/InlineResponse20010.md) - - [InlineResponse20011](docs/Model/InlineResponse20011.md) - - [InlineResponse20012](docs/Model/InlineResponse20012.md) - - [InlineResponse2002](docs/Model/InlineResponse2002.md) - - [InlineResponse2003](docs/Model/InlineResponse2003.md) - - [InlineResponse2004](docs/Model/InlineResponse2004.md) - - [InlineResponse2005](docs/Model/InlineResponse2005.md) - - [InlineResponse2006](docs/Model/InlineResponse2006.md) - - [InlineResponse2007](docs/Model/InlineResponse2007.md) - - [InlineResponse2008](docs/Model/InlineResponse2008.md) - - [InlineResponse2009](docs/Model/InlineResponse2009.md) + - [CorrelationArray](docs/Model/CorrelationArray.md) + - [Credit](docs/Model/Credit.md) + - [DataSource](docs/Model/DataSource.md) + - [Explanation](docs/Model/Explanation.md) + - [ExplanationStartTracking](docs/Model/ExplanationStartTracking.md) + - [GetConnectorsResponse](docs/Model/GetConnectorsResponse.md) + - [GetCorrelationsDataResponse](docs/Model/GetCorrelationsDataResponse.md) + - [GetCorrelationsResponse](docs/Model/GetCorrelationsResponse.md) + - [GetMeasurementsResponse](docs/Model/GetMeasurementsResponse.md) + - [GetMeasurementsResponseArray](docs/Model/GetMeasurementsResponseArray.md) + - [GetPairsResponse](docs/Model/GetPairsResponse.md) + - [GetPairsResponseArray](docs/Model/GetPairsResponseArray.md) + - [GetPublicVariablesResponse](docs/Model/GetPublicVariablesResponse.md) + - [GetPublicVariablesResponseArray](docs/Model/GetPublicVariablesResponseArray.md) + - [GetStudyDataResponse](docs/Model/GetStudyDataResponse.md) + - [GetStudyResponse](docs/Model/GetStudyResponse.md) + - [GetTrackingReminderNotificationsResponse](docs/Model/GetTrackingReminderNotificationsResponse.md) + - [GetTrackingRemindersResponse](docs/Model/GetTrackingRemindersResponse.md) + - [GetTrackingRemindersResponseArray](docs/Model/GetTrackingRemindersResponseArray.md) + - [Highchart](docs/Model/Highchart.md) + - [HighchartArray](docs/Model/HighchartArray.md) + - [Hover](docs/Model/Hover.md) + - [Image](docs/Model/Image.md) - [JsonErrorResponse](docs/Model/JsonErrorResponse.md) + - [Lang](docs/Model/Lang.md) + - [Legend](docs/Model/Legend.md) + - [Loading](docs/Model/Loading.md) + - [LocalDailyReminderNotificationTime](docs/Model/LocalDailyReminderNotificationTime.md) + - [LocalDailyReminderNotificationTimeArray](docs/Model/LocalDailyReminderNotificationTimeArray.md) + - [LocalDailyReminderNotificationTimesForAllReminder](docs/Model/LocalDailyReminderNotificationTimesForAllReminder.md) + - [LocalDailyReminderNotificationTimesForAllReminderArray](docs/Model/LocalDailyReminderNotificationTimesForAllReminderArray.md) + - [Marker](docs/Model/Marker.md) - [Measurement](docs/Model/Measurement.md) + - [MeasurementArray](docs/Model/MeasurementArray.md) - [MeasurementDelete](docs/Model/MeasurementDelete.md) - - [MeasurementRange](docs/Model/MeasurementRange.md) + - [MeasurementItem](docs/Model/MeasurementItem.md) - [MeasurementSet](docs/Model/MeasurementSet.md) - - [MeasurementSource](docs/Model/MeasurementSource.md) - [MeasurementUpdate](docs/Model/MeasurementUpdate.md) + - [Option](docs/Model/Option.md) + - [Pair](docs/Model/Pair.md) + - [PairArray](docs/Model/PairArray.md) - [Pairs](docs/Model/Pairs.md) - - [Permission](docs/Model/Permission.md) + - [PairsOfAveragesForAllUser](docs/Model/PairsOfAveragesForAllUser.md) + - [PairsOfAveragesForAllUserArray](docs/Model/PairsOfAveragesForAllUserArray.md) + - [ParticipantInstruction](docs/Model/ParticipantInstruction.md) + - [PlotOption](docs/Model/PlotOption.md) - [PostCorrelation](docs/Model/PostCorrelation.md) - - [PostVote](docs/Model/PostVote.md) + - [PostMeasurementsDataResponse](docs/Model/PostMeasurementsDataResponse.md) + - [PostMeasurementsResponse](docs/Model/PostMeasurementsResponse.md) + - [PostStudyPublishResponse](docs/Model/PostStudyPublishResponse.md) + - [PostTrackingRemindersDataResponse](docs/Model/PostTrackingRemindersDataResponse.md) + - [PostTrackingRemindersResponse](docs/Model/PostTrackingRemindersResponse.md) + - [PostUserSettingsDataResponse](docs/Model/PostUserSettingsDataResponse.md) + - [PostUserSettingsResponse](docs/Model/PostUserSettingsResponse.md) + - [ProcessedDailyMeasurement](docs/Model/ProcessedDailyMeasurement.md) + - [Scatter](docs/Model/Scatter.md) + - [Scope](docs/Model/Scope.md) + - [ScopeArray](docs/Model/ScopeArray.md) + - [Series](docs/Model/Series.md) + - [State](docs/Model/State.md) + - [Study](docs/Model/Study.md) + - [Subtitle](docs/Model/Subtitle.md) + - [Text](docs/Model/Text.md) + - [Title](docs/Model/Title.md) + - [Tooltip](docs/Model/Tooltip.md) - [TrackingReminder](docs/Model/TrackingReminder.md) + - [TrackingReminderArray](docs/Model/TrackingReminderArray.md) - [TrackingReminderDelete](docs/Model/TrackingReminderDelete.md) - [TrackingReminderNotification](docs/Model/TrackingReminderNotification.md) - - [TrackingReminderNotificationSkip](docs/Model/TrackingReminderNotificationSkip.md) - - [TrackingReminderNotificationSnooze](docs/Model/TrackingReminderNotificationSnooze.md) - - [TrackingReminderNotificationTrack](docs/Model/TrackingReminderNotificationTrack.md) + - [TrackingReminderNotificationActionArray](docs/Model/TrackingReminderNotificationActionArray.md) + - [TrackingReminderNotificationArray](docs/Model/TrackingReminderNotificationArray.md) + - [TrackingReminderNotificationPost](docs/Model/TrackingReminderNotificationPost.md) + - [TrackingReminderNotificationTrackAllAction](docs/Model/TrackingReminderNotificationTrackAllAction.md) + - [TrackingReminderNotificationsArray](docs/Model/TrackingReminderNotificationsArray.md) + - [TrackingRemindersArray](docs/Model/TrackingRemindersArray.md) - [Unit](docs/Model/Unit.md) + - [UnitArray](docs/Model/UnitArray.md) - [UnitCategory](docs/Model/UnitCategory.md) - - [Update](docs/Model/Update.md) - [User](docs/Model/User.md) + - [UserStudy](docs/Model/UserStudy.md) - [UserTag](docs/Model/UserTag.md) - - [UserTokenFailedResponse](docs/Model/UserTokenFailedResponse.md) - - [UserTokenRequest](docs/Model/UserTokenRequest.md) - - [UserTokenRequestInnerUserField](docs/Model/UserTokenRequestInnerUserField.md) - - [UserTokenSuccessfulResponse](docs/Model/UserTokenSuccessfulResponse.md) - - [UserTokenSuccessfulResponseInnerUserField](docs/Model/UserTokenSuccessfulResponseInnerUserField.md) - [UserVariable](docs/Model/UserVariable.md) + - [UserVariableArray](docs/Model/UserVariableArray.md) - [UserVariableDelete](docs/Model/UserVariableDelete.md) - - [UserVariableRelationship](docs/Model/UserVariableRelationship.md) - - [UserVariables](docs/Model/UserVariables.md) - - [ValueObject](docs/Model/ValueObject.md) - - [Variable](docs/Model/Variable.md) - [VariableCategory](docs/Model/VariableCategory.md) - - [VariableNew](docs/Model/VariableNew.md) - - [VariableUserSource](docs/Model/VariableUserSource.md) - - [VariablesNew](docs/Model/VariablesNew.md) + - [VariableCategoryArray](docs/Model/VariableCategoryArray.md) - [Vote](docs/Model/Vote.md) - [VoteDelete](docs/Model/VoteDelete.md) + - [XAxi](docs/Model/XAxi.md) + - [YAxi](docs/Model/YAxi.md) ## Documentation For Authorization -## basicAuth - -- **Type**: HTTP basic authentication - -## internalApiKey +## access_token - **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header +- **API key parameter name**: access_token +- **Location**: URL query string -## oauth2 +## client_id -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: https://app.quantimo.do/api/v1/oauth2/authorize -- **Scopes**: - - **basic**: Basic authentication - - **readmeasurements**: Grants read access to measurements and variables. Allows the client app to obtain the user's data. - - **writemeasurements**: Grants write access to measurements and variables. Allows the client app to store user data. +- **Type**: API key +- **API key parameter name**: clientId +- **Location**: URL query string ## quantimodo_oauth2 - **Type**: OAuth - **Flow**: accessCode -- **Authorization URL**: /api/v2/oauth/authorize +- **Authorization URL**: https://app.quantimo.do/api/v2/oauth/authorize - **Scopes**: - - **basic**: Allows you to read user info (displayname, email, etc). + - **basic**: Allows you to read user info (display name, email, etc). - **readmeasurements**: Allows one to read a user's data - **writemeasurements**: Allows you to write user data diff --git a/autoload.php b/autoload.php index da90a5f..0eef35c 100644 --- a/autoload.php +++ b/autoload.php @@ -1,11 +1,11 @@ . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/composer.json b/composer.json index 8c0d810..a6ce782 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "quantimodo/quantimodo-sdk-php", - "version": "5.0.4", + "version": "5.8.1103", "description": "", "keywords": [ "swagger", diff --git a/docs/Api/AnalyticsApi.md b/docs/Api/AnalyticsApi.md new file mode 100644 index 0000000..121823a --- /dev/null +++ b/docs/Api/AnalyticsApi.md @@ -0,0 +1,442 @@ +# QuantiModo\Client\AnalyticsApi + +All URIs are relative to *https://app.quantimo.do/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteVote**](AnalyticsApi.md#deleteVote) | **DELETE** /v3/votes/delete | Delete vote +[**getAggregatedCorrelations**](AnalyticsApi.md#getAggregatedCorrelations) | **GET** /v3/aggregatedCorrelations | Get aggregated correlations +[**getStudy**](AnalyticsApi.md#getStudy) | **GET** /v4/study | Get Study +[**getUserCorrelationExplanations**](AnalyticsApi.md#getUserCorrelationExplanations) | **GET** /v3/correlations/explanations | Get correlation explanations +[**getUserCorrelations**](AnalyticsApi.md#getUserCorrelations) | **GET** /v3/correlations | Get correlations +[**postAggregatedCorrelations**](AnalyticsApi.md#postAggregatedCorrelations) | **POST** /v3/aggregatedCorrelations | Store or Update a Correlation +[**postVote**](AnalyticsApi.md#postVote) | **POST** /v3/votes | Post or update vote + + +# **deleteVote** +> \QuantiModo\Client\Model\CommonResponse deleteVote($body, $user_id) + +Delete vote + +Delete previously posted vote + +### Example +```php +setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 +QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$api_instance = new QuantiModo\Client\Api\AnalyticsApi(); +$body = new \QuantiModo\Client\Model\VoteDelete(); // \QuantiModo\Client\Model\VoteDelete | The cause and effect variable names for the predictor vote to be deleted. +$user_id = 3.4; // float | User's id + +try { + $result = $api_instance->deleteVote($body, $user_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AnalyticsApi->deleteVote: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\QuantiModo\Client\Model\VoteDelete**](../Model/VoteDelete.md)| The cause and effect variable names for the predictor vote to be deleted. | + **user_id** | **float**| User's id | [optional] + +### Return type + +[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) + +### Authorization + +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getAggregatedCorrelations** +> \QuantiModo\Client\Model\Correlation[] getAggregatedCorrelations($cause_variable_name, $effect_variable_name, $sort, $limit, $offset, $user_id, $correlation_coefficient, $updated_at, $outcomes_of_interest, $onset_delay, $duration_of_action) + +Get aggregated correlations + +Get correlations based on the anonymized aggregate data from all QuantiModo users. + +### Example +```php +setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 +QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$api_instance = new QuantiModo\Client\Api\AnalyticsApi(); +$cause_variable_name = "cause_variable_name_example"; // string | Variable name of the hypothetical cause variable. Example: Sleep Duration +$effect_variable_name = "effect_variable_name_example"; // string | Variable name of the hypothetical effect variable. Example: Overall Mood +$sort = "sort_example"; // string | Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. +$limit = 100; // int | The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. +$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. +$user_id = 3.4; // float | User's id +$correlation_coefficient = "correlation_coefficient_example"; // string | Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action +$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$outcomes_of_interest = true; // bool | Only include correlations for which the effect is an outcome of interest for the user +$onset_delay = "onset_delay_example"; // string | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. +$duration_of_action = "duration_of_action_example"; // string | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. + +try { + $result = $api_instance->getAggregatedCorrelations($cause_variable_name, $effect_variable_name, $sort, $limit, $offset, $user_id, $correlation_coefficient, $updated_at, $outcomes_of_interest, $onset_delay, $duration_of_action); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AnalyticsApi->getAggregatedCorrelations: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cause_variable_name** | **string**| Variable name of the hypothetical cause variable. Example: Sleep Duration | [optional] + **effect_variable_name** | **string**| Variable name of the hypothetical effect variable. Example: Overall Mood | [optional] + **sort** | **string**| Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. | [optional] + **limit** | **int**| The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] [default to 100] + **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] + **user_id** | **float**| User's id | [optional] + **correlation_coefficient** | **string**| Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action | [optional] + **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **outcomes_of_interest** | **bool**| Only include correlations for which the effect is an outcome of interest for the user | [optional] + **onset_delay** | **string**| The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | [optional] + **duration_of_action** | **string**| The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | [optional] + +### Return type + +[**\QuantiModo\Client\Model\Correlation[]**](../Model/Correlation.md) + +### Authorization + +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getStudy** +> \QuantiModo\Client\Model\GetStudyResponse getStudy($cause_variable_name, $effect_variable_name, $app_name, $client_id, $include_charts) + +Get Study + +Get Study + +### Example +```php +setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 +QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$api_instance = new QuantiModo\Client\Api\AnalyticsApi(); +$cause_variable_name = "cause_variable_name_example"; // string | Variable name of the hypothetical cause variable. Example: Sleep Duration +$effect_variable_name = "effect_variable_name_example"; // string | Variable name of the hypothetical effect variable. Example: Overall Mood +$app_name = "app_name_example"; // string | Example: MoodiModo +$client_id = "client_id_example"; // string | Example: oauth_test_client +$include_charts = true; // bool | Example: true + +try { + $result = $api_instance->getStudy($cause_variable_name, $effect_variable_name, $app_name, $client_id, $include_charts); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AnalyticsApi->getStudy: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cause_variable_name** | **string**| Variable name of the hypothetical cause variable. Example: Sleep Duration | [optional] + **effect_variable_name** | **string**| Variable name of the hypothetical effect variable. Example: Overall Mood | [optional] + **app_name** | **string**| Example: MoodiModo | [optional] + **client_id** | **string**| Example: oauth_test_client | [optional] + **include_charts** | **bool**| Example: true | [optional] + +### Return type + +[**\QuantiModo\Client\Model\GetStudyResponse**](../Model/GetStudyResponse.md) + +### Authorization + +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getUserCorrelationExplanations** +> \QuantiModo\Client\Model\Correlation[] getUserCorrelationExplanations($cause_variable_name, $effect_variable_name) + +Get correlation explanations + +Get explanations of correlations based on data from a single user. + +### Example +```php +setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 +QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$api_instance = new QuantiModo\Client\Api\AnalyticsApi(); +$cause_variable_name = "cause_variable_name_example"; // string | Variable name of the hypothetical cause variable. Example: Sleep Duration +$effect_variable_name = "effect_variable_name_example"; // string | Variable name of the hypothetical effect variable. Example: Overall Mood + +try { + $result = $api_instance->getUserCorrelationExplanations($cause_variable_name, $effect_variable_name); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AnalyticsApi->getUserCorrelationExplanations: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cause_variable_name** | **string**| Variable name of the hypothetical cause variable. Example: Sleep Duration | [optional] + **effect_variable_name** | **string**| Variable name of the hypothetical effect variable. Example: Overall Mood | [optional] + +### Return type + +[**\QuantiModo\Client\Model\Correlation[]**](../Model/Correlation.md) + +### Authorization + +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getUserCorrelations** +> \QuantiModo\Client\Model\GetCorrelationsResponse getUserCorrelations($cause_variable_name, $effect_variable_name, $sort, $limit, $offset, $user_id, $correlation_coefficient, $onset_delay, $duration_of_action, $updated_at, $outcomes_of_interest, $app_name, $client_id, $fallback_to_study_for_cause_and_effect, $fallback_to_aggregate_correlations) + +Get correlations + +Get correlations based on data from a single user. + +### Example +```php +setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 +QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$api_instance = new QuantiModo\Client\Api\AnalyticsApi(); +$cause_variable_name = "cause_variable_name_example"; // string | Variable name of the hypothetical cause variable. Example: Sleep Duration +$effect_variable_name = "effect_variable_name_example"; // string | Variable name of the hypothetical effect variable. Example: Overall Mood +$sort = "sort_example"; // string | Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. +$limit = 100; // int | The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. +$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. +$user_id = 3.4; // float | User's id +$correlation_coefficient = "correlation_coefficient_example"; // string | Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action +$onset_delay = "onset_delay_example"; // string | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. +$duration_of_action = "duration_of_action_example"; // string | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. +$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$outcomes_of_interest = true; // bool | Only include correlations for which the effect is an outcome of interest for the user +$app_name = "app_name_example"; // string | Example: MoodiModo +$client_id = "client_id_example"; // string | Example: oauth_test_client +$fallback_to_study_for_cause_and_effect = true; // bool | Example: 1 +$fallback_to_aggregate_correlations = true; // bool | Example: true + +try { + $result = $api_instance->getUserCorrelations($cause_variable_name, $effect_variable_name, $sort, $limit, $offset, $user_id, $correlation_coefficient, $onset_delay, $duration_of_action, $updated_at, $outcomes_of_interest, $app_name, $client_id, $fallback_to_study_for_cause_and_effect, $fallback_to_aggregate_correlations); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AnalyticsApi->getUserCorrelations: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cause_variable_name** | **string**| Variable name of the hypothetical cause variable. Example: Sleep Duration | [optional] + **effect_variable_name** | **string**| Variable name of the hypothetical effect variable. Example: Overall Mood | [optional] + **sort** | **string**| Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. | [optional] + **limit** | **int**| The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] [default to 100] + **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] + **user_id** | **float**| User's id | [optional] + **correlation_coefficient** | **string**| Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action | [optional] + **onset_delay** | **string**| The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | [optional] + **duration_of_action** | **string**| The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | [optional] + **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **outcomes_of_interest** | **bool**| Only include correlations for which the effect is an outcome of interest for the user | [optional] + **app_name** | **string**| Example: MoodiModo | [optional] + **client_id** | **string**| Example: oauth_test_client | [optional] + **fallback_to_study_for_cause_and_effect** | **bool**| Example: 1 | [optional] + **fallback_to_aggregate_correlations** | **bool**| Example: true | [optional] + +### Return type + +[**\QuantiModo\Client\Model\GetCorrelationsResponse**](../Model/GetCorrelationsResponse.md) + +### Authorization + +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **postAggregatedCorrelations** +> postAggregatedCorrelations($body, $user_id) + +Store or Update a Correlation + +Add correlation + +### Example +```php +setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 +QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$api_instance = new QuantiModo\Client\Api\AnalyticsApi(); +$body = new \QuantiModo\Client\Model\PostCorrelation(); // \QuantiModo\Client\Model\PostCorrelation | Provides correlation data +$user_id = 3.4; // float | User's id + +try { + $api_instance->postAggregatedCorrelations($body, $user_id); +} catch (Exception $e) { + echo 'Exception when calling AnalyticsApi->postAggregatedCorrelations: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\QuantiModo\Client\Model\PostCorrelation**](../Model/PostCorrelation.md)| Provides correlation data | + **user_id** | **float**| User's id | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **postVote** +> \QuantiModo\Client\Model\CommonResponse postVote($body, $user_id) + +Post or update vote + +This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. We incorporates crowd-sourced plausibility estimations into our algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. + +### Example +```php +setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 +QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$api_instance = new QuantiModo\Client\Api\AnalyticsApi(); +$body = new \QuantiModo\Client\Model\Vote(); // \QuantiModo\Client\Model\Vote | Contains the cause variable, effect variable, and vote value. +$user_id = 3.4; // float | User's id + +try { + $result = $api_instance->postVote($body, $user_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AnalyticsApi->postVote: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\QuantiModo\Client\Model\Vote**](../Model/Vote.md)| Contains the cause variable, effect variable, and vote value. | + **user_id** | **float**| User's id | [optional] + +### Return type + +[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) + +### Authorization + +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/docs/Api/ApplicationEndpointsApi.md b/docs/Api/ApplicationEndpointsApi.md deleted file mode 100644 index e51713d..0000000 --- a/docs/Api/ApplicationEndpointsApi.md +++ /dev/null @@ -1,795 +0,0 @@ -# QuantiModo\Client\ApplicationEndpointsApi - -All URIs are relative to *https://app.quantimo.do/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**v2ApplicationConnectionsGet**](ApplicationEndpointsApi.md#v2ApplicationConnectionsGet) | **GET** /v2/application/connections | Get all Connections -[**v2ApplicationCredentialsGet**](ApplicationEndpointsApi.md#v2ApplicationCredentialsGet) | **GET** /v2/application/credentials | Get all Credentials -[**v2ApplicationMeasurementsGet**](ApplicationEndpointsApi.md#v2ApplicationMeasurementsGet) | **GET** /v2/application/measurements | Get measurements for all users using your application -[**v2ApplicationTrackingRemindersGet**](ApplicationEndpointsApi.md#v2ApplicationTrackingRemindersGet) | **GET** /v2/application/trackingReminders | Get tracking reminders -[**v2ApplicationUpdatesGet**](ApplicationEndpointsApi.md#v2ApplicationUpdatesGet) | **GET** /v2/application/updates | Get all Updates -[**v2ApplicationUserVariableRelationshipsGet**](ApplicationEndpointsApi.md#v2ApplicationUserVariableRelationshipsGet) | **GET** /v2/application/userVariableRelationships | Get all UserVariableRelationships -[**v2ApplicationUserVariablesGet**](ApplicationEndpointsApi.md#v2ApplicationUserVariablesGet) | **GET** /v2/application/userVariables | Get all UserVariables -[**v2ApplicationVariableUserSourcesGet**](ApplicationEndpointsApi.md#v2ApplicationVariableUserSourcesGet) | **GET** /v2/application/variableUserSources | Get all VariableUserSources -[**v2ApplicationVotesGet**](ApplicationEndpointsApi.md#v2ApplicationVotesGet) | **GET** /v2/application/votes | Get all Votes - - -# **v2ApplicationConnectionsGet** -> \QuantiModo\Client\Model\InlineResponse2002 v2ApplicationConnectionsGet($access_token, $user_id, $connector_id, $connect_status, $connect_error, $update_requested_at, $update_status, $update_error, $last_successful_updated_at, $created_at, $updated_at, $limit, $offset, $sort) - -Get all Connections - -Get all Connections - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$api_instance = new QuantiModo\Client\Api\ApplicationEndpointsApi(); -$access_token = "access_token_example"; // string | Application's OAuth2 access token -$user_id = 56; // int | User's id -$connector_id = 56; // int | The id for the connector data source for which the connection is connected -$connect_status = "connect_status_example"; // string | Indicates whether a connector is currently connected to a service for a user. -$connect_error = "connect_error_example"; // string | Error message if there is a problem with authorizing this connection. -$update_requested_at = "update_requested_at_example"; // string | Time at which an update was requested by a user. -$update_status = "update_status_example"; // string | Indicates whether a connector is currently updated. -$update_error = "update_error_example"; // string | Indicates if there was an error during the update. -$last_successful_updated_at = "last_successful_updated_at_example"; // string | The time at which the connector was last successfully updated. -$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. -$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. -$sort = "sort_example"; // string | Sort by given field. If the field is prefixed with '-', it will sort in descending order. - -try { - $result = $api_instance->v2ApplicationConnectionsGet($access_token, $user_id, $connector_id, $connect_status, $connect_error, $update_requested_at, $update_status, $update_error, $last_successful_updated_at, $created_at, $updated_at, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ApplicationEndpointsApi->v2ApplicationConnectionsGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| Application's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **connector_id** | **int**| The id for the connector data source for which the connection is connected | [optional] - **connect_status** | **string**| Indicates whether a connector is currently connected to a service for a user. | [optional] - **connect_error** | **string**| Error message if there is a problem with authorizing this connection. | [optional] - **update_requested_at** | **string**| Time at which an update was requested by a user. | [optional] - **update_status** | **string**| Indicates whether a connector is currently updated. | [optional] - **update_error** | **string**| Indicates if there was an error during the update. | [optional] - **last_successful_updated_at** | **string**| The time at which the connector was last successfully updated. | [optional] - **created_at** | **string**| When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] - **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] - **sort** | **string**| Sort by given field. If the field is prefixed with '-', it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\InlineResponse2002**](../Model/InlineResponse2002.md) - -### Authorization - -[oauth2](../../README.md#oauth2), [internalApiKey](../../README.md#internalApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2ApplicationCredentialsGet** -> \QuantiModo\Client\Model\InlineResponse2003 v2ApplicationCredentialsGet($access_token, $user_id, $connector_id, $attr_key, $attr_value, $created_at, $updated_at, $limit, $offset, $sort) - -Get all Credentials - -Get all Credentials - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$api_instance = new QuantiModo\Client\Api\ApplicationEndpointsApi(); -$access_token = "access_token_example"; // string | Application's OAuth2 access token -$user_id = 56; // int | User's id -$connector_id = 56; // int | The id for the connector data source from which the credential was obtained -$attr_key = "attr_key_example"; // string | Attribute name such as token, userid, username, or password -$attr_value = "attr_value_example"; // string | Encrypted value for the attribute specified -$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. -$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. -$sort = "sort_example"; // string | Sort by given field. If the field is prefixed with '-', it will sort in descending order. - -try { - $result = $api_instance->v2ApplicationCredentialsGet($access_token, $user_id, $connector_id, $attr_key, $attr_value, $created_at, $updated_at, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ApplicationEndpointsApi->v2ApplicationCredentialsGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| Application's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **connector_id** | **int**| The id for the connector data source from which the credential was obtained | [optional] - **attr_key** | **string**| Attribute name such as token, userid, username, or password | [optional] - **attr_value** | **string**| Encrypted value for the attribute specified | [optional] - **created_at** | **string**| When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] - **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] - **sort** | **string**| Sort by given field. If the field is prefixed with '-', it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\InlineResponse2003**](../Model/InlineResponse2003.md) - -### Authorization - -[oauth2](../../README.md#oauth2), [internalApiKey](../../README.md#internalApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2ApplicationMeasurementsGet** -> \QuantiModo\Client\Model\InlineResponse2004 v2ApplicationMeasurementsGet($access_token, $user_id, $client_id, $connector_id, $variable_id, $source_name, $start_time, $value, $unit_id, $original_value, $original_unit_id, $duration, $note, $latitude, $longitude, $location, $created_at, $updated_at, $error, $limit, $offset, $sort) - -Get measurements for all users using your application - -Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$api_instance = new QuantiModo\Client\Api\ApplicationEndpointsApi(); -$access_token = "access_token_example"; // string | Application's OAuth2 access token -$user_id = 56; // int | User's id -$client_id = "client_id_example"; // string | The ID of the client application which originally stored the measurement -$connector_id = 56; // int | The id for the connector data source from which the measurement was obtained -$variable_id = 56; // int | ID of the variable for which we are creating the measurement records -$source_name = "source_name_example"; // string | Application or device used to record the measurement values -$start_time = "start_time_example"; // string | start time for the measurement event. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$value = 3.4; // float | The value of the measurement after conversion to the default unit for that variable -$unit_id = 56; // int | The default unit id for the variable -$original_value = 3.4; // float | Unconverted value of measurement as originally posted (before conversion to default unit) -$original_unit_id = 56; // int | Unit id of the measurement as originally submitted -$duration = 56; // int | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. -$note = "note_example"; // string | An optional note the user may include with their measurement -$latitude = 3.4; // float | Latitude at which the measurement was taken -$longitude = 3.4; // float | Longitude at which the measurement was taken -$location = "location_example"; // string | Optional human readable name for the location where the measurement was recorded -$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$error = "error_example"; // string | An error message if there is a problem with the measurement -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. -$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. -$sort = "sort_example"; // string | Sort by given field. If the field is prefixed with '-', it will sort in descending order. - -try { - $result = $api_instance->v2ApplicationMeasurementsGet($access_token, $user_id, $client_id, $connector_id, $variable_id, $source_name, $start_time, $value, $unit_id, $original_value, $original_unit_id, $duration, $note, $latitude, $longitude, $location, $created_at, $updated_at, $error, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ApplicationEndpointsApi->v2ApplicationMeasurementsGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| Application's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **client_id** | **string**| The ID of the client application which originally stored the measurement | [optional] - **connector_id** | **int**| The id for the connector data source from which the measurement was obtained | [optional] - **variable_id** | **int**| ID of the variable for which we are creating the measurement records | [optional] - **source_name** | **string**| Application or device used to record the measurement values | [optional] - **start_time** | **string**| start time for the measurement event. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **value** | **float**| The value of the measurement after conversion to the default unit for that variable | [optional] - **unit_id** | **int**| The default unit id for the variable | [optional] - **original_value** | **float**| Unconverted value of measurement as originally posted (before conversion to default unit) | [optional] - **original_unit_id** | **int**| Unit id of the measurement as originally submitted | [optional] - **duration** | **int**| The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | [optional] - **note** | **string**| An optional note the user may include with their measurement | [optional] - **latitude** | **float**| Latitude at which the measurement was taken | [optional] - **longitude** | **float**| Longitude at which the measurement was taken | [optional] - **location** | **string**| Optional human readable name for the location where the measurement was recorded | [optional] - **created_at** | **string**| When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **error** | **string**| An error message if there is a problem with the measurement | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] - **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] - **sort** | **string**| Sort by given field. If the field is prefixed with '-', it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\InlineResponse2004**](../Model/InlineResponse2004.md) - -### Authorization - -[oauth2](../../README.md#oauth2), [internalApiKey](../../README.md#internalApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2ApplicationTrackingRemindersGet** -> \QuantiModo\Client\Model\InlineResponse2005 v2ApplicationTrackingRemindersGet($access_token, $user_id, $client_id, $created_at, $updated_at, $limit, $offset, $sort) - -Get tracking reminders - -Get the variable id, frequency, and default value for the user tracking reminders - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$api_instance = new QuantiModo\Client\Api\ApplicationEndpointsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$client_id = "client_id_example"; // string | The ID of the client application which last created or updated this trackingReminder -$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. -$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. -$sort = "sort_example"; // string | Sort by given field. If the field is prefixed with '-', it will sort in descending order. - -try { - $result = $api_instance->v2ApplicationTrackingRemindersGet($access_token, $user_id, $client_id, $created_at, $updated_at, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ApplicationEndpointsApi->v2ApplicationTrackingRemindersGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **client_id** | **string**| The ID of the client application which last created or updated this trackingReminder | [optional] - **created_at** | **string**| When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] - **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] - **sort** | **string**| Sort by given field. If the field is prefixed with '-', it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\InlineResponse2005**](../Model/InlineResponse2005.md) - -### Authorization - -[oauth2](../../README.md#oauth2), [internalApiKey](../../README.md#internalApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2ApplicationUpdatesGet** -> \QuantiModo\Client\Model\InlineResponse2006 v2ApplicationUpdatesGet($access_token, $user_id, $connector_id, $number_of_measurements, $success, $message, $created_at, $updated_at, $limit, $offset, $sort) - -Get all Updates - -Get all Updates - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$api_instance = new QuantiModo\Client\Api\ApplicationEndpointsApi(); -$access_token = "access_token_example"; // string | Application's OAuth2 access token -$user_id = 56; // int | User's id -$connector_id = 56; // int | connector_id -$number_of_measurements = 56; // int | number_of_measurements -$success = true; // bool | success -$message = "message_example"; // string | message -$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. -$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. -$sort = "sort_example"; // string | Sort by given field. If the field is prefixed with '-', it will sort in descending order. - -try { - $result = $api_instance->v2ApplicationUpdatesGet($access_token, $user_id, $connector_id, $number_of_measurements, $success, $message, $created_at, $updated_at, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ApplicationEndpointsApi->v2ApplicationUpdatesGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| Application's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **connector_id** | **int**| connector_id | [optional] - **number_of_measurements** | **int**| number_of_measurements | [optional] - **success** | **bool**| success | [optional] - **message** | **string**| message | [optional] - **created_at** | **string**| When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] - **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] - **sort** | **string**| Sort by given field. If the field is prefixed with '-', it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\InlineResponse2006**](../Model/InlineResponse2006.md) - -### Authorization - -[oauth2](../../README.md#oauth2), [internalApiKey](../../README.md#internalApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2ApplicationUserVariableRelationshipsGet** -> \QuantiModo\Client\Model\InlineResponse2008 v2ApplicationUserVariableRelationshipsGet($access_token, $user_id, $id, $confidence_level, $confidence_score, $direction, $duration_of_action, $error_message, $onset_delay, $outcome_variable_id, $predictor_variable_id, $predictor_unit_id, $sinn_rank, $strength_level, $strength_score, $vote, $value_predicting_high_outcome, $value_predicting_low_outcome, $limit, $offset, $sort) - -Get all UserVariableRelationships - -Get all UserVariableRelationships - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$api_instance = new QuantiModo\Client\Api\ApplicationEndpointsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$id = 56; // int | id -$confidence_level = "confidence_level_example"; // string | Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors -$confidence_score = 3.4; // float | A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors -$direction = "direction_example"; // string | Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. -$duration_of_action = 56; // int | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. -$error_message = "error_message_example"; // string | error_message -$onset_delay = 56; // int | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. -$outcome_variable_id = 56; // int | Variable ID for the outcome variable -$predictor_variable_id = 56; // int | Variable ID for the predictor variable -$predictor_unit_id = 56; // int | ID for default unit of the predictor variable -$sinn_rank = 3.4; // float | A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. -$strength_level = "strength_level_example"; // string | Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. -$strength_score = 3.4; // float | A value represented to the size of the effect which the predictor appears to have on the outcome. -$vote = "vote_example"; // string | vote -$value_predicting_high_outcome = 3.4; // float | Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value -$value_predicting_low_outcome = 3.4; // float | Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. -$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. -$sort = "sort_example"; // string | Sort by given field. If the field is prefixed with '-', it will sort in descending order. - -try { - $result = $api_instance->v2ApplicationUserVariableRelationshipsGet($access_token, $user_id, $id, $confidence_level, $confidence_score, $direction, $duration_of_action, $error_message, $onset_delay, $outcome_variable_id, $predictor_variable_id, $predictor_unit_id, $sinn_rank, $strength_level, $strength_score, $vote, $value_predicting_high_outcome, $value_predicting_low_outcome, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ApplicationEndpointsApi->v2ApplicationUserVariableRelationshipsGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **id** | **int**| id | [optional] - **confidence_level** | **string**| Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors | [optional] - **confidence_score** | **float**| A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors | [optional] - **direction** | **string**| Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. | [optional] - **duration_of_action** | **int**| The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | [optional] - **error_message** | **string**| error_message | [optional] - **onset_delay** | **int**| The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | [optional] - **outcome_variable_id** | **int**| Variable ID for the outcome variable | [optional] - **predictor_variable_id** | **int**| Variable ID for the predictor variable | [optional] - **predictor_unit_id** | **int**| ID for default unit of the predictor variable | [optional] - **sinn_rank** | **float**| A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. | [optional] - **strength_level** | **string**| Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. | [optional] - **strength_score** | **float**| A value represented to the size of the effect which the predictor appears to have on the outcome. | [optional] - **vote** | **string**| vote | [optional] - **value_predicting_high_outcome** | **float**| Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value | [optional] - **value_predicting_low_outcome** | **float**| Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] - **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] - **sort** | **string**| Sort by given field. If the field is prefixed with '-', it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\InlineResponse2008**](../Model/InlineResponse2008.md) - -### Authorization - -[oauth2](../../README.md#oauth2), [internalApiKey](../../README.md#internalApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2ApplicationUserVariablesGet** -> \QuantiModo\Client\Model\InlineResponse2007 v2ApplicationUserVariablesGet($access_token, $user_id, $client_id, $parent_id, $variable_id, $default_unit_id, $minimum_allowed_value, $maximum_allowed_value, $filling_value, $join_with, $onset_delay, $duration_of_action, $variable_category_id, $updated, $public, $cause_only, $filling_type, $number_of_measurements, $number_of_processed_measurements, $measurements_at_last_analysis, $last_unit_id, $last_original_unit_id, $last_original_value, $last_value, $number_of_correlations, $status, $error_message, $last_successful_update_time, $standard_deviation, $variance, $minimum_recorded_value, $maximum_recorded_value, $mean, $median, $most_common_unit_id, $most_common_value, $number_of_unique_daily_values, $number_of_changes, $skewness, $kurtosis, $latitude, $longitude, $location, $created_at, $updated_at, $outcome, $sources, $earliest_source_time, $latest_source_time, $earliest_measurement_time, $latest_measurement_time, $earliest_filling_time, $latest_filling_time, $limit, $offset, $sort) - -Get all UserVariables - -Get all UserVariables - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$api_instance = new QuantiModo\Client\Api\ApplicationEndpointsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$client_id = "client_id_example"; // string | The ID of the client application which last created or updated this user variable -$parent_id = 56; // int | ID of the parent variable if this variable has any parent -$variable_id = 56; // int | ID of variable -$default_unit_id = 56; // int | D of unit to use for this variable -$minimum_allowed_value = 3.4; // float | The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. -$maximum_allowed_value = 3.4; // float | The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. -$filling_value = 3.4; // float | When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. -$join_with = 56; // int | The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables -$onset_delay = 56; // int | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. -$duration_of_action = 56; // int | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. -$variable_category_id = 56; // int | ID of variable category -$updated = 56; // int | updated -$public = 56; // int | Is variable public -$cause_only = true; // bool | A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user -$filling_type = "filling_type_example"; // string | 0 -> No filling, 1 -> Use filling-value -$number_of_measurements = 56; // int | Number of measurements -$number_of_processed_measurements = 56; // int | Number of processed measurements -$measurements_at_last_analysis = 56; // int | Number of measurements at last analysis -$last_unit_id = 56; // int | ID of last Unit -$last_original_unit_id = 56; // int | ID of last original Unit -$last_original_value = 56; // int | Last original value which is stored -$last_value = 3.4; // float | Last Value -$number_of_correlations = 56; // int | Number of correlations for this variable -$status = "status_example"; // string | status -$error_message = "error_message_example"; // string | error_message -$last_successful_update_time = "last_successful_update_time_example"; // string | When this variable or its settings were last updated -$standard_deviation = 3.4; // float | Standard deviation -$variance = 3.4; // float | Variance -$minimum_recorded_value = 3.4; // float | Minimum recorded value of this variable -$maximum_recorded_value = 3.4; // float | Maximum recorded value of this variable -$mean = 3.4; // float | Mean -$median = 3.4; // float | Median -$most_common_unit_id = 56; // int | Most common Unit ID -$most_common_value = 3.4; // float | Most common value -$number_of_unique_daily_values = 3.4; // float | Number of unique daily values -$number_of_changes = 56; // int | Number of changes -$skewness = 3.4; // float | Skewness -$kurtosis = 3.4; // float | Kurtosis -$latitude = 3.4; // float | Latitude -$longitude = 3.4; // float | Longitude -$location = "location_example"; // string | Location -$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$outcome = true; // bool | Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables -$sources = "sources_example"; // string | Comma-separated list of source names to limit variables to those sources -$earliest_source_time = 56; // int | Earliest source time -$latest_source_time = 56; // int | Latest source time -$earliest_measurement_time = 56; // int | Earliest measurement time -$latest_measurement_time = 56; // int | Latest measurement time -$earliest_filling_time = 56; // int | Earliest filling time -$latest_filling_time = 56; // int | Latest filling time -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. -$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. -$sort = "sort_example"; // string | Sort by given field. If the field is prefixed with '-', it will sort in descending order. - -try { - $result = $api_instance->v2ApplicationUserVariablesGet($access_token, $user_id, $client_id, $parent_id, $variable_id, $default_unit_id, $minimum_allowed_value, $maximum_allowed_value, $filling_value, $join_with, $onset_delay, $duration_of_action, $variable_category_id, $updated, $public, $cause_only, $filling_type, $number_of_measurements, $number_of_processed_measurements, $measurements_at_last_analysis, $last_unit_id, $last_original_unit_id, $last_original_value, $last_value, $number_of_correlations, $status, $error_message, $last_successful_update_time, $standard_deviation, $variance, $minimum_recorded_value, $maximum_recorded_value, $mean, $median, $most_common_unit_id, $most_common_value, $number_of_unique_daily_values, $number_of_changes, $skewness, $kurtosis, $latitude, $longitude, $location, $created_at, $updated_at, $outcome, $sources, $earliest_source_time, $latest_source_time, $earliest_measurement_time, $latest_measurement_time, $earliest_filling_time, $latest_filling_time, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ApplicationEndpointsApi->v2ApplicationUserVariablesGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **client_id** | **string**| The ID of the client application which last created or updated this user variable | [optional] - **parent_id** | **int**| ID of the parent variable if this variable has any parent | [optional] - **variable_id** | **int**| ID of variable | [optional] - **default_unit_id** | **int**| D of unit to use for this variable | [optional] - **minimum_allowed_value** | **float**| The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. | [optional] - **maximum_allowed_value** | **float**| The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. | [optional] - **filling_value** | **float**| When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. | [optional] - **join_with** | **int**| The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables | [optional] - **onset_delay** | **int**| The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | [optional] - **duration_of_action** | **int**| The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | [optional] - **variable_category_id** | **int**| ID of variable category | [optional] - **updated** | **int**| updated | [optional] - **public** | **int**| Is variable public | [optional] - **cause_only** | **bool**| A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user | [optional] - **filling_type** | **string**| 0 -> No filling, 1 -> Use filling-value | [optional] - **number_of_measurements** | **int**| Number of measurements | [optional] - **number_of_processed_measurements** | **int**| Number of processed measurements | [optional] - **measurements_at_last_analysis** | **int**| Number of measurements at last analysis | [optional] - **last_unit_id** | **int**| ID of last Unit | [optional] - **last_original_unit_id** | **int**| ID of last original Unit | [optional] - **last_original_value** | **int**| Last original value which is stored | [optional] - **last_value** | **float**| Last Value | [optional] - **number_of_correlations** | **int**| Number of correlations for this variable | [optional] - **status** | **string**| status | [optional] - **error_message** | **string**| error_message | [optional] - **last_successful_update_time** | **string**| When this variable or its settings were last updated | [optional] - **standard_deviation** | **float**| Standard deviation | [optional] - **variance** | **float**| Variance | [optional] - **minimum_recorded_value** | **float**| Minimum recorded value of this variable | [optional] - **maximum_recorded_value** | **float**| Maximum recorded value of this variable | [optional] - **mean** | **float**| Mean | [optional] - **median** | **float**| Median | [optional] - **most_common_unit_id** | **int**| Most common Unit ID | [optional] - **most_common_value** | **float**| Most common value | [optional] - **number_of_unique_daily_values** | **float**| Number of unique daily values | [optional] - **number_of_changes** | **int**| Number of changes | [optional] - **skewness** | **float**| Skewness | [optional] - **kurtosis** | **float**| Kurtosis | [optional] - **latitude** | **float**| Latitude | [optional] - **longitude** | **float**| Longitude | [optional] - **location** | **string**| Location | [optional] - **created_at** | **string**| When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **outcome** | **bool**| Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables | [optional] - **sources** | **string**| Comma-separated list of source names to limit variables to those sources | [optional] - **earliest_source_time** | **int**| Earliest source time | [optional] - **latest_source_time** | **int**| Latest source time | [optional] - **earliest_measurement_time** | **int**| Earliest measurement time | [optional] - **latest_measurement_time** | **int**| Latest measurement time | [optional] - **earliest_filling_time** | **int**| Earliest filling time | [optional] - **latest_filling_time** | **int**| Latest filling time | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] - **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] - **sort** | **string**| Sort by given field. If the field is prefixed with '-', it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\InlineResponse2007**](../Model/InlineResponse2007.md) - -### Authorization - -[oauth2](../../README.md#oauth2), [internalApiKey](../../README.md#internalApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2ApplicationVariableUserSourcesGet** -> \QuantiModo\Client\Model\InlineResponse2009 v2ApplicationVariableUserSourcesGet($access_token, $user_id, $variable_id, $timestamp, $earliest_measurement_time, $latest_measurement_time, $created_at, $updated_at, $limit, $offset, $sort) - -Get all VariableUserSources - -Get all VariableUserSources - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$api_instance = new QuantiModo\Client\Api\ApplicationEndpointsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$variable_id = 56; // int | ID of variable -$timestamp = 56; // int | Time that this measurement occurred Uses epoch minute (epoch time divided by 60) -$earliest_measurement_time = 56; // int | Earliest measurement time -$latest_measurement_time = 56; // int | Latest measurement time -$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. -$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. -$sort = "sort_example"; // string | Sort by given field. If the field is prefixed with '-', it will sort in descending order. - -try { - $result = $api_instance->v2ApplicationVariableUserSourcesGet($access_token, $user_id, $variable_id, $timestamp, $earliest_measurement_time, $latest_measurement_time, $created_at, $updated_at, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ApplicationEndpointsApi->v2ApplicationVariableUserSourcesGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **variable_id** | **int**| ID of variable | [optional] - **timestamp** | **int**| Time that this measurement occurred Uses epoch minute (epoch time divided by 60) | [optional] - **earliest_measurement_time** | **int**| Earliest measurement time | [optional] - **latest_measurement_time** | **int**| Latest measurement time | [optional] - **created_at** | **string**| When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] - **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] - **sort** | **string**| Sort by given field. If the field is prefixed with '-', it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\InlineResponse2009**](../Model/InlineResponse2009.md) - -### Authorization - -[oauth2](../../README.md#oauth2), [internalApiKey](../../README.md#internalApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2ApplicationVotesGet** -> \QuantiModo\Client\Model\InlineResponse20010 v2ApplicationVotesGet($access_token, $user_id, $client_id, $cause_id, $effect_id, $value, $created_at, $updated_at, $limit, $offset, $sort) - -Get all Votes - -Get all Votes - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$api_instance = new QuantiModo\Client\Api\ApplicationEndpointsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$client_id = "client_id_example"; // string | The ID of the client application which last created or updated this vote -$cause_id = 56; // int | ID of predictor variable -$effect_id = 56; // int | ID of outcome variable -$value = 56; // int | Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. -$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. -$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. -$sort = "sort_example"; // string | Sort by given field. If the field is prefixed with '-', it will sort in descending order. - -try { - $result = $api_instance->v2ApplicationVotesGet($access_token, $user_id, $client_id, $cause_id, $effect_id, $value, $created_at, $updated_at, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ApplicationEndpointsApi->v2ApplicationVotesGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **client_id** | **string**| The ID of the client application which last created or updated this vote | [optional] - **cause_id** | **int**| ID of predictor variable | [optional] - **effect_id** | **int**| ID of outcome variable | [optional] - **value** | **int**| Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. | [optional] - **created_at** | **string**| When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] - **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] - **sort** | **string**| Sort by given field. If the field is prefixed with '-', it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\InlineResponse20010**](../Model/InlineResponse20010.md) - -### Authorization - -[oauth2](../../README.md#oauth2), [internalApiKey](../../README.md#internalApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - diff --git a/docs/Api/AuthenticationApi.md b/docs/Api/AuthenticationApi.md index 74e50ec..deeec1f 100644 --- a/docs/Api/AuthenticationApi.md +++ b/docs/Api/AuthenticationApi.md @@ -4,136 +4,44 @@ All URIs are relative to *https://app.quantimo.do/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**v2AuthSocialAuthorizeCodeGet**](AuthenticationApi.md#v2AuthSocialAuthorizeCodeGet) | **GET** /v2/auth/social/authorizeCode | Second Step in Social Authentication flow with JWT Token -[**v2AuthSocialAuthorizeTokenGet**](AuthenticationApi.md#v2AuthSocialAuthorizeTokenGet) | **GET** /v2/auth/social/authorizeToken | Native Social Authentication -[**v2AuthSocialLoginGet**](AuthenticationApi.md#v2AuthSocialLoginGet) | **GET** /v2/auth/social/login | First Setp in Social Authentication flow with JWT Token -[**v2Oauth2AccessTokenGet**](AuthenticationApi.md#v2Oauth2AccessTokenGet) | **GET** /v2/oauth2/access_token | Get a user access token -[**v2OauthAuthorizeGet**](AuthenticationApi.md#v2OauthAuthorizeGet) | **GET** /v2/oauth/authorize | Request Authorization Code +[**getAccessToken**](AuthenticationApi.md#getAccessToken) | **GET** /v3/oauth2/token | Get a user access token +[**getOauthAuthorizationCode**](AuthenticationApi.md#getOauthAuthorizationCode) | **GET** /v3/oauth2/authorize | Request Authorization Code +[**postGoogleIdToken**](AuthenticationApi.md#postGoogleIdToken) | **POST** /v3/googleIdToken | Post GoogleIdToken -# **v2AuthSocialAuthorizeCodeGet** -> v2AuthSocialAuthorizeCodeGet($code, $provider) +# **getAccessToken** +> getAccessToken($client_secret, $grant_type, $code, $response_type, $scope, $client_id, $redirect_uri, $state) -Second Step in Social Authentication flow with JWT Token - -Here is the flow for how social authentication works with a JWT Token 1.**Client:** The client needs to open popup with social auth url (`https://app/quantimo.do/api/v2/auth/social/login?provider={provider}&redirectUrl={url}`) of server with `provider` and `redirectUrl`. (Url should be registered with our social apps. Facebook is fine with any redirect url with the same domain base url but Google needs exact redirect url.) 2.**Server:** The QM server will redirect user to that provider to get access. 3.**Client:** After successful or failed authentication, it will be redirected to given `redirectUrl` with code or error. 4.**Client:** The client needs to get that code and needs to send an Ajax request to server at `https://app.quantimo.do/api/v2/auth/social/authorizeCode?provider={provider}&code={authorizationCode}` 5.**Server:** The QM server will authorize that code from the social connection and will authenticate user and will retrieve user info. 6.**Server:** The QM server will try to find existing user by unique identity. If the user already exists then it will login. Otherwise, it will create new user and will then login. 7.**Server:** Once user is found/created, it will return a JWT token for that user in the response. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\AuthenticationApi(); -$code = "code_example"; // string | Authorization code obtained from the provider. -$provider = "provider_example"; // string | The current options are `google` and `facebook`. - -try { - $api_instance->v2AuthSocialAuthorizeCodeGet($code, $provider); -} catch (Exception $e) { - echo 'Exception when calling AuthenticationApi->v2AuthSocialAuthorizeCodeGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **code** | **string**| Authorization code obtained from the provider. | - **provider** | **string**| The current options are `google` and `facebook`. | - -### Return type - -void (empty response body) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2AuthSocialAuthorizeTokenGet** -> v2AuthSocialAuthorizeTokenGet($access_token, $provider, $refresh_token) - -Native Social Authentication - -If you are using native authentication via Facebook or Google SDKs then you should use the following flow. 1.**Client:** Using native authentication via your native mobile app, get an access token using the instructions provided by the Facebook SDK (https://developers.facebook.com/docs/facebook-login) or Google (https://developers.google.com/identity/protocols/OAuth2) 2.**Client:** Send an Ajax request with provider name and access token on `https://app.quantimo.do/api/v2/auth/social/authorizeToken?provider={provider}&accessToken={accessToken}&refreshToken={refreshToken}` (`refreshToken` is optional) 3.**Server:** Server will try to get user info and will find existing user by unique identity. If user exist then it will do a login for that or it will create new user and will do login 4.**Server:** Once user is found/created, it will return a JWT token for that user in response 5.**Client:** After getting the JWT token to get a QM access token follow these steps and include your JWT token in them as a header (Authorization: Bearer **{yourJWThere}**) or as a url parameter (https://app.quantimo.do/api/v2/oauth/authorize?token={yourJWThere}). - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\AuthenticationApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token obtained from Google or FB native SDK -$provider = "provider_example"; // string | The current options are `google` and `facebook`. -$refresh_token = "refresh_token_example"; // string | Optional refresh token obtained from Google or FB native SDK - -try { - $api_instance->v2AuthSocialAuthorizeTokenGet($access_token, $provider, $refresh_token); -} catch (Exception $e) { - echo 'Exception when calling AuthenticationApi->v2AuthSocialAuthorizeTokenGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token obtained from Google or FB native SDK | - **provider** | **string**| The current options are `google` and `facebook`. | - **refresh_token** | **string**| Optional refresh token obtained from Google or FB native SDK | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2AuthSocialLoginGet** -> v2AuthSocialLoginGet($redirect_url, $provider) - -First Setp in Social Authentication flow with JWT Token +Get a user access token -Here is the flow for how social authentication works with a JWT Token 1.**Client:** The client needs to open popup with social auth url (`https://app/quantimo.do/api/v2/auth/social/login?provider={provider}&redirectUrl={url}`) of server with `provider` and `redirectUrl`. (Url should be registered with our social apps. Facebook and Twitter are fine with any redirect url with the same domain base url but Google needs exact redirect url.) 2.**Server:** The QM server will redirect user to that provider to get access. 3.**Client:** After successful or failed authentication, it will be redirected to given `redirectUrl` with code or error. 4.**Client:** The client needs to get that code and needs to send an Ajax request to server at `https://app.quantimo.do/api/v2/auth/social/authorizeCode?provider={provider}&code={authorizationCode}` 5.**Server:** The QM server will authorize that code from the social connection and will authenticate user and will retrieve user info. 6.**Server:** The QM server will try to find existing user by unique identity. If the user already exists then it will login. Otherwise, it will create new user and will then login. 7.**Server:** Once user is found/created, it will return a JWT token for that user in the response. +Client provides authorization token obtained from /api/v3/oauth2/authorize to this endpoint and receives an access token. Access token can then be used to query API endpoints. ### Request Access Token After user approves your access to the given scope form the https:/app.quantimo.do/v2/oauth2/authorize endpoint, you'll receive an authorization code to request an access token. This time make a `POST` request to `/api/v2/oauth/access_token` with parameters including: * `grant_type` Can be `authorization_code` or `refresh_token` since we are getting the `access_token` for the first time we don't have a `refresh_token` so this must be `authorization_code`. * `code` Authorization code you received with the previous request. * `redirect_uri` Your application's redirect url. ### Refreshing Access Token Access tokens expire at some point, to continue using our api you need to refresh them with `refresh_token` you received along with the `access_token`. To do this make a `POST` request to `/api/v2/oauth/access_token` with correct parameters, which are: * `grant_type` This time grant type must be `refresh_token` since we have it. * `clientId` Your application's client id. * `client_secret` Your application's client secret. * `refresh_token` The refresh token you received with the `access_token`. Every request you make to this endpoint will give you a new refresh token and make the old one expired. So you can keep getting new access tokens with new refresh tokens. ### Using Access Token Currently we support 2 ways for this, you can't use both at the same time. * Adding access token to the request header as `Authorization: Bearer {access_token}` * Adding to the url as a query parameter `?access_token={access_token}` You can read more about OAuth2 from [here](http://oauth.net/2/) ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\AuthenticationApi(); -$redirect_url = "redirect_url_example"; // string | The redirect URI is the URL within your client application that will receive the OAuth2 credentials. Url should be registered with our social apps. Facebook and Twitter are fine with any redirect url with the same domain base url but Google needs exact redirect url. -$provider = "provider_example"; // string | The current options are `google` and `facebook`. +$client_secret = "client_secret_example"; // string | This is the secret for your obtained clientId. We use this to ensure that only your application uses the clientId. Obtain this by creating a free application at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps). +$grant_type = "grant_type_example"; // string | Grant Type can be 'authorization_code' or 'refresh_token' +$code = "code_example"; // string | Authorization code you received with the previous request. +$response_type = "response_type_example"; // string | If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. +$scope = "scope_example"; // string | Scopes include basic, readmeasurements, and writemeasurements. The `basic` scope allows you to read user info (displayName, email, etc). The `readmeasurements` scope allows one to read a user's data. The `writemeasurements` scope allows you to write user data. Separate multiple scopes by a space. +$client_id = "client_id_example"; // string | Example: oauth_test_client +$redirect_uri = "redirect_uri_example"; // string | The redirect URI is the URL within your client application that will receive the OAuth2 credentials. +$state = "state_example"; // string | An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI try { - $api_instance->v2AuthSocialLoginGet($redirect_url, $provider); + $api_instance->getAccessToken($client_secret, $grant_type, $code, $response_type, $scope, $client_id, $redirect_uri, $state); } catch (Exception $e) { - echo 'Exception when calling AuthenticationApi->v2AuthSocialLoginGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AuthenticationApi->getAccessToken: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -142,8 +50,14 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **redirect_url** | **string**| The redirect URI is the URL within your client application that will receive the OAuth2 credentials. Url should be registered with our social apps. Facebook and Twitter are fine with any redirect url with the same domain base url but Google needs exact redirect url. | - **provider** | **string**| The current options are `google` and `facebook`. | + **client_secret** | **string**| This is the secret for your obtained clientId. We use this to ensure that only your application uses the clientId. Obtain this by creating a free application at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps). | + **grant_type** | **string**| Grant Type can be 'authorization_code' or 'refresh_token' | + **code** | **string**| Authorization code you received with the previous request. | + **response_type** | **string**| If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. | + **scope** | **string**| Scopes include basic, readmeasurements, and writemeasurements. The `basic` scope allows you to read user info (displayName, email, etc). The `readmeasurements` scope allows one to read a user's data. The `writemeasurements` scope allows you to write user data. Separate multiple scopes by a space. | + **client_id** | **string**| Example: oauth_test_client | [optional] + **redirect_uri** | **string**| The redirect URI is the URL within your client application that will receive the OAuth2 credentials. | [optional] + **state** | **string**| An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI | [optional] ### Return type @@ -151,7 +65,7 @@ void (empty response body) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -160,35 +74,37 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v2Oauth2AccessTokenGet** -> v2Oauth2AccessTokenGet($client_id, $client_secret, $grant_type, $code, $response_type, $scope, $redirect_uri, $state) +# **getOauthAuthorizationCode** +> getOauthAuthorizationCode($client_secret, $response_type, $scope, $client_id, $redirect_uri, $state) -Get a user access token +Request Authorization Code -Client provides authorization token obtained from /api/v1/oauth2/authorize to this endpoint and receives an access token. Access token can then be used to query different API endpoints of QuantiModo. ### Request Access Token After user approves your access to the given scope form the https:/app.quantimo.do/v2/oauth2/authorize endpoint, you'll receive an authorization code to request an access token. This time make a `POST` request to `/api/v2/oauth/access_token` with parameters including: * `grant_type` Can be `authorization_code` or `refresh_token` since we are getting the `access_token` for the first time we don't have a `refresh_token` so this must be `authorization_code`. * `code` Authorization code you received with the previous request. * `redirect_uri` Your application's redirect url. ### Refreshing Access Token Access tokens expire at some point, to continue using our api you need to refresh them with `refresh_token` you received along with the `access_token`. To do this make a `POST` request to `/api/v2/oauth/access_token` with correct parameters, which are: * `grant_type` This time grant type must be `refresh_token` since we have it. * `clientId` Your application's client id. * `client_secret` Your application's client secret. * `refresh_token` The refresh token you received with the `access_token`. Every request you make to this endpoint will give you a new refresh token and make the old one expired. So you can keep getting new access tokens with new refresh tokens. ### Using Access Token Currently we support 2 ways for this, you can't use both at the same time. * Adding access token to the request header as `Authorization: Bearer {access_token}` * Adding to the url as a query parameter `?access_token={access_token}` You can read more about OAuth2 from [here](http://oauth.net/2/) +You can implement OAuth2 authentication to your application using our **OAuth2** endpoints. You need to redirect users to `/api/v3/oauth2/authorize` endpoint to get an authorization code and include the parameters below. This page will ask the user if they want to allow a client's application to submit or obtain data from their QM account. It will redirect the user to the url provided by the client application with the code as a query parameter or error in case of an error. See the /api/v2/oauth/access_token endpoint for the next steps. ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\AuthenticationApi(); -$client_id = "client_id_example"; // string | This is the unique ID that QuantiModo uses to identify your application. Obtain a client id by emailing info@quantimo.do. -$client_secret = "client_secret_example"; // string | This is the secret for your obtained clientId. QuantiModo uses this to validate that only your application uses the clientId. -$grant_type = "grant_type_example"; // string | Grant Type can be 'authorization_code' or 'refresh_token' -$code = "code_example"; // string | Authorization code you received with the previous request. +$client_secret = "client_secret_example"; // string | This is the secret for your obtained clientId. We use this to ensure that only your application uses the clientId. Obtain this by creating a free application at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps). $response_type = "response_type_example"; // string | If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. -$scope = "scope_example"; // string | Scopes include basic, readmeasurements, and writemeasurements. The \"basic\" scope allows you to read user info (displayname, email, etc). The \"readmeasurements\" scope allows one to read a user's data. The \"writemeasurements\" scope allows you to write user data. Separate multiple scopes by a space. +$scope = "scope_example"; // string | Scopes include basic, readmeasurements, and writemeasurements. The `basic` scope allows you to read user info (displayName, email, etc). The `readmeasurements` scope allows one to read a user's data. The `writemeasurements` scope allows you to write user data. Separate multiple scopes by a space. +$client_id = "client_id_example"; // string | Example: oauth_test_client $redirect_uri = "redirect_uri_example"; // string | The redirect URI is the URL within your client application that will receive the OAuth2 credentials. $state = "state_example"; // string | An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI try { - $api_instance->v2Oauth2AccessTokenGet($client_id, $client_secret, $grant_type, $code, $response_type, $scope, $redirect_uri, $state); + $api_instance->getOauthAuthorizationCode($client_secret, $response_type, $scope, $client_id, $redirect_uri, $state); } catch (Exception $e) { - echo 'Exception when calling AuthenticationApi->v2Oauth2AccessTokenGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AuthenticationApi->getOauthAuthorizationCode: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -197,12 +113,10 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **client_id** | **string**| This is the unique ID that QuantiModo uses to identify your application. Obtain a client id by emailing info@quantimo.do. | - **client_secret** | **string**| This is the secret for your obtained clientId. QuantiModo uses this to validate that only your application uses the clientId. | - **grant_type** | **string**| Grant Type can be 'authorization_code' or 'refresh_token' | - **code** | **string**| Authorization code you received with the previous request. | - **response_type** | **string**| If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. | [optional] - **scope** | **string**| Scopes include basic, readmeasurements, and writemeasurements. The \"basic\" scope allows you to read user info (displayname, email, etc). The \"readmeasurements\" scope allows one to read a user's data. The \"writemeasurements\" scope allows you to write user data. Separate multiple scopes by a space. | [optional] + **client_secret** | **string**| This is the secret for your obtained clientId. We use this to ensure that only your application uses the clientId. Obtain this by creating a free application at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps). | + **response_type** | **string**| If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. | + **scope** | **string**| Scopes include basic, readmeasurements, and writemeasurements. The `basic` scope allows you to read user info (displayName, email, etc). The `readmeasurements` scope allows one to read a user's data. The `writemeasurements` scope allows you to write user data. Separate multiple scopes by a space. | + **client_id** | **string**| Example: oauth_test_client | [optional] **redirect_uri** | **string**| The redirect URI is the URL within your client application that will receive the OAuth2 credentials. | [optional] **state** | **string**| An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI | [optional] @@ -212,7 +126,7 @@ void (empty response body) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -221,47 +135,30 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v2OauthAuthorizeGet** -> v2OauthAuthorizeGet($client_id, $client_secret, $response_type, $scope, $redirect_uri, $state) +# **postGoogleIdToken** +> postGoogleIdToken() -Request Authorization Code +Post GoogleIdToken -You can implement OAuth2 authentication to your application using our **OAuth2** endpoints. You need to redirect users to `/api/v2/oauth/authorize` endpoint to get an authorization code and include the parameters below. This page will ask the user if they want to allow a client's application to submit or obtain data from their QM account. It will redirect the user to the url provided by the client application with the code as a query parameter or error in case of an error. See the /api/v2/oauth/access_token endpoint for the next steps. +Post GoogleIdToken ### Example ```php setAccessToken('YOUR_ACCESS_TOKEN'); - $api_instance = new QuantiModo\Client\Api\AuthenticationApi(); -$client_id = "client_id_example"; // string | This is the unique ID that QuantiModo uses to identify your application. Obtain a client id by creating a free application at [https://admin.quantimo.do](https://admin.quantimo.do). -$client_secret = "client_secret_example"; // string | This is the secret for your obtained clientId. QuantiModo uses this to validate that only your application uses the clientId. Obtain this by creating a free application at [https://admin.quantimo.do](https://admin.quantimo.do). -$response_type = "response_type_example"; // string | If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. -$scope = "scope_example"; // string | Scopes include basic, readmeasurements, and writemeasurements. The \"basic\" scope allows you to read user info (displayname, email, etc). The \"readmeasurements\" scope allows one to read a user's data. The \"writemeasurements\" scope allows you to write user data. Separate multiple scopes by a space. -$redirect_uri = "redirect_uri_example"; // string | The redirect URI is the URL within your client application that will receive the OAuth2 credentials. -$state = "state_example"; // string | An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI try { - $api_instance->v2OauthAuthorizeGet($client_id, $client_secret, $response_type, $scope, $redirect_uri, $state); + $api_instance->postGoogleIdToken(); } catch (Exception $e) { - echo 'Exception when calling AuthenticationApi->v2OauthAuthorizeGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AuthenticationApi->postGoogleIdToken: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client_id** | **string**| This is the unique ID that QuantiModo uses to identify your application. Obtain a client id by creating a free application at [https://admin.quantimo.do](https://admin.quantimo.do). | - **client_secret** | **string**| This is the secret for your obtained clientId. QuantiModo uses this to validate that only your application uses the clientId. Obtain this by creating a free application at [https://admin.quantimo.do](https://admin.quantimo.do). | - **response_type** | **string**| If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. | - **scope** | **string**| Scopes include basic, readmeasurements, and writemeasurements. The \"basic\" scope allows you to read user info (displayname, email, etc). The \"readmeasurements\" scope allows one to read a user's data. The \"writemeasurements\" scope allows you to write user data. Separate multiple scopes by a space. | - **redirect_uri** | **string**| The redirect URI is the URL within your client application that will receive the OAuth2 credentials. | [optional] - **state** | **string**| An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI | [optional] +This endpoint does not need any parameter. ### Return type @@ -269,7 +166,7 @@ void (empty response body) ### Authorization -[oauth2](../../README.md#oauth2) +No authorization required ### HTTP request headers diff --git a/docs/Api/ConnectorsApi.md b/docs/Api/ConnectorsApi.md index 4b1b91f..fd80405 100644 --- a/docs/Api/ConnectorsApi.md +++ b/docs/Api/ConnectorsApi.md @@ -4,123 +4,16 @@ All URIs are relative to *https://app.quantimo.do/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**v1ConnectJsGet**](ConnectorsApi.md#v1ConnectJsGet) | **GET** /v1/connect.js | Get embeddable connect javascript -[**v1ConnectMobileGet**](ConnectorsApi.md#v1ConnectMobileGet) | **GET** /v1/connect/mobile | Mobile connect page -[**v1ConnectorsConnectorConnectGet**](ConnectorsApi.md#v1ConnectorsConnectorConnectGet) | **GET** /v1/connectors/{connector}/connect | Obtain a token from 3rd party data source -[**v1ConnectorsConnectorConnectInstructionsGet**](ConnectorsApi.md#v1ConnectorsConnectorConnectInstructionsGet) | **GET** /v1/connectors/{connector}/connectInstructions | Connection Instructions -[**v1ConnectorsConnectorConnectParameterGet**](ConnectorsApi.md#v1ConnectorsConnectorConnectParameterGet) | **GET** /v1/connectors/{connector}/connectParameter | Connect Parameter -[**v1ConnectorsConnectorDisconnectGet**](ConnectorsApi.md#v1ConnectorsConnectorDisconnectGet) | **GET** /v1/connectors/{connector}/disconnect | Delete stored connection info -[**v1ConnectorsConnectorInfoGet**](ConnectorsApi.md#v1ConnectorsConnectorInfoGet) | **GET** /v1/connectors/{connector}/info | Get connector info for user -[**v1ConnectorsConnectorUpdateGet**](ConnectorsApi.md#v1ConnectorsConnectorUpdateGet) | **GET** /v1/connectors/{connector}/update | Sync with data source -[**v1ConnectorsListGet**](ConnectorsApi.md#v1ConnectorsListGet) | **GET** /v1/connectors/list | List of Connectors +[**connectConnector**](ConnectorsApi.md#connectConnector) | **GET** /v3/connectors/{connectorName}/connect | Obtain a token from 3rd party data source +[**disconnectConnector**](ConnectorsApi.md#disconnectConnector) | **GET** /v3/connectors/{connectorName}/disconnect | Delete stored connection info +[**getConnectors**](ConnectorsApi.md#getConnectors) | **GET** /v3/connectors/list | List of Connectors +[**getIntegrationJs**](ConnectorsApi.md#getIntegrationJs) | **GET** /v3/integration.js | Get embeddable connect javascript +[**getMobileConnectPage**](ConnectorsApi.md#getMobileConnectPage) | **GET** /v3/connect/mobile | Mobile connect page +[**updateConnector**](ConnectorsApi.md#updateConnector) | **GET** /v3/connectors/{connectorName}/update | Sync with data source -# **v1ConnectJsGet** -> v1ConnectJsGet($access_token) - -Get embeddable connect javascript - -Get embeddable connect javascript. Usage: - Embedding in applications with popups for 3rd-party authentication windows. Use `qmSetupInPopup` function after connecting `connect.js`. - Embedding in applications with popups for 3rd-party authentication windows. Requires a selector to block. It will be embedded in this block. Use `qmSetupOnPage` function after connecting `connect.js`. - Embedding in mobile applications without popups for 3rd-party authentication. Use `qmSetupOnMobile` function after connecting `connect.js`. if using the MoodiModo Clones, Use `qmSetupOnIonic` function after connecting `connect.js`. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$api_instance = new QuantiModo\Client\Api\ConnectorsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token - -try { - $api_instance->v1ConnectJsGet($access_token); -} catch (Exception $e) { - echo 'Exception when calling ConnectorsApi->v1ConnectJsGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[oauth2](../../README.md#oauth2), [internalApiKey](../../README.md#internalApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/x-javascript - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1ConnectMobileGet** -> v1ConnectMobileGet($access_token, $user_id) - -Mobile connect page - -This page is designed to be opened in a webview. Instead of using popup authentication boxes, it uses redirection. You can include the user's access_token as a URL parameter like https://app.quantimo.do/api/v1/connect/mobile?access_token=123 - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$api_instance = new QuantiModo\Client\Api\ConnectorsApi(); -$access_token = "access_token_example"; // string | User OAuth access token -$user_id = 56; // int | User's id - -try { - $api_instance->v1ConnectMobileGet($access_token, $user_id); -} catch (Exception $e) { - echo 'Exception when calling ConnectorsApi->v1ConnectMobileGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User OAuth access token | - **user_id** | **int**| User's id | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[oauth2](../../README.md#oauth2), [internalApiKey](../../README.md#internalApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: text/html - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1ConnectorsConnectorConnectGet** -> v1ConnectorsConnectorConnectGet($connector, $access_token, $user_id) +# **connectConnector** +> connectConnector($connector_name, $user_id) Obtain a token from 3rd party data source @@ -131,18 +24,21 @@ Attempt to obtain a token from the data provider, store it in the database. With setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\ConnectorsApi(); -$connector = "connector_example"; // string | Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id +$connector_name = "connector_name_example"; // string | Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. +$user_id = 3.4; // float | User's id try { - $api_instance->v1ConnectorsConnectorConnectGet($connector, $access_token, $user_id); + $api_instance->connectConnector($connector_name, $user_id); } catch (Exception $e) { - echo 'Exception when calling ConnectorsApi->v1ConnectorsConnectorConnectGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ConnectorsApi->connectConnector: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -151,9 +47,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **connector** | **string**| Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **connector_name** | **string**| Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. | + **user_id** | **float**| User's id | [optional] ### Return type @@ -161,7 +56,7 @@ void (empty response body) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -170,33 +65,32 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1ConnectorsConnectorConnectInstructionsGet** -> v1ConnectorsConnectorConnectInstructionsGet($connector, $parameters, $url, $use_popup, $access_token, $user_id) +# **disconnectConnector** +> disconnectConnector($connector_name) -Connection Instructions +Delete stored connection info -Returns instructions that describe what parameters and endpoint to use to connect to the given data provider. +The disconnect method deletes any stored tokens or connection information from the connectors database. ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\ConnectorsApi(); -$connector = "connector_example"; // string | Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. -$parameters = "parameters_example"; // string | JSON Array of Parameters for the request to enable connector. -$url = "url_example"; // string | URL which should be used to enable the connector. -$use_popup = true; // bool | Should use popup when enabling connector -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id +$connector_name = "connector_name_example"; // string | Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. try { - $api_instance->v1ConnectorsConnectorConnectInstructionsGet($connector, $parameters, $url, $use_popup, $access_token, $user_id); + $api_instance->disconnectConnector($connector_name); } catch (Exception $e) { - echo 'Exception when calling ConnectorsApi->v1ConnectorsConnectorConnectInstructionsGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ConnectorsApi->disconnectConnector: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -205,12 +99,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **connector** | **string**| Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. | - **parameters** | **string**| JSON Array of Parameters for the request to enable connector. | - **url** | **string**| URL which should be used to enable the connector. | - **use_popup** | **bool**| Should use popup when enabling connector | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **connector_name** | **string**| Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. | ### Return type @@ -218,7 +107,7 @@ void (empty response body) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -227,37 +116,34 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1ConnectorsConnectorConnectParameterGet** -> \QuantiModo\Client\Model\ConnectorInstruction v1ConnectorsConnectorConnectParameterGet($connector, $display_name, $key, $placeholder, $type, $use_popup, $access_token, $user_id, $default_value) +# **getConnectors** +> \QuantiModo\Client\Model\GetConnectorsResponse getConnectors($app_name, $client_id) -Connect Parameter +List of Connectors -Returns instructions that describe what parameters and endpoint to use to connect to the given data provider. +A connector pulls data from other data providers using their API or a screenscraper. Returns a list of all available connectors and information about them such as their id, name, whether the user has provided access, logo url, connection instructions, and the update history. ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\ConnectorsApi(); -$connector = "connector_example"; // string | Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. -$display_name = "display_name_example"; // string | Name of the parameter that is user visible in the form -$key = "key_example"; // string | Name of the property that the user has to enter such as username or password Connector (used in HTTP request) -$placeholder = "placeholder_example"; // string | Placeholder hint value for the parameter input tag. -$type = "type_example"; // string | Type of input field such as those found here http://www.w3schools.com/tags/tag_input.asp -$use_popup = true; // bool | Should use popup when enabling connector -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$default_value = "default_value_example"; // string | Default parameter value +$app_name = "app_name_example"; // string | Example: MoodiModo +$client_id = "client_id_example"; // string | Example: oauth_test_client try { - $result = $api_instance->v1ConnectorsConnectorConnectParameterGet($connector, $display_name, $key, $placeholder, $type, $use_popup, $access_token, $user_id, $default_value); + $result = $api_instance->getConnectors($app_name, $client_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ConnectorsApi->v1ConnectorsConnectorConnectParameterGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ConnectorsApi->getConnectors: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -266,23 +152,16 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **connector** | **string**| Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. | - **display_name** | **string**| Name of the parameter that is user visible in the form | - **key** | **string**| Name of the property that the user has to enter such as username or password Connector (used in HTTP request) | - **placeholder** | **string**| Placeholder hint value for the parameter input tag. | - **type** | **string**| Type of input field such as those found here http://www.w3schools.com/tags/tag_input.asp | - **use_popup** | **bool**| Should use popup when enabling connector | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **default_value** | **string**| Default parameter value | [optional] + **app_name** | **string**| Example: MoodiModo | [optional] + **client_id** | **string**| Example: oauth_test_client | [optional] ### Return type -[**\QuantiModo\Client\Model\ConnectorInstruction**](../Model/ConnectorInstruction.md) +[**\QuantiModo\Client\Model\GetConnectorsResponse**](../Model/GetConnectorsResponse.md) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -291,28 +170,25 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1ConnectorsConnectorDisconnectGet** -> v1ConnectorsConnectorDisconnectGet($connector) +# **getIntegrationJs** +> getIntegrationJs($client_id) -Delete stored connection info +Get embeddable connect javascript -The disconnect method deletes any stored tokens or connection information from the connectors database. +Get embeddable connect javascript. Usage: - Embedding in applications with popups for 3rd-party authentication windows. Use `qmSetupInPopup` function after connecting `connect.js`. - Embedding in applications with popups for 3rd-party authentication windows. Requires a selector to block. It will be embedded in this block. Use `qmSetupOnPage` function after connecting `connect.js`. - Embedding in mobile applications without popups for 3rd-party authentication. Use `qmSetupOnMobile` function after connecting `connect.js`. If using in a Cordova application call `qmSetupOnIonic` function after connecting `connect.js`. ### Example ```php setAccessToken('YOUR_ACCESS_TOKEN'); - $api_instance = new QuantiModo\Client\Api\ConnectorsApi(); -$connector = "connector_example"; // string | Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. +$client_id = "client_id_example"; // string | Example: oauth_test_client try { - $api_instance->v1ConnectorsConnectorDisconnectGet($connector); + $api_instance->getIntegrationJs($client_id); } catch (Exception $e) { - echo 'Exception when calling ConnectorsApi->v1ConnectorsConnectorDisconnectGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ConnectorsApi->getIntegrationJs: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -321,7 +197,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **connector** | **string**| Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. | + **client_id** | **string**| Example: oauth_test_client | [optional] ### Return type @@ -329,40 +205,34 @@ void (empty response body) ### Authorization -[oauth2](../../README.md#oauth2) +No authorization required ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/json + - **Accept**: application/x-javascript [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1ConnectorsConnectorInfoGet** -> \QuantiModo\Client\Model\ConnectorInfo v1ConnectorsConnectorInfoGet($connector, $access_token, $user_id) +# **getMobileConnectPage** +> getMobileConnectPage($user_id) -Get connector info for user +Mobile connect page -Returns information about the connector such as the connector id, whether or not is connected for this user (i.e. we have a token or credentials), and its update history for the user. +This page is designed to be opened in a webview. Instead of using popup authentication boxes, it uses redirection. You can include the user's access_token as a URL parameter like https://app.quantimo.do/api/v3/connect/mobile?access_token=123 ### Example ```php setAccessToken('YOUR_ACCESS_TOKEN'); - $api_instance = new QuantiModo\Client\Api\ConnectorsApi(); -$connector = "connector_example"; // string | Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id +$user_id = 3.4; // float | User's id try { - $result = $api_instance->v1ConnectorsConnectorInfoGet($connector, $access_token, $user_id); - print_r($result); + $api_instance->getMobileConnectPage($user_id); } catch (Exception $e) { - echo 'Exception when calling ConnectorsApi->v1ConnectorsConnectorInfoGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ConnectorsApi->getMobileConnectPage: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -371,27 +241,25 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **connector** | **string**| Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **user_id** | **float**| User's id | [optional] ### Return type -[**\QuantiModo\Client\Model\ConnectorInfo**](../Model/ConnectorInfo.md) +void (empty response body) ### Authorization -[oauth2](../../README.md#oauth2) +No authorization required ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/json + - **Accept**: text/html [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1ConnectorsConnectorUpdateGet** -> v1ConnectorsConnectorUpdateGet($connector, $access_token, $user_id) +# **updateConnector** +> updateConnector($connector_name, $user_id) Sync with data source @@ -402,18 +270,21 @@ The update method tells the QM Connector Framework to check with the data provid setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\ConnectorsApi(); -$connector = "connector_example"; // string | Lowercase system name of the source application or device -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id +$connector_name = "connector_name_example"; // string | Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. +$user_id = 3.4; // float | User's id try { - $api_instance->v1ConnectorsConnectorUpdateGet($connector, $access_token, $user_id); + $api_instance->updateConnector($connector_name, $user_id); } catch (Exception $e) { - echo 'Exception when calling ConnectorsApi->v1ConnectorsConnectorUpdateGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ConnectorsApi->updateConnector: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -422,9 +293,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **connector** | **string**| Lowercase system name of the source application or device | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **connector_name** | **string**| Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. | + **user_id** | **float**| User's id | [optional] ### Return type @@ -432,51 +302,7 @@ void (empty response body) ### Authorization -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1ConnectorsListGet** -> \QuantiModo\Client\Model\Connector[] v1ConnectorsListGet() - -List of Connectors - -A connector pulls data from other data providers using their API or a screenscraper. Returns a list of all available connectors and information about them such as their id, name, whether the user has provided access, logo url, connection instructions, and the update history. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\ConnectorsApi(); - -try { - $result = $api_instance->v1ConnectorsListGet(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ConnectorsApi->v1ConnectorsListGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**\QuantiModo\Client\Model\Connector[]**](../Model/Connector.md) - -### Authorization - -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers diff --git a/docs/Api/CorrelationsApi.md b/docs/Api/CorrelationsApi.md deleted file mode 100644 index 6bf9c25..0000000 --- a/docs/Api/CorrelationsApi.md +++ /dev/null @@ -1,699 +0,0 @@ -# QuantiModo\Client\CorrelationsApi - -All URIs are relative to *https://app.quantimo.do/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**v1AggregatedCorrelationsGet**](CorrelationsApi.md#v1AggregatedCorrelationsGet) | **GET** /v1/aggregatedCorrelations | Get aggregated correlations -[**v1AggregatedCorrelationsPost**](CorrelationsApi.md#v1AggregatedCorrelationsPost) | **POST** /v1/aggregatedCorrelations | Store or Update a Correlation -[**v1CorrelationsGet**](CorrelationsApi.md#v1CorrelationsGet) | **GET** /v1/correlations | Get correlations -[**v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet**](CorrelationsApi.md#v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet) | **GET** /v1/organizations/{organizationId}/users/{userId}/variables/{variableName}/causes | Search user correlations for a given cause -[**v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet**](CorrelationsApi.md#v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet) | **GET** /v1/organizations/{organizationId}/users/{userId}/variables/{variableName}/effects | Search user correlations for a given cause -[**v1PublicCorrelationsSearchSearchGet**](CorrelationsApi.md#v1PublicCorrelationsSearchSearchGet) | **GET** /v1/public/correlations/search/{search} | Get average correlations for variables containing search term -[**v1VariablesVariableNameCausesGet**](CorrelationsApi.md#v1VariablesVariableNameCausesGet) | **GET** /v1/variables/{variableName}/causes | Search user correlations for a given effect -[**v1VariablesVariableNameEffectsGet**](CorrelationsApi.md#v1VariablesVariableNameEffectsGet) | **GET** /v1/variables/{variableName}/effects | Search user correlations for a given cause -[**v1VariablesVariableNamePublicCausesGet**](CorrelationsApi.md#v1VariablesVariableNamePublicCausesGet) | **GET** /v1/variables/{variableName}/public/causes | Search public correlations for a given effect -[**v1VariablesVariableNamePublicEffectsGet**](CorrelationsApi.md#v1VariablesVariableNamePublicEffectsGet) | **GET** /v1/variables/{variableName}/public/effects | Search public correlations for a given cause -[**v1VotesDeletePost**](CorrelationsApi.md#v1VotesDeletePost) | **POST** /v1/votes/delete | Delete vote -[**v1VotesPost**](CorrelationsApi.md#v1VotesPost) | **POST** /v1/votes | Post or update vote - - -# **v1AggregatedCorrelationsGet** -> \QuantiModo\Client\Model\Correlation[] v1AggregatedCorrelationsGet($access_token, $user_id, $effect, $cause, $correlation_coefficient, $onset_delay, $duration_of_action, $last_updated, $limit, $offset, $sort, $outcomes_of_interest) - -Get aggregated correlations - -Get correlations based on the anonymized aggregate data from all QuantiModo users. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\CorrelationsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$effect = "effect_example"; // string | ORIGINAL variable name of the effect variable for which the user desires correlations -$cause = "cause_example"; // string | ORIGINAL variable name of the cause variable for which the user desires correlations -$correlation_coefficient = "correlation_coefficient_example"; // string | Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action -$onset_delay = "onset_delay_example"; // string | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. -$duration_of_action = "duration_of_action_example"; // string | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. -$last_updated = "last_updated_example"; // string | The time that this measurement was last updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. -$offset = 56; // int | Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. -$sort = 56; // int | Sort by given field. If the field is prefixed with `-, it will sort in descending order. -$outcomes_of_interest = true; // bool | Only include correlations for which the effect is an outcome of interest for the user - -try { - $result = $api_instance->v1AggregatedCorrelationsGet($access_token, $user_id, $effect, $cause, $correlation_coefficient, $onset_delay, $duration_of_action, $last_updated, $limit, $offset, $sort, $outcomes_of_interest); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CorrelationsApi->v1AggregatedCorrelationsGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **effect** | **string**| ORIGINAL variable name of the effect variable for which the user desires correlations | [optional] - **cause** | **string**| ORIGINAL variable name of the cause variable for which the user desires correlations | [optional] - **correlation_coefficient** | **string**| Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action | [optional] - **onset_delay** | **string**| The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | [optional] - **duration_of_action** | **string**| The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | [optional] - **last_updated** | **string**| The time that this measurement was last updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. | [optional] - **offset** | **int**| Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. | [optional] - **sort** | **int**| Sort by given field. If the field is prefixed with `-, it will sort in descending order. | [optional] - **outcomes_of_interest** | **bool**| Only include correlations for which the effect is an outcome of interest for the user | [optional] - -### Return type - -[**\QuantiModo\Client\Model\Correlation[]**](../Model/Correlation.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1AggregatedCorrelationsPost** -> v1AggregatedCorrelationsPost($body, $access_token, $user_id) - -Store or Update a Correlation - -Add correlation - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\CorrelationsApi(); -$body = new \QuantiModo\Client\Model\PostCorrelation(); // \QuantiModo\Client\Model\PostCorrelation | Provides correlation data -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $api_instance->v1AggregatedCorrelationsPost($body, $access_token, $user_id); -} catch (Exception $e) { - echo 'Exception when calling CorrelationsApi->v1AggregatedCorrelationsPost: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\PostCorrelation**](../Model/\QuantiModo\Client\Model\PostCorrelation.md)| Provides correlation data | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1CorrelationsGet** -> \QuantiModo\Client\Model\Correlation[] v1CorrelationsGet($access_token, $user_id, $effect, $cause, $correlation_coefficient, $onset_delay, $duration_of_action, $last_updated, $limit, $offset, $sort, $outcomes_of_interest) - -Get correlations - -Get correlations based on data from a single user. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\CorrelationsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$effect = "effect_example"; // string | ORIGINAL variable name of the effect variable for which the user desires correlations -$cause = "cause_example"; // string | ORIGINAL variable name of the cause variable for which the user desires correlations -$correlation_coefficient = "correlation_coefficient_example"; // string | Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action -$onset_delay = "onset_delay_example"; // string | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. -$duration_of_action = "duration_of_action_example"; // string | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. -$last_updated = "last_updated_example"; // string | The time that this measurement was last updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. -$offset = 56; // int | Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. -$sort = 56; // int | Sort by given field. If the field is prefixed with `-, it will sort in descending order. -$outcomes_of_interest = true; // bool | Only include correlations for which the effect is an outcome of interest for the user - -try { - $result = $api_instance->v1CorrelationsGet($access_token, $user_id, $effect, $cause, $correlation_coefficient, $onset_delay, $duration_of_action, $last_updated, $limit, $offset, $sort, $outcomes_of_interest); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CorrelationsApi->v1CorrelationsGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **effect** | **string**| ORIGINAL variable name of the effect variable for which the user desires correlations | [optional] - **cause** | **string**| ORIGINAL variable name of the cause variable for which the user desires correlations | [optional] - **correlation_coefficient** | **string**| Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action | [optional] - **onset_delay** | **string**| The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | [optional] - **duration_of_action** | **string**| The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | [optional] - **last_updated** | **string**| The time that this measurement was last updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. | [optional] - **offset** | **int**| Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. | [optional] - **sort** | **int**| Sort by given field. If the field is prefixed with `-, it will sort in descending order. | [optional] - **outcomes_of_interest** | **bool**| Only include correlations for which the effect is an outcome of interest for the user | [optional] - -### Return type - -[**\QuantiModo\Client\Model\Correlation[]**](../Model/Correlation.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet** -> \QuantiModo\Client\Model\Correlation[] v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet($organization_id, $user_id2, $variable_name, $organization_token, $access_token, $user_id, $include_public) - -Search user correlations for a given cause - -Returns average of all correlations and votes for all user cause variables for a given cause. If parameter \"include_public\" is used, it also returns public correlations. User correlation overwrites or supersedes public correlation. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\CorrelationsApi(); -$organization_id = 56; // int | Organization ID -$user_id2 = 56; // int | User id -$variable_name = "variable_name_example"; // string | Effect variable name -$organization_token = "organization_token_example"; // string | Organization access token -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$include_public = "include_public_example"; // string | Include public correlations, Can be \"1\" or empty. - -try { - $result = $api_instance->v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet($organization_id, $user_id2, $variable_name, $organization_token, $access_token, $user_id, $include_public); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CorrelationsApi->v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organization_id** | **int**| Organization ID | - **user_id2** | **int**| User id | - **variable_name** | **string**| Effect variable name | - **organization_token** | **string**| Organization access token | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **include_public** | **string**| Include public correlations, Can be \"1\" or empty. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\Correlation[]**](../Model/Correlation.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet** -> \QuantiModo\Client\Model\CommonResponse[] v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet($organization_id, $user_id2, $variable_name, $organization_token, $access_token, $user_id, $include_public) - -Search user correlations for a given cause - -Returns average of all correlations and votes for all user cause variables for a given effect. If parameter \"include_public\" is used, it also returns public correlations. User correlation overwrites or supersedes public correlation. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\CorrelationsApi(); -$organization_id = 56; // int | Organization ID -$user_id2 = 56; // int | User id -$variable_name = "variable_name_example"; // string | Cause variable name -$organization_token = "organization_token_example"; // string | Organization access token -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$include_public = "include_public_example"; // string | Include public correlations, Can be \"1\" or empty. - -try { - $result = $api_instance->v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet($organization_id, $user_id2, $variable_name, $organization_token, $access_token, $user_id, $include_public); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CorrelationsApi->v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organization_id** | **int**| Organization ID | - **user_id2** | **int**| User id | - **variable_name** | **string**| Cause variable name | - **organization_token** | **string**| Organization access token | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **include_public** | **string**| Include public correlations, Can be \"1\" or empty. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\CommonResponse[]**](../Model/CommonResponse.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1PublicCorrelationsSearchSearchGet** -> \QuantiModo\Client\Model\Correlation[] v1PublicCorrelationsSearchSearchGet($search, $effect_or_cause, $access_token, $user_id, $outcomes_of_interest) - -Get average correlations for variables containing search term - -Returns the average correlations from all users for all public variables that contain the characters in the search query. Returns average of all users public variable correlations with a specified cause or effect. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\CorrelationsApi(); -$search = "search_example"; // string | Name of the variable that you want to know the causes or effects of. -$effect_or_cause = "effect_or_cause_example"; // string | Setting this to effect indicates that the searched variable is the effect and that the causes of this variable should be returned. cause indicates that the searched variable is the cause and the effects should be returned. -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$outcomes_of_interest = true; // bool | Only include correlations for which the effect is an outcome of interest for the user - -try { - $result = $api_instance->v1PublicCorrelationsSearchSearchGet($search, $effect_or_cause, $access_token, $user_id, $outcomes_of_interest); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CorrelationsApi->v1PublicCorrelationsSearchSearchGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **search** | **string**| Name of the variable that you want to know the causes or effects of. | - **effect_or_cause** | **string**| Setting this to effect indicates that the searched variable is the effect and that the causes of this variable should be returned. cause indicates that the searched variable is the cause and the effects should be returned. | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **outcomes_of_interest** | **bool**| Only include correlations for which the effect is an outcome of interest for the user | [optional] - -### Return type - -[**\QuantiModo\Client\Model\Correlation[]**](../Model/Correlation.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1VariablesVariableNameCausesGet** -> \QuantiModo\Client\Model\Correlation[] v1VariablesVariableNameCausesGet($variable_name) - -Search user correlations for a given effect - -Returns average of all correlations and votes for all user cause variables for a given effect - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\CorrelationsApi(); -$variable_name = "variable_name_example"; // string | Effect variable name - -try { - $result = $api_instance->v1VariablesVariableNameCausesGet($variable_name); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CorrelationsApi->v1VariablesVariableNameCausesGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **variable_name** | **string**| Effect variable name | - -### Return type - -[**\QuantiModo\Client\Model\Correlation[]**](../Model/Correlation.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1VariablesVariableNameEffectsGet** -> \QuantiModo\Client\Model\Correlation[] v1VariablesVariableNameEffectsGet($variable_name, $access_token, $user_id, $correlation_coefficient) - -Search user correlations for a given cause - -Returns average of all correlations and votes for all user effect variables for a given cause - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\CorrelationsApi(); -$variable_name = "variable_name_example"; // string | Cause variable name -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$correlation_coefficient = "correlation_coefficient_example"; // string | You can use this to get effects with correlations greater than or less than 0 - -try { - $result = $api_instance->v1VariablesVariableNameEffectsGet($variable_name, $access_token, $user_id, $correlation_coefficient); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CorrelationsApi->v1VariablesVariableNameEffectsGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **variable_name** | **string**| Cause variable name | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **correlation_coefficient** | **string**| You can use this to get effects with correlations greater than or less than 0 | [optional] - -### Return type - -[**\QuantiModo\Client\Model\Correlation[]**](../Model/Correlation.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1VariablesVariableNamePublicCausesGet** -> \QuantiModo\Client\Model\Correlation[] v1VariablesVariableNamePublicCausesGet($variable_name, $access_token, $user_id, $correlation_coefficient) - -Search public correlations for a given effect - -Returns average of all correlations and votes for all public cause variables for a given effect - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\CorrelationsApi(); -$variable_name = "variable_name_example"; // string | Effect variable name -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$correlation_coefficient = "correlation_coefficient_example"; // string | You can use this to get causes with correlations greater than or less than 0 - -try { - $result = $api_instance->v1VariablesVariableNamePublicCausesGet($variable_name, $access_token, $user_id, $correlation_coefficient); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CorrelationsApi->v1VariablesVariableNamePublicCausesGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **variable_name** | **string**| Effect variable name | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **correlation_coefficient** | **string**| You can use this to get causes with correlations greater than or less than 0 | [optional] - -### Return type - -[**\QuantiModo\Client\Model\Correlation[]**](../Model/Correlation.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1VariablesVariableNamePublicEffectsGet** -> \QuantiModo\Client\Model\Correlation[] v1VariablesVariableNamePublicEffectsGet($variable_name, $access_token, $user_id) - -Search public correlations for a given cause - -Returns average of all correlations and votes for all public cause variables for a given cause - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\CorrelationsApi(); -$variable_name = "variable_name_example"; // string | Cause variable name -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $result = $api_instance->v1VariablesVariableNamePublicEffectsGet($variable_name, $access_token, $user_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CorrelationsApi->v1VariablesVariableNamePublicEffectsGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **variable_name** | **string**| Cause variable name | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - -### Return type - -[**\QuantiModo\Client\Model\Correlation[]**](../Model/Correlation.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1VotesDeletePost** -> \QuantiModo\Client\Model\CommonResponse v1VotesDeletePost($body, $access_token, $user_id) - -Delete vote - -Delete previously posted vote - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\CorrelationsApi(); -$body = new \QuantiModo\Client\Model\VoteDelete(); // \QuantiModo\Client\Model\VoteDelete | The cause and effect variable names for the predictor vote to be deleted. -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $result = $api_instance->v1VotesDeletePost($body, $access_token, $user_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CorrelationsApi->v1VotesDeletePost: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\VoteDelete**](../Model/\QuantiModo\Client\Model\VoteDelete.md)| The cause and effect variable names for the predictor vote to be deleted. | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - -### Return type - -[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1VotesPost** -> \QuantiModo\Client\Model\CommonResponse v1VotesPost($body, $access_token, $user_id) - -Post or update vote - -This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\CorrelationsApi(); -$body = new \QuantiModo\Client\Model\PostVote(); // \QuantiModo\Client\Model\PostVote | Contains the cause variable, effect variable, and vote value. -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $result = $api_instance->v1VotesPost($body, $access_token, $user_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CorrelationsApi->v1VotesPost: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\PostVote**](../Model/\QuantiModo\Client\Model\PostVote.md)| Contains the cause variable, effect variable, and vote value. | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - -### Return type - -[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - diff --git a/docs/Api/MeasurementsApi.md b/docs/Api/MeasurementsApi.md index e448459..bac6fed 100644 --- a/docs/Api/MeasurementsApi.md +++ b/docs/Api/MeasurementsApi.md @@ -4,188 +4,16 @@ All URIs are relative to *https://app.quantimo.do/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**v1MeasurementSourcesGet**](MeasurementsApi.md#v1MeasurementSourcesGet) | **GET** /v1/measurementSources | Get measurement sources -[**v1MeasurementSourcesPost**](MeasurementsApi.md#v1MeasurementSourcesPost) | **POST** /v1/measurementSources | Add a data source -[**v1MeasurementsDailyGet**](MeasurementsApi.md#v1MeasurementsDailyGet) | **GET** /v1/measurements/daily | Get daily measurements for this user -[**v1MeasurementsDeletePost**](MeasurementsApi.md#v1MeasurementsDeletePost) | **POST** /v1/measurements/delete | Delete a measurement -[**v1MeasurementsGet**](MeasurementsApi.md#v1MeasurementsGet) | **GET** /v1/measurements | Get measurements for this user -[**v1MeasurementsPost**](MeasurementsApi.md#v1MeasurementsPost) | **POST** /v1/measurements | Post a new set or update existing measurements to the database -[**v1MeasurementsRangeGet**](MeasurementsApi.md#v1MeasurementsRangeGet) | **GET** /v1/measurementsRange | Get measurements range for this user -[**v1MeasurementsUpdatePost**](MeasurementsApi.md#v1MeasurementsUpdatePost) | **POST** /v1/measurements/update | Update a measurement -[**v2MeasurementsCsvGet**](MeasurementsApi.md#v2MeasurementsCsvGet) | **GET** /v2/measurements/csv | Get Measurements CSV -[**v2MeasurementsIdDelete**](MeasurementsApi.md#v2MeasurementsIdDelete) | **DELETE** /v2/measurements/{id} | Delete Measurement -[**v2MeasurementsIdGet**](MeasurementsApi.md#v2MeasurementsIdGet) | **GET** /v2/measurements/{id} | Get Measurement -[**v2MeasurementsIdPut**](MeasurementsApi.md#v2MeasurementsIdPut) | **PUT** /v2/measurements/{id} | Update Measurement -[**v2MeasurementsRequestCsvPost**](MeasurementsApi.md#v2MeasurementsRequestCsvPost) | **POST** /v2/measurements/request_csv | Post Request for Measurements CSV -[**v2MeasurementsRequestPdfPost**](MeasurementsApi.md#v2MeasurementsRequestPdfPost) | **POST** /v2/measurements/request_pdf | Post Request for Measurements PDF -[**v2MeasurementsRequestXlsPost**](MeasurementsApi.md#v2MeasurementsRequestXlsPost) | **POST** /v2/measurements/request_xls | Post Request for Measurements XLS - - -# **v1MeasurementSourcesGet** -> \QuantiModo\Client\Model\MeasurementSource v1MeasurementSourcesGet() - -Get measurement sources - -Returns a list of all the apps from which measurement data is obtained. +[**deleteMeasurement**](MeasurementsApi.md#deleteMeasurement) | **DELETE** /v3/measurements/delete | Delete a measurement +[**getMeasurements**](MeasurementsApi.md#getMeasurements) | **GET** /v3/measurements | Get measurements for this user +[**getPairs**](MeasurementsApi.md#getPairs) | **GET** /v3/pairs | Get pairs of measurements for correlational analysis +[**measurementExportRequest**](MeasurementsApi.md#measurementExportRequest) | **POST** /v2/measurements/exportRequest | Post Request for Measurements CSV +[**postMeasurements**](MeasurementsApi.md#postMeasurements) | **POST** /v3/measurements/post | Post a new set or update existing measurements to the database +[**v3MeasurementsUpdatePost**](MeasurementsApi.md#v3MeasurementsUpdatePost) | **POST** /v3/measurements/update | Update a measurement -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\MeasurementsApi(); - -try { - $result = $api_instance->v1MeasurementSourcesGet(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v1MeasurementSourcesGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**\QuantiModo\Client\Model\MeasurementSource**](../Model/MeasurementSource.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1MeasurementSourcesPost** -> v1MeasurementSourcesPost($body, $access_token, $user_id) - -Add a data source - -Add a life-tracking app or device to the QuantiModo list of data sources. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\MeasurementsApi(); -$body = new \QuantiModo\Client\Model\MeasurementSource(); // \QuantiModo\Client\Model\MeasurementSource | An array of names of data sources you want to add. -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $api_instance->v1MeasurementSourcesPost($body, $access_token, $user_id); -} catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v1MeasurementSourcesPost: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\MeasurementSource**](../Model/\QuantiModo\Client\Model\MeasurementSource.md)| An array of names of data sources you want to add. | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1MeasurementsDailyGet** -> \QuantiModo\Client\Model\Measurement v1MeasurementsDailyGet($variable_name, $access_token, $user_id, $abbreviated_unit_name, $start_time, $end_time, $grouping_width, $grouping_timezone, $limit, $offset, $sort) - -Get daily measurements for this user - -Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten.
Supported filter parameters:
  • value - Value of measurement
  • lastUpdated - The time that this measurement was created or last updated in the UTC format \"YYYY-MM-DDThh:mm:ss\"

- -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\MeasurementsApi(); -$variable_name = "variable_name_example"; // string | Name of the variable you want measurements for -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$abbreviated_unit_name = "abbreviated_unit_name_example"; // string | The unit your want the measurements in -$start_time = "start_time_example"; // string | The lower limit of measurements returned (UTC Iso8601 \"YYYY-MM-DDThh:mm:ss\" format) -$end_time = "end_time_example"; // string | The upper limit of measurements returned (UTC Iso8601 \"YYYY-MM-DDThh:mm:ss\" format) -$grouping_width = 56; // int | The time (in seconds) over which measurements are grouped together -$grouping_timezone = "grouping_timezone_example"; // string | The time (in seconds) over which measurements are grouped together -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. -$offset = 56; // int | Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. -$sort = 56; // int | Sort by given field. If the field is prefixed with `-, it will sort in descending order. - -try { - $result = $api_instance->v1MeasurementsDailyGet($variable_name, $access_token, $user_id, $abbreviated_unit_name, $start_time, $end_time, $grouping_width, $grouping_timezone, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v1MeasurementsDailyGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **variable_name** | **string**| Name of the variable you want measurements for | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **abbreviated_unit_name** | **string**| The unit your want the measurements in | [optional] - **start_time** | **string**| The lower limit of measurements returned (UTC Iso8601 \"YYYY-MM-DDThh:mm:ss\" format) | [optional] - **end_time** | **string**| The upper limit of measurements returned (UTC Iso8601 \"YYYY-MM-DDThh:mm:ss\" format) | [optional] - **grouping_width** | **int**| The time (in seconds) over which measurements are grouped together | [optional] - **grouping_timezone** | **string**| The time (in seconds) over which measurements are grouped together | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. | [optional] - **offset** | **int**| Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. | [optional] - **sort** | **int**| Sort by given field. If the field is prefixed with `-, it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\Measurement**](../Model/Measurement.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1MeasurementsDeletePost** -> \QuantiModo\Client\Model\CommonResponse v1MeasurementsDeletePost($body) +# **deleteMeasurement** +> \QuantiModo\Client\Model\CommonResponse deleteMeasurement($body) Delete a measurement @@ -196,17 +24,21 @@ Delete a previously submitted measurement setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\MeasurementsApi(); $body = new \QuantiModo\Client\Model\MeasurementDelete(); // \QuantiModo\Client\Model\MeasurementDelete | The startTime and variableId of the measurement to be deleted. try { - $result = $api_instance->v1MeasurementsDeletePost($body); + $result = $api_instance->deleteMeasurement($body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v1MeasurementsDeletePost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling MeasurementsApi->deleteMeasurement: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -215,7 +47,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\MeasurementDelete**](../Model/\QuantiModo\Client\Model\MeasurementDelete.md)| The startTime and variableId of the measurement to be deleted. | + **body** | [**\QuantiModo\Client\Model\MeasurementDelete**](../Model/MeasurementDelete.md)| The startTime and variableId of the measurement to be deleted. | ### Return type @@ -223,7 +55,7 @@ Name | Type | Description | Notes ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -232,45 +64,53 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1MeasurementsGet** -> \QuantiModo\Client\Model\Measurement v1MeasurementsGet($access_token, $user_id, $id, $variable_name, $variable_category_name, $source_name, $value, $abbreviated_unit_name, $earliest_measurement_time, $latest_measurement_time, $created_at, $updated_at, $grouping_width, $grouping_timezone, $limit, $offset, $sort) +# **getMeasurements** +> \QuantiModo\Client\Model\MeasurementArray getMeasurements($variable_name, $sort, $limit, $offset, $variable_category_name, $updated_at, $user_id, $source_name, $value, $unit_name, $earliest_measurement_time, $latest_measurement_time, $created_at, $id, $grouping_width, $grouping_timezone, $do_not_process, $app_name, $client_id, $do_not_convert, $min_max_filter) Get measurements for this user -Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten.
Supported filter parameters:
  • value - Value of measurement
  • lastUpdated - The time that this measurement was created or last updated in the UTC format \"YYYY-MM-DDThh:mm:ss\"

+Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\MeasurementsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$id = 56; // int | Measurement id $variable_name = "variable_name_example"; // string | Name of the variable you want measurements for -$variable_category_name = "variable_category_name_example"; // string | Name of the variable category you want measurements for +$sort = "sort_example"; // string | Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. +$limit = 100; // int | The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. +$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. +$variable_category_name = "variable_category_name_example"; // string | Limit results to a specific variable category +$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$user_id = 3.4; // float | User's id $source_name = "source_name_example"; // string | ID of the source you want measurements for (supports exact name match only) $value = "value_example"; // string | Value of measurement -$abbreviated_unit_name = "abbreviated_unit_name_example"; // string | The unit you want the measurements returned in -$earliest_measurement_time = "earliest_measurement_time_example"; // string | The lower limit of measurements returned in ISO 8601 format or epoch seconds (unixtime) -$latest_measurement_time = "latest_measurement_time_example"; // string | The upper limit of measurements returned in ISO 8601 format or epoch seconds (unixtime) -$created_at = "created_at_example"; // string | The time the measurement record was first created in the format YYYY-MM-DDThh:mm:ss. Time zone should be UTC and not local. -$updated_at = "updated_at_example"; // string | The time the measurement record was last changed in the format YYYY-MM-DDThh:mm:ss. Time zone should be UTC and not local. +$unit_name = "unit_name_example"; // string | Example: 86400 +$earliest_measurement_time = "earliest_measurement_time_example"; // string | Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$latest_measurement_time = "latest_measurement_time_example"; // string | Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$id = 56; // int | Measurement id $grouping_width = 56; // int | The time (in seconds) over which measurements are grouped together $grouping_timezone = "grouping_timezone_example"; // string | The time (in seconds) over which measurements are grouped together -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. -$offset = 56; // int | Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. -$sort = 56; // int | Sort by given field. If the field is prefixed with `-, it will sort in descending order. +$do_not_process = true; // bool | Example: true +$app_name = "app_name_example"; // string | Example: MoodiModo +$client_id = "client_id_example"; // string | Example: oauth_test_client +$do_not_convert = true; // bool | Example: 1 +$min_max_filter = true; // bool | Example: 1 try { - $result = $api_instance->v1MeasurementsGet($access_token, $user_id, $id, $variable_name, $variable_category_name, $source_name, $value, $abbreviated_unit_name, $earliest_measurement_time, $latest_measurement_time, $created_at, $updated_at, $grouping_width, $grouping_timezone, $limit, $offset, $sort); + $result = $api_instance->getMeasurements($variable_name, $sort, $limit, $offset, $variable_category_name, $updated_at, $user_id, $source_name, $value, $unit_name, $earliest_measurement_time, $latest_measurement_time, $created_at, $id, $grouping_width, $grouping_timezone, $do_not_process, $app_name, $client_id, $do_not_convert, $min_max_filter); print_r($result); } catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v1MeasurementsGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling MeasurementsApi->getMeasurements: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -279,31 +119,35 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **id** | **int**| Measurement id | [optional] **variable_name** | **string**| Name of the variable you want measurements for | [optional] - **variable_category_name** | **string**| Name of the variable category you want measurements for | [optional] + **sort** | **string**| Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. | [optional] + **limit** | **int**| The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] [default to 100] + **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] + **variable_category_name** | **string**| Limit results to a specific variable category | [optional] + **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **user_id** | **float**| User's id | [optional] **source_name** | **string**| ID of the source you want measurements for (supports exact name match only) | [optional] **value** | **string**| Value of measurement | [optional] - **abbreviated_unit_name** | **string**| The unit you want the measurements returned in | [optional] - **earliest_measurement_time** | **string**| The lower limit of measurements returned in ISO 8601 format or epoch seconds (unixtime) | [optional] - **latest_measurement_time** | **string**| The upper limit of measurements returned in ISO 8601 format or epoch seconds (unixtime) | [optional] - **created_at** | **string**| The time the measurement record was first created in the format YYYY-MM-DDThh:mm:ss. Time zone should be UTC and not local. | [optional] - **updated_at** | **string**| The time the measurement record was last changed in the format YYYY-MM-DDThh:mm:ss. Time zone should be UTC and not local. | [optional] + **unit_name** | **string**| Example: 86400 | [optional] + **earliest_measurement_time** | **string**| Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **latest_measurement_time** | **string**| Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **created_at** | **string**| When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **id** | **int**| Measurement id | [optional] **grouping_width** | **int**| The time (in seconds) over which measurements are grouped together | [optional] **grouping_timezone** | **string**| The time (in seconds) over which measurements are grouped together | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. | [optional] - **offset** | **int**| Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. | [optional] - **sort** | **int**| Sort by given field. If the field is prefixed with `-, it will sort in descending order. | [optional] + **do_not_process** | **bool**| Example: true | [optional] + **app_name** | **string**| Example: MoodiModo | [optional] + **client_id** | **string**| Example: oauth_test_client | [optional] + **do_not_convert** | **bool**| Example: 1 | [optional] + **min_max_filter** | **bool**| Example: 1 | [optional] ### Return type -[**\QuantiModo\Client\Model\Measurement**](../Model/Measurement.md) +[**\QuantiModo\Client\Model\MeasurementArray**](../Model/MeasurementArray.md) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -312,282 +156,44 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1MeasurementsPost** -> v1MeasurementsPost($body, $access_token, $user_id) +# **getPairs** +> \QuantiModo\Client\Model\PairArray getPairs($cause_variable_name, $effect_variable_name, $effect_unit_name, $user_id, $cause_unit_name, $onset_delay, $duration_of_action, $earliest_measurement_time, $latest_measurement_time, $limit, $offset, $sort) -Post a new set or update existing measurements to the database +Get pairs of measurements for correlational analysis -You can submit or update multiple measurements in a \"measurements\" sub-array. If the variable these measurements correspond to does not already exist in the database, it will be automatically added. The request body should look something like [{\"measurements\":[{\"startTime\":1439389320,\"value\":\"3\"}, {\"startTime\":1439389319,\"value\":\"2\"}],\"name\":\"Acne (out of 5)\",\"source\":\"QuantiModo\",\"category\":\"Symptoms\",\"combinationOperation\":\"MEAN\",\"unit\":\"/5\"}] - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\MeasurementsApi(); -$body = new \QuantiModo\Client\Model\MeasurementSet(); // \QuantiModo\Client\Model\MeasurementSet | An array of measurements you want to insert. -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $api_instance->v1MeasurementsPost($body, $access_token, $user_id); -} catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v1MeasurementsPost: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\MeasurementSet**](../Model/\QuantiModo\Client\Model\MeasurementSet.md)| An array of measurements you want to insert. | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1MeasurementsRangeGet** -> \QuantiModo\Client\Model\MeasurementRange v1MeasurementsRangeGet($sources, $user) - -Get measurements range for this user - -Get Unix time-stamp (epoch time) of the user's first and last measurements taken. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\MeasurementsApi(); -$sources = "sources_example"; // string | Enter source name to limit to specific source (varchar) -$user = 56; // int | If not specified, uses currently logged in user (bigint) - -try { - $result = $api_instance->v1MeasurementsRangeGet($sources, $user); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v1MeasurementsRangeGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sources** | **string**| Enter source name to limit to specific source (varchar) | [optional] - **user** | **int**| If not specified, uses currently logged in user (bigint) | [optional] - -### Return type - -[**\QuantiModo\Client\Model\MeasurementRange**](../Model/MeasurementRange.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1MeasurementsUpdatePost** -> \QuantiModo\Client\Model\CommonResponse v1MeasurementsUpdatePost($body) - -Update a measurement - -Delete a previously submitted measurement - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\MeasurementsApi(); -$body = new \QuantiModo\Client\Model\MeasurementUpdate(); // \QuantiModo\Client\Model\MeasurementUpdate | The id as well as the new startTime, note, and/or value of the measurement to be updated - -try { - $result = $api_instance->v1MeasurementsUpdatePost($body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v1MeasurementsUpdatePost: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\MeasurementUpdate**](../Model/\QuantiModo\Client\Model\MeasurementUpdate.md)| The id as well as the new startTime, note, and/or value of the measurement to be updated | - -### Return type - -[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2MeasurementsCsvGet** -> \SplFileObject v2MeasurementsCsvGet($access_token, $user_id) - -Get Measurements CSV - -Download a CSV containing all user measurements - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\MeasurementsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $result = $api_instance->v2MeasurementsCsvGet($access_token, $user_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v2MeasurementsCsvGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - -### Return type - -[**\SplFileObject**](../Model/\SplFileObject.md) - -### Authorization - -[quantimodo_oauth2](../../README.md#quantimodo_oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: text/csv - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2MeasurementsIdDelete** -> \QuantiModo\Client\Model\InlineResponse2001 v2MeasurementsIdDelete($id, $access_token, $user_id) - -Delete Measurement - -Delete Measurement - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\MeasurementsApi(); -$id = 56; // int | id of Measurement -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $result = $api_instance->v2MeasurementsIdDelete($id, $access_token, $user_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v2MeasurementsIdDelete: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **int**| id of Measurement | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - -### Return type - -[**\QuantiModo\Client\Model\InlineResponse2001**](../Model/InlineResponse2001.md) - -### Authorization - -[quantimodo_oauth2](../../README.md#quantimodo_oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2MeasurementsIdGet** -> \QuantiModo\Client\Model\InlineResponse200 v2MeasurementsIdGet($id, $access_token, $user_id) - -Get Measurement - -Get Measurement +Pairs cause measurements with effect measurements grouped over the duration of action after the onset delay. ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); // Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\MeasurementsApi(); -$id = 56; // int | id of Measurement -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id +$cause_variable_name = "cause_variable_name_example"; // string | Variable name of the hypothetical cause variable. Example: Sleep Duration +$effect_variable_name = "effect_variable_name_example"; // string | Variable name of the hypothetical effect variable. Example: Overall Mood +$effect_unit_name = "effect_unit_name_example"; // string | Name for the unit effect measurements to be returned in +$user_id = 3.4; // float | User's id +$cause_unit_name = "cause_unit_name_example"; // string | Name for the unit cause measurements to be returned in +$onset_delay = "onset_delay_example"; // string | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. +$duration_of_action = "duration_of_action_example"; // string | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. +$earliest_measurement_time = "earliest_measurement_time_example"; // string | Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$latest_measurement_time = "latest_measurement_time_example"; // string | Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$limit = 100; // int | The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. +$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. +$sort = "sort_example"; // string | Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. try { - $result = $api_instance->v2MeasurementsIdGet($id, $access_token, $user_id); + $result = $api_instance->getPairs($cause_variable_name, $effect_variable_name, $effect_unit_name, $user_id, $cause_unit_name, $onset_delay, $duration_of_action, $earliest_measurement_time, $latest_measurement_time, $limit, $offset, $sort); print_r($result); } catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v2MeasurementsIdGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling MeasurementsApi->getPairs: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -596,17 +202,26 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| id of Measurement | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **cause_variable_name** | **string**| Variable name of the hypothetical cause variable. Example: Sleep Duration | [optional] + **effect_variable_name** | **string**| Variable name of the hypothetical effect variable. Example: Overall Mood | [optional] + **effect_unit_name** | **string**| Name for the unit effect measurements to be returned in | [optional] + **user_id** | **float**| User's id | [optional] + **cause_unit_name** | **string**| Name for the unit cause measurements to be returned in | [optional] + **onset_delay** | **string**| The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | [optional] + **duration_of_action** | **string**| The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | [optional] + **earliest_measurement_time** | **string**| Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **latest_measurement_time** | **string**| Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **limit** | **int**| The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] [default to 100] + **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] + **sort** | **string**| Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. | [optional] ### Return type -[**\QuantiModo\Client\Model\InlineResponse200**](../Model/InlineResponse200.md) +[**\QuantiModo\Client\Model\PairArray**](../Model/PairArray.md) ### Authorization -[quantimodo_oauth2](../../README.md#quantimodo_oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -615,62 +230,8 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v2MeasurementsIdPut** -> \QuantiModo\Client\Model\InlineResponse2001 v2MeasurementsIdPut($id, $access_token, $user_id, $body) - -Update Measurement - -Update Measurement - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\MeasurementsApi(); -$id = 56; // int | id of Measurement -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$body = new \QuantiModo\Client\Model\Measurement(); // \QuantiModo\Client\Model\Measurement | Measurement that should be updated - -try { - $result = $api_instance->v2MeasurementsIdPut($id, $access_token, $user_id, $body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v2MeasurementsIdPut: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **int**| id of Measurement | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **body** | [**\QuantiModo\Client\Model\Measurement**](../Model/\QuantiModo\Client\Model\Measurement.md)| Measurement that should be updated | [optional] - -### Return type - -[**\QuantiModo\Client\Model\InlineResponse2001**](../Model/InlineResponse2001.md) - -### Authorization - -[quantimodo_oauth2](../../README.md#quantimodo_oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v2MeasurementsRequestCsvPost** -> int v2MeasurementsRequestCsvPost($access_token, $user_id) +# **measurementExportRequest** +> int measurementExportRequest($user_id) Post Request for Measurements CSV @@ -681,18 +242,21 @@ Use this endpoint to schedule a CSV export containing all user measurements to b setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); // Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\MeasurementsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id +$user_id = 3.4; // float | User's id try { - $result = $api_instance->v2MeasurementsRequestCsvPost($access_token, $user_id); + $result = $api_instance->measurementExportRequest($user_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v2MeasurementsRequestCsvPost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling MeasurementsApi->measurementExportRequest: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -701,8 +265,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **user_id** | **float**| User's id | [optional] ### Return type @@ -710,7 +273,7 @@ Name | Type | Description | Notes ### Authorization -[quantimodo_oauth2](../../README.md#quantimodo_oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -719,30 +282,34 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v2MeasurementsRequestPdfPost** -> int v2MeasurementsRequestPdfPost($access_token, $user_id) +# **postMeasurements** +> \QuantiModo\Client\Model\PostMeasurementsResponse postMeasurements($body, $user_id) -Post Request for Measurements PDF +Post a new set or update existing measurements to the database -Use this endpoint to schedule a PDF export containing all user measurements to be emailed to the user within 24 hours. +You can submit or update multiple measurements in a \"measurements\" sub-array. If the variable these measurements correspond to does not already exist in the database, it will be automatically added. ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); // Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\MeasurementsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id +$body = array(new \QuantiModo\Client\Model\MeasurementSet()); // \QuantiModo\Client\Model\MeasurementSet[] | An array of measurement sets containing measurement items you want to insert. +$user_id = 3.4; // float | User's id try { - $result = $api_instance->v2MeasurementsRequestPdfPost($access_token, $user_id); + $result = $api_instance->postMeasurements($body, $user_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v2MeasurementsRequestPdfPost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling MeasurementsApi->postMeasurements: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -751,16 +318,16 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **body** | [**\QuantiModo\Client\Model\MeasurementSet[]**](../Model/MeasurementSet.md)| An array of measurement sets containing measurement items you want to insert. | + **user_id** | **float**| User's id | [optional] ### Return type -**int** +[**\QuantiModo\Client\Model\PostMeasurementsResponse**](../Model/PostMeasurementsResponse.md) ### Authorization -[quantimodo_oauth2](../../README.md#quantimodo_oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -769,30 +336,33 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v2MeasurementsRequestXlsPost** -> int v2MeasurementsRequestXlsPost($access_token, $user_id) +# **v3MeasurementsUpdatePost** +> \QuantiModo\Client\Model\CommonResponse v3MeasurementsUpdatePost($body) -Post Request for Measurements XLS +Update a measurement -Use this endpoint to schedule a XLS export containing all user measurements to be emailed to the user within 24 hours. +Delete a previously submitted measurement ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); // Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\MeasurementsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id +$body = new \QuantiModo\Client\Model\MeasurementUpdate(); // \QuantiModo\Client\Model\MeasurementUpdate | The id as well as the new startTime, note, and/or value of the measurement to be updated try { - $result = $api_instance->v2MeasurementsRequestXlsPost($access_token, $user_id); + $result = $api_instance->v3MeasurementsUpdatePost($body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling MeasurementsApi->v2MeasurementsRequestXlsPost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling MeasurementsApi->v3MeasurementsUpdatePost: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -801,16 +371,15 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **body** | [**\QuantiModo\Client\Model\MeasurementUpdate**](../Model/MeasurementUpdate.md)| The id as well as the new startTime, note, and/or value of the measurement to be updated | ### Return type -**int** +[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) ### Authorization -[quantimodo_oauth2](../../README.md#quantimodo_oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers diff --git a/docs/Api/NotificationsApi.md b/docs/Api/NotificationsApi.md new file mode 100644 index 0000000..9106fd5 --- /dev/null +++ b/docs/Api/NotificationsApi.md @@ -0,0 +1,90 @@ +# QuantiModo\Client\NotificationsApi + +All URIs are relative to *https://app.quantimo.do/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getNotificationPreferences**](NotificationsApi.md#getNotificationPreferences) | **GET** /v3/notificationPreferences | Get NotificationPreferences +[**postDeviceTokens**](NotificationsApi.md#postDeviceTokens) | **POST** /v3/deviceTokens | Post DeviceTokens + + +# **getNotificationPreferences** +> getNotificationPreferences() + +Get NotificationPreferences + +Get NotificationPreferences + +### Example +```php +getNotificationPreferences(); +} catch (Exception $e) { + echo 'Exception when calling NotificationsApi->getNotificationPreferences: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **postDeviceTokens** +> postDeviceTokens() + +Post DeviceTokens + +Post DeviceTokens + +### Example +```php +postDeviceTokens(); +} catch (Exception $e) { + echo 'Exception when calling NotificationsApi->postDeviceTokens: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/docs/Api/OrganizationsApi.md b/docs/Api/OrganizationsApi.md deleted file mode 100644 index caa5a76..0000000 --- a/docs/Api/OrganizationsApi.md +++ /dev/null @@ -1,67 +0,0 @@ -# QuantiModo\Client\OrganizationsApi - -All URIs are relative to *https://app.quantimo.do/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**v1OrganizationsOrganizationIdUsersPost**](OrganizationsApi.md#v1OrganizationsOrganizationIdUsersPost) | **POST** /v1/organizations/{organizationId}/users | Get user tokens for existing users, create new users - - -# **v1OrganizationsOrganizationIdUsersPost** -> \QuantiModo\Client\Model\UserTokenSuccessfulResponse v1OrganizationsOrganizationIdUsersPost($organization_id, $body, $access_token, $user_id) - -Get user tokens for existing users, create new users - -Get user tokens for existing users, create new users - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$api_instance = new QuantiModo\Client\Api\OrganizationsApi(); -$organization_id = 56; // int | Organization ID -$body = new \QuantiModo\Client\Model\UserTokenRequest(); // \QuantiModo\Client\Model\UserTokenRequest | Provides organization token and user ID -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $result = $api_instance->v1OrganizationsOrganizationIdUsersPost($organization_id, $body, $access_token, $user_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling OrganizationsApi->v1OrganizationsOrganizationIdUsersPost: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organization_id** | **int**| Organization ID | - **body** | [**\QuantiModo\Client\Model\UserTokenRequest**](../Model/\QuantiModo\Client\Model\UserTokenRequest.md)| Provides organization token and user ID | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - -### Return type - -[**\QuantiModo\Client\Model\UserTokenSuccessfulResponse**](../Model/UserTokenSuccessfulResponse.md) - -### Authorization - -[oauth2](../../README.md#oauth2), [internalApiKey](../../README.md#internalApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - diff --git a/docs/Api/PairsApi.md b/docs/Api/PairsApi.md deleted file mode 100644 index 5b5fba5..0000000 --- a/docs/Api/PairsApi.md +++ /dev/null @@ -1,162 +0,0 @@ -# QuantiModo\Client\PairsApi - -All URIs are relative to *https://app.quantimo.do/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**v1PairsCsvGet**](PairsApi.md#v1PairsCsvGet) | **GET** /v1/pairsCsv | Get pairs -[**v1PairsGet**](PairsApi.md#v1PairsGet) | **GET** /v1/pairs | Get pairs - - -# **v1PairsCsvGet** -> \QuantiModo\Client\Model\Pairs[] v1PairsCsvGet($cause, $effect, $access_token, $user_id, $cause_source, $cause_unit, $delay, $duration, $effect_source, $effect_unit, $end_time, $start_time, $limit, $offset, $sort) - -Get pairs - -Pairs cause measurements with effect measurements grouped over the duration of action after the onset delay. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\PairsApi(); -$cause = "cause_example"; // string | Original variable name for the explanatory or independent variable -$effect = "effect_example"; // string | Original variable name for the outcome or dependent variable -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$cause_source = "cause_source_example"; // string | Name of data source that the cause measurements should come from -$cause_unit = "cause_unit_example"; // string | Abbreviated name for the unit cause measurements to be returned in -$delay = "delay_example"; // string | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. -$duration = "duration_example"; // string | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. -$effect_source = "effect_source_example"; // string | Name of data source that the effectmeasurements should come from -$effect_unit = "effect_unit_example"; // string | Abbreviated name for the unit effect measurements to be returned in -$end_time = "end_time_example"; // string | The most recent date (in epoch time) for which we should return measurements -$start_time = "start_time_example"; // string | The earliest date (in epoch time) for which we should return measurements -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. -$offset = 56; // int | Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. -$sort = 56; // int | Sort by given field. If the field is prefixed with `-, it will sort in descending order. - -try { - $result = $api_instance->v1PairsCsvGet($cause, $effect, $access_token, $user_id, $cause_source, $cause_unit, $delay, $duration, $effect_source, $effect_unit, $end_time, $start_time, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling PairsApi->v1PairsCsvGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cause** | **string**| Original variable name for the explanatory or independent variable | - **effect** | **string**| Original variable name for the outcome or dependent variable | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **cause_source** | **string**| Name of data source that the cause measurements should come from | [optional] - **cause_unit** | **string**| Abbreviated name for the unit cause measurements to be returned in | [optional] - **delay** | **string**| The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | [optional] - **duration** | **string**| The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | [optional] - **effect_source** | **string**| Name of data source that the effectmeasurements should come from | [optional] - **effect_unit** | **string**| Abbreviated name for the unit effect measurements to be returned in | [optional] - **end_time** | **string**| The most recent date (in epoch time) for which we should return measurements | [optional] - **start_time** | **string**| The earliest date (in epoch time) for which we should return measurements | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. | [optional] - **offset** | **int**| Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. | [optional] - **sort** | **int**| Sort by given field. If the field is prefixed with `-, it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\Pairs[]**](../Model/Pairs.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1PairsGet** -> \QuantiModo\Client\Model\Pairs[] v1PairsGet($cause, $effect, $access_token, $user_id, $cause_source, $cause_unit, $delay, $duration, $effect_source, $effect_unit, $end_time, $start_time, $limit, $offset, $sort) - -Get pairs - -Pairs cause measurements with effect measurements grouped over the duration of action after the onset delay. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\PairsApi(); -$cause = "cause_example"; // string | Original variable name for the explanatory or independent variable -$effect = "effect_example"; // string | Original variable name for the outcome or dependent variable -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$cause_source = "cause_source_example"; // string | Name of data source that the cause measurements should come from -$cause_unit = "cause_unit_example"; // string | Abbreviated name for the unit cause measurements to be returned in -$delay = "delay_example"; // string | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. -$duration = "duration_example"; // string | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. -$effect_source = "effect_source_example"; // string | Name of data source that the effectmeasurements should come from -$effect_unit = "effect_unit_example"; // string | Abbreviated name for the unit effect measurements to be returned in -$end_time = "end_time_example"; // string | The most recent date (in epoch time) for which we should return measurements -$start_time = "start_time_example"; // string | The earliest date (in epoch time) for which we should return measurements -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. -$offset = 56; // int | Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. -$sort = 56; // int | Sort by given field. If the field is prefixed with `-, it will sort in descending order. - -try { - $result = $api_instance->v1PairsGet($cause, $effect, $access_token, $user_id, $cause_source, $cause_unit, $delay, $duration, $effect_source, $effect_unit, $end_time, $start_time, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling PairsApi->v1PairsGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cause** | **string**| Original variable name for the explanatory or independent variable | - **effect** | **string**| Original variable name for the outcome or dependent variable | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **cause_source** | **string**| Name of data source that the cause measurements should come from | [optional] - **cause_unit** | **string**| Abbreviated name for the unit cause measurements to be returned in | [optional] - **delay** | **string**| The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | [optional] - **duration** | **string**| The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | [optional] - **effect_source** | **string**| Name of data source that the effectmeasurements should come from | [optional] - **effect_unit** | **string**| Abbreviated name for the unit effect measurements to be returned in | [optional] - **end_time** | **string**| The most recent date (in epoch time) for which we should return measurements | [optional] - **start_time** | **string**| The earliest date (in epoch time) for which we should return measurements | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. | [optional] - **offset** | **int**| Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. | [optional] - **sort** | **int**| Sort by given field. If the field is prefixed with `-, it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\Pairs[]**](../Model/Pairs.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - diff --git a/docs/Api/RemindersApi.md b/docs/Api/RemindersApi.md index 9587700..5b60b9e 100644 --- a/docs/Api/RemindersApi.md +++ b/docs/Api/RemindersApi.md @@ -4,154 +4,41 @@ All URIs are relative to *https://app.quantimo.do/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**v1TrackingReminderNotificationsGet**](RemindersApi.md#v1TrackingReminderNotificationsGet) | **GET** /v1/trackingReminderNotifications | Get specific pending tracking reminders -[**v1TrackingReminderNotificationsSkipPost**](RemindersApi.md#v1TrackingReminderNotificationsSkipPost) | **POST** /v1/trackingReminderNotifications/skip | Skip a pending tracking reminder -[**v1TrackingReminderNotificationsSnoozePost**](RemindersApi.md#v1TrackingReminderNotificationsSnoozePost) | **POST** /v1/trackingReminderNotifications/snooze | Snooze a pending tracking reminder -[**v1TrackingReminderNotificationsTrackPost**](RemindersApi.md#v1TrackingReminderNotificationsTrackPost) | **POST** /v1/trackingReminderNotifications/track | Track a pending tracking reminder -[**v1TrackingRemindersDeletePost**](RemindersApi.md#v1TrackingRemindersDeletePost) | **POST** /v1/trackingReminders/delete | Delete tracking reminder -[**v1TrackingRemindersGet**](RemindersApi.md#v1TrackingRemindersGet) | **GET** /v1/trackingReminders | Get repeating tracking reminder settings -[**v1TrackingRemindersPost**](RemindersApi.md#v1TrackingRemindersPost) | **POST** /v1/trackingReminders | Store a Tracking Reminder +[**deleteTrackingReminder**](RemindersApi.md#deleteTrackingReminder) | **DELETE** /v3/trackingReminders/delete | Delete tracking reminder +[**getTrackingReminderNotifications**](RemindersApi.md#getTrackingReminderNotifications) | **GET** /v3/trackingReminderNotifications | Get specific tracking reminder notifications +[**getTrackingReminders**](RemindersApi.md#getTrackingReminders) | **GET** /v3/trackingReminders | Get repeating tracking reminder settings +[**postTrackingReminderNotifications**](RemindersApi.md#postTrackingReminderNotifications) | **POST** /v3/trackingReminderNotifications | Snooze, skip, or track a tracking reminder notification +[**postTrackingReminders**](RemindersApi.md#postTrackingReminders) | **POST** /v3/trackingReminders | Store a Tracking Reminder -# **v1TrackingReminderNotificationsGet** -> \QuantiModo\Client\Model\InlineResponse20012 v1TrackingReminderNotificationsGet($access_token, $user_id, $variable_category_name, $created_at, $updated_at, $limit, $offset, $sort) +# **deleteTrackingReminder** +> \QuantiModo\Client\Model\CommonResponse deleteTrackingReminder($body, $user_id) -Get specific pending tracking reminders +Delete tracking reminder -Specfic pending reminder instances that still need to be tracked. +Delete previously created tracking reminder ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); // Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\RemindersApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$variable_category_name = "variable_category_name_example"; // string | Limit tracking reminder notifications to a specific variable category -$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. -$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. -$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. -$sort = "sort_example"; // string | Sort by given field. If the field is prefixed with '-', it will sort in descending order. - -try { - $result = $api_instance->v1TrackingReminderNotificationsGet($access_token, $user_id, $variable_category_name, $created_at, $updated_at, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling RemindersApi->v1TrackingReminderNotificationsGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **variable_category_name** | **string**| Limit tracking reminder notifications to a specific variable category | [optional] - **created_at** | **string**| When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. | [optional] - **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] - **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] - **sort** | **string**| Sort by given field. If the field is prefixed with '-', it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\InlineResponse20012**](../Model/InlineResponse20012.md) - -### Authorization - -[quantimodo_oauth2](../../README.md#quantimodo_oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1TrackingReminderNotificationsSkipPost** -> \QuantiModo\Client\Model\CommonResponse v1TrackingReminderNotificationsSkipPost($body, $access_token, $user_id) - -Skip a pending tracking reminder - -Deletes the pending tracking reminder - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\RemindersApi(); -$body = new \QuantiModo\Client\Model\TrackingReminderNotificationSkip(); // \QuantiModo\Client\Model\TrackingReminderNotificationSkip | Id of the pending reminder to be skipped or deleted -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $result = $api_instance->v1TrackingReminderNotificationsSkipPost($body, $access_token, $user_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling RemindersApi->v1TrackingReminderNotificationsSkipPost: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\TrackingReminderNotificationSkip**](../Model/\QuantiModo\Client\Model\TrackingReminderNotificationSkip.md)| Id of the pending reminder to be skipped or deleted | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - -### Return type - -[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1TrackingReminderNotificationsSnoozePost** -> \QuantiModo\Client\Model\CommonResponse v1TrackingReminderNotificationsSnoozePost($body, $access_token, $user_id) - -Snooze a pending tracking reminder - -Changes the reminder time to now plus one hour - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\RemindersApi(); -$body = new \QuantiModo\Client\Model\TrackingReminderNotificationSnooze(); // \QuantiModo\Client\Model\TrackingReminderNotificationSnooze | Id of the pending reminder to be snoozed -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id +$body = new \QuantiModo\Client\Model\TrackingReminderDelete(); // \QuantiModo\Client\Model\TrackingReminderDelete | Id of reminder to be deleted +$user_id = 3.4; // float | User's id try { - $result = $api_instance->v1TrackingReminderNotificationsSnoozePost($body, $access_token, $user_id); + $result = $api_instance->deleteTrackingReminder($body, $user_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling RemindersApi->v1TrackingReminderNotificationsSnoozePost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling RemindersApi->deleteTrackingReminder: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -160,9 +47,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\TrackingReminderNotificationSnooze**](../Model/\QuantiModo\Client\Model\TrackingReminderNotificationSnooze.md)| Id of the pending reminder to be snoozed | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **body** | [**\QuantiModo\Client\Model\TrackingReminderDelete**](../Model/TrackingReminderDelete.md)| Id of reminder to be deleted | + **user_id** | **float**| User's id | [optional] ### Return type @@ -170,7 +56,7 @@ Name | Type | Description | Notes ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -179,31 +65,44 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1TrackingReminderNotificationsTrackPost** -> \QuantiModo\Client\Model\CommonResponse v1TrackingReminderNotificationsTrackPost($body, $access_token, $user_id) +# **getTrackingReminderNotifications** +> \QuantiModo\Client\Model\GetTrackingReminderNotificationsResponse getTrackingReminderNotifications($sort, $user_id, $created_at, $updated_at, $limit, $offset, $variable_category_name, $reminder_time, $app_name, $client_id, $only_past, $include_deleted) -Track a pending tracking reminder +Get specific tracking reminder notifications -Adds the default measurement for the pending tracking reminder with the reminder time as the measurment start time +Specific tracking reminder notification instances that still need to be tracked. ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\RemindersApi(); -$body = new \QuantiModo\Client\Model\TrackingReminderNotificationTrack(); // \QuantiModo\Client\Model\TrackingReminderNotificationTrack | Id of the pending reminder to be tracked -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id +$sort = "sort_example"; // string | Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. +$user_id = 3.4; // float | User's id +$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$limit = 100; // int | The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. +$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. +$variable_category_name = "variable_category_name_example"; // string | Limit results to a specific variable category +$reminder_time = "reminder_time_example"; // string | Example: (lt)2017-07-31 21:43:26 +$app_name = "app_name_example"; // string | Example: MoodiModo +$client_id = "client_id_example"; // string | Example: oauth_test_client +$only_past = true; // bool | Example: 1 +$include_deleted = true; // bool | Example: try { - $result = $api_instance->v1TrackingReminderNotificationsTrackPost($body, $access_token, $user_id); + $result = $api_instance->getTrackingReminderNotifications($sort, $user_id, $created_at, $updated_at, $limit, $offset, $variable_category_name, $reminder_time, $app_name, $client_id, $only_past, $include_deleted); print_r($result); } catch (Exception $e) { - echo 'Exception when calling RemindersApi->v1TrackingReminderNotificationsTrackPost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling RemindersApi->getTrackingReminderNotifications: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -212,17 +111,26 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\TrackingReminderNotificationTrack**](../Model/\QuantiModo\Client\Model\TrackingReminderNotificationTrack.md)| Id of the pending reminder to be tracked | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **sort** | **string**| Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. | [optional] + **user_id** | **float**| User's id | [optional] + **created_at** | **string**| When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **limit** | **int**| The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] [default to 100] + **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] + **variable_category_name** | **string**| Limit results to a specific variable category | [optional] + **reminder_time** | **string**| Example: (lt)2017-07-31 21:43:26 | [optional] + **app_name** | **string**| Example: MoodiModo | [optional] + **client_id** | **string**| Example: oauth_test_client | [optional] + **only_past** | **bool**| Example: 1 | [optional] + **include_deleted** | **bool**| Example: | [optional] ### Return type -[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) +[**\QuantiModo\Client\Model\GetTrackingReminderNotificationsResponse**](../Model/GetTrackingReminderNotificationsResponse.md) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -231,31 +139,42 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1TrackingRemindersDeletePost** -> \QuantiModo\Client\Model\CommonResponse v1TrackingRemindersDeletePost($body, $access_token, $user_id) +# **getTrackingReminders** +> \QuantiModo\Client\Model\TrackingReminderArray getTrackingReminders($user_id, $variable_category_name, $created_at, $updated_at, $limit, $offset, $sort, $app_name, $client_id, $app_version) -Delete tracking reminder +Get repeating tracking reminder settings -Delete previously created tracking reminder +Users can be reminded to track certain variables at a specified frequency with a default value. ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\RemindersApi(); -$body = new \QuantiModo\Client\Model\TrackingReminderDelete(); // \QuantiModo\Client\Model\TrackingReminderDelete | Id of reminder to be deleted -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id +$user_id = 3.4; // float | User's id +$variable_category_name = "variable_category_name_example"; // string | Limit results to a specific variable category +$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$limit = 100; // int | The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. +$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. +$sort = "sort_example"; // string | Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. +$app_name = "app_name_example"; // string | Example: MoodiModo +$client_id = "client_id_example"; // string | Example: oauth_test_client +$app_version = "app_version_example"; // string | Example: 2.1.1.0 try { - $result = $api_instance->v1TrackingRemindersDeletePost($body, $access_token, $user_id); + $result = $api_instance->getTrackingReminders($user_id, $variable_category_name, $created_at, $updated_at, $limit, $offset, $sort, $app_name, $client_id, $app_version); print_r($result); } catch (Exception $e) { - echo 'Exception when calling RemindersApi->v1TrackingRemindersDeletePost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling RemindersApi->getTrackingReminders: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -264,17 +183,24 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\TrackingReminderDelete**](../Model/\QuantiModo\Client\Model\TrackingReminderDelete.md)| Id of reminder to be deleted | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **user_id** | **float**| User's id | [optional] + **variable_category_name** | **string**| Limit results to a specific variable category | [optional] + **created_at** | **string**| When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **limit** | **int**| The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] [default to 100] + **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] + **sort** | **string**| Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. | [optional] + **app_name** | **string**| Example: MoodiModo | [optional] + **client_id** | **string**| Example: oauth_test_client | [optional] + **app_version** | **string**| Example: 2.1.1.0 | [optional] ### Return type -[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) +[**\QuantiModo\Client\Model\TrackingReminderArray**](../Model/TrackingReminderArray.md) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -283,36 +209,36 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1TrackingRemindersGet** -> \QuantiModo\Client\Model\InlineResponse2005 v1TrackingRemindersGet($access_token, $user_id, $variable_category_name, $created_at, $updated_at, $limit, $offset, $sort) +# **postTrackingReminderNotifications** +> \QuantiModo\Client\Model\CommonResponse postTrackingReminderNotifications($body, $user_id, $app_name, $client_id) -Get repeating tracking reminder settings +Snooze, skip, or track a tracking reminder notification -Users can be reminded to track certain variables at a specified frequency with a default value. +Snooze, skip, or track a tracking reminder notification ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); // Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\RemindersApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$variable_category_name = "variable_category_name_example"; // string | Limit tracking reminders to a specific variable category -$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. -$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. -$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. -$sort = "sort_example"; // string | Sort by given field. If the field is prefixed with '-', it will sort in descending order. +$body = array(new \QuantiModo\Client\Model\TrackingReminderNotificationPost()); // \QuantiModo\Client\Model\TrackingReminderNotificationPost[] | Id of the tracking reminder notification to be snoozed +$user_id = 3.4; // float | User's id +$app_name = "app_name_example"; // string | Example: MoodiModo +$client_id = "client_id_example"; // string | Example: oauth_test_client try { - $result = $api_instance->v1TrackingRemindersGet($access_token, $user_id, $variable_category_name, $created_at, $updated_at, $limit, $offset, $sort); + $result = $api_instance->postTrackingReminderNotifications($body, $user_id, $app_name, $client_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling RemindersApi->v1TrackingRemindersGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling RemindersApi->postTrackingReminderNotifications: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -321,22 +247,18 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **variable_category_name** | **string**| Limit tracking reminders to a specific variable category | [optional] - **created_at** | **string**| When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. | [optional] - **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] - **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] - **sort** | **string**| Sort by given field. If the field is prefixed with '-', it will sort in descending order. | [optional] + **body** | [**\QuantiModo\Client\Model\TrackingReminderNotificationPost[]**](../Model/TrackingReminderNotificationPost.md)| Id of the tracking reminder notification to be snoozed | + **user_id** | **float**| User's id | [optional] + **app_name** | **string**| Example: MoodiModo | [optional] + **client_id** | **string**| Example: oauth_test_client | [optional] ### Return type -[**\QuantiModo\Client\Model\InlineResponse2005**](../Model/InlineResponse2005.md) +[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) ### Authorization -[quantimodo_oauth2](../../README.md#quantimodo_oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -345,8 +267,8 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1TrackingRemindersPost** -> \QuantiModo\Client\Model\InlineResponse20011 v1TrackingRemindersPost($access_token, $user_id, $body) +# **postTrackingReminders** +> \QuantiModo\Client\Model\PostTrackingRemindersResponse postTrackingReminders($body) Store a Tracking Reminder @@ -357,19 +279,21 @@ This is to enable users to create reminders to track a variable with a default v setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); // Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\RemindersApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$body = new \QuantiModo\Client\Model\TrackingReminder(); // \QuantiModo\Client\Model\TrackingReminder | TrackingReminder that should be stored +$body = new \QuantiModo\Client\Model\TrackingReminderArray(); // \QuantiModo\Client\Model\TrackingReminderArray | TrackingReminder that should be stored try { - $result = $api_instance->v1TrackingRemindersPost($access_token, $user_id, $body); + $result = $api_instance->postTrackingReminders($body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling RemindersApi->v1TrackingRemindersPost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling RemindersApi->postTrackingReminders: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -378,17 +302,15 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **body** | [**\QuantiModo\Client\Model\TrackingReminder**](../Model/\QuantiModo\Client\Model\TrackingReminder.md)| TrackingReminder that should be stored | [optional] + **body** | [**\QuantiModo\Client\Model\TrackingReminderArray**](../Model/TrackingReminderArray.md)| TrackingReminder that should be stored | ### Return type -[**\QuantiModo\Client\Model\InlineResponse20011**](../Model/InlineResponse20011.md) +[**\QuantiModo\Client\Model\PostTrackingRemindersResponse**](../Model/PostTrackingRemindersResponse.md) ### Authorization -[quantimodo_oauth2](../../README.md#quantimodo_oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers diff --git a/docs/Api/StudyApi.md b/docs/Api/StudyApi.md new file mode 100644 index 0000000..d632673 --- /dev/null +++ b/docs/Api/StudyApi.md @@ -0,0 +1,50 @@ +# QuantiModo\Client\StudyApi + +All URIs are relative to *https://app.quantimo.do/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**postStudyPublish**](StudyApi.md#postStudyPublish) | **POST** /v3/study/publish | Post Study Publish + + +# **postStudyPublish** +> \QuantiModo\Client\Model\PostStudyPublishResponse postStudyPublish() + +Post Study Publish + +Post Study Publish + +### Example +```php +postStudyPublish(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling StudyApi->postStudyPublish: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\QuantiModo\Client\Model\PostStudyPublishResponse**](../Model/PostStudyPublishResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/docs/Api/TagsApi.md b/docs/Api/TagsApi.md deleted file mode 100644 index 003cbb7..0000000 --- a/docs/Api/TagsApi.md +++ /dev/null @@ -1,112 +0,0 @@ -# QuantiModo\Client\TagsApi - -All URIs are relative to *https://app.quantimo.do/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**v1UserTagsDeletePost**](TagsApi.md#v1UserTagsDeletePost) | **POST** /v1/userTags/delete | Delete user tag or ingredient -[**v1UserTagsPost**](TagsApi.md#v1UserTagsPost) | **POST** /v1/userTags | Post or update user tags or ingredients - - -# **v1UserTagsDeletePost** -> \QuantiModo\Client\Model\CommonResponse v1UserTagsDeletePost($tagged_variable_id, $tag_variable_id) - -Delete user tag or ingredient - -Delete previously created user tags or ingredients. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\TagsApi(); -$tagged_variable_id = 56; // int | This is the id of the variable being tagged with an ingredient or something. -$tag_variable_id = 56; // int | This is the id of the ingredient variable whose value is determined based on the value of the tagged variable. - -try { - $result = $api_instance->v1UserTagsDeletePost($tagged_variable_id, $tag_variable_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling TagsApi->v1UserTagsDeletePost: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tagged_variable_id** | **int**| This is the id of the variable being tagged with an ingredient or something. | - **tag_variable_id** | **int**| This is the id of the ingredient variable whose value is determined based on the value of the tagged variable. | - -### Return type - -[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1UserTagsPost** -> \QuantiModo\Client\Model\CommonResponse v1UserTagsPost($body, $access_token, $user_id) - -Post or update user tags or ingredients - -This endpoint allows users to tag foods with their ingredients. This information will then be used to infer the user intake of the different ingredients by just entering the foods. The inferred intake levels will then be used to determine the effects of different nutrients on the user during analysis. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\TagsApi(); -$body = new \QuantiModo\Client\Model\UserTag(); // \QuantiModo\Client\Model\UserTag | Contains the new user tag data -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $result = $api_instance->v1UserTagsPost($body, $access_token, $user_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling TagsApi->v1UserTagsPost: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\UserTag**](../Model/\QuantiModo\Client\Model\UserTag.md)| Contains the new user tag data | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - -### Return type - -[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - diff --git a/docs/Api/UnitsApi.md b/docs/Api/UnitsApi.md index 409059d..a0d30eb 100644 --- a/docs/Api/UnitsApi.md +++ b/docs/Api/UnitsApi.md @@ -4,13 +4,12 @@ All URIs are relative to *https://app.quantimo.do/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**v1UnitCategoriesGet**](UnitsApi.md#v1UnitCategoriesGet) | **GET** /v1/unitCategories | Get unit categories -[**v1UnitsGet**](UnitsApi.md#v1UnitsGet) | **GET** /v1/units | Get all available units -[**v1UnitsVariableGet**](UnitsApi.md#v1UnitsVariableGet) | **GET** /v1/unitsVariable | Units for Variable +[**getUnitCategories**](UnitsApi.md#getUnitCategories) | **GET** /v3/unitCategories | Get unit categories +[**getUnits**](UnitsApi.md#getUnits) | **GET** /v3/units | Get units -# **v1UnitCategoriesGet** -> \QuantiModo\Client\Model\UnitCategory v1UnitCategoriesGet() +# **getUnitCategories** +> \QuantiModo\Client\Model\UnitCategory[] getUnitCategories() Get unit categories @@ -21,16 +20,20 @@ Get a list of the categories of measurement units such as 'Distance', 'Duration' setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\UnitsApi(); try { - $result = $api_instance->v1UnitCategoriesGet(); + $result = $api_instance->getUnitCategories(); print_r($result); } catch (Exception $e) { - echo 'Exception when calling UnitsApi->v1UnitCategoriesGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling UnitsApi->getUnitCategories: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -40,11 +43,11 @@ This endpoint does not need any parameter. ### Return type -[**\QuantiModo\Client\Model\UnitCategory**](../Model/UnitCategory.md) +[**\QuantiModo\Client\Model\UnitCategory[]**](../Model/UnitCategory.md) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -53,106 +56,38 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1UnitsGet** -> \QuantiModo\Client\Model\Unit[] v1UnitsGet($access_token, $user_id, $id, $unit_name, $abbreviated_unit_name, $unit_category_name) +# **getUnits** +> \QuantiModo\Client\Model\Unit[] getUnits() -Get all available units +Get units -Get all available units +Get a list of the available measurement units ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\UnitsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$id = 56; // int | Unit id -$unit_name = "unit_name_example"; // string | Unit name -$abbreviated_unit_name = "abbreviated_unit_name_example"; // string | Restrict the results to a specific unit by providing the unit abbreviation. -$unit_category_name = "unit_category_name_example"; // string | Restrict the results to a specific unit category by providing the unit category name. try { - $result = $api_instance->v1UnitsGet($access_token, $user_id, $id, $unit_name, $abbreviated_unit_name, $unit_category_name); + $result = $api_instance->getUnits(); print_r($result); } catch (Exception $e) { - echo 'Exception when calling UnitsApi->v1UnitsGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling UnitsApi->getUnits: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **id** | **int**| Unit id | [optional] - **unit_name** | **string**| Unit name | [optional] - **abbreviated_unit_name** | **string**| Restrict the results to a specific unit by providing the unit abbreviation. | [optional] - **unit_category_name** | **string**| Restrict the results to a specific unit category by providing the unit category name. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\Unit[]**](../Model/Unit.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1UnitsVariableGet** -> \QuantiModo\Client\Model\Unit[] v1UnitsVariableGet($access_token, $user_id, $unit_name, $abbreviated_unit_name, $unit_category_name, $variable) - -Units for Variable - -Get a list of all possible units to use for a given variable - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\UnitsApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$unit_name = "unit_name_example"; // string | Name of Unit you want to retrieve -$abbreviated_unit_name = "abbreviated_unit_name_example"; // string | Abbreviated Unit Name of the unit you want -$unit_category_name = "unit_category_name_example"; // string | Name of the category you want units for -$variable = "variable_example"; // string | Name of the variable you want units for - -try { - $result = $api_instance->v1UnitsVariableGet($access_token, $user_id, $unit_name, $abbreviated_unit_name, $unit_category_name, $variable); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling UnitsApi->v1UnitsVariableGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **unit_name** | **string**| Name of Unit you want to retrieve | [optional] - **abbreviated_unit_name** | **string**| Abbreviated Unit Name of the unit you want | [optional] - **unit_category_name** | **string**| Name of the category you want units for | [optional] - **variable** | **string**| Name of the variable you want units for | [optional] +This endpoint does not need any parameter. ### Return type @@ -160,7 +95,7 @@ Name | Type | Description | Notes ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers diff --git a/docs/Api/UserApi.md b/docs/Api/UserApi.md index 91010c8..4a432f4 100644 --- a/docs/Api/UserApi.md +++ b/docs/Api/UserApi.md @@ -4,40 +4,46 @@ All URIs are relative to *https://app.quantimo.do/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**v1OrganizationsOrganizationIdUsersPost**](UserApi.md#v1OrganizationsOrganizationIdUsersPost) | **POST** /v1/organizations/{organizationId}/users | Get user tokens for existing users, create new users -[**v1UserMeGet**](UserApi.md#v1UserMeGet) | **GET** /v1/user/me | Get all available units for variableGet authenticated user +[**getUser**](UserApi.md#getUser) | **GET** /v3/user | Get user info +[**postUserSettings**](UserApi.md#postUserSettings) | **POST** /v3/userSettings | Post UserSettings -# **v1OrganizationsOrganizationIdUsersPost** -> \QuantiModo\Client\Model\UserTokenSuccessfulResponse v1OrganizationsOrganizationIdUsersPost($organization_id, $body, $access_token, $user_id) +# **getUser** +> \QuantiModo\Client\Model\User getUser($user_id, $created_at, $updated_at, $limit, $offset, $sort, $client_id, $app_name, $app_version, $client_user_id) -Get user tokens for existing users, create new users +Get user info -Get user tokens for existing users, create new users +Returns user info. If no userId is specified, returns info for currently authenticated user ### Example ```php setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure API key authorization: internalApiKey -QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); +// Configure API key authorization: access_token +QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKey('access_token', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 +QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\UserApi(); -$organization_id = 56; // int | Organization ID -$body = new \QuantiModo\Client\Model\UserTokenRequest(); // \QuantiModo\Client\Model\UserTokenRequest | Provides organization token and user ID -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id +$user_id = 3.4; // float | User's id +$created_at = "created_at_example"; // string | When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$limit = 100; // int | The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. +$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. +$sort = "sort_example"; // string | Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. +$client_id = "client_id_example"; // string | Example: oauth_test_client +$app_name = "app_name_example"; // string | Example: MoodiModo +$app_version = "app_version_example"; // string | Example: 2.1.1.0 +$client_user_id = 56; // int | Example: 74802 try { - $result = $api_instance->v1OrganizationsOrganizationIdUsersPost($organization_id, $body, $access_token, $user_id); + $result = $api_instance->getUser($user_id, $created_at, $updated_at, $limit, $offset, $sort, $client_id, $app_name, $app_version, $client_user_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling UserApi->v1OrganizationsOrganizationIdUsersPost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling UserApi->getUser: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -46,18 +52,24 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **organization_id** | **int**| Organization ID | - **body** | [**\QuantiModo\Client\Model\UserTokenRequest**](../Model/\QuantiModo\Client\Model\UserTokenRequest.md)| Provides organization token and user ID | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **user_id** | **float**| User's id | [optional] + **created_at** | **string**| When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **limit** | **int**| The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] [default to 100] + **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] + **sort** | **string**| Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. | [optional] + **client_id** | **string**| Example: oauth_test_client | [optional] + **app_name** | **string**| Example: MoodiModo | [optional] + **app_version** | **string**| Example: 2.1.1.0 | [optional] + **client_user_id** | **int**| Example: 74802 | [optional] ### Return type -[**\QuantiModo\Client\Model\UserTokenSuccessfulResponse**](../Model/UserTokenSuccessfulResponse.md) +[**\QuantiModo\Client\Model\User**](../Model/User.md) ### Authorization -[oauth2](../../README.md#oauth2), [internalApiKey](../../README.md#internalApiKey) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -66,42 +78,45 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1UserMeGet** -> \QuantiModo\Client\Model\User v1UserMeGet() +# **postUserSettings** +> \QuantiModo\Client\Model\PostUserSettingsResponse postUserSettings($app_name, $client_id) -Get all available units for variableGet authenticated user +Post UserSettings -Returns user info for the currently authenticated user. +Post UserSettings ### Example ```php setAccessToken('YOUR_ACCESS_TOKEN'); - $api_instance = new QuantiModo\Client\Api\UserApi(); +$app_name = "app_name_example"; // string | Example: MoodiModo +$client_id = "client_id_example"; // string | Example: oauth_test_client try { - $result = $api_instance->v1UserMeGet(); + $result = $api_instance->postUserSettings($app_name, $client_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling UserApi->v1UserMeGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling UserApi->postUserSettings: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **app_name** | **string**| Example: MoodiModo | [optional] + **client_id** | **string**| Example: oauth_test_client | [optional] ### Return type -[**\QuantiModo\Client\Model\User**](../Model/User.md) +[**\QuantiModo\Client\Model\PostUserSettingsResponse**](../Model/PostUserSettingsResponse.md) ### Authorization -[oauth2](../../README.md#oauth2) +No authorization required ### HTTP request headers diff --git a/docs/Api/VariablesApi.md b/docs/Api/VariablesApi.md index ed12174..0461394 100644 --- a/docs/Api/VariablesApi.md +++ b/docs/Api/VariablesApi.md @@ -4,54 +4,44 @@ All URIs are relative to *https://app.quantimo.do/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**v1PublicVariablesGet**](VariablesApi.md#v1PublicVariablesGet) | **GET** /v1/public/variables | Get public variables -[**v1PublicVariablesSearchSearchGet**](VariablesApi.md#v1PublicVariablesSearchSearchGet) | **GET** /v1/public/variables/search/{search} | Get top 5 PUBLIC variables with the most correlations -[**v1UserVariablesDeletePost**](VariablesApi.md#v1UserVariablesDeletePost) | **POST** /v1/userVariables/delete | Delete All Measurements For Variable -[**v1UserVariablesPost**](VariablesApi.md#v1UserVariablesPost) | **POST** /v1/userVariables | Update User Settings for a Variable -[**v1UserVariablesResetPost**](VariablesApi.md#v1UserVariablesResetPost) | **POST** /v1/userVariables/reset | Reset user settings for a variable to defaults -[**v1VariableCategoriesGet**](VariablesApi.md#v1VariableCategoriesGet) | **GET** /v1/variableCategories | Variable categories -[**v1VariablesGet**](VariablesApi.md#v1VariablesGet) | **GET** /v1/variables | Get variables with user's settings -[**v1VariablesPost**](VariablesApi.md#v1VariablesPost) | **POST** /v1/variables | Create Variables -[**v1VariablesSearchSearchGet**](VariablesApi.md#v1VariablesSearchSearchGet) | **GET** /v1/variables/search/{search} | Get variables by search query -[**v1VariablesVariableNameGet**](VariablesApi.md#v1VariablesVariableNameGet) | **GET** /v1/variables/{variableName} | Get info about a variable +[**deleteUserTag**](VariablesApi.md#deleteUserTag) | **DELETE** /v3/userTags/delete | Delete user tag or ingredient +[**deleteUserVariable**](VariablesApi.md#deleteUserVariable) | **DELETE** /v3/userVariables/delete | Delete All Measurements For Variable +[**getCommonVariables**](VariablesApi.md#getCommonVariables) | **GET** /v3/public/variables | Get common variables with aggregated instead of user-specific data +[**getUserVariables**](VariablesApi.md#getUserVariables) | **GET** /v3/userVariables | Get variables along with related user-specific analysis settings and statistics +[**getVariableCategories**](VariablesApi.md#getVariableCategories) | **GET** /v3/variableCategories | Variable categories +[**postUserTags**](VariablesApi.md#postUserTags) | **POST** /v3/userTags | Post or update user tags or ingredients +[**postUserVariables**](VariablesApi.md#postUserVariables) | **POST** /v3/userVariables | Update User Settings for a Variable +[**resetUserVariableSettings**](VariablesApi.md#resetUserVariableSettings) | **POST** /v3/userVariables/reset | Reset user settings for a variable to defaults -# **v1PublicVariablesGet** -> \QuantiModo\Client\Model\Variable v1PublicVariablesGet($access_token, $user_id, $id, $user_id2, $category, $name, $last_updated, $source, $latest_measurement_time, $number_of_raw_measurements, $last_source, $limit, $offset, $sort) +# **deleteUserTag** +> \QuantiModo\Client\Model\CommonResponse deleteUserTag($tagged_variable_id, $tag_variable_id) -Get public variables +Delete user tag or ingredient -This endpoint retrieves an array of all public variables. Public variables are things like foods, medications, symptoms, conditions, and anything not unique to a particular user. For instance, a telephone number or name would not be a public variable. +Delete previously created user tags or ingredients. ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\VariablesApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$id = 56; // int | Common variable id -$user_id2 = 56; // int | User id -$category = "category_example"; // string | Filter data by category -$name = "name_example"; // string | Original name of the variable (supports exact name match only) -$last_updated = "last_updated_example"; // string | Filter by the last time any of the properties of the variable were changed. Uses UTC format \"YYYY-MM-DDThh:mm:ss\" -$source = "source_example"; // string | The name of the data source that created the variable (supports exact name match only). So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here -$latest_measurement_time = "latest_measurement_time_example"; // string | Filter variables based on the last time a measurement for them was created or updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" -$number_of_raw_measurements = "number_of_raw_measurements_example"; // string | Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. -$last_source = "last_source_example"; // string | Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here. (supports exact name match only) -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. -$offset = 56; // int | Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. -$sort = 56; // int | Sort by given field. If the field is prefixed with `-, it will sort in descending order. +$tagged_variable_id = 56; // int | This is the id of the variable being tagged with an ingredient or something. +$tag_variable_id = 56; // int | This is the id of the ingredient variable whose value is determined based on the value of the tagged variable. try { - $result = $api_instance->v1PublicVariablesGet($access_token, $user_id, $id, $user_id2, $category, $name, $last_updated, $source, $latest_measurement_time, $number_of_raw_measurements, $last_source, $limit, $offset, $sort); + $result = $api_instance->deleteUserTag($tagged_variable_id, $tag_variable_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling VariablesApi->v1PublicVariablesGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling VariablesApi->deleteUserTag: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -60,28 +50,16 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **id** | **int**| Common variable id | [optional] - **user_id2** | **int**| User id | [optional] - **category** | **string**| Filter data by category | [optional] - **name** | **string**| Original name of the variable (supports exact name match only) | [optional] - **last_updated** | **string**| Filter by the last time any of the properties of the variable were changed. Uses UTC format \"YYYY-MM-DDThh:mm:ss\" | [optional] - **source** | **string**| The name of the data source that created the variable (supports exact name match only). So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here | [optional] - **latest_measurement_time** | **string**| Filter variables based on the last time a measurement for them was created or updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" | [optional] - **number_of_raw_measurements** | **string**| Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. | [optional] - **last_source** | **string**| Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here. (supports exact name match only) | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. | [optional] - **offset** | **int**| Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. | [optional] - **sort** | **int**| Sort by given field. If the field is prefixed with `-, it will sort in descending order. | [optional] + **tagged_variable_id** | **int**| This is the id of the variable being tagged with an ingredient or something. | + **tag_variable_id** | **int**| This is the id of the ingredient variable whose value is determined based on the value of the tagged variable. | ### Return type -[**\QuantiModo\Client\Model\Variable**](../Model/Variable.md) +[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -90,74 +68,8 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1PublicVariablesSearchSearchGet** -> \QuantiModo\Client\Model\Variable v1PublicVariablesSearchSearchGet($search, $access_token, $user_id, $variable_category_name, $source, $effect_or_cause, $public_effect_or_cause, $limit, $offset, $sort) - -Get top 5 PUBLIC variables with the most correlations - -Get top 5 PUBLIC variables with the most correlations containing the entered search characters. For example, search for 'mood' as an effect. Since 'Overall Mood' has a lot of correlations with other variables, it should be in the autocomplete list.
Supported filter parameters:
  • category - Category of Variable

- -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\VariablesApi(); -$search = "search_example"; // string | Search query can be some fraction of a variable name. -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$variable_category_name = "variable_category_name_example"; // string | Filter variables by category name. The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. -$source = "source_example"; // string | Specify a data source name to only return variables from a specific data source. -$effect_or_cause = "effect_or_cause_example"; // string | Indicate if you only want variables that have user correlations. Possible values are effect and cause. -$public_effect_or_cause = "public_effect_or_cause_example"; // string | Indicate if you only want variables that have aggregated correlations. Possible values are effect and cause. -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. -$offset = 56; // int | Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. -$sort = 56; // int | Sort by given field. If the field is prefixed with `-, it will sort in descending order. - -try { - $result = $api_instance->v1PublicVariablesSearchSearchGet($search, $access_token, $user_id, $variable_category_name, $source, $effect_or_cause, $public_effect_or_cause, $limit, $offset, $sort); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling VariablesApi->v1PublicVariablesSearchSearchGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **search** | **string**| Search query can be some fraction of a variable name. | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **variable_category_name** | **string**| Filter variables by category name. The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. | [optional] - **source** | **string**| Specify a data source name to only return variables from a specific data source. | [optional] - **effect_or_cause** | **string**| Indicate if you only want variables that have user correlations. Possible values are effect and cause. | [optional] - **public_effect_or_cause** | **string**| Indicate if you only want variables that have aggregated correlations. Possible values are effect and cause. | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. | [optional] - **offset** | **int**| Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. | [optional] - **sort** | **int**| Sort by given field. If the field is prefixed with `-, it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\Variable**](../Model/Variable.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1UserVariablesDeletePost** -> v1UserVariablesDeletePost($variable_id) +# **deleteUserVariable** +> deleteUserVariable($variable_id) Delete All Measurements For Variable @@ -168,16 +80,20 @@ Users can delete all of their measurements for a variable setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\VariablesApi(); $variable_id = new \QuantiModo\Client\Model\UserVariableDelete(); // \QuantiModo\Client\Model\UserVariableDelete | Id of the variable whose measurements should be deleted try { - $api_instance->v1UserVariablesDeletePost($variable_id); + $api_instance->deleteUserVariable($variable_id); } catch (Exception $e) { - echo 'Exception when calling VariablesApi->v1UserVariablesDeletePost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling VariablesApi->deleteUserVariable: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -186,7 +102,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **variable_id** | [**\QuantiModo\Client\Model\UserVariableDelete**](../Model/\QuantiModo\Client\Model\UserVariableDelete.md)| Id of the variable whose measurements should be deleted | + **variable_id** | [**\QuantiModo\Client\Model\UserVariableDelete**](../Model/UserVariableDelete.md)| Id of the variable whose measurements should be deleted | ### Return type @@ -194,7 +110,7 @@ void (empty response body) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -203,28 +119,54 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1UserVariablesPost** -> v1UserVariablesPost($user_variables) +# **getCommonVariables** +> \QuantiModo\Client\Model\CommonVariableArray getCommonVariables($offset, $user_id, $variable_category_name, $name, $updated_at, $source_name, $earliest_measurement_time, $latest_measurement_time, $number_of_raw_measurements, $last_source_name, $limit, $id, $sort, $effect_or_cause, $public_effect_or_cause, $exact_match, $manual_tracking, $variable_category_id, $include_private, $client_id, $search_phrase, $synonyms) -Update User Settings for a Variable +Get common variables with aggregated instead of user-specific data -Users can change the parameters used in analysis of that variable such as the expected duration of action for a variable to have an effect, the estimated delay before the onset of action. In order to filter out erroneous data, they are able to set the maximum and minimum reasonable daily values for a variable. +This endpoint retrieves an array of all public variables. Public variables are things like foods, medications, symptoms, conditions, and anything not unique to a particular user. For instance, a telephone number or name would not be a public variable. ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\VariablesApi(); -$user_variables = new \QuantiModo\Client\Model\UserVariables(); // \QuantiModo\Client\Model\UserVariables | Variable user settings data +$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. +$user_id = 3.4; // float | User's id +$variable_category_name = "variable_category_name_example"; // string | Limit results to a specific variable category +$name = "name_example"; // string | Name of the variable. To get results matching a substring, add % as a wildcard as the first and/or last character of a query string parameter. In order to get variables that contain `Mood`, the following query should be used: ?variableName=%Mood% +$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$source_name = "source_name_example"; // string | ID of the source you want measurements for (supports exact name match only) +$earliest_measurement_time = "earliest_measurement_time_example"; // string | Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$latest_measurement_time = "latest_measurement_time_example"; // string | Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$number_of_raw_measurements = "number_of_raw_measurements_example"; // string | Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. +$last_source_name = "last_source_name_example"; // string | Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here +$limit = 100; // int | The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. +$id = 56; // int | Common variable id +$sort = "sort_example"; // string | Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. +$effect_or_cause = "effect_or_cause_example"; // string | Example: +$public_effect_or_cause = "public_effect_or_cause_example"; // string | Example: +$exact_match = true; // bool | Example: +$manual_tracking = true; // bool | Example: +$variable_category_id = 56; // int | Example: 13 +$include_private = true; // bool | Example: +$client_id = "client_id_example"; // string | Example: oauth_test_client +$search_phrase = "search_phrase_example"; // string | Example: %Body Fat% +$synonyms = "synonyms_example"; // string | Example: %McDonalds hotcake% try { - $api_instance->v1UserVariablesPost($user_variables); + $result = $api_instance->getCommonVariables($offset, $user_id, $variable_category_name, $name, $updated_at, $source_name, $earliest_measurement_time, $latest_measurement_time, $number_of_raw_measurements, $last_source_name, $limit, $id, $sort, $effect_or_cause, $public_effect_or_cause, $exact_match, $manual_tracking, $variable_category_id, $include_private, $client_id, $search_phrase, $synonyms); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling VariablesApi->v1UserVariablesPost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling VariablesApi->getCommonVariables: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -233,15 +175,36 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_variables** | [**\QuantiModo\Client\Model\UserVariables**](../Model/\QuantiModo\Client\Model\UserVariables.md)| Variable user settings data | + **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] + **user_id** | **float**| User's id | [optional] + **variable_category_name** | **string**| Limit results to a specific variable category | [optional] + **name** | **string**| Name of the variable. To get results matching a substring, add % as a wildcard as the first and/or last character of a query string parameter. In order to get variables that contain `Mood`, the following query should be used: ?variableName=%Mood% | [optional] + **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **source_name** | **string**| ID of the source you want measurements for (supports exact name match only) | [optional] + **earliest_measurement_time** | **string**| Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **latest_measurement_time** | **string**| Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **number_of_raw_measurements** | **string**| Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. | [optional] + **last_source_name** | **string**| Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here | [optional] + **limit** | **int**| The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] [default to 100] + **id** | **int**| Common variable id | [optional] + **sort** | **string**| Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. | [optional] + **effect_or_cause** | **string**| Example: | [optional] + **public_effect_or_cause** | **string**| Example: | [optional] + **exact_match** | **bool**| Example: | [optional] + **manual_tracking** | **bool**| Example: | [optional] + **variable_category_id** | **int**| Example: 13 | [optional] + **include_private** | **bool**| Example: | [optional] + **client_id** | **string**| Example: oauth_test_client | [optional] + **search_phrase** | **string**| Example: %Body Fat% | [optional] + **synonyms** | **string**| Example: %McDonalds hotcake% | [optional] ### Return type -void (empty response body) +[**\QuantiModo\Client\Model\CommonVariableArray**](../Model/CommonVariableArray.md) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -250,28 +213,50 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1UserVariablesResetPost** -> v1UserVariablesResetPost($variable_id) +# **getUserVariables** +> \QuantiModo\Client\Model\UserVariable[] getUserVariables($include_charts, $number_of_raw_measurements, $user_id, $variable_category_name, $name, $updated_at, $source_name, $earliest_measurement_time, $latest_measurement_time, $id, $last_source_name, $limit, $offset, $sort, $include_public, $manual_tracking, $app_name, $client_id) -Reset user settings for a variable to defaults +Get variables along with related user-specific analysis settings and statistics -Reset user settings for a variable to defaults +Get variables for which the user has measurements. If the user has specified variable settings, these are provided instead of the common variable defaults. ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\VariablesApi(); -$variable_id = new \QuantiModo\Client\Model\UserVariableDelete(); // \QuantiModo\Client\Model\UserVariableDelete | Id of the variable that should be reset +$include_charts = true; // bool | Return highcharts configs that can be used if you have highcharts.js included on the page. This only works if the id or name query parameter is also provided. +$number_of_raw_measurements = "number_of_raw_measurements_example"; // string | Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. +$user_id = 3.4; // float | User's id +$variable_category_name = "variable_category_name_example"; // string | Limit results to a specific variable category +$name = "name_example"; // string | Name of the variable. To get results matching a substring, add % as a wildcard as the first and/or last character of a query string parameter. In order to get variables that contain `Mood`, the following query should be used: ?variableName=%Mood% +$updated_at = "updated_at_example"; // string | When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$source_name = "source_name_example"; // string | ID of the source you want measurements for (supports exact name match only) +$earliest_measurement_time = "earliest_measurement_time_example"; // string | Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$latest_measurement_time = "latest_measurement_time_example"; // string | Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. +$id = 56; // int | Common variable id +$last_source_name = "last_source_name_example"; // string | Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here +$limit = 100; // int | The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. +$offset = 56; // int | OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. +$sort = "sort_example"; // string | Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. +$include_public = true; // bool | Example: true +$manual_tracking = true; // bool | Example: +$app_name = "app_name_example"; // string | Example: MoodiModo +$client_id = "client_id_example"; // string | Example: oauth_test_client try { - $api_instance->v1UserVariablesResetPost($variable_id); + $result = $api_instance->getUserVariables($include_charts, $number_of_raw_measurements, $user_id, $variable_category_name, $name, $updated_at, $source_name, $earliest_measurement_time, $latest_measurement_time, $id, $last_source_name, $limit, $offset, $sort, $include_public, $manual_tracking, $app_name, $client_id); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling VariablesApi->v1UserVariablesResetPost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling VariablesApi->getUserVariables: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -280,15 +265,32 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **variable_id** | [**\QuantiModo\Client\Model\UserVariableDelete**](../Model/\QuantiModo\Client\Model\UserVariableDelete.md)| Id of the variable that should be reset | + **include_charts** | **bool**| Return highcharts configs that can be used if you have highcharts.js included on the page. This only works if the id or name query parameter is also provided. | [optional] + **number_of_raw_measurements** | **string**| Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. | [optional] + **user_id** | **float**| User's id | [optional] + **variable_category_name** | **string**| Limit results to a specific variable category | [optional] + **name** | **string**| Name of the variable. To get results matching a substring, add % as a wildcard as the first and/or last character of a query string parameter. In order to get variables that contain `Mood`, the following query should be used: ?variableName=%Mood% | [optional] + **updated_at** | **string**| When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **source_name** | **string**| ID of the source you want measurements for (supports exact name match only) | [optional] + **earliest_measurement_time** | **string**| Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **latest_measurement_time** | **string**| Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] + **id** | **int**| Common variable id | [optional] + **last_source_name** | **string**| Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here | [optional] + **limit** | **int**| The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. | [optional] [default to 100] + **offset** | **int**| OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. | [optional] + **sort** | **string**| Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. | [optional] + **include_public** | **bool**| Example: true | [optional] + **manual_tracking** | **bool**| Example: | [optional] + **app_name** | **string**| Example: MoodiModo | [optional] + **client_id** | **string**| Example: oauth_test_client | [optional] ### Return type -void (empty response body) +[**\QuantiModo\Client\Model\UserVariable[]**](../Model/UserVariable.md) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -297,8 +299,8 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1VariableCategoriesGet** -> \QuantiModo\Client\Model\VariableCategory[] v1VariableCategoriesGet() +# **getVariableCategories** +> \QuantiModo\Client\Model\VariableCategory[] getVariableCategories() Variable categories @@ -309,16 +311,20 @@ The variable categories include Activity, Causes of Illness, Cognitive Performan setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\VariablesApi(); try { - $result = $api_instance->v1VariableCategoriesGet(); + $result = $api_instance->getVariableCategories(); print_r($result); } catch (Exception $e) { - echo 'Exception when calling VariablesApi->v1VariableCategoriesGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling VariablesApi->getVariableCategories: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -332,7 +338,7 @@ This endpoint does not need any parameter. ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -341,107 +347,34 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1VariablesGet** -> \QuantiModo\Client\Model\Variable v1VariablesGet($access_token, $user_id, $id, $user_id2, $category, $name, $last_updated, $source, $latest_measurement_time, $number_of_raw_measurements, $last_source, $limit, $offset, $sort) +# **postUserTags** +> \QuantiModo\Client\Model\CommonResponse postUserTags($body, $user_id) -Get variables with user's settings +Post or update user tags or ingredients -Get variables for which the user has measurements. If the user has specified variable settings, these are provided instead of the common variable defaults. +This endpoint allows users to tag foods with their ingredients. This information will then be used to infer the user intake of the different ingredients by just entering the foods. The inferred intake levels will then be used to determine the effects of different nutrients on the user during analysis. ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -// Configure HTTP basic authorization: basicAuth -QuantiModo\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); -QuantiModo\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new QuantiModo\Client\Api\VariablesApi(); -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$id = 56; // int | Common variable id -$user_id2 = 56; // int | User id -$category = "category_example"; // string | Filter data by category -$name = "name_example"; // string | Original name of the variable (supports exact name match only) -$last_updated = "last_updated_example"; // string | Filter by the last time any of the properties of the variable were changed. Uses UTC format \"YYYY-MM-DDThh:mm:ss\" -$source = "source_example"; // string | The name of the data source that created the variable (supports exact name match only). So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here -$latest_measurement_time = "latest_measurement_time_example"; // string | Filter variables based on the last time a measurement for them was created or updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" -$number_of_raw_measurements = "number_of_raw_measurements_example"; // string | Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. -$last_source = "last_source_example"; // string | Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here. (supports exact name match only) -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. -$offset = 56; // int | Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. -$sort = 56; // int | Sort by given field. If the field is prefixed with `-, it will sort in descending order. +$body = new \QuantiModo\Client\Model\UserTag(); // \QuantiModo\Client\Model\UserTag | Contains the new user tag data +$user_id = 3.4; // float | User's id try { - $result = $api_instance->v1VariablesGet($access_token, $user_id, $id, $user_id2, $category, $name, $last_updated, $source, $latest_measurement_time, $number_of_raw_measurements, $last_source, $limit, $offset, $sort); + $result = $api_instance->postUserTags($body, $user_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling VariablesApi->v1VariablesGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **id** | **int**| Common variable id | [optional] - **user_id2** | **int**| User id | [optional] - **category** | **string**| Filter data by category | [optional] - **name** | **string**| Original name of the variable (supports exact name match only) | [optional] - **last_updated** | **string**| Filter by the last time any of the properties of the variable were changed. Uses UTC format \"YYYY-MM-DDThh:mm:ss\" | [optional] - **source** | **string**| The name of the data source that created the variable (supports exact name match only). So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here | [optional] - **latest_measurement_time** | **string**| Filter variables based on the last time a measurement for them was created or updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" | [optional] - **number_of_raw_measurements** | **string**| Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. | [optional] - **last_source** | **string**| Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here. (supports exact name match only) | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. | [optional] - **offset** | **int**| Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. | [optional] - **sort** | **int**| Sort by given field. If the field is prefixed with `-, it will sort in descending order. | [optional] - -### Return type - -[**\QuantiModo\Client\Model\Variable**](../Model/Variable.md) - -### Authorization - -[oauth2](../../README.md#oauth2), [basicAuth](../../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1VariablesPost** -> v1VariablesPost($body, $access_token, $user_id) - -Create Variables - -Allows the client to create a new variable in the `variables` table. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\VariablesApi(); -$body = new \QuantiModo\Client\Model\VariablesNew(); // \QuantiModo\Client\Model\VariablesNew | Original name for the variable. -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $api_instance->v1VariablesPost($body, $access_token, $user_id); -} catch (Exception $e) { - echo 'Exception when calling VariablesApi->v1VariablesPost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling VariablesApi->postUserTags: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -450,17 +383,16 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\VariablesNew**](../Model/\QuantiModo\Client\Model\VariablesNew.md)| Original name for the variable. | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **body** | [**\QuantiModo\Client\Model\UserTag**](../Model/UserTag.md)| Contains the new user tag data | + **user_id** | **float**| User's id | [optional] ### Return type -void (empty response body) +[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -469,39 +401,43 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1VariablesSearchSearchGet** -> \QuantiModo\Client\Model\Variable[] v1VariablesSearchSearchGet($search, $access_token, $user_id, $variable_category_name, $include_public, $manual_tracking, $source, $effect_or_cause, $public_effect_or_cause, $limit, $offset) +# **postUserVariables** +> \QuantiModo\Client\Model\CommonResponse postUserVariables($user_variables, $include_private, $client_id, $include_public, $search_phrase, $app_name, $exact_match, $manual_tracking, $variable_category_name, $variable_category_id, $synonyms) -Get variables by search query +Update User Settings for a Variable -Get variables containing the search characters for which the currently logged in user has measurements. Used to provide auto-complete function in variable search boxes. +Users can change the parameters used in analysis of that variable such as the expected duration of action for a variable to have an effect, the estimated delay before the onset of action. In order to filter out erroneous data, they are able to set the maximum and minimum reasonable daily values for a variable. ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\VariablesApi(); -$search = "search_example"; // string | Search query which may be an entire variable name or a fragment of one. -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id -$variable_category_name = "variable_category_name_example"; // string | Filter variables by category name. The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. -$include_public = true; // bool | Set to true if you would like to include public variables when no user variables are found. -$manual_tracking = true; // bool | Set to true if you would like to exlude variables like apps and website names. -$source = "source_example"; // string | Specify a data source name to only return variables from a specific data source. -$effect_or_cause = "effect_or_cause_example"; // string | Indicate if you only want variables that have user correlations. Possible values are effect and cause. -$public_effect_or_cause = "public_effect_or_cause_example"; // string | Indicate if you only want variables that have aggregated correlations. Possible values are effect and cause. -$limit = 56; // int | The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. -$offset = 56; // int | Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. +$user_variables = array(new \QuantiModo\Client\Model\UserVariable()); // \QuantiModo\Client\Model\UserVariable[] | Variable user settings data +$include_private = true; // bool | Example: +$client_id = "client_id_example"; // string | Example: oauth_test_client +$include_public = true; // bool | Example: true +$search_phrase = "search_phrase_example"; // string | Example: %Body Fat% +$app_name = "app_name_example"; // string | Example: MoodiModo +$exact_match = true; // bool | Example: +$manual_tracking = true; // bool | Example: +$variable_category_name = "variable_category_name_example"; // string | Limit results to a specific variable category +$variable_category_id = 56; // int | Example: 13 +$synonyms = "synonyms_example"; // string | Example: %McDonalds hotcake% try { - $result = $api_instance->v1VariablesSearchSearchGet($search, $access_token, $user_id, $variable_category_name, $include_public, $manual_tracking, $source, $effect_or_cause, $public_effect_or_cause, $limit, $offset); + $result = $api_instance->postUserVariables($user_variables, $include_private, $client_id, $include_public, $search_phrase, $app_name, $exact_match, $manual_tracking, $variable_category_name, $variable_category_id, $synonyms); print_r($result); } catch (Exception $e) { - echo 'Exception when calling VariablesApi->v1VariablesSearchSearchGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling VariablesApi->postUserVariables: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -510,25 +446,25 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string**| Search query which may be an entire variable name or a fragment of one. | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - **variable_category_name** | **string**| Filter variables by category name. The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. | [optional] - **include_public** | **bool**| Set to true if you would like to include public variables when no user variables are found. | [optional] - **manual_tracking** | **bool**| Set to true if you would like to exlude variables like apps and website names. | [optional] - **source** | **string**| Specify a data source name to only return variables from a specific data source. | [optional] - **effect_or_cause** | **string**| Indicate if you only want variables that have user correlations. Possible values are effect and cause. | [optional] - **public_effect_or_cause** | **string**| Indicate if you only want variables that have aggregated correlations. Possible values are effect and cause. | [optional] - **limit** | **int**| The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. | [optional] - **offset** | **int**| Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. | [optional] + **user_variables** | [**\QuantiModo\Client\Model\UserVariable[]**](../Model/UserVariable.md)| Variable user settings data | + **include_private** | **bool**| Example: | [optional] + **client_id** | **string**| Example: oauth_test_client | [optional] + **include_public** | **bool**| Example: true | [optional] + **search_phrase** | **string**| Example: %Body Fat% | [optional] + **app_name** | **string**| Example: MoodiModo | [optional] + **exact_match** | **bool**| Example: | [optional] + **manual_tracking** | **bool**| Example: | [optional] + **variable_category_name** | **string**| Limit results to a specific variable category | [optional] + **variable_category_id** | **int**| Example: 13 | [optional] + **synonyms** | **string**| Example: %McDonalds hotcake% | [optional] ### Return type -[**\QuantiModo\Client\Model\Variable[]**](../Model/Variable.md) +[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers @@ -537,31 +473,32 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -# **v1VariablesVariableNameGet** -> \QuantiModo\Client\Model\Variable v1VariablesVariableNameGet($variable_name, $access_token, $user_id) +# **resetUserVariableSettings** +> resetUserVariableSettings($variable_id) -Get info about a variable +Reset user settings for a variable to defaults -Get all of the settings and information about a variable by its name. If the logged in user has modified the settings for the variable, these will be provided instead of the default settings for that variable. +Reset user settings for a variable to defaults ### Example ```php setApiKey('access_token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// QuantiModo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer'); +// Configure OAuth2 access token for authorization: quantimodo_oauth2 QuantiModo\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new QuantiModo\Client\Api\VariablesApi(); -$variable_name = "variable_name_example"; // string | Variable name -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id +$variable_id = new \QuantiModo\Client\Model\UserVariableDelete(); // \QuantiModo\Client\Model\UserVariableDelete | Id of the variable whose measurements should be deleted try { - $result = $api_instance->v1VariablesVariableNameGet($variable_name, $access_token, $user_id); - print_r($result); + $api_instance->resetUserVariableSettings($variable_id); } catch (Exception $e) { - echo 'Exception when calling VariablesApi->v1VariablesVariableNameGet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling VariablesApi->resetUserVariableSettings: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -570,17 +507,15 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **variable_name** | **string**| Variable name | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] + **variable_id** | [**\QuantiModo\Client\Model\UserVariableDelete**](../Model/UserVariableDelete.md)| Id of the variable whose measurements should be deleted | ### Return type -[**\QuantiModo\Client\Model\Variable**](../Model/Variable.md) +void (empty response body) ### Authorization -[oauth2](../../README.md#oauth2) +[access_token](../../README.md#access_token), [quantimodo_oauth2](../../README.md#quantimodo_oauth2) ### HTTP request headers diff --git a/docs/Api/VotesApi.md b/docs/Api/VotesApi.md deleted file mode 100644 index 4b000d8..0000000 --- a/docs/Api/VotesApi.md +++ /dev/null @@ -1,114 +0,0 @@ -# QuantiModo\Client\VotesApi - -All URIs are relative to *https://app.quantimo.do/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**v1VotesDeletePost**](VotesApi.md#v1VotesDeletePost) | **POST** /v1/votes/delete | Delete vote -[**v1VotesPost**](VotesApi.md#v1VotesPost) | **POST** /v1/votes | Post or update vote - - -# **v1VotesDeletePost** -> \QuantiModo\Client\Model\CommonResponse v1VotesDeletePost($body, $access_token, $user_id) - -Delete vote - -Delete previously posted vote - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\VotesApi(); -$body = new \QuantiModo\Client\Model\VoteDelete(); // \QuantiModo\Client\Model\VoteDelete | The cause and effect variable names for the predictor vote to be deleted. -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $result = $api_instance->v1VotesDeletePost($body, $access_token, $user_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling VotesApi->v1VotesDeletePost: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\VoteDelete**](../Model/\QuantiModo\Client\Model\VoteDelete.md)| The cause and effect variable names for the predictor vote to be deleted. | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - -### Return type - -[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **v1VotesPost** -> \QuantiModo\Client\Model\CommonResponse v1VotesPost($body, $access_token, $user_id) - -Post or update vote - -This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. - -### Example -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - -$api_instance = new QuantiModo\Client\Api\VotesApi(); -$body = new \QuantiModo\Client\Model\PostVote(); // \QuantiModo\Client\Model\PostVote | Contains the cause variable, effect variable, and vote value. -$access_token = "access_token_example"; // string | User's OAuth2 access token -$user_id = 56; // int | User's id - -try { - $result = $api_instance->v1VotesPost($body, $access_token, $user_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling VotesApi->v1VotesPost: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\QuantiModo\Client\Model\PostVote**](../Model/\QuantiModo\Client\Model\PostVote.md)| Contains the cause variable, effect variable, and vote value. | - **access_token** | **string**| User's OAuth2 access token | [optional] - **user_id** | **int**| User's id | [optional] - -### Return type - -[**\QuantiModo\Client\Model\CommonResponse**](../Model/CommonResponse.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - diff --git a/docs/Model/MeasurementSource.md b/docs/Model/Animation.md similarity index 77% rename from docs/Model/MeasurementSource.md rename to docs/Model/Animation.md index adb5b12..b8ba527 100644 --- a/docs/Model/MeasurementSource.md +++ b/docs/Model/Animation.md @@ -1,9 +1,9 @@ -# MeasurementSource +# Animation ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Name of the application or device. | +**duration** | **int** | Example: 0 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/TrackingReminderNotificationSnooze.md b/docs/Model/Button.md similarity index 69% rename from docs/Model/TrackingReminderNotificationSnooze.md rename to docs/Model/Button.md index 59f0117..18c5e99 100644 --- a/docs/Model/TrackingReminderNotificationSnooze.md +++ b/docs/Model/Button.md @@ -1,9 +1,10 @@ -# TrackingReminderNotificationSnooze +# Button ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Id of the PENDING reminder to be snoozed | +**link** | **string** | Example: https://local.quantimo.do | +**text** | **string** | Example: Start Tracking | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/Chart.md b/docs/Model/Chart.md new file mode 100644 index 0000000..b6b8d50 --- /dev/null +++ b/docs/Model/Chart.md @@ -0,0 +1,18 @@ +# Chart + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**animation** | [**\QuantiModo\Client\Model\Animation**](Animation.md) | | +**chart_config** | [**\QuantiModo\Client\Model\ChartConfig**](ChartConfig.md) | | +**chart_id** | **string** | Example: correlationScatterPlot | +**chart_title** | **string** | Example: Reference And Learning Hours following Barometric Pressure (R = 0.147) | +**explanation** | **string** | Example: The chart above indicates that an increase in Barometric Pressure is usually followed by an increase in Reference And Learning Hours. | +**height** | **int** | Example: 300 | +**render_to** | **string** | Example: BarContainer | +**type** | **string** | Example: scatter | +**zoom_type** | **string** | Example: xy | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/ChartConfig.md b/docs/Model/ChartConfig.md new file mode 100644 index 0000000..e410e62 --- /dev/null +++ b/docs/Model/ChartConfig.md @@ -0,0 +1,16 @@ +# ChartConfig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loading** | **bool** | Example: false | +**options** | [**\QuantiModo\Client\Model\Option**](Option.md) | | +**series** | [**\QuantiModo\Client\Model\Series[]**](Series.md) | | +**subtitle** | [**\QuantiModo\Client\Model\Subtitle**](Subtitle.md) | | +**title** | [**\QuantiModo\Client\Model\Title**](Title.md) | | +**x_axis** | [**\QuantiModo\Client\Model\XAxi**](XAxi.md) | | +**y_axis** | [**\QuantiModo\Client\Model\YAxi**](YAxi.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/TrackingReminderNotificationSkip.md b/docs/Model/ChartStyle.md similarity index 73% rename from docs/Model/TrackingReminderNotificationSkip.md rename to docs/Model/ChartStyle.md index 974811a..87a86be 100644 --- a/docs/Model/TrackingReminderNotificationSkip.md +++ b/docs/Model/ChartStyle.md @@ -1,9 +1,9 @@ -# TrackingReminderNotificationSkip +# ChartStyle ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Id of the PENDING reminder to be skipped | +**background** | **string** | Example: url(/res/loading3.gif) no-repeat center | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/Column.md b/docs/Model/Column.md new file mode 100644 index 0000000..9f37e4b --- /dev/null +++ b/docs/Model/Column.md @@ -0,0 +1,14 @@ +# Column + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**border_width** | **int** | Example: 0 | +**color_by_point** | **bool** | Example: true | +**enable_mouse_tracking** | **bool** | Example: true | +**point_padding** | **double** | Example: 0.2 | +**point_width** | **double** | Example: 33.333333333333 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/CommonResponse.md b/docs/Model/CommonResponse.md index e963d80..0d9c199 100644 --- a/docs/Model/CommonResponse.md +++ b/docs/Model/CommonResponse.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **int** | Status code | +**data** | [**\QuantiModo\Client\Model\GetStudyDataResponse**](GetStudyDataResponse.md) | | [optional] **message** | **string** | Message | [optional] +**status** | **int** | Status code | **success** | **bool** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/CommonVariable.md b/docs/Model/CommonVariable.md new file mode 100644 index 0000000..94f6da3 --- /dev/null +++ b/docs/Model/CommonVariable.md @@ -0,0 +1,136 @@ +# CommonVariable + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**alias** | **string** | Example: | +**available_units** | [**\QuantiModo\Client\Model\Unit[]**](Unit.md) | | +**category** | **string** | Example: Sleep | [optional] +**cause_only** | **int** | A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user. | +**charts_link_dynamic** | **string** | Example: https://local.quantimo.do/ionic/Modo/www/#/app/charts/Barometric%20Pressure?variableName=Barometric%20Pressure&userId=230&pngUrl=https%3A%2F%2Fapp.quantimo.do%2Fionic%2FModo%2Fwww%2Fimg%2Fvariable_categories%2Fenvironment.png | +**charts_link_email** | **string** | Example: mailto:?subject=Check%20out%20my%20Barometric%20Pressure%20data%21&body=See%20my%20Barometric%20Pressure%20history%20at%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DBarometric%2520Pressure%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Fenvironment.png%0A%0AHave%20a%20great%20day! | +**charts_link_facebook** | **string** | Example: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DBarometric%2520Pressure%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Fenvironment.png | +**charts_link_google** | **string** | Example: https://plus.google.com/share?url=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DBarometric%2520Pressure%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Fenvironment.png | +**charts_link_static** | **string** | Example: https://local.quantimo.do/api/v2/charts?variableName=Barometric%20Pressure&userId=230&pngUrl=https%3A%2F%2Fapp.quantimo.do%2Fionic%2FModo%2Fwww%2Fimg%2Fvariable_categories%2Fenvironment.png | +**charts_link_twitter** | **string** | Example: https://twitter.com/home?status=Check%20out%20my%20Barometric%20Pressure%20data%21%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DBarometric%2520Pressure%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Fenvironment.png%20%40quantimodo | +**child_user_tag_variables** | [**\QuantiModo\Client\Model\UserVariableArray**](UserVariableArray.md) | | +**client_id** | **string** | Example: local | +**combination_operation** | **string** | Way to aggregate measurements over time. Options are \"MEAN\" or \"SUM\". SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED. | +**common_alias** | **string** | Example: Mood_(psychology) | [optional] +**common_tagged_variables** | [**\QuantiModo\Client\Model\CommonVariableArray**](CommonVariableArray.md) | | +**common_tag_variables** | [**\QuantiModo\Client\Model\CommonVariableArray**](CommonVariableArray.md) | | +**common_variable_most_common_connector_id** | **int** | Example: 13 | +**common_variable_updated_at** | [**\DateTime**](\DateTime.md) | Example: 2017-07-30 20:47:38 | +**created_at** | [**\DateTime**](\DateTime.md) | Example: 2014-10-23 03:41:06 | [optional] +**data_source** | [**\QuantiModo\Client\Model\DataSource**](DataSource.md) | | +**highcharts** | [**\QuantiModo\Client\Model\HighchartArray**](HighchartArray.md) | | [optional] +**unit_abbreviated_name** | **string** | Abbreviated name of the default unit for the variable | +**unit_category_id** | **int** | Example: 1 | [optional] +**unit_category_name** | **string** | Example: Duration | [optional] +**unit_id** | **int** | Id of the default unit for the variable | +**unit_name** | **string** | Example: Hours | [optional] +**description** | **string** | Example: positive | [optional] +**duration_of_action** | **int** | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | +**duration_of_action_in_hours** | **int** | Example: 168 | [optional] +**earliest_filling_time** | **int** | Example: 1362099600 | +**earliest_measurement_time** | **int** | Earliest measurement time | +**earliest_source_time** | **int** | Example: 1334473200 | +**experiment_end_time** | [**\DateTime**](\DateTime.md) | Example: | +**experiment_end_time_seconds** | [**\DateTime**](\DateTime.md) | Example: | +**experiment_end_time_string** | [**\DateTime**](\DateTime.md) | Example: | +**experiment_start_time** | [**\DateTime**](\DateTime.md) | Example: | +**experiment_start_time_seconds** | [**\DateTime**](\DateTime.md) | Example: | +**experiment_start_time_string** | [**\DateTime**](\DateTime.md) | Example: | +**filling_type** | **string** | Example: | +**filling_value** | **double** | When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. | +**id** | **int** | Variable ID | [optional] +**image_url** | **string** | | [optional] +**informational_url** | **string** | Example: | +**ingredient_of_user_tag_variables** | [**\QuantiModo\Client\Model\UserVariableArray**](UserVariableArray.md) | | +**ingredient_user_tag_variables** | [**\QuantiModo\Client\Model\UserVariableArray**](UserVariableArray.md) | | +**input_type** | **string** | Example: slider | [optional] +**ion_icon** | **string** | | [optional] +**joined_user_tag_variables** | [**\QuantiModo\Client\Model\UserVariableArray**](UserVariableArray.md) | | +**joined_variables** | [**\QuantiModo\Client\Model\CommonVariable[]**](CommonVariable.md) | Array of Variables that are joined with this Variable | +**join_with** | **string** | The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables. | +**kurtosis** | **double** | Example: 10.764488721491 | [optional] +**last_original_unit_id** | **int** | Example: 47 | +**last_original_value** | **double** | Example: 100900 | +**last_processed_daily_value** | **double** | Example: 100900 | +**last_source** | **int** | Last source | +**last_successful_update_time** | [**\DateTime**](\DateTime.md) | Example: 2017-02-08 17:43:01 | +**last_unit** | **string** | Last unit | +**last_unit_id** | **int** | Example: 47 | +**last_value** | **int** | Last value | +**latest_filling_time** | **int** | Example: 1501722000 | +**latest_measurement_time** | **int** | Latest measurement time | +**latest_source_time** | **int** | Example: 1501722000 | +**latest_user_measurement_time** | **int** | Example: 1501722000 | +**manual_tracking** | **bool** | Example: 1 | [optional] +**maximum_allowed_value** | **double** | The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. | +**maximum_recorded_value** | **double** | Example: 104700 | +**mean** | **double** | Example: 2202.3886251393 | [optional] +**measurements_at_last_analysis** | **int** | Example: 9795 | +**median** | **double** | Example: 2255.9284755781 | [optional] +**minimum_allowed_value** | **double** | The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. | +**minimum_recorded_value** | **double** | Example: 1008.74 | +**most_common_connector_id** | **int** | Example: 7 | [optional] +**most_common_original_unit_id** | **int** | Example: 2 | [optional] +**most_common_unit** | **string** | Most common unit | +**most_common_value** | **int** | Most common value | +**name** | **string** | User-defined variable display name. | +**number_of_aggregate_correlations_as_cause** | **int** | Example: 386 | [optional] +**number_of_aggregate_correlations_as_effect** | **int** | Example: 2074 | [optional] +**number_of_changes** | **int** | Example: 1317 | +**number_of_correlations** | **int** | Number of correlations | +**number_of_measurements** | **int** | Example: 308554 | [optional] +**number_of_processed_daily_measurements** | **int** | Example: 1364 | +**number_of_raw_measurements** | **int** | Number of measurements | +**number_of_tracking_reminders** | **int** | Example: 6 | [optional] +**number_of_unique_daily_values** | **int** | Example: 283 | +**number_of_unique_values** | **int** | Example: 74 | [optional] +**number_of_user_correlations_as_cause** | **int** | Example: 155 | +**number_of_user_correlations_as_effect** | **int** | Example: 0 | +**number_of_user_variables** | **int** | Example: 307 | [optional] +**onset_delay** | **int** | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | +**onset_delay_in_hours** | **int** | Example: 0 | +**outcome** | **int** | Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. | +**outcome_of_interest** | **int** | Example: 0 | +**parent** | **int** | Id of the parent variable if this variable has any parent | +**parent_id** | **string** | Example: | +**parent_user_tag_variables** | [**\QuantiModo\Client\Model\UserVariableArray**](UserVariableArray.md) | | +**png_path** | **string** | Example: img/variable_categories/sleep.png | [optional] +**png_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/sleep.png | [optional] +**predictor_of_interest** | **int** | Example: 0 | +**price** | **string** | Example: | +**product_url** | **string** | Example: | +**public** | **bool** | Example: 1 | [optional] +**raw_measurements_at_last_analysis** | **int** | The number of measurements that a given user had for this variable the last time a correlation calculation was performed. Generally correlation values are only updated once the current number of measurements for a variable is more than 10% greater than the rawMeasurementsAtLastAnalysis. This avoids a computationally-demanding recalculation when there's not enough new data to make a significant difference in the correlation. | +**second_most_common_value** | **double** | Example: 8 | [optional] +**second_to_last_value** | **double** | Example: 101800 | +**share_user_measurements** | **bool** | Example: false | +**skewness** | **double** | Example: 0.2461351905455 | [optional] +**sources** | **string** | Comma-separated list of source names to limit variables to those sources | +**standard_deviation** | **double** | Example: 1840.535129803 | [optional] +**status** | **string** | Example: UPDATED | +**subtitle** | **string** | Based on sort filter and can be shown beneath variable name on search list | [optional] +**sub_variables** | [**\QuantiModo\Client\Model\CommonVariable[]**](CommonVariable.md) | Array of Variables that are sub variables to this Variable | +**svg_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/sleep.svg | [optional] +**third_most_common_value** | **double** | Example: 7 | [optional] +**third_to_last_value** | **double** | Example: 102000 | +**updated** | **int** | When this variable or its settings were last updated | +**updated_at** | [**\DateTime**](\DateTime.md) | Example: 2017-07-31 03:57:06 | [optional] +**user_id** | **int** | Example: 230 | +**valence** | **string** | Example: positive | [optional] +**variable_category_id** | **int** | Example: 6 | [optional] +**variable_category_image_url** | **string** | Example: https://maxcdn.icons8.com/Color/PNG/96/Household/sleeping_in_bed-96.png | [optional] +**variable_category_name** | **string** | Variable category like Mood, Sleep, Physical Activity, Treatment, Symptom, etc. | +**variable_filling_value** | **double** | Example: -1 | +**variable_id** | **int** | Example: 96380 | +**variable_name** | **string** | Example: Sleep Duration | [optional] +**variance** | **double** | Example: 115947037.40816 | [optional] +**wikipedia_title** | **string** | Example: | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/UserTokenRequestInnerUserField.md b/docs/Model/CommonVariableArray.md similarity index 76% rename from docs/Model/UserTokenRequestInnerUserField.md rename to docs/Model/CommonVariableArray.md index e17c5ab..bb3a04d 100644 --- a/docs/Model/UserTokenRequestInnerUserField.md +++ b/docs/Model/CommonVariableArray.md @@ -1,9 +1,8 @@ -# UserTokenRequestInnerUserField +# CommonVariableArray ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | WordPress user ID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/Connection.md b/docs/Model/Connection.md deleted file mode 100644 index 11ca604..0000000 --- a/docs/Model/Connection.md +++ /dev/null @@ -1,20 +0,0 @@ -# Connection - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | id | [optional] -**user_id** | **int** | ID of user that owns this correlation | [optional] -**connector_id** | **int** | The id for the connector data source for which the connection is connected | [optional] -**connect_status** | **string** | Indicates whether a connector is currently connected to a service for a user. | [optional] -**connect_error** | **string** | Error message if there is a problem with authorizing this connection. | [optional] -**update_requested_at** | [**\DateTime**](\DateTime.md) | Time at which an update was requested by a user. | [optional] -**update_status** | **string** | Indicates whether a connector is currently updated. | [optional] -**update_error** | **string** | Indicates if there was an error during the update. | [optional] -**last_successful_updated_at** | [**\DateTime**](\DateTime.md) | The time at which the connector was last successfully updated. | [optional] -**created_at** | [**\DateTime**](\DateTime.md) | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] -**updated_at** | [**\DateTime**](\DateTime.md) | When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/Connector.md b/docs/Model/Connector.md index 2aa6661..cdb55ed 100644 --- a/docs/Model/Connector.md +++ b/docs/Model/Connector.md @@ -3,16 +3,37 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Connector ID number | -**name** | **string** | Connector lowercase system name | -**display_name** | **string** | Connector pretty display name | -**image** | **string** | URL to the image of the connector logo | -**get_it_url** | **string** | URL to a site where one can get this device or application | +**affiliate** | **bool** | Example: false | [optional] +**buttons** | [**\QuantiModo\Client\Model\Button[]**](Button.md) | | [optional] +**client_id** | **string** | Example: ghostInspector | [optional] **connected** | **string** | True if the authenticated user has this connector enabled | +**connect_error** | **string** | Example: Your token is expired. Please re-connect | [optional] **connect_instructions** | **string** | URL and parameters used when connecting to a service | +**connector_client_id** | **string** | Example: 225078261031461 | [optional] +**connector_id** | **int** | Example: 8 | [optional] +**connect_status** | **string** | Example: CONNECTED | [optional] +**created_at** | [**\DateTime**](\DateTime.md) | Example: 2000-01-01 00:00:00 | [optional] +**default_variable_category_name** | **string** | Example: Social Interactions | [optional] +**display_name** | **string** | Connector pretty display name | +**enabled** | **int** | Example: 1 | [optional] +**get_it_url** | **string** | URL to a site where one can get this device or application | +**id** | **int** | Connector ID number | +**image** | **string** | URL to the image of the connector logo | +**image_html** | **string** | Example: <a href=\"http://www.facebook.com\"><img id=\"facebook_image\" title=\"Facebook\" src=\"https://i.imgur.com/GhwqK4f.png\" alt=\"Facebook\"></a> | [optional] +**last_successful_updated_at** | [**\DateTime**](\DateTime.md) | Example: 2017-07-31 10:10:34 | [optional] **last_update** | **int** | Epoch timestamp of last sync | +**linked_display_name_html** | **string** | Example: <a href=\"http://www.facebook.com\">Facebook</a> | [optional] +**long_description** | **string** | Example: Facebook is a social networking website where users may create a personal profile, add other users as friends, and exchange messages. | [optional] +**message** | **string** | Example: Got 412 new measurements on 2017-07-31 10:10:34 | [optional] +**name** | **string** | Connector lowercase system name | +**oauth** | **object** | Example: {} | [optional] +**scopes** | [**\QuantiModo\Client\Model\Scope[]**](Scope.md) | | [optional] +**short_description** | **string** | Example: Tracks social interaction. QuantiModo requires permission to access your Facebook \"user likes\" and \"user posts\". | [optional] **total_measurements_in_last_update** | **int** | Number of measurements obtained during latest update | -**no_data_yet** | **bool** | True if user has no measurements for this connector | +**updated_at** | [**\DateTime**](\DateTime.md) | Example: 2017-07-31 10:10:34 | [optional] +**update_requested_at** | [**\DateTime**](\DateTime.md) | Example: 2017-07-18 05:16:31 | [optional] +**update_status** | **string** | Example: UPDATED | [optional] +**user_id** | **int** | Example: 230 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/ConnectorArray.md b/docs/Model/ConnectorArray.md new file mode 100644 index 0000000..32a4365 --- /dev/null +++ b/docs/Model/ConnectorArray.md @@ -0,0 +1,9 @@ +# ConnectorArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/ConnectorInfo.md b/docs/Model/ConnectorInfo.md deleted file mode 100644 index b924a41..0000000 --- a/docs/Model/ConnectorInfo.md +++ /dev/null @@ -1,13 +0,0 @@ -# ConnectorInfo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Connector ID number | -**connected** | **bool** | True if the authenticated user has this connector enabled | -**error** | **string** | Error message. Empty if connected. | -**history** | [**\QuantiModo\Client\Model\ConnectorInfoHistoryItem[]**](ConnectorInfoHistoryItem.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/ConnectorInfoHistoryItem.md b/docs/Model/ConnectorInfoHistoryItem.md deleted file mode 100644 index 8011652..0000000 --- a/docs/Model/ConnectorInfoHistoryItem.md +++ /dev/null @@ -1,13 +0,0 @@ -# ConnectorInfoHistoryItem - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**number_of_measurements** | **int** | Number of measurements | -**success** | **bool** | True if the update was successfull | -**message** | **string** | Error message. | -**created_at** | **string** | Date and time of the update in UTC time zone | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/ConnectorInstruction.md b/docs/Model/ConnectorInstruction.md index 4208e6e..6387a69 100644 --- a/docs/Model/ConnectorInstruction.md +++ b/docs/Model/ConnectorInstruction.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **string** | url | [optional] **parameters** | **string[]** | parameters array | [optional] +**url** | **string** | url | [optional] **use_popup** | **bool** | usePopup | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/Correlation.md b/docs/Model/Correlation.md index cc74aa3..a5995cb 100644 --- a/docs/Model/Correlation.md +++ b/docs/Model/Correlation.md @@ -3,71 +3,178 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**average_daily_low_cause** | **float** | | [optional] -**average_daily_high_cause** | **float** | | [optional] -**average_effect** | **float** | | [optional] -**average_effect_following_high_cause** | **float** | | [optional] -**average_effect_following_low_cause** | **float** | | [optional] -**average_effect_following_high_cause_explanation** | **string** | | [optional] -**average_effect_following_low_cause_explanation** | **string** | | [optional] -**average_vote** | **float** | Average Vote | [optional] +**average_daily_high_cause** | **double** | Example: 4.19 | +**average_daily_low_cause** | **double** | Example: 1.97 | +**average_effect** | **double** | Example: 3.0791054117396 | +**average_effect_following_high_cause** | **double** | Example: 3.55 | +**average_effect_following_high_cause_explanation** | **string** | Example: Overall Mood is 3.55/5 (15% higher) on average after days with around 4.19/5 Sleep Quality | +**average_effect_following_low_cause** | **double** | Example: 2.65 | +**average_effect_following_low_cause_explanation** | **string** | Example: Overall Mood is 2.65/5 (14% lower) on average after days with around 1.97/5 Sleep Quality | +**average_forward_pearson_correlation_over_onset_delays** | **double** | Example: 0.396 | +**average_reverse_pearson_correlation_over_onset_delays** | **double** | Example: 0.453667 | +**average_vote** | **string** | Example: 0.9855 | +**cause_changes** | **int** | Example: 164 | +**cause_data_source** | [**\QuantiModo\Client\Model\DataSource**](DataSource.md) | | [optional] +**cause_user_variable_share_user_measurements** | **int** | Example: 1 | +**cause_variable_category_id** | **int** | Example: 6 | +**cause_variable_category_name** | **string** | Example: Sleep | +**cause_variable_combination_operation** | **string** | Example: MEAN | +**cause_variable_unit_abbreviated_name** | **string** | Example: /5 | +**cause_variable_unit_id** | **int** | Example: 10 | +**cause_variable_unit_name** | **string** | Example: 1 to 5 Rating | +**cause_variable_id** | **int** | Example: 1448 | +**cause_variable_image_url** | **string** | Example: https://maxcdn.icons8.com/Color/PNG/96/Household/sleeping_in_bed-96.png | +**cause_variable_ion_icon** | **string** | Example: ion-ios-cloudy-night-outline | +**cause_variable_most_common_connector_id** | **int** | Example: 6 | +**cause_variable_name** | **string** | Example: Sleep Quality | +**confidence_interval** | **double** | Example: 0.14344467795996 | +**confidence_level** | **string** | Example: high | +**correlation_coefficient** | **double** | Example: 0.538 | +**correlation_is_contradictory_to_optimal_values** | **bool** | Example: false | [optional] +**created_at** | [**\DateTime**](\DateTime.md) | Example: 2016-12-28 20:47:30 | +**critical_t_value** | **double** | Example: 1.646 | +**data_analysis** | **string** | Example: It was assumed that 0 hours would pass before a change in Sleep Quality would produce an observable change in Overall Mood. It was assumed that Sleep Quality could produce an observable change in Overall Mood for as much as 7 days after the stimulus event. | +**data_sources** | **string** | Example: Sleep Quality data was primarily collected using <a href=\"http://www.amazon.com/gp/product/B00A17IAO0/ref=as_li_qf_sp_asin_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00A17IAO0&linkCode=as2&tag=quant08-20\">Up by Jawbone</a>. UP by Jawbone is a wristband and app that tracks how you sleep, move and eat and then helps you use that information to feel your best.<br>Overall Mood data was primarily collected using <a href=\"https://quantimo.do\">QuantiModo</a>. <a href=\"https://quantimo.do\">QuantiModo</a> is a Chrome extension, Android app, iOS app, and web app that allows you to easily track mood, symptoms, or any outcome you want to optimize in a fraction of a second. You can also import your data from over 30 other apps and devices like Fitbit, Rescuetime, Jawbone Up, Withings, Facebook, Github, Google Calendar, Runkeeper, MoodPanda, Slice, Google Fit, and more. <a href=\"https://quantimo.do\">QuantiModo</a> then analyzes your data to identify which hidden factors are most likely to be influencing your mood or symptoms and their optimal daily values. | +**data_sources_paragraph_for_cause** | **string** | Example: Sleep Quality data was primarily collected using <a href=\"http://www.amazon.com/gp/product/B00A17IAO0/ref=as_li_qf_sp_asin_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00A17IAO0&linkCode=as2&tag=quant08-20\">Up by Jawbone</a>. UP by Jawbone is a wristband and app that tracks how you sleep, move and eat and then helps you use that information to feel your best. | +**data_sources_paragraph_for_effect** | **string** | Example: Overall Mood data was primarily collected using <a href=\"https://quantimo.do\">QuantiModo</a>. <a href=\"https://quantimo.do\">QuantiModo</a> is a Chrome extension, Android app, iOS app, and web app that allows you to easily track mood, symptoms, or any outcome you want to optimize in a fraction of a second. You can also import your data from over 30 other apps and devices like Fitbit, Rescuetime, Jawbone Up, Withings, Facebook, Github, Google Calendar, Runkeeper, MoodPanda, Slice, Google Fit, and more. <a href=\"https://quantimo.do\">QuantiModo</a> then analyzes your data to identify which hidden factors are most likely to be influencing your mood or symptoms and their optimal daily values. | +**direction** | **string** | Example: higher | +**duration_of_action** | **int** | Example: 604800 | +**duration_of_action_in_hours** | **int** | Example: 168 | +**effect_changes** | **int** | Example: 193 | +**effect_data_source** | [**\QuantiModo\Client\Model\DataSource**](DataSource.md) | | [optional] +**effect_size** | **string** | Example: moderately positive | +**effect_unit** | **string** | Example: /5 | +**effect_user_variable_share_user_measurements** | **int** | Example: 1 | +**effect_variable_category_id** | **int** | Example: 1 | +**effect_variable_category_name** | **string** | Example: Emotions | +**effect_variable_combination_operation** | **string** | Example: MEAN | +**effect_variable_common_alias** | **string** | Example: Mood_(psychology) | +**effect_variable_unit_abbreviated_name** | **string** | Example: /5 | +**effect_variable_unit_id** | **int** | Example: 10 | +**effect_variable_unit_name** | **string** | Example: 1 to 5 Rating | +**effect_variable_id** | **int** | Example: 1398 | +**effect_variable_image_url** | **string** | Example: https://maxcdn.icons8.com/Color/PNG/96/Cinema/theatre_mask-96.png | +**effect_variable_ion_icon** | **string** | Example: ion-happy-outline | +**effect_variable_most_common_connector_id** | **int** | Example: 10 | +**effect_variable_name** | **string** | Example: Overall Mood | +**experiment_end_time** | [**\DateTime**](\DateTime.md) | Example: 2014-07-30 12:50:00 | +**experiment_start_time** | [**\DateTime**](\DateTime.md) | Example: 2012-05-06 21:15:00 | +**forward_spearman_correlation_coefficient** | **double** | Example: 0.528359 | +**gauge_image** | **string** | Example: https://s3.amazonaws.com/quantimodo-docs/images/gauge-moderately-positive-relationship.png | +**gauge_image_square** | **string** | Example: https://s3.amazonaws.com/quantimodo-docs/images/gauge-moderately-positive-relationship-200-200.png | +**image_url** | **string** | Example: https://s3-us-west-1.amazonaws.com/qmimages/variable_categories_gauges_logo_background/gauge-moderately-positive-relationship_sleep_emotions_logo_background.png | +**instructions_for_cause** | **string** | Example: <a href=\"http://www.amazon.com/gp/product/B00A17IAO0/ref=as_li_qf_sp_asin_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00A17IAO0&linkCode=as2&tag=quant08-20\">Obtain Up by Jawbone</a> and use it to record your Sleep Quality. Once you have a <a href=\"http://www.amazon.com/gp/product/B00A17IAO0/ref=as_li_qf_sp_asin_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00A17IAO0&linkCode=as2&tag=quant08-20\">Up by Jawbone</a> account, <a href=\"https://app.quantimo.do/ionic/Modo/www/#/app/import\">connect your Up by Jawbone account at QuantiModo</a> to automatically import and analyze your data. | +**instructions_for_effect** | **string** | Example: <a href=\"https://quantimo.do\">Obtain QuantiModo</a> and use it to record your Overall Mood. Once you have a <a href=\"https://quantimo.do\">QuantiModo</a> account, <a href=\"https://app.quantimo.do/ionic/Modo/www/#/app/import\">connect your QuantiModo account at QuantiModo</a> to automatically import and analyze your data. | +**number_of_pairs** | **int** | Example: 298 | +**onset_delay** | **int** | Example: 0 | +**onset_delay_in_hours** | **int** | Example: 0 | +**onset_delay_with_strongest_pearson_correlation** | **int** | Example: -86400 | +**onset_delay_with_strongest_pearson_correlation_in_hours** | **int** | Example: -24 | +**optimal_pearson_product** | **double** | Example: 0.68582816186982 | +**outcome_filling_value** | **int** | Example: -1 | +**outcome_maximum_allowed_value** | **double** | Example: 23 | [optional] +**outcome_minimum_allowed_value** | **double** | Example: 0.1 | [optional] +**pearson_correlation_with_no_onset_delay** | **double** | Example: 0.477 | +**predictive_pearson_correlation** | **double** | Example: 0.538 | +**predictive_pearson_correlation_coefficient** | **double** | Example: 0.538 | +**predictor_data_sources** | **string** | Example: RescueTime | +**predictor_explanation** | **string** | Example: Sleep Quality Predicts Higher Overall Mood | +**predictor_filling_value** | **int** | Example: -1 | +**predictor_maximum_allowed_value** | **double** | Example: 200 | +**predictor_minimum_allowed_value** | **double** | Example: 30 | +**predicts_high_effect_change** | **int** | Example: 17 | +**predicts_high_effect_change_sentence_fragment** | **string** | Example: , on average, 17% | +**predicts_low_effect_change** | **int** | Example: -11 | +**predicts_low_effect_change_sentence_fragment** | **string** | Example: , on average, 11% | +**p_value** | **double** | Example: 0.39628900511586 | [optional] +**qm_score** | **double** | Example: 0.528 | +**reverse_pearson_correlation_coefficient** | **double** | Example: 0.01377184270977 | +**share_user_measurements** | **bool** | Example: 1 | +**significance_explanation** | **string** | Example: Using a two-tailed t-test with alpha = 0.05, it was determined that the change in Overall Mood is statistically significant at 95% confidence interval. | +**significant_difference** | **bool** | Example: 1 | +**statistical_significance** | **double** | Example: 0.9813 | +**strength_level** | **string** | Example: moderate | +**strongest_pearson_correlation_coefficient** | **double** | Example: 0.613 | +**study_abstract** | **string** | Example: Your data suggests with a high degree of confidence (p=0) that Sleep Quality (Sleep) has a moderately positive predictive relationship (R=0.538) with Overall Mood (Emotions). The highest quartile of Overall Mood measurements were observed following an average 4.14/5 Sleep Quality. The lowest quartile of Overall Mood measurements were observed following an average 3.03/5 Sleep Quality. | +**study_design** | **string** | Example: This study is based on data donated by one QuantiModo user. Thus, the study design is consistent with an n=1 observational natural experiment. | +**study_limitations** | **string** | Example: As with any human experiment, it was impossible to control for all potentially confounding variables. Correlation does not necessarily imply correlation. We can never know for sure if one factor is definitely the cause of an outcome. However, lack of correlation definitely implies the lack of a causal relationship. Hence, we can with great confidence rule out non-existent relationships. For instance, if we discover no relationship between mood and an antidepressant this information is just as or even more valuable than the discovery that there is a relationship. <br> <br> We can also take advantage of several characteristics of time series data from many subjects to infer the likelihood of a causal relationship if we do find a correlational relationship. The criteria for causation are a group of minimal conditions necessary to provide adequate evidence of a causal relationship between an incidence and a possible consequence. The list of the criteria is as follows: <br> 1. Strength (effect size): A small association does not mean that there is not a causal effect, though the larger the association, the more likely that it is causal. <br> 2. Consistency (reproducibility): Consistent findings observed by different persons in different places with different samples strengthens the likelihood of an effect. <br> 3. Specificity: Causation is likely if a very specific population at a specific site and disease with no other likely explanation. The more specific an association between a factor and an effect is, the bigger the probability of a causal relationship. <br> 4. Temporality: The effect has to occur after the cause (and if there is an expected delay between the cause and expected effect, then the effect must occur after that delay). <br> 5. Biological gradient: Greater exposure should generally lead to greater incidence of the effect. However, in some cases, the mere presence of the factor can trigger the effect. In other cases, an inverse proportion is observed: greater exposure leads to lower incidence. <br> 6. Plausibility: A plausible mechanism between cause and effect is helpful. <br> 7. Coherence: Coherence between epidemiological and laboratory findings increases the likelihood of an effect. <br> 8. Experiment: \"Occasionally it is possible to appeal to experimental evidence\". <br> 9. Analogy: The effect of similar factors may be considered. <br> <br> The confidence in a causal relationship is bolstered by the fact that time-precedence was taken into account in all calculations. Furthermore, in accordance with the law of large numbers (LLN), the predictive power and accuracy of these results will continually grow over time. 298 paired data points were used in this analysis. Assuming that the relationship is merely coincidental, as the participant independently modifies their Sleep Quality values, the observed strength of the relationship will decline until it is below the threshold of significance. To it another way, in the case that we do find a spurious correlation, suggesting that banana intake improves mood for instance, one will likely increase their banana intake. Due to the fact that this correlation is spurious, it is unlikely that you will see a continued and persistent corresponding increase in mood. So over time, the spurious correlation will naturally dissipate.Furthermore, it will be very enlightening to aggregate this data with the data from other participants with similar genetic, diseasomic, environmentomic, and demographic profiles. | +**study_link_dynamic** | **string** | Example: https://local.quantimo.do/ionic/Modo/www/index.html#/app/study?causeVariableName=Sleep%20Quality&effectVariableName=Overall%20Mood&userId=230 | +**study_link_email** | **string** | Example: mailto:?subject=N1%20Study%3A%20Sleep%20Quality%20Predicts%20Higher%20Overall%20Mood&body=Check%20out%20my%20study%20at%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230%0A%0AHave%20a%20great%20day! | +**study_link_facebook** | **string** | Example: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230 | +**study_link_google** | **string** | Example: https://plus.google.com/share?url=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230 | +**study_link_static** | **string** | Example: https://local.quantimo.do/api/v2/study?causeVariableName=Sleep%20Quality&effectVariableName=Overall%20Mood&userId=230 | +**study_link_twitter** | **string** | Example: https://twitter.com/home?status=Sleep%20Quality%20Predicts%20Higher%20Overall%20Mood%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230%20%40quantimodo | +**study_objective** | **string** | Example: The objective of this study is to determine the nature of the relationship (if any) between the Sleep Quality and the Overall Mood. Additionally, we attempt to determine the Sleep Quality values most likely to produce optimal Overall Mood values. | +**study_results** | **string** | Example: This analysis suggests that higher Sleep Quality (Sleep) generally predicts higher Overall Mood (p = 0). Overall Mood is, on average, 17% higher after around 4.14 Sleep Quality. After an onset delay of 168 hours, Overall Mood is, on average, 11% lower than its average over the 168 hours following around 3.03 Sleep Quality. 298 data points were used in this analysis. The value for Sleep Quality changed 164 times, effectively running 82 separate natural experiments. The top quartile outcome values are preceded by an average 4.14 /5 of Sleep Quality. The bottom quartile outcome values are preceded by an average 3.03 /5 of Sleep Quality. Forward Pearson Correlation Coefficient was 0.538 (p=0, 95% CI 0.395 to 0.681 onset delay = 0 hours, duration of action = 168 hours) . The Reverse Pearson Correlation Coefficient was 0 (P=0, 95% CI -0.143 to 0.143, onset delay = -0 hours, duration of action = -168 hours). When the Sleep Quality value is closer to 4.14 /5 than 3.03 /5, the Overall Mood value which follows is, on average, 17% percent higher than its typical value. When the Sleep Quality value is closer to 3.03 /5 than 4.14 /5, the Overall Mood value which follows is 0% lower than its typical value. Overall Mood is 3.55/5 (15% higher) on average after days with around 4.19/5 Sleep Quality Overall Mood is 2.65/5 (14% lower) on average after days with around 1.97/5 Sleep Quality | +**study_title** | **string** | Example: N1 Study: Sleep Quality Predicts Higher Overall Mood | +**timestamp** | **int** | Example: 1494085127 | +**t_value** | **double** | Example: 9.6986079652717 | +**updated_at** | [**\DateTime**](\DateTime.md) | Example: 2017-05-06 15:40:38 | +**user_id** | **int** | Example: 230 | +**user_vote** | **int** | Example: 1 | +**value_predicting_high_outcome** | **double** | Example: 4.14 | +**value_predicting_high_outcome_explanation** | **string** | Example: Overall Mood, on average, 17% higher after around 4.14/5 Sleep Quality | +**value_predicting_low_outcome** | **double** | Example: 3.03 | +**value_predicting_low_outcome_explanation** | **string** | Example: Overall Mood, on average, 11% lower after around 3.03/5 Sleep Quality | **causality_factor** | **float** | | [optional] -**cause** | **string** | ORIGINAL variable name of the cause variable for which the user desires correlations. | -**cause_variable_category_name** | **string** | Variable category of the cause variable. | [optional] -**cause_changes** | **int** | Number of changes in the predictor variable (a.k.a the number of experiments) | [optional] -**cause_combination_operation** | **string** | The way cause measurements are aggregated | [optional] -**cause_variable_image_url** | **string** | | [optional] -**cause_variable_ion_icon** | **string** | For use in Ionic apps | [optional] -**cause_unit** | **string** | Unit of the predictor variable | [optional] -**cause_unit_id** | **int** | Unit Id of the predictor variable | [optional] -**cause_variable_id** | **int** | | [optional] -**cause_variable_name** | **string** | ORIGINAL variable name of the cause variable for which the user desires correlations. | [optional] -**correlation_coefficient** | **float** | Pearson correlation coefficient between cause and effect measurements | -**created_at** | [**\DateTime**](\DateTime.md) | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] -**data_analysis** | **string** | How the data was analyzed | [optional] -**data_sources** | **string** | How the data was obtained | [optional] -**duration_of_action** | **float** | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | -**effect** | **string** | ORIGINAL variable name of the effect variable for which the user desires correlations. | -**effect_variable_category_name** | **string** | Variable category of the effect variable. | [optional] -**effect_variable_image_url** | **string** | | [optional] -**effect_variable_ion_icon** | **string** | For use in Ionic apps | [optional] -**effect_size** | **string** | Magnitude of the effects of a cause indicating whether it's practically meaningful. | [optional] -**effect_variable_id** | **string** | Magnitude of the effects of a cause indicating whether it's practically meaningful. | [optional] -**effect_variable_name** | **string** | ORIGINAL variable name of the effect variable for which the user desires correlations. | [optional] -**gauge_image** | **string** | Illustrates the strength of the relationship | [optional] -**image_url** | **string** | Large image for Facebook | [optional] -**number_of_pairs** | **float** | Number of points that went into the correlation calculation | -**original_effect** | **string** | effect variable original name. | [optional] -**onset_delay** | **double** | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | -**optimal_pearson_product** | **float** | Optimal Pearson Product | [optional] -**original_cause** | **string** | original name of the cause. | [optional] **outcome_data_sources** | **string** | original name of the cause. | [optional] -**predictor_explanation** | **string** | HIGHER Remeron predicts HIGHER Overall Mood | [optional] **principal_investigator** | **string** | Mike Sinn | [optional] -**qm_score** | **float** | Value representing the significance of the relationship as a function of crowdsourced insights, predictive strength, data quantity, and data quality | [optional] **reverse_correlation** | **float** | Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation. | [optional] -**significance_explanation** | **string** | Using a two-tailed t-test with alpha = 0.05, it was determined that the change... | [optional] -**statistical_significance** | **string** | A function of the effect size and sample size | [optional] -**strength_level** | **string** | weak, moderate, strong | [optional] -**study_abstract** | **string** | These data suggest with a high degree of confidence... | [optional] **study_background** | **string** | In order to reduce suffering through the advancement of human knowledge... | [optional] -**study_design** | **string** | This study is based on data donated by one QuantiModo user... | [optional] -**study_limitations** | **string** | As with any human experiment, it was impossible to control for all potentially confounding variables... | [optional] -**study_link_dynamic** | **string** | Url for the interactive study within the web app | [optional] -**study_link_facebook** | **string** | Url for sharing the study on Facebook | [optional] -**study_link_google** | **string** | Url for sharing the study on Google+ | [optional] -**study_link_twitter** | **string** | Url for sharing the study on Twitter | [optional] -**study_link_static** | **string** | Url for sharing the statically rendered study on social media | [optional] -**study_objective** | **string** | The objective of this study is to determine... | [optional] -**study_results** | **string** | This analysis suggests that... | [optional] -**study_title** | **string** | N1 Study HIGHER Remeron predicts HIGHER Overall Mood | [optional] -**timestamp** | **float** | Time at which correlation was calculated | -**updated_at** | [**\DateTime**](\DateTime.md) | When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. | [optional] -**user_vote** | **float** | User Vote | [optional] -**value_predicting_high_outcome** | **float** | cause value that predicts an above average effect value (in default unit for cause variable) | [optional] -**value_predicting_high_outcome_explanation** | **string** | Overall Mood, on average, 34% HIGHER after around 3.98mg Remeron | [optional] -**value_predicting_low_outcome** | **float** | cause value that predicts a below average effect value (in default unit for cause variable) | [optional] -**value_predicting_low_outcome_explanation** | **string** | Overall Mood, on average, 4% LOWER after around 0mg Remeron | [optional] +**study_invitation** | **string** | Help us determine if Remeron affects Overall Mood! | [optional] +**study_question** | **string** | Does Remeron affect Overall Mood? | [optional] +**all_pairs_significance** | **double** | Example: 0.99994982531794 | [optional] +**average_pearson_correlation_coefficient_over_onset_delays** | **string** | Example: | [optional] +**calculation_start_time** | [**\DateTime**](\DateTime.md) | Example: | [optional] +**cause_changes_statistical_significance** | **double** | Example: 0.9999299755903 | [optional] +**cause_number_of_processed_daily_measurements** | **int** | Example: 1364 | [optional] +**cause_number_of_raw_measurements** | **int** | Example: 14764 | [optional] +**cause_value_spread** | **double** | Example: 99032.44787234 | [optional] +**correlations_over_durations_of_action** | **string** | Example: | [optional] +**correlations_over_durations_of_action_chart_config** | **string** | Example: | [optional] +**correlations_over_onset_delays_chart_config** | **string** | Example: | [optional] +**data_points** | **string** | Example: | [optional] +**degrees_of_freedom** | **int** | Example: 200 | [optional] +**distance_from_middle_to_be_hight_low_effect** | **int** | Example: 25 | [optional] +**effect_number_of_processed_daily_measurements** | **int** | Example: 145 | [optional] +**effect_number_of_raw_measurements** | **int** | Example: 4045 | [optional] +**effect_value_spread** | **double** | Example: 20.2 | [optional] +**error** | **string** | Example: optimalPearsonProduct is not defined | [optional] +**maximum_cause_value** | **double** | Example: 104300 | [optional] +**maximum_effect_value** | **double** | Example: 20.38 | [optional] +**median_of_lower_half_of_effect_measurements** | **string** | Example: | [optional] +**median_of_upper_half_of_effect_measurements** | **string** | Example: | [optional] +**minimum_cause_value** | **double** | Example: 5267.5521276596 | [optional] +**minimum_effect_value** | **double** | Example: 0.18 | [optional] +**minimum_probability** | **double** | Example: 0.05 | [optional] +**number_of_cause_changes_for_optimal_values** | **int** | Example: 287 | [optional] +**number_of_days** | **int** | Example: 425 | [optional] +**number_of_days_significance** | **double** | Example: 0.99999929612614 | [optional] +**number_of_effect_changes_for_optimal_values** | **int** | Example: 295 | [optional] +**number_of_high_effect_pairs** | **int** | Example: 27 | [optional] +**number_of_low_effect_pairs** | **int** | Example: 57 | [optional] +**number_of_samples** | **int** | Example: 297 | [optional] +**number_of_unique_cause_values_for_optimal_values** | **int** | Example: 201 | [optional] +**number_of_unique_effect_values_for_optimal_values** | **int** | Example: 264 | [optional] +**number_of_users** | **string** | Example: | [optional] +**optimal_change_spread** | **double** | Example: 83.44 | [optional] +**optimal_change_spread_significance** | **double** | Example: 0.99999999999917 | [optional] +**pairs_over_time_chart_config** | [**\DateTime**](\DateTime.md) | Example: | [optional] +**per_day_sentence_fragment** | **string** | Example: | [optional] +**raw_cause_measurement_significance** | **double** | Example: 1 | [optional] +**raw_effect_measurement_significance** | **double** | Example: 1 | [optional] +**reverse_pairs_count** | **string** | Example: | [optional] +**vote_statistical_significance** | **int** | Example: 1 | [optional] +**aggregate_qm_score** | **double** | Example: 0.011598441286655 | [optional] +**cause_unit** | **string** | Unit of the predictor variable | [optional] +**cause_variable_common_alias** | **string** | Example: | [optional] +**cause_variable_informational_url** | **string** | Example: | [optional] +**cause_variable_product_url** | **string** | Example: | [optional] +**effect_variable_informational_url** | **string** | Example: | [optional] +**effect_variable_product_url** | **string** | Example: | [optional] +**forward_pearson_correlation_coefficient** | **double** | Example: 0.0333 | [optional] +**number_of_correlations** | **int** | Example: 6 | [optional] +**vote** | **string** | Example: | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/CorrelationArray.md b/docs/Model/CorrelationArray.md new file mode 100644 index 0000000..1e2151b --- /dev/null +++ b/docs/Model/CorrelationArray.md @@ -0,0 +1,9 @@ +# CorrelationArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Credential.md b/docs/Model/Credential.md deleted file mode 100644 index 066209a..0000000 --- a/docs/Model/Credential.md +++ /dev/null @@ -1,15 +0,0 @@ -# Credential - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **int** | ID of user that owns this credential | [optional] -**connector_id** | **int** | The id for the connector data source from which the credential was obtained | [optional] -**attr_key** | **string** | Attribute name such as token, userid, username, or password | [optional] -**attr_value** | **string** | Encrypted value for the attribute specified | [optional] -**created_at** | [**\DateTime**](\DateTime.md) | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] -**updated_at** | [**\DateTime**](\DateTime.md) | When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/Credit.md b/docs/Model/Credit.md new file mode 100644 index 0000000..ca0feb6 --- /dev/null +++ b/docs/Model/Credit.md @@ -0,0 +1,10 @@ +# Credit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Example: false | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/DataSource.md b/docs/Model/DataSource.md new file mode 100644 index 0000000..9c70d54 --- /dev/null +++ b/docs/Model/DataSource.md @@ -0,0 +1,22 @@ +# DataSource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**affiliate** | **bool** | Example: true | +**connector_client_id** | **string** | Example: ba7d0c12432650e23b3ce924ae2d21e2ff59e7e4e28650759633700af7ed0a30 | +**default_variable_category_name** | **string** | Example: Foods | +**display_name** | **string** | Example: QuantiModo | +**enabled** | **int** | Example: 0 | +**get_it_url** | **string** | Example: https://quantimo.do | +**id** | **int** | Example: 72 | +**image** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/logos/quantimodo-logo-qm-rainbow-200-200.png | +**image_html** | **string** | Example: <a href=\"https://quantimo.do\"><img id=\"quantimodo_image\" title=\"QuantiModo\" src=\"https://app.quantimo.do/ionic/Modo/www/img/logos/quantimodo-logo-qm-rainbow-200-200.png\" alt=\"QuantiModo\"></a> | +**linked_display_name_html** | **string** | Example: <a href=\"https://quantimo.do\">QuantiModo</a> | +**long_description** | **string** | Example: QuantiModo is a Chrome extension, Android app, iOS app, and web app that allows you to easily track mood, symptoms, or any outcome you want to optimize in a fraction of a second. You can also import your data from over 30 other apps and devices like Fitbit, Rescuetime, Jawbone Up, Withings, Facebook, Github, Google Calendar, Runkeeper, MoodPanda, Slice, Google Fit, and more. QuantiModo then analyzes your data to identify which hidden factors are most likely to be influencing your mood or symptoms and their optimal daily values. | +**name** | **string** | Example: quantimodo | +**short_description** | **string** | Example: Tracks anything | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Explanation.md b/docs/Model/Explanation.md new file mode 100644 index 0000000..3b10483 --- /dev/null +++ b/docs/Model/Explanation.md @@ -0,0 +1,14 @@ +# Explanation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **string** | Example: These factors are most predictive of Overall Mood based on your own data. | +**image** | [**\QuantiModo\Client\Model\Image**](Image.md) | | +**ion_icon** | **string** | Example: ion-ios-person | +**start_tracking** | [**\QuantiModo\Client\Model\ExplanationStartTracking**](ExplanationStartTracking.md) | | +**title** | **string** | Example: Top Predictors of Overall Mood | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/ExplanationStartTracking.md b/docs/Model/ExplanationStartTracking.md new file mode 100644 index 0000000..b8a18a4 --- /dev/null +++ b/docs/Model/ExplanationStartTracking.md @@ -0,0 +1,12 @@ +# ExplanationStartTracking + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**button** | [**\QuantiModo\Client\Model\Button**](Button.md) | | +**description** | **string** | Example: The more data I have the more accurate your results will be so track regularly! | +**title** | **string** | Example: Improve Accuracy | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/UserTokenFailedResponse.md b/docs/Model/GetConnectorsResponse.md similarity index 60% rename from docs/Model/UserTokenFailedResponse.md rename to docs/Model/GetConnectorsResponse.md index 66b2c1b..ad230b4 100644 --- a/docs/Model/UserTokenFailedResponse.md +++ b/docs/Model/GetConnectorsResponse.md @@ -1,10 +1,11 @@ -# UserTokenFailedResponse +# GetConnectorsResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**code** | **int** | Status code | -**message** | **string** | Message | +**connectors** | [**\QuantiModo\Client\Model\Connector[]**](Connector.md) | | [optional] +**message** | **string** | Message | [optional] +**status** | **int** | Status code | **success** | **bool** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/GetCorrelationsDataResponse.md b/docs/Model/GetCorrelationsDataResponse.md new file mode 100644 index 0000000..943d3b7 --- /dev/null +++ b/docs/Model/GetCorrelationsDataResponse.md @@ -0,0 +1,11 @@ +# GetCorrelationsDataResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**correlations** | [**\QuantiModo\Client\Model\Correlation[]**](Correlation.md) | | +**explanation** | [**\QuantiModo\Client\Model\Explanation**](Explanation.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/GetCorrelationsResponse.md b/docs/Model/GetCorrelationsResponse.md new file mode 100644 index 0000000..2481012 --- /dev/null +++ b/docs/Model/GetCorrelationsResponse.md @@ -0,0 +1,13 @@ +# GetCorrelationsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\QuantiModo\Client\Model\GetCorrelationsDataResponse**](GetCorrelationsDataResponse.md) | | [optional] +**message** | **string** | Message | [optional] +**status** | **int** | Status code | +**success** | **bool** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/GetMeasurementsResponse.md b/docs/Model/GetMeasurementsResponse.md new file mode 100644 index 0000000..c84933c --- /dev/null +++ b/docs/Model/GetMeasurementsResponse.md @@ -0,0 +1,43 @@ +# GetMeasurementsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_id** | **string** | Example: pImUNsI6T5Ysd81k | [optional] +**created_at** | [**\DateTime**](\DateTime.md) | Example: 2017-08-09 19:19:05 | [optional] +**id** | **int** | Example: 1060761015 | [optional] +**input_type** | **string** | Example: oneToFiveNumbers | [optional] +**ion_icon** | **string** | Example: ion-happy-outline | [optional] +**manual_tracking** | **bool** | Example: true | [optional] +**maximum_allowed_value** | **int** | Example: 5 | [optional] +**minimum_allowed_value** | **int** | Example: 1 | [optional] +**original_unit_abbreviated_name** | **string** | Example: /5 | [optional] +**original_unit_category_id** | **int** | Example: 5 | [optional] +**original_unit_category_name** | **string** | Example: Rating | [optional] +**original_unit_id** | **int** | Example: 10 | [optional] +**original_unit_name** | **string** | Example: 1 to 5 Rating | [optional] +**original_value** | **double** | Example: 1 | [optional] +**png_path** | **string** | Example: img/rating/100/numeric_rating_button_100_1.png | [optional] +**png_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.png | [optional] +**source_name** | **string** | Example: pImUNsI6T5Ysd81k | [optional] +**start_time_epoch** | **int** | Example: 1502306315 | [optional] +**start_time_string** | [**\DateTime**](\DateTime.md) | Example: 2017-08-09T19:18:35+00:00 | [optional] +**svg_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.svg | [optional] +**unit_abbreviated_name** | **string** | Example: /5 | [optional] +**unit_category_id** | **int** | Example: 5 | [optional] +**unit_category_name** | **string** | Example: Rating | [optional] +**unit_id** | **int** | Example: 10 | [optional] +**unit_name** | **string** | Example: 1 to 5 Rating | [optional] +**updated_at** | [**\DateTime**](\DateTime.md) | Example: 2017-08-09 19:19:05 | [optional] +**user_variable_variable_category_id** | **int** | Example: 1 | [optional] +**user_variable_variable_category_name** | **string** | Example: Emotions | [optional] +**value** | **double** | Example: 1 | [optional] +**variable_category_id** | **int** | Example: 1 | [optional] +**variable_category_image_url** | **string** | Example: https://maxcdn.icons8.com/Color/PNG/96/Cinema/theatre_mask-96.png | [optional] +**variable_category_name** | **string** | Example: Emotions | [optional] +**variable_id** | **int** | Example: 5970988 | [optional] +**variable_name** | **string** | Example: Unique Test Variable 1502306315 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/GetMeasurementsResponseArray.md b/docs/Model/GetMeasurementsResponseArray.md new file mode 100644 index 0000000..c16afb4 --- /dev/null +++ b/docs/Model/GetMeasurementsResponseArray.md @@ -0,0 +1,9 @@ +# GetMeasurementsResponseArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/GetPairsResponse.md b/docs/Model/GetPairsResponse.md new file mode 100644 index 0000000..6fc2f34 --- /dev/null +++ b/docs/Model/GetPairsResponse.md @@ -0,0 +1,15 @@ +# GetPairsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cause_measurement** | **double** | Example: 2.0166666666667 | [optional] +**cause_measurement_value** | **double** | Example: 2.0166666666667 | [optional] +**effect_measurement** | **double** | Example: 4 | [optional] +**effect_measurement_value** | **double** | Example: 4 | [optional] +**start_time_string** | [**\DateTime**](\DateTime.md) | Example: 2015-08-06 15:49:02 | [optional] +**timestamp** | **int** | Example: 1438876142 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/GetPairsResponseArray.md b/docs/Model/GetPairsResponseArray.md new file mode 100644 index 0000000..aa2e05f --- /dev/null +++ b/docs/Model/GetPairsResponseArray.md @@ -0,0 +1,9 @@ +# GetPairsResponseArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/GetPublicVariablesResponse.md b/docs/Model/GetPublicVariablesResponse.md new file mode 100644 index 0000000..1a97e18 --- /dev/null +++ b/docs/Model/GetPublicVariablesResponse.md @@ -0,0 +1,68 @@ +# GetPublicVariablesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**available_units** | [**\QuantiModo\Client\Model\Unit[]**](Unit.md) | | [optional] +**category** | **string** | Example: Emotions | [optional] +**cause_only** | **bool** | Example: false | [optional] +**combination_operation** | **string** | Example: MEAN | [optional] +**common_alias** | **string** | Example: Mood_(psychology) | [optional] +**created_at** | [**\DateTime**](\DateTime.md) | Example: 2015-03-05 05:01:48 | [optional] +**unit_abbreviated_name** | **string** | Example: /5 | [optional] +**unit_category_id** | **int** | Example: 5 | [optional] +**unit_category_name** | **string** | Example: Rating | [optional] +**unit_id** | **int** | Example: 10 | [optional] +**unit_name** | **string** | Example: 1 to 5 Rating | [optional] +**description** | **string** | Example: positive | [optional] +**duration_of_action** | **int** | Example: 86400 | [optional] +**duration_of_action_in_hours** | **int** | Example: 24 | [optional] +**id** | **int** | Example: 1398 | [optional] +**input_type** | **string** | Example: happiestFaceIsFive | [optional] +**ion_icon** | **string** | Example: ion-happy-outline | [optional] +**kurtosis** | **double** | Example: 4.3527259032083 | [optional] +**manual_tracking** | **bool** | Example: true | [optional] +**maximum_allowed_value** | **int** | Example: 5 | [optional] +**mean** | **double** | Example: 3.1359987410015 | [optional] +**median** | **double** | Example: 3.1295731659047 | [optional] +**minimum_allowed_value** | **int** | Example: 1 | [optional] +**most_common_connector_id** | **int** | Example: 10 | [optional] +**most_common_original_unit_id** | **int** | Example: 10 | [optional] +**most_common_value** | **double** | Example: 3 | [optional] +**name** | **string** | Example: Overall Mood | [optional] +**number_of_aggregate_correlations_as_cause** | **int** | Example: 329 | [optional] +**number_of_aggregate_correlations_as_effect** | **int** | Example: 890 | [optional] +**number_of_measurements** | **int** | Example: 544298 | [optional] +**number_of_raw_measurements** | **int** | Example: 544298 | [optional] +**number_of_tracking_reminders** | **int** | Example: 102 | [optional] +**number_of_unique_values** | **int** | Example: 7 | [optional] +**number_of_user_variables** | **int** | Example: 4003 | [optional] +**onset_delay** | **int** | Example: 0 | [optional] +**onset_delay_in_hours** | **int** | Example: 0 | [optional] +**outcome** | **bool** | Example: true | [optional] +**png_path** | **string** | Example: img/variable_categories/emotions.png | [optional] +**png_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.png | [optional] +**public** | **bool** | Example: true | [optional] +**second_most_common_value** | **double** | Example: 4 | [optional] +**skewness** | **double** | Example: -0.23360852317166 | [optional] +**standard_deviation** | **double** | Example: 0.7214901744899 | [optional] +**svg_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.svg | [optional] +**third_most_common_value** | **double** | Example: 2 | [optional] +**updated_at** | [**\DateTime**](\DateTime.md) | Example: 2017-07-31 19:55:38 | [optional] +**user_variable_unit_abbreviated_name** | **string** | Example: /5 | [optional] +**user_variable_unit_category_id** | **int** | Example: 5 | [optional] +**user_variable_unit_category_name** | **string** | Example: Rating | [optional] +**user_variable_unit_id** | **int** | Example: 10 | [optional] +**user_variable_unit_name** | **string** | Example: 1 to 5 Rating | [optional] +**user_variable_variable_category_id** | **int** | Example: 1 | [optional] +**user_variable_variable_category_name** | **string** | Example: Emotions | [optional] +**valence** | **string** | Example: positive | [optional] +**variable_category_id** | **int** | Example: 1 | [optional] +**variable_category_image_url** | **string** | Example: https://maxcdn.icons8.com/Color/PNG/96/Cinema/theatre_mask-96.png | [optional] +**variable_category_name** | **string** | Example: Emotions | [optional] +**variable_name** | **string** | Example: Overall Mood | [optional] +**variance** | **double** | Example: 22.541085893948 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/GetPublicVariablesResponseArray.md b/docs/Model/GetPublicVariablesResponseArray.md new file mode 100644 index 0000000..73e2fb3 --- /dev/null +++ b/docs/Model/GetPublicVariablesResponseArray.md @@ -0,0 +1,9 @@ +# GetPublicVariablesResponseArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/GetStudyDataResponse.md b/docs/Model/GetStudyDataResponse.md new file mode 100644 index 0000000..c6f665a --- /dev/null +++ b/docs/Model/GetStudyDataResponse.md @@ -0,0 +1,19 @@ +# GetStudyDataResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cause_processed_daily_measurements** | [**\QuantiModo\Client\Model\ProcessedDailyMeasurement[]**](ProcessedDailyMeasurement.md) | | +**cause_variable** | [**\QuantiModo\Client\Model\UserVariable**](UserVariable.md) | | +**charts** | [**\QuantiModo\Client\Model\Chart[]**](Chart.md) | | +**effect_processed_daily_measurements** | [**\QuantiModo\Client\Model\ProcessedDailyMeasurement[]**](ProcessedDailyMeasurement.md) | | +**effect_variable** | [**\QuantiModo\Client\Model\UserVariable**](UserVariable.md) | | +**pairs** | [**\QuantiModo\Client\Model\Pair[]**](Pair.md) | | +**statistics** | [**\QuantiModo\Client\Model\Correlation**](Correlation.md) | | +**text** | **string** | Example: | +**user** | **string** | Example: | +**user_id** | **int** | Example: 230 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/GetStudyResponse.md b/docs/Model/GetStudyResponse.md new file mode 100644 index 0000000..bbf838c --- /dev/null +++ b/docs/Model/GetStudyResponse.md @@ -0,0 +1,28 @@ +# GetStudyResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cause_processed_daily_measurements** | [**\QuantiModo\Client\Model\ProcessedDailyMeasurement[]**](ProcessedDailyMeasurement.md) | | [optional] +**cause_variable** | [**\QuantiModo\Client\Model\UserVariable**](UserVariable.md) | | [optional] +**charts** | [**\QuantiModo\Client\Model\Chart[]**](Chart.md) | | [optional] +**data** | [**\QuantiModo\Client\Model\GetStudyDataResponse**](GetStudyDataResponse.md) | | [optional] +**effect_processed_daily_measurements** | [**\QuantiModo\Client\Model\ProcessedDailyMeasurement[]**](ProcessedDailyMeasurement.md) | | [optional] +**effect_variable** | [**\QuantiModo\Client\Model\UserVariable**](UserVariable.md) | | [optional] +**highcharts** | [**\QuantiModo\Client\Model\HighchartArray**](HighchartArray.md) | | [optional] +**message** | **string** | Message | [optional] +**pairs** | [**\QuantiModo\Client\Model\Pair[]**](Pair.md) | | [optional] +**pairs_of_averages_for_all_users** | [**\QuantiModo\Client\Model\PairsOfAveragesForAllUser[]**](PairsOfAveragesForAllUser.md) | | [optional] +**participant_instructions** | [**\QuantiModo\Client\Model\ParticipantInstruction**](ParticipantInstruction.md) | | [optional] +**statistics** | [**\QuantiModo\Client\Model\Correlation**](Correlation.md) | | [optional] +**status** | **int** | Status code | +**success** | **bool** | | +**text** | [**\QuantiModo\Client\Model\Text**](Text.md) | | [optional] +**type** | **string** | Example: population | [optional] +**user_correlations** | [**\QuantiModo\Client\Model\Correlation[]**](Correlation.md) | | [optional] +**user_id** | **int** | Example: 230 | [optional] +**user_study** | [**\QuantiModo\Client\Model\UserStudy**](UserStudy.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/InlineResponse20012.md b/docs/Model/GetTrackingReminderNotificationsResponse.md similarity index 59% rename from docs/Model/InlineResponse20012.md rename to docs/Model/GetTrackingReminderNotificationsResponse.md index 0a093c4..6eb07fd 100644 --- a/docs/Model/InlineResponse20012.md +++ b/docs/Model/GetTrackingReminderNotificationsResponse.md @@ -1,10 +1,12 @@ -# InlineResponse20012 +# GetTrackingReminderNotificationsResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**data** | [**\QuantiModo\Client\Model\TrackingReminderNotification[]**](TrackingReminderNotification.md) | | [optional] +**data** | [**\QuantiModo\Client\Model\TrackingReminderNotificationsArray**](TrackingReminderNotificationsArray.md) | | [optional] +**message** | **string** | Message | [optional] +**status** | **int** | Status code | +**success** | **bool** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/GetTrackingRemindersResponse.md b/docs/Model/GetTrackingRemindersResponse.md new file mode 100644 index 0000000..0b6112f --- /dev/null +++ b/docs/Model/GetTrackingRemindersResponse.md @@ -0,0 +1,70 @@ +# GetTrackingRemindersResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**available_units** | [**\QuantiModo\Client\Model\Unit[]**](Unit.md) | | [optional] +**client_id** | **string** | Example: ionic | [optional] +**combination_operation** | **string** | Example: MEAN | [optional] +**created_at** | [**\DateTime**](\DateTime.md) | Example: 2016-12-25 10:28:42 | [optional] +**data** | [**\QuantiModo\Client\Model\TrackingRemindersArray**](TrackingRemindersArray.md) | | [optional] +**unit_abbreviated_name** | **string** | Example: mg | [optional] +**unit_category_id** | **int** | Example: 3 | [optional] +**unit_category_name** | **string** | Example: Weight | [optional] +**unit_id** | **int** | Example: 7 | [optional] +**unit_name** | **string** | Example: Milligrams | [optional] +**default_value** | **double** | Example: 500 | [optional] +**filling_value** | **int** | Example: 0 | [optional] +**first_daily_reminder_time** | [**\DateTime**](\DateTime.md) | Example: 12:00:00 | [optional] +**frequency_text_description** | **string** | Example: Daily (ended 2017-02-02) | [optional] +**frequency_text_description_with_time** | [**\DateTime**](\DateTime.md) | Example: Daily at 09:00 AM (ended 2017-02-02) | [optional] +**id** | **int** | Example: 30376 | [optional] +**image_url** | **string** | Example: https://rximage.nlm.nih.gov/image/images/gallery/original/55111-0129-60_RXNAVIMAGE10_B051D81E.jpg | [optional] +**input_type** | **string** | Example: value | [optional] +**ion_icon** | **string** | Example: ion-ios-medkit-outline | [optional] +**last_value** | **double** | Example: 500 | [optional] +**local_daily_reminder_notification_times** | **string[]** | | [optional] +**local_daily_reminder_notification_times_for_all_reminders** | **string[]** | | [optional] +**manual_tracking** | **bool** | Example: true | [optional] +**message** | **string** | Message | [optional] +**minimum_allowed_value** | **int** | Example: 0 | [optional] +**next_reminder_time_epoch_seconds** | **int** | Example: 1502373600 | [optional] +**number_of_raw_measurements** | **int** | Example: 791 | [optional] +**png_path** | **string** | Example: img/variable_categories/treatments.png | [optional] +**png_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/treatments.png | [optional] +**reminder_frequency** | **int** | Example: 86400 | [optional] +**reminder_start_epoch_seconds** | **int** | Example: 1481896800 | [optional] +**reminder_start_time** | [**\DateTime**](\DateTime.md) | Example: 14:00:00 | [optional] +**reminder_start_time_local** | [**\DateTime**](\DateTime.md) | Example: 09:00:00 | [optional] +**reminder_start_time_local_human_formatted** | [**\DateTime**](\DateTime.md) | Example: 09:00 AM | [optional] +**repeating** | **bool** | Example: true | [optional] +**second_daily_reminder_time** | [**\DateTime**](\DateTime.md) | Example: 14:00:00 | [optional] +**second_to_last_value** | **double** | Example: 250 | [optional] +**start_tracking_date** | **string** | Example: 2016-12-16 | [optional] +**status** | **int** | Status code | +**stop_tracking_date** | **string** | Example: 2017-02-02 | [optional] +**success** | **bool** | | +**svg_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/treatments.svg | [optional] +**third_to_last_value** | **double** | Example: 250 | [optional] +**tracking_reminder_id** | **int** | Example: 30376 | [optional] +**tracking_reminder_image_url** | **string** | Example: https://rximage.nlm.nih.gov/image/images/gallery/original/55111-0129-60_RXNAVIMAGE10_B051D81E.jpg | [optional] +**updated_at** | [**\DateTime**](\DateTime.md) | Example: 2017-08-09 19:38:05 | [optional] +**user_id** | **int** | Example: 230 | [optional] +**user_variable_unit_abbreviated_name** | **string** | Example: mg | [optional] +**user_variable_unit_category_id** | **int** | Example: 3 | [optional] +**user_variable_unit_category_name** | **string** | Example: Weight | [optional] +**user_variable_unit_id** | **int** | Example: 7 | [optional] +**user_variable_unit_name** | **string** | Example: Milligrams | [optional] +**user_variable_variable_category_id** | **int** | Example: 13 | [optional] +**user_variable_variable_category_name** | **string** | Example: Treatments | [optional] +**value_and_frequency_text_description** | **string** | Example: 500 mg daily (ended 2017-02-02) | [optional] +**value_and_frequency_text_description_with_time** | [**\DateTime**](\DateTime.md) | Example: 500 mg daily at 09:00 AM (ended 2017-02-02) | [optional] +**variable_category_id** | **int** | Example: 13 | [optional] +**variable_category_image_url** | **string** | Example: https://maxcdn.icons8.com/Color/PNG/96/Healthcare/pill-96.png | [optional] +**variable_category_name** | **string** | Example: Treatments | [optional] +**variable_id** | **int** | Example: 5627291 | [optional] +**variable_name** | **string** | Example: Acetyl L-Carnitine By MRM | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/GetTrackingRemindersResponseArray.md b/docs/Model/GetTrackingRemindersResponseArray.md new file mode 100644 index 0000000..dc0b729 --- /dev/null +++ b/docs/Model/GetTrackingRemindersResponseArray.md @@ -0,0 +1,9 @@ +# GetTrackingRemindersResponseArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Highchart.md b/docs/Model/Highchart.md new file mode 100644 index 0000000..0a70966 --- /dev/null +++ b/docs/Model/Highchart.md @@ -0,0 +1,13 @@ +# Highchart + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**chart_config** | [**\QuantiModo\Client\Model\ChartConfig**](ChartConfig.md) | | [optional] +**chart_id** | **string** | Example: correlationScatterPlot | [optional] +**chart_title** | **string** | Example: Overall Mood following Sleep Duration (R = -0.173) | [optional] +**explanation** | **string** | Example: The chart above indicates that an increase in Sleep Duration is usually followed by an decrease in Overall Mood. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/HighchartArray.md b/docs/Model/HighchartArray.md new file mode 100644 index 0000000..d74d02b --- /dev/null +++ b/docs/Model/HighchartArray.md @@ -0,0 +1,9 @@ +# HighchartArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Hover.md b/docs/Model/Hover.md new file mode 100644 index 0000000..0fbef74 --- /dev/null +++ b/docs/Model/Hover.md @@ -0,0 +1,12 @@ +# Hover + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Example: true | +**line_color** | **string** | Example: rgb(100,100,100) | +**marker** | [**\QuantiModo\Client\Model\Marker**](Marker.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Image.md b/docs/Model/Image.md new file mode 100644 index 0000000..e86c71d --- /dev/null +++ b/docs/Model/Image.md @@ -0,0 +1,12 @@ +# Image + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**height** | **string** | Example: 240 | +**image_url** | **string** | Example: https://www.filepicker.io/api/file/TjmeNWS5Q2SFmtJlUGLf | +**width** | **string** | Example: 224 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/InlineResponse20011.md b/docs/Model/InlineResponse20011.md deleted file mode 100644 index 06da8ee..0000000 --- a/docs/Model/InlineResponse20011.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse20011 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**data** | [**\QuantiModo\Client\Model\TrackingReminder**](TrackingReminder.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/InlineResponse2003.md b/docs/Model/InlineResponse2003.md deleted file mode 100644 index 25b6afd..0000000 --- a/docs/Model/InlineResponse2003.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2003 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\QuantiModo\Client\Model\Credential[]**](Credential.md) | | [optional] -**success** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/InlineResponse2004.md b/docs/Model/InlineResponse2004.md deleted file mode 100644 index 71bd01b..0000000 --- a/docs/Model/InlineResponse2004.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2004 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**data** | [**\QuantiModo\Client\Model\Measurement[]**](Measurement.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/InlineResponse2005.md b/docs/Model/InlineResponse2005.md deleted file mode 100644 index 108eea4..0000000 --- a/docs/Model/InlineResponse2005.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2005 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**data** | [**\QuantiModo\Client\Model\TrackingReminder[]**](TrackingReminder.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/InlineResponse2007.md b/docs/Model/InlineResponse2007.md deleted file mode 100644 index 57e430a..0000000 --- a/docs/Model/InlineResponse2007.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2007 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**data** | [**\QuantiModo\Client\Model\UserVariable[]**](UserVariable.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/InlineResponse2008.md b/docs/Model/InlineResponse2008.md deleted file mode 100644 index 49ef619..0000000 --- a/docs/Model/InlineResponse2008.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2008 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**data** | [**\QuantiModo\Client\Model\UserVariableRelationship[]**](UserVariableRelationship.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/InlineResponse2009.md b/docs/Model/InlineResponse2009.md deleted file mode 100644 index 78c7ad8..0000000 --- a/docs/Model/InlineResponse2009.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2009 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**data** | [**\QuantiModo\Client\Model\VariableUserSource[]**](VariableUserSource.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/JsonErrorResponse.md b/docs/Model/JsonErrorResponse.md index 66e20c6..cbb7e7a 100644 --- a/docs/Model/JsonErrorResponse.md +++ b/docs/Model/JsonErrorResponse.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | Status: \"ok\" or \"error\" | **message** | **string** | Error message | [optional] +**status** | **string** | Status: \"ok\" or \"error\" | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/Lang.md b/docs/Model/Lang.md new file mode 100644 index 0000000..feff818 --- /dev/null +++ b/docs/Model/Lang.md @@ -0,0 +1,10 @@ +# Lang + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loading** | **string** | Example: | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Legend.md b/docs/Model/Legend.md new file mode 100644 index 0000000..3642b08 --- /dev/null +++ b/docs/Model/Legend.md @@ -0,0 +1,10 @@ +# Legend + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Example: false | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/HumanTime.md b/docs/Model/Loading.md similarity index 61% rename from docs/Model/HumanTime.md rename to docs/Model/Loading.md index e6a3cee..073dab8 100644 --- a/docs/Model/HumanTime.md +++ b/docs/Model/Loading.md @@ -1,11 +1,11 @@ -# HumanTime +# Loading ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**date** | **string** | date time | [optional] -**timezone_type** | **int** | | [optional] -**timezone** | **string** | timezone of date time | [optional] +**hide_duration** | **int** | Example: 10 | +**show_duration** | **int** | Example: 10 | +**style** | [**\QuantiModo\Client\Model\ChartStyle**](ChartStyle.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/InlineResponse20010.md b/docs/Model/LocalDailyReminderNotificationTime.md similarity index 65% rename from docs/Model/InlineResponse20010.md rename to docs/Model/LocalDailyReminderNotificationTime.md index 2ef57a9..280c1de 100644 --- a/docs/Model/InlineResponse20010.md +++ b/docs/Model/LocalDailyReminderNotificationTime.md @@ -1,10 +1,9 @@ -# InlineResponse20010 +# LocalDailyReminderNotificationTime ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**data** | [**\QuantiModo\Client\Model\Vote[]**](Vote.md) | | [optional] +**local_daily_reminder_notification_time** | [**\DateTime**](\DateTime.md) | Example: 00:10:00 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/LocalDailyReminderNotificationTimeArray.md b/docs/Model/LocalDailyReminderNotificationTimeArray.md new file mode 100644 index 0000000..f4596b6 --- /dev/null +++ b/docs/Model/LocalDailyReminderNotificationTimeArray.md @@ -0,0 +1,9 @@ +# LocalDailyReminderNotificationTimeArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/LocalDailyReminderNotificationTimesForAllReminder.md b/docs/Model/LocalDailyReminderNotificationTimesForAllReminder.md new file mode 100644 index 0000000..2976c63 --- /dev/null +++ b/docs/Model/LocalDailyReminderNotificationTimesForAllReminder.md @@ -0,0 +1,10 @@ +# LocalDailyReminderNotificationTimesForAllReminder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**local_daily_reminder_notification_times_for_all_reminder** | [**\DateTime**](\DateTime.md) | Example: 00:10:00 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/LocalDailyReminderNotificationTimesForAllReminderArray.md b/docs/Model/LocalDailyReminderNotificationTimesForAllReminderArray.md new file mode 100644 index 0000000..90476a7 --- /dev/null +++ b/docs/Model/LocalDailyReminderNotificationTimesForAllReminderArray.md @@ -0,0 +1,9 @@ +# LocalDailyReminderNotificationTimesForAllReminderArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/InlineResponse200.md b/docs/Model/Marker.md similarity index 63% rename from docs/Model/InlineResponse200.md rename to docs/Model/Marker.md index 7fe4464..2183ca2 100644 --- a/docs/Model/InlineResponse200.md +++ b/docs/Model/Marker.md @@ -1,10 +1,11 @@ -# InlineResponse200 +# Marker ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**data** | [**\QuantiModo\Client\Model\Measurement**](Measurement.md) | | [optional] +**enabled** | **bool** | Example: false | +**radius** | **int** | Example: 5 | +**states** | [**\QuantiModo\Client\Model\State**](State.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/Measurement.md b/docs/Model/Measurement.md index 46e29e1..f99e18a 100644 --- a/docs/Model/Measurement.md +++ b/docs/Model/Measurement.md @@ -3,16 +3,52 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**variable_name** | **string** | Name of the variable for which we are creating the measurement records | +**client_id** | **string** | Example: quantimodo | [optional] +**connector_id** | **int** | Example: 13 | [optional] +**created_at** | **string** | Example: 2017-07-30 21:08:36 | [optional] +**icon_icon** | **string** | Example: ion-sad-outline | [optional] +**id** | **int** | Example: 1051466127 | [optional] +**input_type** | **string** | Example: value | [optional] +**ion_icon** | **string** | Example: ion-ios-medkit-outline | [optional] +**manual_tracking** | **bool** | Example: 1 | [optional] +**maximum_allowed_value** | **int** | Example: 5 | [optional] +**minimum_allowed_value** | **int** | Example: 1 | [optional] +**note** | **string** | Note of measurement | [optional] +**originalunit_abbreviated_name** | **string** | Original Unit of measurement as originally submitted | [optional] +**original_unit_abbreviated_name** | **string** | Example: count | [optional] +**original_unit_category_id** | **int** | Example: 6 | [optional] +**original_unit_category_name** | **string** | Example: Miscellany | [optional] +**original_unit_id** | **int** | Example: 23 | [optional] +**original_unit_name** | **string** | Example: Count | [optional] +**original_value** | **int** | Original value as originally submitted | [optional] +**png_path** | **string** | Example: img/variable_categories/treatments.png | [optional] +**png_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/treatments.png | [optional] **source_name** | **string** | Application or device used to record the measurement values | -**start_time_string** | **string** | Start Time for the measurement event in UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" | [optional] +**start_date** | **string** | Example: 2014-08-27 | [optional] **start_time_epoch** | **int** | Seconds between the start of the event measured and 1970 (Unix timestamp) | [optional] -**human_time** | [**\QuantiModo\Client\Model\HumanTime**](HumanTime.md) | | [optional] +**start_time_string** | **string** | Start Time for the measurement event in UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` | +**svg_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/treatments.svg | [optional] +**unit_abbreviated_name** | **string** | Abbreviated name for the unit of measurement | +**unit_category_id** | **int** | Example: 6 | [optional] +**unit_category_name** | **string** | Example: Miscellany | [optional] +**unit_id** | **int** | Example: 23 | [optional] +**unit_name** | **string** | Example: Count | [optional] +**updated_at** | **string** | Example: 2017-07-30 21:08:36 | [optional] +**user_variable_unit_abbreviated_name** | **string** | Example: count | [optional] +**user_variable_unit_category_id** | **int** | Example: 6 | [optional] +**user_variable_unit_category_name** | **string** | Example: Miscellany | [optional] +**user_variable_unit_id** | **int** | Example: 23 | [optional] +**user_variable_unit_name** | **string** | Example: Count | [optional] +**user_variable_variable_category_id** | **int** | Example: 13 | [optional] +**user_variable_variable_category_name** | **string** | Example: Treatments | [optional] +**valence** | **string** | Example: negative | [optional] **value** | **double** | Converted measurement value in requested unit | -**original_value** | **int** | Original value as originally submitted | [optional] -**original_abbreviated_unit_name** | **string** | Original Unit of measurement as originally submitted | [optional] -**abbreviated_unit_name** | **string** | Abbreviated name for the unit of measurement | -**note** | **string** | Note of measurement | [optional] +**variable_category_id** | **int** | Example: 13 | [optional] +**variable_category_image_url** | **string** | Example: https://maxcdn.icons8.com/Color/PNG/96/Healthcare/pill-96.png | [optional] +**variable_category_name** | **string** | Example: Treatments | [optional] +**variable_description** | **string** | Example: negative | [optional] +**variable_id** | **int** | Example: 5956846 | [optional] +**variable_name** | **string** | Name of the variable for which we are creating the measurement records | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/MeasurementArray.md b/docs/Model/MeasurementArray.md new file mode 100644 index 0000000..f6e81ad --- /dev/null +++ b/docs/Model/MeasurementArray.md @@ -0,0 +1,9 @@ +# MeasurementArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/MeasurementDelete.md b/docs/Model/MeasurementDelete.md index 60801c6..48545f4 100644 --- a/docs/Model/MeasurementDelete.md +++ b/docs/Model/MeasurementDelete.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**variable_id** | **int** | Variable id of the measurement to be deleted | **start_time** | **int** | Start time of the measurement to be deleted | +**variable_id** | **int** | Variable id of the measurement to be deleted | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/ValueObject.md b/docs/Model/MeasurementItem.md similarity index 96% rename from docs/Model/ValueObject.md rename to docs/Model/MeasurementItem.md index 291b7e5..7c4e032 100644 --- a/docs/Model/ValueObject.md +++ b/docs/Model/MeasurementItem.md @@ -1,11 +1,11 @@ -# ValueObject +# MeasurementItem ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**note** | **string** | Optional note to include with the measurement | [optional] **timestamp** | **int** | Timestamp for the measurement event in epoch time (unixtime) | **value** | **double** | Measurement value | -**note** | **string** | Optional note to include with the measurement | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/MeasurementRange.md b/docs/Model/MeasurementRange.md deleted file mode 100644 index 70ba319..0000000 --- a/docs/Model/MeasurementRange.md +++ /dev/null @@ -1,11 +0,0 @@ -# MeasurementRange - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**lower_limit** | **int** | The timestamp of the earliest measurement for a user. | -**upper_limit** | **int** | The timestamp of the most recent measurement for a user. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/MeasurementSet.md b/docs/Model/MeasurementSet.md index 0dbaa81..342bb19 100644 --- a/docs/Model/MeasurementSet.md +++ b/docs/Model/MeasurementSet.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**measurements** | [**\QuantiModo\Client\Model\ValueObject[]**](ValueObject.md) | Array of timestamps, values, and optional notes | -**variable_name** | **string** | ORIGINAL name of the variable for which we are creating the measurement records | +**combination_operation** | **string** | Way to aggregate measurements over time. Options are \"MEAN\" or \"SUM\". SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED. | [optional] +**measurement_items** | [**\QuantiModo\Client\Model\MeasurementItem[]**](MeasurementItem.md) | Array of timestamps, values, and optional notes | **source_name** | **string** | Name of the application or device used to record the measurement values | +**unit_abbreviated_name** | **string** | Unit of measurement | **variable_category_name** | **string** | Variable category name | [optional] -**combination_operation** | **string** | Way to aggregate measurements over time. Options are \"MEAN\" or \"SUM\". SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED. | [optional] -**abbreviated_unit_name** | **string** | Unit of measurement | +**variable_name** | **string** | ORIGINAL name of the variable for which we are creating the measurement records | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/MeasurementUpdate.md b/docs/Model/MeasurementUpdate.md index f5c18b3..5e24c12 100644 --- a/docs/Model/MeasurementUpdate.md +++ b/docs/Model/MeasurementUpdate.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Variable id of the measurement to be deleted | +**id** | **int** | Variable id of the measurement to be updated | +**note** | **string** | The new note for the measurement (optional) | [optional] **start_time** | **int** | The new timestamp for the the event in epoch seconds (optional) | [optional] **value** | **double** | The new value of for the measurement (optional) | [optional] -**note** | **string** | The new note for the measurement (optional) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/Option.md b/docs/Model/Option.md new file mode 100644 index 0000000..f2b51a5 --- /dev/null +++ b/docs/Model/Option.md @@ -0,0 +1,19 @@ +# Option + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**chart** | [**\QuantiModo\Client\Model\Chart**](Chart.md) | | +**colors** | **string[]** | | +**credits** | [**\QuantiModo\Client\Model\Credit**](Credit.md) | | +**lang** | [**\QuantiModo\Client\Model\Lang**](Lang.md) | | +**legend** | [**\QuantiModo\Client\Model\Legend**](Legend.md) | | +**loading** | [**\QuantiModo\Client\Model\Loading**](Loading.md) | | +**plot_options** | [**\QuantiModo\Client\Model\PlotOption**](PlotOption.md) | | +**title** | [**\QuantiModo\Client\Model\Title**](Title.md) | | +**x_axis** | [**\QuantiModo\Client\Model\XAxi**](XAxi.md) | | +**y_axis** | [**\QuantiModo\Client\Model\YAxi[]**](YAxi.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Pair.md b/docs/Model/Pair.md new file mode 100644 index 0000000..3c64e5b --- /dev/null +++ b/docs/Model/Pair.md @@ -0,0 +1,20 @@ +# Pair + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cause_measurement** | **double** | Example: 101341.66666667 | +**cause_measurement_value** | **double** | Example: 101341.66666667 | +**cause_variable_unit_abbreviated_name** | **string** | Example: mg | +**effect_measurement** | **double** | Example: 7.98 | +**effect_measurement_value** | **double** | Example: 7.98 | +**effect_variable_unit_abbreviated_name** | **string** | Example: % | +**event_at** | [**\DateTime**](\DateTime.md) | Example: 2015-08-06 15:49:02 | [optional] +**event_at_unix_time** | **int** | Example: 1438876142 | [optional] +**start_time_sting** | [**\DateTime**](\DateTime.md) | Example: 2016-06-03 07:00:00 | +**start_time_string** | [**\DateTime**](\DateTime.md) | Example: 2015-08-06 15:49:02 | [optional] +**timestamp** | **int** | Example: 1464937200 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/VariablesNew.md b/docs/Model/PairArray.md similarity index 94% rename from docs/Model/VariablesNew.md rename to docs/Model/PairArray.md index 4b0b63a..b8d3c4d 100644 --- a/docs/Model/VariablesNew.md +++ b/docs/Model/PairArray.md @@ -1,4 +1,4 @@ -# VariablesNew +# PairArray ## Properties Name | Type | Description | Notes diff --git a/docs/Model/InlineResponse2006.md b/docs/Model/PairsOfAveragesForAllUser.md similarity index 63% rename from docs/Model/InlineResponse2006.md rename to docs/Model/PairsOfAveragesForAllUser.md index 453521e..a340aaa 100644 --- a/docs/Model/InlineResponse2006.md +++ b/docs/Model/PairsOfAveragesForAllUser.md @@ -1,10 +1,10 @@ -# InlineResponse2006 +# PairsOfAveragesForAllUser ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**data** | [**\QuantiModo\Client\Model\Update[]**](Update.md) | | [optional] +**cause_variable_average_value** | **double** | Example: 435.73 | [optional] +**effect_variable_average_value** | **double** | Example: 3.3705 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/PairsOfAveragesForAllUserArray.md b/docs/Model/PairsOfAveragesForAllUserArray.md new file mode 100644 index 0000000..97c0fa7 --- /dev/null +++ b/docs/Model/PairsOfAveragesForAllUserArray.md @@ -0,0 +1,9 @@ +# PairsOfAveragesForAllUserArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/ParticipantInstruction.md b/docs/Model/ParticipantInstruction.md new file mode 100644 index 0000000..30c16a2 --- /dev/null +++ b/docs/Model/ParticipantInstruction.md @@ -0,0 +1,11 @@ +# ParticipantInstruction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instructions_for_cause_variable** | **string** | Example: <a href=\"https://www.amazon.com/Fitbit-Charge-Heart-Fitness-Wristband/dp/B01K9S260E/ref=as_li_ss_tl?ie=UTF8&qid=1493518902&sr=8-3&keywords=fitbit&th=1&linkCode=ll1&tag=quant08-20&linkId=b357b0833de73b0c4e935fd7c13a079e\">Obtain Fitbit</a> and use it to record your Sleep Duration. Once you have a <a href=\"https://www.amazon.com/Fitbit-Charge-Heart-Fitness-Wristband/dp/B01K9S260E/ref=as_li_ss_tl?ie=UTF8&qid=1493518902&sr=8-3&keywords=fitbit&th=1&linkCode=ll1&tag=quant08-20&linkId=b357b0833de73b0c4e935fd7c13a079e\">Fitbit</a> account, <a href=\"https://app.quantimo.do/ionic/Modo/www/#/app/import\">connect your Fitbit account at QuantiModo</a> to automatically import and analyze your data. | [optional] +**instructions_for_effect_variable** | **string** | Example: <a href=\"https://quantimo.do\">Obtain QuantiModo</a> and use it to record your Overall Mood. Once you have a <a href=\"https://quantimo.do\">QuantiModo</a> account, <a href=\"https://app.quantimo.do/ionic/Modo/www/#/app/import\">connect your QuantiModo account at QuantiModo</a> to automatically import and analyze your data. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Permission.md b/docs/Model/Permission.md deleted file mode 100644 index e074973..0000000 --- a/docs/Model/Permission.md +++ /dev/null @@ -1,16 +0,0 @@ -# Permission - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**target** | **int** | Grant permission to target user or public so they may access measurements within the given parameters. TODO: Rename target to something more intuitive. | -**variable_name** | **string** | ORIGINAL Variable name | -**min_timestamp** | **int** | Earliest time when measurements will be accessible in epoch seconds | -**max_timestamp** | **int** | Latest time when measurements will be accessible in epoch seconds | -**min_time_of_day** | **int** | Earliest time of day when measurements will be accessible in epoch seconds | -**max_time_of_day** | **int** | Latest time of day when measurements will be accessible in epoch seconds | -**week** | **string** | Maybe specifies if only weekday measurements should be accessible | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/InlineResponse2002.md b/docs/Model/PlotOption.md similarity index 64% rename from docs/Model/InlineResponse2002.md rename to docs/Model/PlotOption.md index 755099a..ef34f5c 100644 --- a/docs/Model/InlineResponse2002.md +++ b/docs/Model/PlotOption.md @@ -1,10 +1,10 @@ -# InlineResponse2002 +# PlotOption ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**data** | [**\QuantiModo\Client\Model\Connection[]**](Connection.md) | | [optional] +**column** | [**\QuantiModo\Client\Model\Column**](Column.md) | | +**scatter** | [**\QuantiModo\Client\Model\Scatter**](Scatter.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/PostCorrelation.md b/docs/Model/PostCorrelation.md index cf642af..b4ed134 100644 --- a/docs/Model/PostCorrelation.md +++ b/docs/Model/PostCorrelation.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cause_variable_name** | **string** | Cause variable name | -**effect_variable_name** | **string** | Effect variable name | **correlation** | **double** | Correlation value | +**effect_variable_name** | **string** | Effect variable name | **vote** | **int** | Vote: 0 or 1 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/PostMeasurementsDataResponse.md b/docs/Model/PostMeasurementsDataResponse.md new file mode 100644 index 0000000..97754fa --- /dev/null +++ b/docs/Model/PostMeasurementsDataResponse.md @@ -0,0 +1,10 @@ +# PostMeasurementsDataResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_variables** | [**\QuantiModo\Client\Model\UserVariable[]**](UserVariable.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/PostMeasurementsResponse.md b/docs/Model/PostMeasurementsResponse.md new file mode 100644 index 0000000..b091783 --- /dev/null +++ b/docs/Model/PostMeasurementsResponse.md @@ -0,0 +1,13 @@ +# PostMeasurementsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\QuantiModo\Client\Model\PostMeasurementsDataResponse**](PostMeasurementsDataResponse.md) | | [optional] +**message** | **string** | Message | [optional] +**status** | **int** | Status code | +**success** | **bool** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/PostStudyPublishResponse.md b/docs/Model/PostStudyPublishResponse.md new file mode 100644 index 0000000..0631d18 --- /dev/null +++ b/docs/Model/PostStudyPublishResponse.md @@ -0,0 +1,11 @@ +# PostStudyPublishResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **string** | Example: ok | [optional] +**success** | **bool** | Example: true | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/PostTrackingRemindersDataResponse.md b/docs/Model/PostTrackingRemindersDataResponse.md new file mode 100644 index 0000000..f64cd29 --- /dev/null +++ b/docs/Model/PostTrackingRemindersDataResponse.md @@ -0,0 +1,12 @@ +# PostTrackingRemindersDataResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tracking_reminder_notifications** | [**\QuantiModo\Client\Model\TrackingReminderNotification[]**](TrackingReminderNotification.md) | | [optional] +**tracking_reminders** | [**\QuantiModo\Client\Model\TrackingReminder[]**](TrackingReminder.md) | | [optional] +**user_variables** | [**\QuantiModo\Client\Model\UserVariable[]**](UserVariable.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/PostTrackingRemindersResponse.md b/docs/Model/PostTrackingRemindersResponse.md new file mode 100644 index 0000000..0d2d4de --- /dev/null +++ b/docs/Model/PostTrackingRemindersResponse.md @@ -0,0 +1,13 @@ +# PostTrackingRemindersResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\QuantiModo\Client\Model\PostTrackingRemindersDataResponse**](PostTrackingRemindersDataResponse.md) | | [optional] +**message** | **string** | Message | [optional] +**status** | **int** | Status code | +**success** | **bool** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/PostUserSettingsDataResponse.md b/docs/Model/PostUserSettingsDataResponse.md new file mode 100644 index 0000000..f0824c8 --- /dev/null +++ b/docs/Model/PostUserSettingsDataResponse.md @@ -0,0 +1,10 @@ +# PostUserSettingsDataResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purchase_id** | **int** | Example: 1 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/PostUserSettingsResponse.md b/docs/Model/PostUserSettingsResponse.md new file mode 100644 index 0000000..9e501f7 --- /dev/null +++ b/docs/Model/PostUserSettingsResponse.md @@ -0,0 +1,13 @@ +# PostUserSettingsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\QuantiModo\Client\Model\PostUserSettingsDataResponse**](PostUserSettingsDataResponse.md) | | [optional] +**message** | **string** | Message | [optional] +**status** | **int** | Status code | +**success** | **bool** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/PostVote.md b/docs/Model/PostVote.md deleted file mode 100644 index 6c34350..0000000 --- a/docs/Model/PostVote.md +++ /dev/null @@ -1,12 +0,0 @@ -# PostVote - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cause_variable_id** | **int** | Cause variable id | -**effect_variable_id** | **int** | Effect variable id | -**vote** | **bool** | Vote: 0 (for implausible) or 1 (for plausible) | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/ProcessedDailyMeasurement.md b/docs/Model/ProcessedDailyMeasurement.md new file mode 100644 index 0000000..4d6d1df --- /dev/null +++ b/docs/Model/ProcessedDailyMeasurement.md @@ -0,0 +1,22 @@ +# ProcessedDailyMeasurement + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**duration** | **int** | Example: 0 | +**id** | **string** | Example: | +**note** | **string** | Example: | +**original_unit_id** | **string** | Example: 47, 47, 47, 47, 47, 47 | +**original_value** | **string** | Example: 101800, 101800, 101700, 101600, 101600, 101600 | +**start_date** | **string** | Example: 2016-06-03 | +**start_time_epoch** | **int** | Example: 1464937200 | +**start_time_string** | [**\DateTime**](\DateTime.md) | Example: 2016-06-03 07:00:00 | +**unit_id** | **int** | Example: 47 | +**value** | **double** | Example: 101341.66666667 | +**variable_category_id** | **int** | Example: 17 | +**variable_id** | **int** | Example: 96380 | +**variable_name** | **string** | Example: Barometric Pressure | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Scatter.md b/docs/Model/Scatter.md new file mode 100644 index 0000000..4004a0e --- /dev/null +++ b/docs/Model/Scatter.md @@ -0,0 +1,12 @@ +# Scatter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**marker** | [**\QuantiModo\Client\Model\Marker**](Marker.md) | | +**states** | [**\QuantiModo\Client\Model\State**](State.md) | | +**tooltip** | [**\QuantiModo\Client\Model\Tooltip**](Tooltip.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Scope.md b/docs/Model/Scope.md new file mode 100644 index 0000000..4a28325 --- /dev/null +++ b/docs/Model/Scope.md @@ -0,0 +1,10 @@ +# Scope + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scalar** | **string** | Example: user_likes | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/ScopeArray.md b/docs/Model/ScopeArray.md new file mode 100644 index 0000000..8b00ccc --- /dev/null +++ b/docs/Model/ScopeArray.md @@ -0,0 +1,9 @@ +# ScopeArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Series.md b/docs/Model/Series.md new file mode 100644 index 0000000..d5dd4e5 --- /dev/null +++ b/docs/Model/Series.md @@ -0,0 +1,15 @@ +# Series + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **string** | Example: rgba(223, 83, 83, .5) | +**data** | [**\QuantiModo\Client\Model\Series[]**](Series.md) | | +**name** | **string** | Example: Reference And Learning Hours by Barometric Pressure | +**tooltip** | [**\QuantiModo\Client\Model\Tooltip**](Tooltip.md) | | +**type** | **string** | Example: spline | +**y_axis** | **int** | Example: 1 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/State.md b/docs/Model/State.md new file mode 100644 index 0000000..4d882e8 --- /dev/null +++ b/docs/Model/State.md @@ -0,0 +1,10 @@ +# State + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hover** | [**\QuantiModo\Client\Model\Hover**](Hover.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Study.md b/docs/Model/Study.md new file mode 100644 index 0000000..55144a2 --- /dev/null +++ b/docs/Model/Study.md @@ -0,0 +1,20 @@ +# Study + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cause_processed_daily_measurements** | [**\QuantiModo\Client\Model\ProcessedDailyMeasurement[]**](ProcessedDailyMeasurement.md) | | +**cause_variable** | [**\QuantiModo\Client\Model\UserVariable**](UserVariable.md) | | +**charts** | [**\QuantiModo\Client\Model\Highchart[]**](Highchart.md) | | +**effect_processed_daily_measurements** | [**\QuantiModo\Client\Model\ProcessedDailyMeasurement[]**](ProcessedDailyMeasurement.md) | | +**effect_variable** | [**\QuantiModo\Client\Model\UserVariable**](UserVariable.md) | | +**highcharts** | [**\QuantiModo\Client\Model\HighchartArray**](HighchartArray.md) | | [optional] +**pairs** | [**\QuantiModo\Client\Model\Pair[]**](Pair.md) | | +**statistics** | [**\QuantiModo\Client\Model\Correlation**](Correlation.md) | | +**text** | **string** | Example: | +**user** | **string** | Example: | +**user_id** | **int** | Example: 230 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Subtitle.md b/docs/Model/Subtitle.md new file mode 100644 index 0000000..76efa7a --- /dev/null +++ b/docs/Model/Subtitle.md @@ -0,0 +1,10 @@ +# Subtitle + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **string** | Example: | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Text.md b/docs/Model/Text.md new file mode 100644 index 0000000..9630fbb --- /dev/null +++ b/docs/Model/Text.md @@ -0,0 +1,18 @@ +# Text + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_analysis** | **string** | Example: It was assumed that 0 hours would pass before a change in Very Distracting Time would produce an observable change in Video Activities. It was assumed that Very Distracting Time could produce an observable change in Video Activities for as much as 7 days after the stimulus event. | [optional] +**data_sources** | **string** | Example: Very Distracting Time data was primarily collected using <a href=\"https://www.rescuetime.com/rp/quantimodo/plans\">RescueTime</a>. Detailed reports show which applications and websites you spent time on. Activities are automatically grouped into pre-defined categories with built-in productivity scores covering thousands of websites and applications. You can customize categories and productivity scores to meet your needs.<br>Video Activities data was primarily collected using <a href=\"https://www.rescuetime.com/rp/quantimodo/plans\">RescueTime</a>. Detailed reports show which applications and websites you spent time on. Activities are automatically grouped into pre-defined categories with built-in productivity scores covering thousands of websites and applications. You can customize categories and productivity scores to meet your needs. | [optional] +**significance_explanation** | **string** | Example: Using a two-tailed t-test with alpha = 0.05, it was determined that the change in Video Activities is statistically significant at 95% confidence interval. | [optional] +**study_abstract** | **string** | Example: Aggregated data from 21 suggests with a low degree of confidence (p=0.097) that Very Distracting Time (Work) has a moderately positive predictive relationship (R=0.354) with Video Activities (Activity). The highest quartile of Video Activities measurements were observed following an average 2.03h Very Distracting Timeper day. The lowest quartile of Video Activities measurements were observed following an average 1.04h Very Distracting Timeper day. | [optional] +**study_design** | **string** | Example: This study is based on data donated by 21 QuantiModo users. Thus, the study design is equivalent to the aggregation of 21 separate n=1 observational natural experiments. | [optional] +**study_limitations** | **string** | Example: As with any human experiment, it was impossible to control for all potentially confounding variables. Correlation does not necessarily imply correlation. We can never know for sure if one factor is definitely the cause of an outcome. However, lack of correlation definitely implies the lack of a causal relationship. Hence, we can with great confidence rule out non-existent relationships. For instance, if we discover no relationship between mood and an antidepressant this information is just as or even more valuable than the discovery that there is a relationship. <br> <br> We can also take advantage of several characteristics of time series data from many subjects to infer the likelihood of a causal relationship if we do find a correlational relationship. The criteria for causation are a group of minimal conditions necessary to provide adequate evidence of a causal relationship between an incidence and a possible consequence. The list of the criteria is as follows: <br> 1. Strength (effect size): A small association does not mean that there is not a causal effect, though the larger the association, the more likely that it is causal. <br> 2. Consistency (reproducibility): Consistent findings observed by different persons in different places with different samples strengthens the likelihood of an effect. <br> 3. Specificity: Causation is likely if a very specific population at a specific site and disease with no other likely explanation. The more specific an association between a factor and an effect is, the bigger the probability of a causal relationship. <br> 4. Temporality: The effect has to occur after the cause (and if there is an expected delay between the cause and expected effect, then the effect must occur after that delay). <br> 5. Biological gradient: Greater exposure should generally lead to greater incidence of the effect. However, in some cases, the mere presence of the factor can trigger the effect. In other cases, an inverse proportion is observed: greater exposure leads to lower incidence. <br> 6. Plausibility: A plausible mechanism between cause and effect is helpful. <br> 7. Coherence: Coherence between epidemiological and laboratory findings increases the likelihood of an effect. <br> 8. Experiment: \"Occasionally it is possible to appeal to experimental evidence\". <br> 9. Analogy: The effect of similar factors may be considered. <br> <br> The confidence in a causal relationship is bolstered by the fact that time-precedence was taken into account in all calculations. Furthermore, in accordance with the law of large numbers (LLN), the predictive power and accuracy of these results will continually grow over time. 146 paired data points were used in this analysis. Assuming that the relationship is merely coincidental, as the participant independently modifies their Very Distracting Time values, the observed strength of the relationship will decline until it is below the threshold of significance. To it another way, in the case that we do find a spurious correlation, suggesting that banana intake improves mood for instance, one will likely increase their banana intake. Due to the fact that this correlation is spurious, it is unlikely that you will see a continued and persistent corresponding increase in mood. So over time, the spurious correlation will naturally dissipate.Furthermore, it will be very enlightening to aggregate this data with the data from other participants with similar genetic, diseasomic, environmentomic, and demographic profiles. | [optional] +**study_objective** | **string** | Example: The objective of this study is to determine the nature of the relationship (if any) between the Very Distracting Time and the Video Activities. Additionally, we attempt to determine the Very Distracting Time values most likely to produce optimal Video Activities values. | [optional] +**study_results** | **string** | Example: This analysis suggests that higher Very Distracting Time (Work) generally predicts negative Video Activities (p = 0.097). Video Activities is, on average, 36% higher after around 2.03 Very Distracting Time. After an onset delay of 168 hours, Video Activities is, on average, 16% lower than its average over the 168 hours following around 1.04 Very Distracting Time. 146 data points were used in this analysis. The value for Very Distracting Time changed 2984 times, effectively running 1492 separate natural experiments. The top quartile outcome values are preceded by an average 2.03 h of Very Distracting Time. The bottom quartile outcome values are preceded by an average 1.04 h of Very Distracting Time. Forward Pearson Correlation Coefficient was 0.354 (p=0.097, 95% CI -0.437 to 1.144 onset delay = 0 hours, duration of action = 168 hours) . The Reverse Pearson Correlation Coefficient was 0.208 (P=0.097, 95% CI -0.583 to 0.998, onset delay = -0 hours, duration of action = -168 hours). When the Very Distracting Time value is closer to 2.03 h than 1.04 h, the Video Activities value which follows is, on average, 36% percent higher than its typical value. When the Very Distracting Time value is closer to 1.04 h than 2.03 h, the Video Activities value which follows is 0% lower than its typical value. Video Activities is 5 h (67% higher) on average after days with around 5 h Very Distracting Time | [optional] +**study_title** | **string** | Example: N1 Study: Very Distracting Time Predicts Negative Video Activities | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/InlineResponse2001.md b/docs/Model/Title.md similarity index 71% rename from docs/Model/InlineResponse2001.md rename to docs/Model/Title.md index 5d21e06..8e7bf8d 100644 --- a/docs/Model/InlineResponse2001.md +++ b/docs/Model/Title.md @@ -1,10 +1,10 @@ -# InlineResponse2001 +# Title ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**data** | **string** | | [optional] +**enabled** | **bool** | Example: true | +**text** | **string** | Example: Barometric Pressure (Pa) | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/Tooltip.md b/docs/Model/Tooltip.md new file mode 100644 index 0000000..e46d3de --- /dev/null +++ b/docs/Model/Tooltip.md @@ -0,0 +1,11 @@ +# Tooltip + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**point_format** | **string** | Example: {point.x}Pa, {point.y}h | +**value_suffix** | **string** | Example: Pa | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/TrackingReminder.md b/docs/Model/TrackingReminder.md index 5184b8b..8ede0f7 100644 --- a/docs/Model/TrackingReminder.md +++ b/docs/Model/TrackingReminder.md @@ -3,28 +3,77 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | id | [optional] +**available_units** | [**\QuantiModo\Client\Model\Unit[]**](Unit.md) | | [optional] **client_id** | **string** | clientId | [optional] -**user_id** | **int** | ID of User | [optional] -**variable_id** | **int** | Id for the variable to be tracked | -**default_value** | **float** | Default value to use for the measurement when tracking | -**reminder_start_time** | **string** | Earliest time of day at which reminders should appear in UTC HH:MM:SS format | [optional] +**combination_operation** | **string** | The way multiple measurements are aggregated over time | [optional] +**created_at** | [**\DateTime**](\DateTime.md) | Example: 2016-05-18 02:24:08 | [optional] +**unit_abbreviated_name** | **string** | Example: /5 | +**unit_category_id** | **int** | Example: 5 | [optional] +**unit_category_name** | **string** | Example: Rating | [optional] +**unit_id** | **int** | Example: 10 | [optional] +**unit_name** | **string** | Example: 1 to 5 Rating | [optional] +**default_value** | **float** | Default value to use for the measurement when tracking | [optional] +**email** | **bool** | True if the reminders should be delivered via email | [optional] +**error_message** | **string** | Example: reminderStartTimeLocal is less than $user->earliestReminderTime or greater than $user->latestReminderTime | [optional] +**filling_value** | **int** | Example: 0 | [optional] +**first_daily_reminder_time** | [**\DateTime**](\DateTime.md) | Example: 02:45:20 | [optional] +**frequency_text_description** | **string** | Example: Daily | [optional] +**frequency_text_description_with_time** | **string** | Example: Daily at 09:45 PM | [optional] +**id** | **int** | id | [optional] +**input_type** | **string** | Example: saddestFaceIsFive | [optional] +**instructions** | **string** | Example: I am an instruction! | [optional] +**ion_icon** | **string** | Example: ion-sad-outline | [optional] +**last_tracked** | [**\DateTime**](\DateTime.md) | UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` timestamp for the last time a measurement was received for this user and variable | [optional] +**last_value** | **double** | Example: 2 | [optional] +**latest_tracking_reminder_notification_reminder_time** | [**\DateTime**](\DateTime.md) | UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` timestamp for the reminder time of the latest tracking reminder notification that has been pre-emptively generated in the database | [optional] +**local_daily_reminder_notification_times** | **string[]** | | [optional] +**local_daily_reminder_notification_times_for_all_reminders** | **string[]** | | [optional] +**manual_tracking** | **bool** | Example: 1 | [optional] +**maximum_allowed_value** | **int** | Example: 5 | [optional] +**minimum_allowed_value** | **int** | Example: 1 | [optional] +**next_reminder_time_epoch_seconds** | **int** | Example: 1501555520 | [optional] +**notification_bar** | **bool** | True if the reminders should appear in the notification bar | [optional] +**number_of_raw_measurements** | **int** | Example: 445 | [optional] +**number_of_unique_values** | **int** | Example: 1 | [optional] +**png_path** | **string** | Example: img/variable_categories/symptoms.png | [optional] +**png_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/symptoms.png | [optional] +**pop_up** | **bool** | True if the reminders should appear as a popup notification | [optional] **reminder_end_time** | **string** | Latest time of day at which reminders should appear in UTC HH:MM:SS format | [optional] -**reminder_sound** | **string** | String identifier for the sound to accompany the reminder | [optional] **reminder_frequency** | **int** | Number of seconds between one reminder and the next | -**pop_up** | **bool** | True if the reminders should appear as a popup notification | [optional] +**reminder_sound** | **string** | String identifier for the sound to accompany the reminder | [optional] +**reminder_start_epoch_seconds** | **int** | Example: 1469760320 | [optional] +**reminder_start_time** | **string** | Earliest time of day at which reminders should appear in UTC HH:MM:SS format | [optional] +**reminder_start_time_local** | [**\DateTime**](\DateTime.md) | Example: 21:45:20 | [optional] +**reminder_start_time_local_human_formatted** | [**\DateTime**](\DateTime.md) | Example: 09:45 PM | [optional] +**repeating** | **bool** | Example: true | [optional] +**second_daily_reminder_time** | [**\DateTime**](\DateTime.md) | Example: 01:00:00 | [optional] +**second_to_last_value** | **double** | Example: 1 | [optional] **sms** | **bool** | True if the reminders should be delivered via SMS | [optional] -**email** | **bool** | True if the reminders should be delivered via email | [optional] -**notification_bar** | **bool** | True if the reminders should appear in the notification bar | [optional] -**latest_tracking_reminder_notification_reminder_time** | [**\DateTime**](\DateTime.md) | UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" timestamp for the reminder time of the latest tracking reminder notification that has been pre-emptively generated in the database | [optional] -**last_tracked** | [**\DateTime**](\DateTime.md) | UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" timestamp for the last time a measurement was received for this user and variable | [optional] **start_tracking_date** | **string** | Earliest date on which the user should be reminded to track in YYYY-MM-DD format | [optional] **stop_tracking_date** | **string** | Latest date on which the user should be reminded to track in YYYY-MM-DD format | [optional] -**updated_at** | [**\DateTime**](\DateTime.md) | When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. | [optional] -**variable_name** | **string** | Name of the variable to be used when sending measurements | [optional] -**variable_category_name** | **string** | Name of the variable category to be used when sending measurements | [optional] -**abbreviated_unit_name** | **string** | Abbreviated name of the unit to be used when sending measurements | [optional] -**combination_operation** | **string** | The way multiple measurements are aggregated over time | [optional] +**svg_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/symptoms.svg | [optional] +**third_daily_reminder_time** | [**\DateTime**](\DateTime.md) | Example: 20:00:00 | [optional] +**third_to_last_value** | **double** | Example: 3 | [optional] +**tracking_reminder_id** | **int** | Example: 11841 | [optional] +**tracking_reminder_image_url** | **string** | Example: Not Found | [optional] +**updated_at** | [**\DateTime**](\DateTime.md) | When the record in the database was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] +**user_id** | **int** | ID of User | [optional] +**user_variable_unit_abbreviated_name** | **string** | Example: /5 | [optional] +**user_variable_unit_category_id** | **int** | Example: 5 | [optional] +**user_variable_unit_category_name** | **string** | Example: Rating | [optional] +**user_variable_unit_id** | **int** | Example: 10 | [optional] +**user_variable_unit_name** | **string** | Example: 1 to 5 Rating | [optional] +**user_variable_variable_category_id** | **int** | Example: 10 | [optional] +**user_variable_variable_category_name** | **string** | Example: Symptoms | [optional] +**valence** | **string** | Example: negative | [optional] +**value_and_frequency_text_description** | **string** | Example: Rate daily | [optional] +**value_and_frequency_text_description_with_time** | **string** | Example: Rate daily at 09:45 PM | [optional] +**variable_category_id** | **int** | Example: 10 | [optional] +**variable_category_image_url** | **string** | Example: https://maxcdn.icons8.com/Color/PNG/96/Messaging/sad-96.png | [optional] +**variable_category_name** | **string** | Name of the variable category to be used when sending measurements | +**variable_description** | **string** | Example: negative | [optional] +**variable_id** | **int** | Id for the variable to be tracked | [optional] +**variable_name** | **string** | Name of the variable to be used when sending measurements | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/TrackingReminderArray.md b/docs/Model/TrackingReminderArray.md new file mode 100644 index 0000000..bc77c33 --- /dev/null +++ b/docs/Model/TrackingReminderArray.md @@ -0,0 +1,9 @@ +# TrackingReminderArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/TrackingReminderDelete.md b/docs/Model/TrackingReminderDelete.md index 18653b7..119cc24 100644 --- a/docs/Model/TrackingReminderDelete.md +++ b/docs/Model/TrackingReminderDelete.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Id of the PENDING reminder to be deleted | +**id** | **int** | Id of the TrackingReminder to be deleted | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/TrackingReminderNotification.md b/docs/Model/TrackingReminderNotification.md index dfbfbf0..a2a02e2 100644 --- a/docs/Model/TrackingReminderNotification.md +++ b/docs/Model/TrackingReminderNotification.md @@ -3,23 +3,72 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | id for the specific PENDING tracking remidner | -**tracking_reminder_id** | **int** | id for the repeating tracking remidner | +**action_array** | [**\QuantiModo\Client\Model\TrackingReminderNotificationActionArray[]**](TrackingReminderNotificationActionArray.md) | | +**available_units** | [**\QuantiModo\Client\Model\Unit[]**](Unit.md) | | **client_id** | **string** | clientId | [optional] -**user_id** | **int** | ID of User | [optional] -**variable_id** | **int** | Id for the variable to be tracked | [optional] -**pending_reminder_time** | [**\DateTime**](\DateTime.md) | UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" timestamp for the specific time the variable should be tracked in UTC. This will be used for the measurement startTime if the track endpoint is used. | [optional] +**combination_operation** | **string** | The way multiple measurements are aggregated over time | [optional] +**created_at** | [**\DateTime**](\DateTime.md) | Example: 2017-07-29 20:49:54 | [optional] +**unit_abbreviated_name** | **string** | Example: /5 | [optional] +**unit_category_id** | **int** | Example: 5 | [optional] +**unit_category_name** | **string** | Example: Rating | [optional] +**unit_id** | **int** | Example: 10 | [optional] +**unit_name** | **string** | Example: 1 to 5 Rating | [optional] **default_value** | **float** | Default value to use for the measurement when tracking | [optional] -**reminder_sound** | **string** | String identifier for the sound to accompany the reminder | [optional] -**pop_up** | **bool** | True if the reminders should appear as a popup notification | [optional] -**sms** | **bool** | True if the reminders should be delivered via SMS | [optional] +**description** | **string** | Example: positive | [optional] **email** | **bool** | True if the reminders should be delivered via email | [optional] +**filling_value** | **int** | Example: 0 | +**icon_icon** | **string** | Example: ion-sad-outline | [optional] +**id** | **int** | id for the specific PENDING tracking remidner | +**image_url** | **string** | Example: https://rximage.nlm.nih.gov/image/images/gallery/original/55111-0129-60_RXNAVIMAGE10_B051D81E.jpg | [optional] +**input_type** | **string** | Example: happiestFaceIsFive | [optional] +**ion_icon** | **string** | Example: ion-happy-outline | [optional] +**last_value** | **double** | Example: 3 | [optional] +**manual_tracking** | **bool** | Example: 1 | [optional] +**maximum_allowed_value** | **int** | Example: 5 | [optional] +**minimum_allowed_value** | **int** | Example: 1 | [optional] +**most_common_value** | **double** | Example: 3 | [optional] **notification_bar** | **bool** | True if the reminders should appear in the notification bar | [optional] -**updated_at** | [**\DateTime**](\DateTime.md) | When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. | [optional] -**variable_name** | **string** | Name of the variable to be used when sending measurements | [optional] +**notified_at** | [**\DateTime**](\DateTime.md) | Example: | [optional] +**number_of_unique_values** | **int** | Example: 5 | [optional] +**png_path** | **string** | Example: img/variable_categories/emotions.png | [optional] +**png_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.png | [optional] +**pop_up** | **bool** | True if the reminders should appear as a popup notification | [optional] +**reminder_end_time** | [**\DateTime**](\DateTime.md) | Example: | [optional] +**reminder_frequency** | **int** | How often user should be reminded in seconds. Example: 86400 | [optional] +**reminder_sound** | **string** | String identifier for the sound to accompany the reminder | [optional] +**reminder_start_time** | **string** | Earliest time of day at which reminders should appear in UTC HH:MM:SS format | [optional] +**reminder_time** | [**\DateTime**](\DateTime.md) | UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` timestamp for the specific time the variable should be tracked in UTC. This will be used for the measurement startTime if the track endpoint is used. | [optional] +**second_most_common_value** | **double** | Example: 4 | [optional] +**second_to_last_value** | **double** | Example: 1 | [optional] +**sms** | **bool** | True if the reminders should be delivered via SMS | [optional] +**svg_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.svg | [optional] +**third_most_common_value** | **double** | Example: 2 | [optional] +**third_to_last_value** | **double** | Example: 2 | [optional] +**title** | **string** | Example: Rate Overall Mood | [optional] +**total** | **double** | Example: 3 | [optional] +**track_all_actions** | [**\QuantiModo\Client\Model\TrackingReminderNotificationTrackAllAction[]**](TrackingReminderNotificationTrackAllAction.md) | | +**tracking_reminder_id** | **int** | id for the repeating tracking remidner | [optional] +**tracking_reminder_image_url** | **string** | Example: https://rximage.nlm.nih.gov/image/images/gallery/original/55111-0129-60_RXNAVIMAGE10_B051D81E.jpg | [optional] +**tracking_reminder_notification_id** | **int** | Example: 5072482 | [optional] +**tracking_reminder_notification_time** | [**\DateTime**](\DateTime.md) | UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` timestamp for the specific time the variable should be tracked in UTC. This will be used for the measurement startTime if the track endpoint is used. | [optional] +**tracking_reminder_notification_time_epoch** | **int** | Example: 1501534124 | [optional] +**tracking_reminder_notification_time_local** | **string** | Example: 15:48:44 | [optional] +**updated_at** | [**\DateTime**](\DateTime.md) | When the record in the database was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. | [optional] +**user_id** | **int** | ID of User | [optional] +**user_variable_unit_abbreviated_name** | **string** | Example: /5 | [optional] +**user_variable_unit_category_id** | **int** | Example: 5 | [optional] +**user_variable_unit_category_name** | **string** | Example: Rating | [optional] +**user_variable_unit_id** | **int** | Example: 10 | [optional] +**user_variable_unit_name** | **string** | Example: 1 to 5 Rating | [optional] +**user_variable_variable_category_id** | **int** | Example: 1 | [optional] +**user_variable_variable_category_name** | **string** | Example: Emotions | [optional] +**valence** | **string** | Example: positive | [optional] +**variable_category_id** | **int** | Example: 1 | [optional] +**variable_category_image_url** | **string** | Example: https://maxcdn.icons8.com/Color/PNG/96/Cinema/theatre_mask-96.png | [optional] **variable_category_name** | **string** | Name of the variable category to be used when sending measurements | [optional] -**abbreviated_unit_name** | **string** | Abbreviated name of the unit to be used when sending measurements | [optional] -**combination_operation** | **string** | The way multiple measurements are aggregated over time | [optional] +**variable_id** | **int** | Id for the variable to be tracked | [optional] +**variable_image_url** | **string** | Example: | [optional] +**variable_name** | **string** | Name of the variable to be used when sending measurements | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/TrackingReminderNotificationActionArray.md b/docs/Model/TrackingReminderNotificationActionArray.md new file mode 100644 index 0000000..b0a0594 --- /dev/null +++ b/docs/Model/TrackingReminderNotificationActionArray.md @@ -0,0 +1,13 @@ +# TrackingReminderNotificationActionArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **string** | Example: track | +**callback** | **string** | Example: trackThreeRatingAction | +**modified_value** | **int** | Example: 3 | +**title** | **string** | Example: Rate 3/5 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/TrackingReminderNotificationArray.md b/docs/Model/TrackingReminderNotificationArray.md new file mode 100644 index 0000000..a3e35cd --- /dev/null +++ b/docs/Model/TrackingReminderNotificationArray.md @@ -0,0 +1,9 @@ +# TrackingReminderNotificationArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/TrackingReminderNotificationTrack.md b/docs/Model/TrackingReminderNotificationPost.md similarity index 60% rename from docs/Model/TrackingReminderNotificationTrack.md rename to docs/Model/TrackingReminderNotificationPost.md index 16ed5f5..1898eac 100644 --- a/docs/Model/TrackingReminderNotificationTrack.md +++ b/docs/Model/TrackingReminderNotificationPost.md @@ -1,9 +1,10 @@ -# TrackingReminderNotificationTrack +# TrackingReminderNotificationPost ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tracking_reminder_notification** | [**\QuantiModo\Client\Model\TrackingReminderNotification**](TrackingReminderNotification.md) | | +**action** | **string** | track records a measurement for the notification. snooze changes the notification to 1 hour from now. skip deletes the notification. | +**id** | **float** | Id of the TrackingReminderNotification | **modified_value** | **float** | Optional value to be recorded instead of the tracking reminder default value | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/TrackingReminderNotificationTrackAllAction.md b/docs/Model/TrackingReminderNotificationTrackAllAction.md new file mode 100644 index 0000000..991725d --- /dev/null +++ b/docs/Model/TrackingReminderNotificationTrackAllAction.md @@ -0,0 +1,13 @@ +# TrackingReminderNotificationTrackAllAction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **string** | Example: trackAll | +**callback** | **string** | Example: trackThreeRatingAction | +**modified_value** | **int** | Example: 3 | +**title** | **string** | Example: Rate 3/5 for all | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/TrackingReminderNotificationsArray.md b/docs/Model/TrackingReminderNotificationsArray.md new file mode 100644 index 0000000..a2d96c4 --- /dev/null +++ b/docs/Model/TrackingReminderNotificationsArray.md @@ -0,0 +1,9 @@ +# TrackingReminderNotificationsArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/TrackingRemindersArray.md b/docs/Model/TrackingRemindersArray.md new file mode 100644 index 0000000..fd0cc69 --- /dev/null +++ b/docs/Model/TrackingRemindersArray.md @@ -0,0 +1,9 @@ +# TrackingRemindersArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Unit.md b/docs/Model/Unit.md index c3c22bd..645bbb4 100644 --- a/docs/Model/Unit.md +++ b/docs/Model/Unit.md @@ -3,12 +3,20 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Unit name | **abbreviated_name** | **string** | Unit abbreviation | +**advanced** | **int** | Example: 1 | [optional] **category** | **string** | Unit category | -**minimum_allowed_value** | **double** | The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. | [optional] -**maximum_allowed_value** | **double** | The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. | [optional] +**category_id** | **int** | Example: 6 | [optional] +**category_name** | **string** | Example: Miscellany | [optional] **conversion_steps** | [**\QuantiModo\Client\Model\ConversionStep[]**](ConversionStep.md) | Conversion steps list | +**id** | **int** | Example: 29 | [optional] +**manual_tracking** | **int** | Example: 0 | [optional] +**maximum_allowed_value** | **double** | The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. | [optional] +**maximum_value** | **int** | Example: 4 | +**minimum_allowed_value** | **double** | The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. | [optional] +**minimum_value** | **int** | Example: 0 | [optional] +**name** | **string** | Unit name | +**unit_category** | [**\QuantiModo\Client\Model\UnitCategory**](UnitCategory.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/UnitArray.md b/docs/Model/UnitArray.md new file mode 100644 index 0000000..4449eed --- /dev/null +++ b/docs/Model/UnitArray.md @@ -0,0 +1,9 @@ +# UnitArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/UnitCategory.md b/docs/Model/UnitCategory.md index 6752bc6..e905bec 100644 --- a/docs/Model/UnitCategory.md +++ b/docs/Model/UnitCategory.md @@ -3,7 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **int** | id | [optional] **name** | **string** | Category name | +**standard_unit_abbreviated_name** | **string** | Base unit for in which measurements are to be converted to and stored | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/Update.md b/docs/Model/Update.md deleted file mode 100644 index 68d0412..0000000 --- a/docs/Model/Update.md +++ /dev/null @@ -1,17 +0,0 @@ -# Update - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | id | [optional] -**user_id** | **int** | user_id | [optional] -**connector_id** | **int** | connector_id | [optional] -**number_of_measurements** | **int** | number_of_measurements | [optional] -**success** | **bool** | success | -**message** | **string** | message | -**created_at** | [**\DateTime**](\DateTime.md) | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] -**updated_at** | [**\DateTime**](\DateTime.md) | When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/User.md b/docs/Model/User.md index 6f9befb..4083fe8 100644 --- a/docs/Model/User.md +++ b/docs/Model/User.md @@ -3,13 +3,49 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | User id | -**wp_id** | **int** | Wordpress user id | +**access_token** | **string** | User access token | +**access_token_expires** | **string** | Example: 2018-08-08 02:41:19 | [optional] +**access_token_expires_at_milliseconds** | **int** | Example: 1533696079000 | [optional] +**administrator** | **bool** | Is user administrator | +**avatar** | **string** | Example: https://lh6.googleusercontent.com/-BHr4hyUWqZU/AAAAAAAAAAI/AAAAAAAIG28/2Lv0en738II/photo.jpg?sz=50 | [optional] +**avatar_image** | **string** | Example: https://lh6.googleusercontent.com/-BHr4hyUWqZU/AAAAAAAAAAI/AAAAAAAIG28/2Lv0en738II/photo.jpg?sz=50 | [optional] +**capabilities** | **string** | Example: a:1:{s:13:\"administrator\";b:1;} | [optional] +**client_id** | **string** | Example: quantimodo | [optional] +**client_user_id** | **string** | Example: 118444693184829555362 | [optional] +**combine_notifications** | **bool** | Example: 1 | [optional] **display_name** | **string** | User display name | -**login_name** | **string** | User login name | +**earliest_reminder_time** | [**\DateTime**](\DateTime.md) | Earliest time user should get notifications. Example: 05:00:00 | [optional] **email** | **string** | User email | -**token** | **string** | User token | -**administrator** | **bool** | Is user administrator | +**first_name** | **string** | Example: Mike | [optional] +**get_preview_builds** | **bool** | Example: false | [optional] +**has_android_app** | **bool** | Example: false | [optional] +**has_chrome_extension** | **bool** | Example: false | [optional] +**has_ios_app** | **bool** | Example: false | [optional] +**id** | **int** | User id | +**last_four** | **string** | Example: 2009 | [optional] +**last_name** | **string** | Example: Sinn | [optional] +**last_sms_tracking_reminder_notification_id** | **string** | Example: | [optional] +**latest_reminder_time** | **string** | Latest time user should get notifications. Example: 23:00:00 | [optional] +**login_name** | **string** | User login name | +**password** | **string** | Example: PASSWORD | [optional] +**phone_number** | **string** | Example: | [optional] +**phone_verification_code** | **string** | Example: | [optional] +**push_notifications_enabled** | **bool** | Example: 1 | [optional] +**refresh_token** | **string** | Example: 6e99b113d85586de1f92468433f2df1e666647cb | [optional] +**roles** | **string** | Example: [\"admin\"] | [optional] +**send_predictor_emails** | **bool** | Example: 1 | [optional] +**send_reminder_notification_emails** | **bool** | Example: 1 | [optional] +**sms_notifications_enabled** | **bool** | Example: false | [optional] +**stripe_active** | **bool** | Example: 1 | [optional] +**stripe_id** | **string** | Example: cus_A8CEmcvl8jwLhV | [optional] +**stripe_plan** | **string** | Example: monthly7 | [optional] +**stripe_subscription** | **string** | Example: sub_ANTx3nOE7nzjQf | [optional] +**subscription_ends_at** | [**\DateTime**](\DateTime.md) | Example: | [optional] +**subscription_provider** | **string** | Example: google | [optional] +**time_zone_offset** | **int** | Example: 300 | [optional] +**track_location** | **bool** | Example: 1 | [optional] +**user_registered** | [**\DateTime**](\DateTime.md) | Example: 2013-12-03 15:25:13 | [optional] +**user_url** | **string** | Example: https://plus.google.com/+MikeSinn | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/UserStudy.md b/docs/Model/UserStudy.md new file mode 100644 index 0000000..0af21e1 --- /dev/null +++ b/docs/Model/UserStudy.md @@ -0,0 +1,129 @@ +# UserStudy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**all_pairs_significance** | **double** | Example: 1 | [optional] +**average_daily_high_cause** | **double** | Example: 8.8 | [optional] +**average_daily_low_cause** | **double** | Example: 5.93 | [optional] +**average_effect** | **double** | Example: 2.7265782739077 | [optional] +**average_effect_following_high_cause** | **double** | Example: 2.62 | [optional] +**average_effect_following_high_cause_explanation** | **string** | Example: Overall Mood is 2.62/5 (4% lower) on average after days with around 8.8 h Sleep Duration | [optional] +**average_effect_following_low_cause** | **double** | Example: 2.82 | [optional] +**average_effect_following_low_cause_explanation** | **string** | Example: Overall Mood is 2.82/5 (3% higher) on average after days with around 5.93 h Sleep Duration | [optional] +**causality_factor** | **double** | Example: -0.173 | [optional] +**cause_changes** | **int** | Example: 1010 | [optional] +**cause_changes_statistical_significance** | **double** | Example: 1 | [optional] +**cause_data_source** | [**\QuantiModo\Client\Model\DataSource**](DataSource.md) | | [optional] +**cause_number_of_processed_daily_measurements** | **int** | Example: 1113 | [optional] +**cause_number_of_raw_measurements** | **int** | Example: 1942 | [optional] +**cause_value_spread** | **double** | Example: 12.45 | [optional] +**cause_variable** | [**\QuantiModo\Client\Model\UserVariable**](UserVariable.md) | | [optional] +**cause_variable_category_id** | **int** | Example: 6 | [optional] +**cause_variable_category_name** | **string** | Example: Sleep | [optional] +**cause_variable_unit_abbreviated_name** | **string** | Example: h | [optional] +**cause_variable_unit_id** | **int** | Example: 34 | [optional] +**cause_variable_id** | **int** | Example: 1867 | [optional] +**cause_variable_image_url** | **string** | Example: https://maxcdn.icons8.com/Color/PNG/96/Household/sleeping_in_bed-96.png | [optional] +**cause_variable_ion_icon** | **string** | Example: ion-ios-cloudy-night-outline | [optional] +**cause_variable_most_common_connector_id** | **int** | Example: 7 | [optional] +**cause_variable_name** | **string** | Example: Sleep Duration | [optional] +**charts** | [**\QuantiModo\Client\Model\Chart[]**](Chart.md) | | [optional] +**confidence_interval** | **double** | Example: 0.055165978848875 | [optional] +**confidence_level** | **string** | Example: high | [optional] +**correlation_coefficient** | **double** | Example: -0.173 | [optional] +**correlation_is_contradictory_to_optimal_values** | **bool** | Example: false | [optional] +**critical_t_value** | **double** | Example: 1.646 | [optional] +**data_analysis** | **string** | Example: It was assumed that 0 hours would pass before a change in Sleep Duration would produce an observable change in Overall Mood. It was assumed that Sleep Duration could produce an observable change in Overall Mood for as much as 7 days after the stimulus event. | [optional] +**data_sources** | **string** | Example: Sleep Duration data was primarily collected using <a href=\"https://www.amazon.com/Fitbit-Charge-Heart-Fitness-Wristband/dp/B01K9S260E/ref=as_li_ss_tl?ie=UTF8&qid=1493518902&sr=8-3&keywords=fitbit&th=1&linkCode=ll1&tag=quant08-20&linkId=b357b0833de73b0c4e935fd7c13a079e\">Fitbit</a>. <a href=\"https://www.amazon.com/Fitbit-Charge-Heart-Fitness-Wristband/dp/B01K9S260E/ref=as_li_ss_tl?ie=UTF8&qid=1493518902&sr=8-3&keywords=fitbit&th=1&linkCode=ll1&tag=quant08-20&linkId=b357b0833de73b0c4e935fd7c13a079e\">Fitbit</a> makes activity tracking easy and automatic.<br>Overall Mood data was primarily collected using <a href=\"https://quantimo.do\">QuantiModo</a>. <a href=\"https://quantimo.do\">QuantiModo</a> is a Chrome extension, Android app, iOS app, and web app that allows you to easily track mood, symptoms, or any outcome you want to optimize in a fraction of a second. You can also import your data from over 30 other apps and devices like Fitbit, Rescuetime, Jawbone Up, Withings, Facebook, Github, Google Calendar, Runkeeper, MoodPanda, Slice, Google Fit, and more. <a href=\"https://quantimo.do\">QuantiModo</a> then analyzes your data to identify which hidden factors are most likely to be influencing your mood or symptoms and their optimal daily values. | [optional] +**data_sources_paragraph_for_cause** | **string** | Example: Sleep Duration data was primarily collected using <a href=\"https://www.amazon.com/Fitbit-Charge-Heart-Fitness-Wristband/dp/B01K9S260E/ref=as_li_ss_tl?ie=UTF8&qid=1493518902&sr=8-3&keywords=fitbit&th=1&linkCode=ll1&tag=quant08-20&linkId=b357b0833de73b0c4e935fd7c13a079e\">Fitbit</a>. <a href=\"https://www.amazon.com/Fitbit-Charge-Heart-Fitness-Wristband/dp/B01K9S260E/ref=as_li_ss_tl?ie=UTF8&qid=1493518902&sr=8-3&keywords=fitbit&th=1&linkCode=ll1&tag=quant08-20&linkId=b357b0833de73b0c4e935fd7c13a079e\">Fitbit</a> makes activity tracking easy and automatic. | [optional] +**data_sources_paragraph_for_effect** | **string** | Example: Overall Mood data was primarily collected using <a href=\"https://quantimo.do\">QuantiModo</a>. <a href=\"https://quantimo.do\">QuantiModo</a> is a Chrome extension, Android app, iOS app, and web app that allows you to easily track mood, symptoms, or any outcome you want to optimize in a fraction of a second. You can also import your data from over 30 other apps and devices like Fitbit, Rescuetime, Jawbone Up, Withings, Facebook, Github, Google Calendar, Runkeeper, MoodPanda, Slice, Google Fit, and more. <a href=\"https://quantimo.do\">QuantiModo</a> then analyzes your data to identify which hidden factors are most likely to be influencing your mood or symptoms and their optimal daily values. | [optional] +**degrees_of_freedom** | **int** | Example: 200 | [optional] +**direction** | **string** | Example: lower | [optional] +**distance_from_middle_to_be_hight_low_effect** | **int** | Example: 25 | [optional] +**duration_of_action** | **int** | Example: 604800 | [optional] +**duration_of_action_in_hours** | **int** | Example: 0 | [optional] +**effect_changes** | **int** | Example: 521 | [optional] +**effect_data_source** | [**\QuantiModo\Client\Model\DataSource**](DataSource.md) | | [optional] +**effect_number_of_processed_daily_measurements** | **int** | Example: 1492 | [optional] +**effect_number_of_raw_measurements** | **int** | Example: 11866 | [optional] +**effect_size** | **string** | Example: weakly negative | [optional] +**effect_unit** | **string** | Example: /5 | [optional] +**effect_value_spread** | **double** | Example: 3.5 | [optional] +**effect_variable** | [**\QuantiModo\Client\Model\UserVariable**](UserVariable.md) | | [optional] +**effect_variable_category_id** | **int** | Example: 1 | [optional] +**effect_variable_category_name** | **string** | Example: Emotions | [optional] +**effect_variable_unit_abbreviated_name** | **string** | Example: /5 | [optional] +**effect_variable_unit_id** | **int** | Example: 10 | [optional] +**effect_variable_id** | **int** | Example: 1398 | [optional] +**effect_variable_image_url** | **string** | Example: https://maxcdn.icons8.com/Color/PNG/96/Cinema/theatre_mask-96.png | [optional] +**effect_variable_ion_icon** | **string** | Example: ion-happy-outline | [optional] +**effect_variable_most_common_connector_id** | **int** | Example: 5 | [optional] +**effect_variable_name** | **string** | Example: Overall Mood | [optional] +**error** | **string** | Example: optimalPearsonProduct is not defined | [optional] +**experiment_end_time** | **int** | Example: 1491024591 | [optional] +**experiment_start_time** | **int** | Example: 1336267020 | [optional] +**forward_spearman_correlation_coefficient** | **double** | Example: -0.20037947834262 | [optional] +**gauge_image** | **string** | Example: https://s3.amazonaws.com/quantimodo-docs/images/gauge-weakly-negative-relationship.png | [optional] +**gauge_image_square** | **string** | Example: https://s3.amazonaws.com/quantimodo-docs/images/gauge-weakly-negative-relationship-200-200.png | [optional] +**image_url** | **string** | Example: https://s3-us-west-1.amazonaws.com/qmimages/variable_categories_gauges_logo_background/gauge-weakly-negative-relationship_sleep_emotions_logo_background.png | [optional] +**instructions_for_cause** | **string** | Example: <a href=\"https://www.amazon.com/Fitbit-Charge-Heart-Fitness-Wristband/dp/B01K9S260E/ref=as_li_ss_tl?ie=UTF8&qid=1493518902&sr=8-3&keywords=fitbit&th=1&linkCode=ll1&tag=quant08-20&linkId=b357b0833de73b0c4e935fd7c13a079e\">Obtain Fitbit</a> and use it to record your Sleep Duration. Once you have a <a href=\"https://www.amazon.com/Fitbit-Charge-Heart-Fitness-Wristband/dp/B01K9S260E/ref=as_li_ss_tl?ie=UTF8&qid=1493518902&sr=8-3&keywords=fitbit&th=1&linkCode=ll1&tag=quant08-20&linkId=b357b0833de73b0c4e935fd7c13a079e\">Fitbit</a> account, <a href=\"https://app.quantimo.do/ionic/Modo/www/#/app/import\">connect your Fitbit account at QuantiModo</a> to automatically import and analyze your data. | [optional] +**instructions_for_effect** | **string** | Example: <a href=\"https://quantimo.do\">Obtain QuantiModo</a> and use it to record your Overall Mood. Once you have a <a href=\"https://quantimo.do\">QuantiModo</a> account, <a href=\"https://app.quantimo.do/ionic/Modo/www/#/app/import\">connect your QuantiModo account at QuantiModo</a> to automatically import and analyze your data. | [optional] +**maximum_cause_value** | **double** | Example: 13.75 | [optional] +**maximum_effect_value** | **double** | Example: 5 | [optional] +**minimum_cause_value** | **double** | Example: 1.3 | [optional] +**minimum_effect_value** | **double** | Example: 1.5 | [optional] +**minimum_probability** | **double** | Example: 0.05 | [optional] +**number_of_cause_changes_for_optimal_values** | **int** | Example: 1010 | [optional] +**number_of_days** | **int** | Example: 1791 | [optional] +**number_of_days_significance** | **double** | Example: 1 | [optional] +**number_of_effect_changes_for_optimal_values** | **int** | Example: 521 | [optional] +**number_of_high_effect_pairs** | **int** | Example: 28 | [optional] +**number_of_low_effect_pairs** | **int** | Example: 275 | [optional] +**number_of_pairs** | **int** | Example: 1011 | [optional] +**number_of_samples** | **int** | Example: 1011 | [optional] +**number_of_unique_cause_values_for_optimal_values** | **int** | Example: 671 | [optional] +**number_of_unique_effect_values_for_optimal_values** | **int** | Example: 112 | [optional] +**onset_delay** | **int** | Example: 0 | [optional] +**onset_delay_in_hours** | **int** | Example: 0 | [optional] +**optimal_change_spread** | **double** | Example: 6.79 | [optional] +**optimal_change_spread_significance** | **double** | Example: 0.8959967711131 | [optional] +**optimal_pearson_product** | **double** | Example: 0.074088026546601 | [optional] +**predictive_pearson_correlation_coefficient** | **double** | Example: -0.173 | [optional] +**predictor_explanation** | **string** | Example: Sleep Duration Predicts Lower Overall Mood | [optional] +**predicts_high_effect_change** | **double** | Example: 3.54 | [optional] +**predicts_high_effect_change_sentence_fragment** | **string** | Example: , on average, 3.54% | [optional] +**predicts_low_effect_change** | **double** | Example: -3.25 | [optional] +**predicts_low_effect_change_sentence_fragment** | **string** | Example: , on average, 3.25% | [optional] +**raw_cause_measurement_significance** | **double** | Example: 1 | [optional] +**raw_effect_measurement_significance** | **double** | Example: 1 | [optional] +**share_user_measurements** | **bool** | Example: false | [optional] +**significance_explanation** | **string** | Example: Using a two-tailed t-test with alpha = 0.05, it was determined that the change in Overall Mood is statistically significant at 95% confidence interval. | [optional] +**significant_difference** | **bool** | Example: true | [optional] +**statistical_significance** | **double** | Example: 0.83333333333333 | [optional] +**strength_level** | **string** | Example: very weak | [optional] +**study_abstract** | **string** | Example: Your data suggests with a high degree of confidence (p=0) that Sleep Duration (Sleep) has a weakly negative predictive relationship (R=-0.173) with Overall Mood (Emotions). The highest quartile of Overall Mood measurements were observed following an average 6.79h Sleep Duration. The lowest quartile of Overall Mood measurements were observed following an average 7.54h Sleep Duration. | [optional] +**study_background** | **string** | In order to reduce suffering through the advancement of human knowledge... | [optional] +**study_design** | **string** | Example: This study is based on data donated by one QuantiModo user. Thus, the study design is consistent with an n=1 observational natural experiment. | [optional] +**study_limitations** | **string** | Example: As with any human experiment, it was impossible to control for all potentially confounding variables. Correlation does not necessarily imply correlation. We can never know for sure if one factor is definitely the cause of an outcome. However, lack of correlation definitely implies the lack of a causal relationship. Hence, we can with great confidence rule out non-existent relationships. For instance, if we discover no relationship between mood and an antidepressant this information is just as or even more valuable than the discovery that there is a relationship. <br> <br> We can also take advantage of several characteristics of time series data from many subjects to infer the likelihood of a causal relationship if we do find a correlational relationship. The criteria for causation are a group of minimal conditions necessary to provide adequate evidence of a causal relationship between an incidence and a possible consequence. The list of the criteria is as follows: <br> 1. Strength (effect size): A small association does not mean that there is not a causal effect, though the larger the association, the more likely that it is causal. <br> 2. Consistency (reproducibility): Consistent findings observed by different persons in different places with different samples strengthens the likelihood of an effect. <br> 3. Specificity: Causation is likely if a very specific population at a specific site and disease with no other likely explanation. The more specific an association between a factor and an effect is, the bigger the probability of a causal relationship. <br> 4. Temporality: The effect has to occur after the cause (and if there is an expected delay between the cause and expected effect, then the effect must occur after that delay). <br> 5. Biological gradient: Greater exposure should generally lead to greater incidence of the effect. However, in some cases, the mere presence of the factor can trigger the effect. In other cases, an inverse proportion is observed: greater exposure leads to lower incidence. <br> 6. Plausibility: A plausible mechanism between cause and effect is helpful. <br> 7. Coherence: Coherence between epidemiological and laboratory findings increases the likelihood of an effect. <br> 8. Experiment: \"Occasionally it is possible to appeal to experimental evidence\". <br> 9. Analogy: The effect of similar factors may be considered. <br> <br> The confidence in a causal relationship is bolstered by the fact that time-precedence was taken into account in all calculations. Furthermore, in accordance with the law of large numbers (LLN), the predictive power and accuracy of these results will continually grow over time. 1011 paired data points were used in this analysis. Assuming that the relationship is merely coincidental, as the participant independently modifies their Sleep Duration values, the observed strength of the relationship will decline until it is below the threshold of significance. To it another way, in the case that we do find a spurious correlation, suggesting that banana intake improves mood for instance, one will likely increase their banana intake. Due to the fact that this correlation is spurious, it is unlikely that you will see a continued and persistent corresponding increase in mood. So over time, the spurious correlation will naturally dissipate.Furthermore, it will be very enlightening to aggregate this data with the data from other participants with similar genetic, diseasomic, environmentomic, and demographic profiles. | [optional] +**study_link_dynamic** | **string** | Example: https://local.quantimo.do/ionic/Modo/www/index.html#/app/study?causeVariableName=Sleep%20Duration&effectVariableName=Overall%20Mood&userId=230 | [optional] +**study_link_email** | **string** | Example: mailto:?subject=N1%20Study%3A%20Sleep%20Duration%20Predicts%20Lower%20Overall%20Mood&body=Check%20out%20my%20study%20at%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Duration%26effectVariableName%3DOverall%2520Mood%26userId%3D230%0A%0AHave%20a%20great%20day! | [optional] +**study_link_facebook** | **string** | Example: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Duration%26effectVariableName%3DOverall%2520Mood%26userId%3D230 | [optional] +**study_link_google** | **string** | Example: https://plus.google.com/share?url=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Duration%26effectVariableName%3DOverall%2520Mood%26userId%3D230 | [optional] +**study_link_static** | **string** | Example: https://local.quantimo.do/api/v2/study?causeVariableName=Sleep%20Duration&effectVariableName=Overall%20Mood&userId=230 | [optional] +**study_link_twitter** | **string** | Example: https://twitter.com/home?status=Sleep%20Duration%20Predicts%20Lower%20Overall%20Mood%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Duration%26effectVariableName%3DOverall%2520Mood%26userId%3D230%20%40quantimodo | [optional] +**study_objective** | **string** | Example: The objective of this study is to determine the nature of the relationship (if any) between the Sleep Duration and the Overall Mood. Additionally, we attempt to determine the Sleep Duration values most likely to produce optimal Overall Mood values. | [optional] +**study_results** | **string** | Example: This analysis suggests that higher Sleep Duration (Sleep) generally predicts lower Overall Mood (p = 0). Overall Mood is, on average, 3.54% higher after around 6.79 Sleep Duration. After an onset delay of 168 hours, Overall Mood is, on average, 3.25% lower than its average over the 168 hours following around 7.54 Sleep Duration. 1011 data points were used in this analysis. The value for Sleep Duration changed 1010 times, effectively running 505 separate natural experiments. The top quartile outcome values are preceded by an average 6.79 h of Sleep Duration. The bottom quartile outcome values are preceded by an average 7.54 h of Sleep Duration. Forward Pearson Correlation Coefficient was -0.173 (p=0, 95% CI -0.228 to -0.118 onset delay = 0 hours, duration of action = 168 hours) . The Reverse Pearson Correlation Coefficient was 0 (P=0, 95% CI -0.055 to 0.055, onset delay = -0 hours, duration of action = -168 hours). When the Sleep Duration value is closer to 6.79 h than 7.54 h, the Overall Mood value which follows is, on average, 3.54% percent higher than its typical value. When the Sleep Duration value is closer to 7.54 h than 6.79 h, the Overall Mood value which follows is 0% lower than its typical value. Overall Mood is 2.62/5 (4% lower) on average after days with around 8.8 h Sleep Duration Overall Mood is 2.82/5 (3% higher) on average after days with around 5.93 h Sleep Duration | [optional] +**study_title** | **string** | Example: N1 Study: Sleep Duration Predicts Lower Overall Mood | [optional] +**timestamp** | **int** | Example: 1502255174 | [optional] +**t_value** | **double** | Example: 5.525102310162 | [optional] +**user_id** | **int** | Example: 230 | [optional] +**value_predicting_high_outcome** | **double** | Example: 6.79 | [optional] +**value_predicting_high_outcome_explanation** | **string** | Example: Overall Mood, on average, 3.54% higher after around 6.79 h Sleep Duration | [optional] +**value_predicting_low_outcome** | **double** | Example: 7.54 | [optional] +**value_predicting_low_outcome_explanation** | **string** | Example: Overall Mood, on average, 3.25% lower after around 7.54 h Sleep Duration | [optional] +**vote_statistical_significance** | **double** | Example: 0.83333333333333 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/UserTag.md b/docs/Model/UserTag.md index 30289ff..2c3d5ac 100644 --- a/docs/Model/UserTag.md +++ b/docs/Model/UserTag.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**conversion_factor** | **float** | Number by which we multiply the tagged variable value to obtain the tag variable (ingredient) value | **tagged_variable_id** | **int** | This is the id of the variable being tagged with an ingredient or something. | **tag_variable_id** | **int** | This is the id of the ingredient variable whose value is determined based on the value of the tagged variable. | -**conversion_factor** | **float** | Number by which we multiply the tagged variable value to obtain the tag variable (ingredient) value | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/UserTokenRequest.md b/docs/Model/UserTokenRequest.md deleted file mode 100644 index 750ab06..0000000 --- a/docs/Model/UserTokenRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserTokenRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | [**\QuantiModo\Client\Model\UserTokenRequestInnerUserField**](UserTokenRequestInnerUserField.md) | | [optional] -**organization_access_token** | **string** | Organization Access token | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/UserTokenSuccessfulResponse.md b/docs/Model/UserTokenSuccessfulResponse.md deleted file mode 100644 index cf6c4d1..0000000 --- a/docs/Model/UserTokenSuccessfulResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# UserTokenSuccessfulResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **int** | Status code | -**message** | **string** | Message | -**user** | [**\QuantiModo\Client\Model\UserTokenSuccessfulResponseInnerUserField**](UserTokenSuccessfulResponseInnerUserField.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/UserTokenSuccessfulResponseInnerUserField.md b/docs/Model/UserTokenSuccessfulResponseInnerUserField.md deleted file mode 100644 index 1bc5c00..0000000 --- a/docs/Model/UserTokenSuccessfulResponseInnerUserField.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserTokenSuccessfulResponseInnerUserField - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | WordPress user ID | -**access_token** | **string** | User token | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/UserVariable.md b/docs/Model/UserVariable.md index a47d03a..5e4a5fe 100644 --- a/docs/Model/UserVariable.md +++ b/docs/Model/UserVariable.md @@ -3,62 +3,152 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**parent_id** | **int** | ID of the parent variable if this variable has any parent | [optional] -**user_id** | **int** | User ID | [optional] -**client_id** | **string** | client_id | [optional] -**variable_id** | **int** | ID of variable | [optional] -**default_unit_id** | **int** | ID of unit to use for this variable | [optional] -**minimum_allowed_value** | **float** | The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. | [optional] -**maximum_allowed_value** | **float** | The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. | [optional] -**filling_value** | **float** | When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. | [optional] -**join_with** | **int** | The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables | [optional] -**onset_delay** | **int** | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | [optional] -**duration_of_action** | **int** | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | [optional] -**variable_category_id** | **int** | ID of variable category | [optional] -**updated** | **int** | updated | [optional] -**public** | **int** | Is variable public | [optional] +**alias** | **string** | Example: | +**available_units** | [**\QuantiModo\Client\Model\Unit[]**](Unit.md) | | **cause_only** | **bool** | A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user | [optional] +**charts** | **object** | Highcharts configs you can use if you add highcharts.js to your page | [optional] +**charts_link_dynamic** | **string** | Example: https://local.quantimo.do/ionic/Modo/www/#/app/charts/Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29?variableName=Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29&userId=230&pngUrl=https%3A%2F%2Fapp.quantimo.do%2Fionic%2FModo%2Fwww%2Fimg%2Fvariable_categories%2Ftreatments.png | [optional] +**charts_link_email** | **string** | Example: mailto:?subject=Check%20out%20my%20Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29%20data%21&body=See%20my%20Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29%20history%20at%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DTrader%2520Joes%2520Bedtime%2520Tea%2520%252F%2520Sleepytime%2520Tea%2520%2528any%2520Brand%2529%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png%0A%0AHave%20a%20great%20day! | [optional] +**charts_link_facebook** | **string** | Example: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DTrader%2520Joes%2520Bedtime%2520Tea%2520%252F%2520Sleepytime%2520Tea%2520%2528any%2520Brand%2529%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png | [optional] +**charts_link_google** | **string** | Example: https://plus.google.com/share?url=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DTrader%2520Joes%2520Bedtime%2520Tea%2520%252F%2520Sleepytime%2520Tea%2520%2528any%2520Brand%2529%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png | [optional] +**charts_link_static** | **string** | Example: https://local.quantimo.do/api/v2/charts?variableName=Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29&userId=230&pngUrl=https%3A%2F%2Fapp.quantimo.do%2Fionic%2FModo%2Fwww%2Fimg%2Fvariable_categories%2Ftreatments.png | [optional] +**charts_link_twitter** | **string** | Example: https://twitter.com/home?status=Check%20out%20my%20Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29%20data%21%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DTrader%2520Joes%2520Bedtime%2520Tea%2520%252F%2520Sleepytime%2520Tea%2520%2528any%2520Brand%2529%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png%20%40quantimodo | [optional] +**child_user_tag_variables** | [**\QuantiModo\Client\Model\UserVariableArray**](UserVariableArray.md) | | +**client_id** | **string** | clientId | [optional] +**combination_operation** | **string** | Example: MEAN | [optional] +**common_alias** | **string** | Example: Anxiety / Nervousness | [optional] +**common_tagged_variables** | [**\QuantiModo\Client\Model\CommonVariableArray**](CommonVariableArray.md) | | +**common_tag_variables** | [**\QuantiModo\Client\Model\CommonVariableArray**](CommonVariableArray.md) | | +**common_variable_most_common_connector_id** | **int** | Example: 51 | [optional] +**common_variable_updated_at** | [**\DateTime**](\DateTime.md) | Example: 2017-02-07 23:43:39 | [optional] +**created_at** | [**\DateTime**](\DateTime.md) | When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format | [optional] +**unit_abbreviated_name** | **string** | Example: count | [optional] +**unit_category_id** | **int** | Example: 6 | [optional] +**unit_category_name** | **string** | Example: Miscellany | [optional] +**unit_id** | **int** | ID of unit to use for this variable | [optional] +**unit_name** | **string** | Example: Count | [optional] +**description** | **string** | Example: negative | [optional] +**duration_of_action** | **int** | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | [optional] +**duration_of_action_in_hours** | **int** | Example: 168 | [optional] +**earliest_filling_time** | **int** | Earliest filling time | [optional] +**earliest_measurement_time** | **int** | Earliest measurement time | [optional] +**earliest_source_time** | **int** | Earliest source time | [optional] +**error_message** | **string** | error_message | [optional] +**experiment_end_time** | [**\DateTime**](\DateTime.md) | Latest measurement start_time to be used in analysis. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format | [optional] +**experiment_end_time_seconds** | **int** | Example: 1893477600 | [optional] +**experiment_end_time_string** | [**\DateTime**](\DateTime.md) | Example: 2030-01-01 06:00:00 | [optional] +**experiment_start_time** | [**\DateTime**](\DateTime.md) | Earliest measurement start_time to be used in analysis. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format | [optional] +**experiment_start_time_seconds** | **int** | Example: 1269307902 | [optional] +**experiment_start_time_string** | [**\DateTime**](\DateTime.md) | Example: 2010-03-23 01:31:42 | [optional] **filling_type** | **string** | 0 -> No filling, 1 -> Use filling-value | [optional] -**number_of_measurements** | **int** | Number of measurements | [optional] -**number_of_processed_measurements** | **int** | Number of processed measurements | [optional] -**measurements_at_last_analysis** | **int** | Number of measurements at last analysis | [optional] -**last_unit_id** | **int** | ID of last Unit | [optional] +**filling_value** | **float** | When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. | [optional] +**icon_icon** | **string** | Example: ion-sad-outline | [optional] +**highcharts** | [**\QuantiModo\Client\Model\HighchartArray**](HighchartArray.md) | | [optional] +**id** | **int** | Example: 95614 | [optional] +**image_url** | **string** | | [optional] +**informational_url** | **string** | Example: | +**ingredient_of_user_tag_variables** | [**\QuantiModo\Client\Model\UserVariableArray**](UserVariableArray.md) | | +**ingredient_user_tag_variables** | [**\QuantiModo\Client\Model\UserVariableArray**](UserVariableArray.md) | | +**input_type** | **string** | Example: value | [optional] +**ion_icon** | **string** | | [optional] +**joined_user_tag_variables** | [**\QuantiModo\Client\Model\UserVariableArray**](UserVariableArray.md) | | +**join_with** | **int** | The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables | [optional] +**kurtosis** | **float** | Kurtosis | [optional] **last_original_unit_id** | **int** | ID of last original Unit | [optional] -**last_value** | **float** | Last Value | [optional] **last_original_value** | **int** | Last original value which is stored | [optional] -**number_of_correlations** | **int** | Number of correlations for this variable | [optional] -**status** | **string** | status | [optional] -**error_message** | **string** | error_message | [optional] +**last_processed_daily_value** | **double** | Example: 500 | [optional] **last_successful_update_time** | [**\DateTime**](\DateTime.md) | When this variable or its settings were last updated | [optional] -**standard_deviation** | **float** | Standard deviation | [optional] -**variance** | **float** | Variance | [optional] -**minimum_recorded_value** | **float** | Minimum recorded value of this variable | [optional] +**last_unit_id** | **int** | ID of last Unit | [optional] +**last_value** | **float** | Last Value | [optional] +**latest_filling_time** | **int** | Latest filling time | [optional] +**latest_measurement_time** | **int** | Latest measurement time | [optional] +**latest_source_time** | **int** | Latest source time | [optional] +**latest_user_measurement_time** | **int** | Example: 1501383600 | [optional] +**latitude** | **float** | Latitude | [optional] +**location** | **string** | Location | [optional] +**longitude** | **float** | Longitude | [optional] +**manual_tracking** | **bool** | Example: 1 | [optional] +**maximum_allowed_value** | **float** | The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. | [optional] **maximum_recorded_daily_value** | **float** | Maximum recorded daily value of this variable | [optional] +**maximum_recorded_value** | **double** | Example: 1 | [optional] **mean** | **float** | Mean | [optional] +**measurements_at_last_analysis** | **int** | Number of measurements at last analysis | [optional] **median** | **float** | Median | [optional] +**minimum_allowed_value** | **float** | The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. | [optional] +**minimum_recorded_value** | **float** | Minimum recorded value of this variable | [optional] +**most_common_connector_id** | **int** | Example: 51 | [optional] +**most_common_original_unit_id** | **int** | Example: 23 | [optional] **most_common_unit_id** | **int** | Most common Unit ID | [optional] **most_common_value** | **float** | Most common value | [optional] -**number_of_unique_daily_values** | **float** | Number of unique daily values | [optional] +**name** | **string** | Example: Trader Joes Bedtime Tea / Sleepytime Tea (any Brand) | [optional] +**number_of_aggregate_correlations_as_cause** | **int** | Example: 1 | [optional] +**number_of_aggregate_correlations_as_effect** | **int** | Example: 310 | [optional] **number_of_changes** | **int** | Number of changes | [optional] +**number_of_correlations** | **int** | Number of correlations for this variable | [optional] +**number_of_measurements** | **int** | Number of measurements | [optional] +**number_of_processed_daily_measurements** | **int** | Number of processed measurements | [optional] +**number_of_raw_measurements** | **int** | Example: 295 | [optional] +**number_of_tracking_reminders** | **int** | Example: 1 | [optional] +**number_of_unique_daily_values** | **float** | Number of unique daily values | [optional] +**number_of_unique_values** | **int** | Example: 2 | [optional] +**number_of_user_correlations_as_cause** | **int** | Example: 115 | [optional] +**number_of_user_correlations_as_effect** | **int** | Example: 29014 | [optional] +**number_of_user_variables** | **int** | Example: 2 | [optional] +**onset_delay** | **int** | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | [optional] +**onset_delay_in_hours** | **double** | Example: 0.5 | [optional] +**outcome** | **bool** | Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables | [optional] +**outcome_of_interest** | **int** | Example: 1 | [optional] +**parent** | **string** | Example: | +**parent_id** | **int** | ID of the parent variable if this variable has any parent | [optional] +**parent_user_tag_variables** | [**\QuantiModo\Client\Model\UserVariableArray**](UserVariableArray.md) | | +**png_path** | **string** | Example: img/variable_categories/treatments.png | [optional] +**png_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/treatments.png | [optional] +**predictor_of_interest** | **int** | Example: 0 | [optional] +**price** | **double** | Example: 95.4 | +**product_url** | **string** | Example: | +**public** | **int** | Is variable public | [optional] +**raw_measurements_at_last_analysis** | **int** | Example: 131 | [optional] +**second_most_common_value** | **double** | Example: 1 | [optional] +**second_to_last_value** | **double** | Example: 250 | [optional] +**share_user_measurements** | **bool** | Example: 1 | [optional] **skewness** | **float** | Skewness | [optional] -**kurtosis** | **float** | Kurtosis | [optional] -**latitude** | **float** | Latitude | [optional] -**longitude** | **float** | Longitude | [optional] -**location** | **string** | Location | [optional] -**experiment_start_time** | [**\DateTime**](\DateTime.md) | Earliest measurement start_time to be used in analysis. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] -**experiment_end_time** | [**\DateTime**](\DateTime.md) | Latest measurement start_time to be used in analysis. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] -**created_at** | [**\DateTime**](\DateTime.md) | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] -**updated_at** | [**\DateTime**](\DateTime.md) | When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] -**outcome** | **bool** | Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables | [optional] **sources** | **string** | Comma-separated list of source names to limit variables to those sources | [optional] -**earliest_source_time** | **int** | Earliest source time | [optional] -**latest_source_time** | **int** | Latest source time | [optional] -**earliest_measurement_time** | **int** | Earliest measurement time | [optional] -**latest_measurement_time** | **int** | Latest measurement time | [optional] -**earliest_filling_time** | **int** | Earliest filling time | [optional] -**latest_filling_time** | **int** | Latest filling time | [optional] -**image_url** | **string** | | [optional] -**ion_icon** | **string** | | [optional] +**standard_deviation** | **float** | Standard deviation | [optional] +**standard_deviation** | **double** | Example: 0.46483219855434 | [optional] +**status** | **string** | status | [optional] +**subtitle** | **string** | Based on sort filter and can be shown beneath variable name on search list | [optional] +**svg_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/treatments.svg | [optional] +**third_most_common_value** | **double** | Example: 6 | [optional] +**third_to_last_value** | **double** | Example: 250 | [optional] +**unit** | [**\QuantiModo\Client\Model\Unit**](Unit.md) | | [optional] +**updated** | **int** | updated | [optional] +**updated_at** | [**\DateTime**](\DateTime.md) | When the record in the database was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format | [optional] +**updated_time** | [**\DateTime**](\DateTime.md) | Example: 2017-07-30 14:58:26 | [optional] +**user_id** | **int** | User ID | [optional] +**user_tagged_variables** | [**\QuantiModo\Client\Model\UserVariableArray**](UserVariableArray.md) | | +**user_tag_variables** | [**\QuantiModo\Client\Model\UserVariableArray**](UserVariableArray.md) | | +**user_variable_unit_abbreviated_name** | **string** | Example: count | [optional] +**user_variable_unit_category_id** | **int** | Example: 6 | [optional] +**user_variable_unit_category_name** | **string** | Example: Miscellany | [optional] +**user_variable_unit_id** | **int** | Example: 23 | [optional] +**user_variable_unit_name** | **string** | Example: Count | [optional] +**user_variable_filling_value** | **double** | Example: -1 | [optional] +**user_variable_most_common_connector_id** | **int** | Example: 51 | [optional] +**user_variable_updated_at** | [**\DateTime**](\DateTime.md) | Example: 2017-07-30 14:58:26 | [optional] +**user_variable_valence** | **string** | Example: | +**user_variable_variable_category_id** | **int** | Example: 13 | [optional] +**user_variable_variable_category_name** | **string** | Example: Treatments | [optional] +**user_variable_wikipedia_title** | **string** | Example: | +**valence** | **string** | Example: negative | [optional] +**variable_category** | [**\QuantiModo\Client\Model\VariableCategory**](VariableCategory.md) | | [optional] +**variable_category_id** | **int** | ID of variable category | [optional] +**variable_category_image_url** | **string** | Example: https://maxcdn.icons8.com/Color/PNG/96/Healthcare/pill-96.png | [optional] +**variable_category_name** | **string** | Example: Treatments | [optional] +**variable_filling_value** | **double** | Example: -1 | [optional] +**variable_id** | **int** | ID of variable | +**variable_name** | **string** | Example: Trader Joes Bedtime Tea / Sleepytime Tea (any Brand) | [optional] +**variance** | **float** | Variance | [optional] +**wikipedia_title** | **string** | Example: | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/UserVariableArray.md b/docs/Model/UserVariableArray.md new file mode 100644 index 0000000..c3cd339 --- /dev/null +++ b/docs/Model/UserVariableArray.md @@ -0,0 +1,9 @@ +# UserVariableArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/UserVariableRelationship.md b/docs/Model/UserVariableRelationship.md deleted file mode 100644 index 494f8ab..0000000 --- a/docs/Model/UserVariableRelationship.md +++ /dev/null @@ -1,26 +0,0 @@ -# UserVariableRelationship - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | id | [optional] -**confidence_level** | **string** | Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors | -**confidence_score** | **float** | A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors | -**direction** | **string** | Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. | -**duration_of_action** | **int** | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | -**error_message** | **string** | error_message | [optional] -**onset_delay** | **int** | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | [optional] -**outcome_variable_id** | **int** | Variable ID for the outcome variable | -**predictor_variable_id** | **int** | Variable ID for the predictor variable | -**predictor_unit_id** | **int** | ID for default unit of the predictor variable | -**sinn_rank** | **float** | A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. | -**strength_level** | **string** | Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. | -**strength_score** | **float** | A value represented to the size of the effect which the predictor appears to have on the outcome. | -**user_id** | **int** | user_id | [optional] -**vote** | **string** | vote | [optional] -**value_predicting_high_outcome** | **float** | Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value | -**value_predicting_low_outcome** | **float** | Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/UserVariables.md b/docs/Model/UserVariables.md deleted file mode 100644 index 6ad2aa0..0000000 --- a/docs/Model/UserVariables.md +++ /dev/null @@ -1,20 +0,0 @@ -# UserVariables - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | **int** | User ID | -**variable_id** | **int** | Common variable id | -**duration_of_action** | **int** | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | [optional] -**filling_value** | **int** | When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. | [optional] -**join_with** | **string** | joinWith | [optional] -**maximum_allowed_value** | **float** | The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. | [optional] -**minimum_allowed_value** | **float** | The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. | [optional] -**onset_delay** | **int** | onsetDelay | [optional] -**experiment_start_time** | **string** | Earliest measurement startTime that should be used in analysis. For instance, the date when you started tracking something. Helpful in determining when to start 0 filling since we can assume the absence of a treatment measurement, for instance, indicates that the treatment was not applied rathter than simply not recorded. Uses ISO string format | [optional] -**experiment_end_time** | **string** | Latest measurement startTime that should be used in analysis. For instance, the date when you stopped tracking something. Helpful in determining when to stop 0 filling since we can assume the absence of a treatment measurement, for instance, indicates that the treatment was not applied rathter than simply not recorded. Uses ISO string format | [optional] -**alias** | **string** | User-defined display alias for variable name | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/Variable.md b/docs/Model/Variable.md deleted file mode 100644 index 4b4a74d..0000000 --- a/docs/Model/Variable.md +++ /dev/null @@ -1,41 +0,0 @@ -# Variable - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Variable ID | [optional] -**name** | **string** | User-defined variable display name. | -**original_name** | **string** | Name used when the variable was originally created in the `variables` table. | -**category** | **string** | Variable category like Mood, Sleep, Physical Activity, Treatment, Symptom, etc. | -**abbreviated_unit_name** | **string** | Abbreviated name of the default unit for the variable | -**abbreviated_unit_id** | **int** | Id of the default unit for the variable | -**sources** | **string** | Comma-separated list of source names to limit variables to those sources | -**minimum_allowed_value** | **double** | The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. | -**maximum_allowed_value** | **double** | The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. | -**combination_operation** | **string** | Way to aggregate measurements over time. Options are \"MEAN\" or \"SUM\". SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED. | -**filling_value** | **double** | When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. | -**join_with** | **string** | The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables. | -**joined_variables** | [**\QuantiModo\Client\Model\Variable[]**](Variable.md) | Array of Variables that are joined with this Variable | -**parent** | **int** | Id of the parent variable if this variable has any parent | -**sub_variables** | [**\QuantiModo\Client\Model\Variable[]**](Variable.md) | Array of Variables that are sub variables to this Variable | -**onset_delay** | **int** | The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. | -**duration_of_action** | **int** | The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. | -**earliest_measurement_time** | **int** | Earliest measurement time | -**latest_measurement_time** | **int** | Latest measurement time | -**updated** | **int** | When this variable or its settings were last updated | -**cause_only** | **int** | A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user. | -**number_of_correlations** | **int** | Number of correlations | -**outcome** | **int** | Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. | -**raw_measurements_at_last_analysis** | **int** | The number of measurements that a given user had for this variable the last time a correlation calculation was performed. Generally correlation values are only updated once the current number of measurements for a variable is more than 10% greater than the rawMeasurementsAtLastAnalysis. This avoids a computationally-demanding recalculation when there's not enough new data to make a significant difference in the correlation. | -**number_of_raw_measurements** | **int** | Number of measurements | -**last_unit** | **string** | Last unit | -**last_value** | **int** | Last value | -**most_common_value** | **int** | Most common value | -**most_common_unit** | **string** | Most common unit | -**last_source** | **int** | Last source | -**image_url** | **string** | | [optional] -**ion_icon** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/VariableCategory.md b/docs/Model/VariableCategory.md index fe466b1..fb440f7 100644 --- a/docs/Model/VariableCategory.md +++ b/docs/Model/VariableCategory.md @@ -3,7 +3,35 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**app_type** | **string** | Example: mood | [optional] +**cause_only** | **bool** | Example: false | [optional] +**combination_operation** | **string** | Example: MEAN | [optional] +**created_time** | [**\DateTime**](\DateTime.md) | Example: | [optional] +**unit_abbreviated_name** | **string** | Example: /5 | [optional] +**unit_id** | **int** | Example: 10 | [optional] +**duration_of_action** | **int** | Example: 86400 | [optional] +**filling_value** | **int** | Example: -1 | [optional] +**help_text** | **string** | Example: What emotion do you want to rate? | [optional] +**id** | **int** | Example: 1 | [optional] +**image_url** | **string** | Example: https://maxcdn.icons8.com/Color/PNG/96/Cinema/theatre_mask-96.png | [optional] +**ion_icon** | **string** | Example: ion-happy-outline | [optional] +**manual_tracking** | **bool** | Example: true | [optional] +**maximum_allowed_value** | **string** | Example: | [optional] +**measurement_synonym_singular_lowercase** | **string** | Example: rating | [optional] +**minimum_allowed_value** | **string** | Example: | [optional] +**more_info** | **string** | Example: Do you have any emotions that fluctuate regularly? If so, add them so I can try to determine which factors are influencing them. | [optional] **name** | **string** | Category name | +**onset_delay** | **int** | Example: 0 | [optional] +**outcome** | **bool** | Example: true | [optional] +**png_path** | **string** | Example: img/variable_categories/emotions.png | [optional] +**png_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.png | [optional] +**public** | **bool** | Example: true | [optional] +**svg_path** | **string** | Example: img/variable_categories/emotions.svg | [optional] +**svg_url** | **string** | Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.svg | [optional] +**updated** | **int** | Example: 1 | [optional] +**updated_time** | [**\DateTime**](\DateTime.md) | Example: | [optional] +**variable_category_name** | **string** | Example: Emotions | [optional] +**variable_category_name_singular** | **string** | Example: Emotion | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/VariableCategoryArray.md b/docs/Model/VariableCategoryArray.md new file mode 100644 index 0000000..c104d27 --- /dev/null +++ b/docs/Model/VariableCategoryArray.md @@ -0,0 +1,9 @@ +# VariableCategoryArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/VariableNew.md b/docs/Model/VariableNew.md deleted file mode 100644 index 5c4b2a0..0000000 --- a/docs/Model/VariableNew.md +++ /dev/null @@ -1,14 +0,0 @@ -# VariableNew - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | User-defined variable display name. | -**category** | **string** | Variable category like Mood, Sleep, Physical Activity, Treatment, Symptom, etc. | -**unit** | **string** | Abbreviated name of the default unit for the variable | -**combination_operation** | **string** | Way to aggregate measurements over time. Options are \"MEAN\" or \"SUM\". SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED. | -**parent** | **string** | Parent | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/VariableUserSource.md b/docs/Model/VariableUserSource.md deleted file mode 100644 index d17f0f9..0000000 --- a/docs/Model/VariableUserSource.md +++ /dev/null @@ -1,17 +0,0 @@ -# VariableUserSource - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **int** | ID of User | [optional] -**variable_id** | **int** | ID of variable | -**source_name** | **string** | source | -**timestamp** | **int** | Time that this measurement occurred Uses epoch minute (epoch time divided by 60) | -**earliest_measurement_time** | **int** | Earliest measurement time | -**latest_measurement_time** | **int** | Latest measurement time | -**created_at** | [**\DateTime**](\DateTime.md) | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] -**updated_at** | [**\DateTime**](\DateTime.md) | When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Model/Vote.md b/docs/Model/Vote.md index 3dd4acb..76115f7 100644 --- a/docs/Model/Vote.md +++ b/docs/Model/Vote.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**cause_variable_id** | **int** | Cause variable id | +**client_id** | **string** | clientId | +**created_at** | [**\DateTime**](\DateTime.md) | When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format | [optional] +**effect_variable_id** | **int** | Effect variable id | **id** | **int** | id | [optional] -**client_id** | **string** | client_id | [optional] -**user_id** | **int** | ID of User | [optional] -**cause_id** | **int** | ID of the predictor variable | [optional] -**effect_id** | **int** | ID of effect variable | [optional] -**value** | **int** | Value of Vote | -**created_at** | [**\DateTime**](\DateTime.md) | When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] -**updated_at** | [**\DateTime**](\DateTime.md) | When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format | [optional] +**updated_at** | [**\DateTime**](\DateTime.md) | When the record in the database was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format | [optional] +**user_id** | **int** | ID of User | +**value** | **bool** | Vote: 0 (for implausible) or 1 (for plausible) | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/XAxi.md b/docs/Model/XAxi.md new file mode 100644 index 0000000..8587683 --- /dev/null +++ b/docs/Model/XAxi.md @@ -0,0 +1,15 @@ +# XAxi + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**categories** | **string[]** | | +**end_on_tick** | **bool** | Example: true | +**show_last_label** | **bool** | Example: true | +**start_on_tick** | **bool** | Example: true | +**text** | **string** | Example: Date | +**title** | [**\QuantiModo\Client\Model\Title**](Title.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/YAxi.md b/docs/Model/YAxi.md new file mode 100644 index 0000000..7506296 --- /dev/null +++ b/docs/Model/YAxi.md @@ -0,0 +1,14 @@ +# YAxi + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**line_width** | **int** | Example: 1 | +**max** | **double** | Example: 372.68 | +**min** | **double** | Example: -2.68 | +**opposite** | **bool** | Example: true | +**title** | [**\QuantiModo\Client\Model\Title**](Title.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/git_push.sh b/git_push.sh index 7923201..103a8b7 100644 --- a/git_push.sh +++ b/git_push.sh @@ -8,17 +8,17 @@ git_repo_id=$2 release_note=$3 if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" + git_user_id="" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" + git_repo_id="" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi if [ "$release_note" = "" ]; then - release_note="Minor update" + release_note="" echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi diff --git a/lib/Api/AnalyticsApi.php b/lib/Api/AnalyticsApi.php new file mode 100644 index 0000000..e9bebed --- /dev/null +++ b/lib/Api/AnalyticsApi.php @@ -0,0 +1,889 @@ +apiClient = $apiClient; + } + + /** + * Get API client + * + * @return \QuantiModo\Client\ApiClient get the API client + */ + public function getApiClient() + { + return $this->apiClient; + } + + /** + * Set the API client + * + * @param \QuantiModo\Client\ApiClient $apiClient set the API client + * + * @return AnalyticsApi + */ + public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) + { + $this->apiClient = $apiClient; + return $this; + } + + /** + * Operation deleteVote + * + * Delete vote + * + * @param \QuantiModo\Client\Model\VoteDelete $body The cause and effect variable names for the predictor vote to be deleted. (required) + * @param float $user_id User's id (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return \QuantiModo\Client\Model\CommonResponse + */ + public function deleteVote($body, $user_id = null) + { + list($response) = $this->deleteVoteWithHttpInfo($body, $user_id); + return $response; + } + + /** + * Operation deleteVoteWithHttpInfo + * + * Delete vote + * + * @param \QuantiModo\Client\Model\VoteDelete $body The cause and effect variable names for the predictor vote to be deleted. (required) + * @param float $user_id User's id (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteVoteWithHttpInfo($body, $user_id = null) + { + // verify the required parameter 'body' is set + if ($body === null) { + throw new \InvalidArgumentException('Missing the required parameter $body when calling deleteVote'); + } + // parse inputs + $resourcePath = "/v3/votes/delete"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($user_id !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + } + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + '\QuantiModo\Client\Model\CommonResponse', + '/v3/votes/delete' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 204: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getAggregatedCorrelations + * + * Get aggregated correlations + * + * @param string $cause_variable_name Variable name of the hypothetical cause variable. Example: Sleep Duration (optional) + * @param string $effect_variable_name Variable name of the hypothetical effect variable. Example: Overall Mood (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param float $user_id User's id (optional) + * @param string $correlation_coefficient Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param bool $outcomes_of_interest Only include correlations for which the effect is an outcome of interest for the user (optional) + * @param string $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) + * @param string $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return \QuantiModo\Client\Model\Correlation[] + */ + public function getAggregatedCorrelations($cause_variable_name = null, $effect_variable_name = null, $sort = null, $limit = '100', $offset = null, $user_id = null, $correlation_coefficient = null, $updated_at = null, $outcomes_of_interest = null, $onset_delay = null, $duration_of_action = null) + { + list($response) = $this->getAggregatedCorrelationsWithHttpInfo($cause_variable_name, $effect_variable_name, $sort, $limit, $offset, $user_id, $correlation_coefficient, $updated_at, $outcomes_of_interest, $onset_delay, $duration_of_action); + return $response; + } + + /** + * Operation getAggregatedCorrelationsWithHttpInfo + * + * Get aggregated correlations + * + * @param string $cause_variable_name Variable name of the hypothetical cause variable. Example: Sleep Duration (optional) + * @param string $effect_variable_name Variable name of the hypothetical effect variable. Example: Overall Mood (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param float $user_id User's id (optional) + * @param string $correlation_coefficient Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param bool $outcomes_of_interest Only include correlations for which the effect is an outcome of interest for the user (optional) + * @param string $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) + * @param string $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return array of \QuantiModo\Client\Model\Correlation[], HTTP status code, HTTP response headers (array of strings) + */ + public function getAggregatedCorrelationsWithHttpInfo($cause_variable_name = null, $effect_variable_name = null, $sort = null, $limit = '100', $offset = null, $user_id = null, $correlation_coefficient = null, $updated_at = null, $outcomes_of_interest = null, $onset_delay = null, $duration_of_action = null) + { + if (!is_null($offset) && ($offset < 0)) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsApi.getAggregatedCorrelations, must be bigger than or equal to 0.'); + } + + // parse inputs + $resourcePath = "/v3/aggregatedCorrelations"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($cause_variable_name !== null) { + $queryParams['causeVariableName'] = $this->apiClient->getSerializer()->toQueryValue($cause_variable_name); + } + // query params + if ($effect_variable_name !== null) { + $queryParams['effectVariableName'] = $this->apiClient->getSerializer()->toQueryValue($effect_variable_name); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); + } + // query params + if ($user_id !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + } + // query params + if ($correlation_coefficient !== null) { + $queryParams['correlationCoefficient'] = $this->apiClient->getSerializer()->toQueryValue($correlation_coefficient); + } + // query params + if ($updated_at !== null) { + $queryParams['updatedAt'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); + } + // query params + if ($outcomes_of_interest !== null) { + $queryParams['outcomesOfInterest'] = $this->apiClient->getSerializer()->toQueryValue($outcomes_of_interest); + } + // query params + if ($onset_delay !== null) { + $queryParams['onsetDelay'] = $this->apiClient->getSerializer()->toQueryValue($onset_delay); + } + // query params + if ($duration_of_action !== null) { + $queryParams['durationOfAction'] = $this->apiClient->getSerializer()->toQueryValue($duration_of_action); + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\QuantiModo\Client\Model\Correlation[]', + '/v3/aggregatedCorrelations' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Correlation[]', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Correlation[]', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getStudy + * + * Get Study + * + * @param string $cause_variable_name Variable name of the hypothetical cause variable. Example: Sleep Duration (optional) + * @param string $effect_variable_name Variable name of the hypothetical effect variable. Example: Overall Mood (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param bool $include_charts Example: true (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return \QuantiModo\Client\Model\GetStudyResponse + */ + public function getStudy($cause_variable_name = null, $effect_variable_name = null, $app_name = null, $client_id = null, $include_charts = null) + { + list($response) = $this->getStudyWithHttpInfo($cause_variable_name, $effect_variable_name, $app_name, $client_id, $include_charts); + return $response; + } + + /** + * Operation getStudyWithHttpInfo + * + * Get Study + * + * @param string $cause_variable_name Variable name of the hypothetical cause variable. Example: Sleep Duration (optional) + * @param string $effect_variable_name Variable name of the hypothetical effect variable. Example: Overall Mood (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param bool $include_charts Example: true (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return array of \QuantiModo\Client\Model\GetStudyResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getStudyWithHttpInfo($cause_variable_name = null, $effect_variable_name = null, $app_name = null, $client_id = null, $include_charts = null) + { + // parse inputs + $resourcePath = "/v4/study"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($cause_variable_name !== null) { + $queryParams['causeVariableName'] = $this->apiClient->getSerializer()->toQueryValue($cause_variable_name); + } + // query params + if ($effect_variable_name !== null) { + $queryParams['effectVariableName'] = $this->apiClient->getSerializer()->toQueryValue($effect_variable_name); + } + // query params + if ($app_name !== null) { + $queryParams['appName'] = $this->apiClient->getSerializer()->toQueryValue($app_name); + } + // query params + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); + } + // query params + if ($include_charts !== null) { + $queryParams['includeCharts'] = $this->apiClient->getSerializer()->toQueryValue($include_charts); + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\QuantiModo\Client\Model\GetStudyResponse', + '/v4/study' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\GetStudyResponse', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\GetStudyResponse', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 401: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\GetStudyResponse', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getUserCorrelationExplanations + * + * Get correlation explanations + * + * @param string $cause_variable_name Variable name of the hypothetical cause variable. Example: Sleep Duration (optional) + * @param string $effect_variable_name Variable name of the hypothetical effect variable. Example: Overall Mood (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return \QuantiModo\Client\Model\Correlation[] + */ + public function getUserCorrelationExplanations($cause_variable_name = null, $effect_variable_name = null) + { + list($response) = $this->getUserCorrelationExplanationsWithHttpInfo($cause_variable_name, $effect_variable_name); + return $response; + } + + /** + * Operation getUserCorrelationExplanationsWithHttpInfo + * + * Get correlation explanations + * + * @param string $cause_variable_name Variable name of the hypothetical cause variable. Example: Sleep Duration (optional) + * @param string $effect_variable_name Variable name of the hypothetical effect variable. Example: Overall Mood (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return array of \QuantiModo\Client\Model\Correlation[], HTTP status code, HTTP response headers (array of strings) + */ + public function getUserCorrelationExplanationsWithHttpInfo($cause_variable_name = null, $effect_variable_name = null) + { + // parse inputs + $resourcePath = "/v3/correlations/explanations"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($cause_variable_name !== null) { + $queryParams['causeVariableName'] = $this->apiClient->getSerializer()->toQueryValue($cause_variable_name); + } + // query params + if ($effect_variable_name !== null) { + $queryParams['effectVariableName'] = $this->apiClient->getSerializer()->toQueryValue($effect_variable_name); + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\QuantiModo\Client\Model\Correlation[]', + '/v3/correlations/explanations' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Correlation[]', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Correlation[]', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getUserCorrelations + * + * Get correlations + * + * @param string $cause_variable_name Variable name of the hypothetical cause variable. Example: Sleep Duration (optional) + * @param string $effect_variable_name Variable name of the hypothetical effect variable. Example: Overall Mood (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param float $user_id User's id (optional) + * @param string $correlation_coefficient Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action (optional) + * @param string $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) + * @param string $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param bool $outcomes_of_interest Only include correlations for which the effect is an outcome of interest for the user (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param bool $fallback_to_study_for_cause_and_effect Example: 1 (optional) + * @param bool $fallback_to_aggregate_correlations Example: true (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return \QuantiModo\Client\Model\GetCorrelationsResponse + */ + public function getUserCorrelations($cause_variable_name = null, $effect_variable_name = null, $sort = null, $limit = '100', $offset = null, $user_id = null, $correlation_coefficient = null, $onset_delay = null, $duration_of_action = null, $updated_at = null, $outcomes_of_interest = null, $app_name = null, $client_id = null, $fallback_to_study_for_cause_and_effect = null, $fallback_to_aggregate_correlations = null) + { + list($response) = $this->getUserCorrelationsWithHttpInfo($cause_variable_name, $effect_variable_name, $sort, $limit, $offset, $user_id, $correlation_coefficient, $onset_delay, $duration_of_action, $updated_at, $outcomes_of_interest, $app_name, $client_id, $fallback_to_study_for_cause_and_effect, $fallback_to_aggregate_correlations); + return $response; + } + + /** + * Operation getUserCorrelationsWithHttpInfo + * + * Get correlations + * + * @param string $cause_variable_name Variable name of the hypothetical cause variable. Example: Sleep Duration (optional) + * @param string $effect_variable_name Variable name of the hypothetical effect variable. Example: Overall Mood (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param float $user_id User's id (optional) + * @param string $correlation_coefficient Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action (optional) + * @param string $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) + * @param string $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param bool $outcomes_of_interest Only include correlations for which the effect is an outcome of interest for the user (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param bool $fallback_to_study_for_cause_and_effect Example: 1 (optional) + * @param bool $fallback_to_aggregate_correlations Example: true (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return array of \QuantiModo\Client\Model\GetCorrelationsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getUserCorrelationsWithHttpInfo($cause_variable_name = null, $effect_variable_name = null, $sort = null, $limit = '100', $offset = null, $user_id = null, $correlation_coefficient = null, $onset_delay = null, $duration_of_action = null, $updated_at = null, $outcomes_of_interest = null, $app_name = null, $client_id = null, $fallback_to_study_for_cause_and_effect = null, $fallback_to_aggregate_correlations = null) + { + if (!is_null($offset) && ($offset < 0)) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsApi.getUserCorrelations, must be bigger than or equal to 0.'); + } + + // parse inputs + $resourcePath = "/v3/correlations"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($cause_variable_name !== null) { + $queryParams['causeVariableName'] = $this->apiClient->getSerializer()->toQueryValue($cause_variable_name); + } + // query params + if ($effect_variable_name !== null) { + $queryParams['effectVariableName'] = $this->apiClient->getSerializer()->toQueryValue($effect_variable_name); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); + } + // query params + if ($user_id !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + } + // query params + if ($correlation_coefficient !== null) { + $queryParams['correlationCoefficient'] = $this->apiClient->getSerializer()->toQueryValue($correlation_coefficient); + } + // query params + if ($onset_delay !== null) { + $queryParams['onsetDelay'] = $this->apiClient->getSerializer()->toQueryValue($onset_delay); + } + // query params + if ($duration_of_action !== null) { + $queryParams['durationOfAction'] = $this->apiClient->getSerializer()->toQueryValue($duration_of_action); + } + // query params + if ($updated_at !== null) { + $queryParams['updatedAt'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); + } + // query params + if ($outcomes_of_interest !== null) { + $queryParams['outcomesOfInterest'] = $this->apiClient->getSerializer()->toQueryValue($outcomes_of_interest); + } + // query params + if ($app_name !== null) { + $queryParams['appName'] = $this->apiClient->getSerializer()->toQueryValue($app_name); + } + // query params + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); + } + // query params + if ($fallback_to_study_for_cause_and_effect !== null) { + $queryParams['fallbackToStudyForCauseAndEffect'] = $this->apiClient->getSerializer()->toQueryValue($fallback_to_study_for_cause_and_effect); + } + // query params + if ($fallback_to_aggregate_correlations !== null) { + $queryParams['fallbackToAggregateCorrelations'] = $this->apiClient->getSerializer()->toQueryValue($fallback_to_aggregate_correlations); + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\QuantiModo\Client\Model\GetCorrelationsResponse', + '/v3/correlations' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\GetCorrelationsResponse', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\GetCorrelationsResponse', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation postAggregatedCorrelations + * + * Store or Update a Correlation + * + * @param \QuantiModo\Client\Model\PostCorrelation $body Provides correlation data (required) + * @param float $user_id User's id (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return void + */ + public function postAggregatedCorrelations($body, $user_id = null) + { + list($response) = $this->postAggregatedCorrelationsWithHttpInfo($body, $user_id); + return $response; + } + + /** + * Operation postAggregatedCorrelationsWithHttpInfo + * + * Store or Update a Correlation + * + * @param \QuantiModo\Client\Model\PostCorrelation $body Provides correlation data (required) + * @param float $user_id User's id (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function postAggregatedCorrelationsWithHttpInfo($body, $user_id = null) + { + // verify the required parameter 'body' is set + if ($body === null) { + throw new \InvalidArgumentException('Missing the required parameter $body when calling postAggregatedCorrelations'); + } + // parse inputs + $resourcePath = "/v3/aggregatedCorrelations"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($user_id !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + } + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/v3/aggregatedCorrelations' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\JsonErrorResponse', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation postVote + * + * Post or update vote + * + * @param \QuantiModo\Client\Model\Vote $body Contains the cause variable, effect variable, and vote value. (required) + * @param float $user_id User's id (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return \QuantiModo\Client\Model\CommonResponse + */ + public function postVote($body, $user_id = null) + { + list($response) = $this->postVoteWithHttpInfo($body, $user_id); + return $response; + } + + /** + * Operation postVoteWithHttpInfo + * + * Post or update vote + * + * @param \QuantiModo\Client\Model\Vote $body Contains the cause variable, effect variable, and vote value. (required) + * @param float $user_id User's id (optional) + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function postVoteWithHttpInfo($body, $user_id = null) + { + // verify the required parameter 'body' is set + if ($body === null) { + throw new \InvalidArgumentException('Missing the required parameter $body when calling postVote'); + } + // parse inputs + $resourcePath = "/v3/votes"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($user_id !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + } + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\QuantiModo\Client\Model\CommonResponse', + '/v3/votes' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } +} diff --git a/lib/Api/ApplicationEndpointsApi.php b/lib/Api/ApplicationEndpointsApi.php deleted file mode 100644 index 1962b3c..0000000 --- a/lib/Api/ApplicationEndpointsApi.php +++ /dev/null @@ -1,1766 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Api; - -use \QuantiModo\Client\ApiClient; -use \QuantiModo\Client\ApiException; -use \QuantiModo\Client\Configuration; -use \QuantiModo\Client\ObjectSerializer; - -/** - * ApplicationEndpointsApi Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class ApplicationEndpointsApi -{ - /** - * API Client - * - * @var \QuantiModo\Client\ApiClient instance of the ApiClient - */ - protected $apiClient; - - /** - * Constructor - * - * @param \QuantiModo\Client\ApiClient|null $apiClient The api client to use - */ - public function __construct(\QuantiModo\Client\ApiClient $apiClient = null) - { - if ($apiClient === null) { - $apiClient = new ApiClient(); - } - - $this->apiClient = $apiClient; - } - - /** - * Get API client - * - * @return \QuantiModo\Client\ApiClient get the API client - */ - public function getApiClient() - { - return $this->apiClient; - } - - /** - * Set the API client - * - * @param \QuantiModo\Client\ApiClient $apiClient set the API client - * - * @return ApplicationEndpointsApi - */ - public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) - { - $this->apiClient = $apiClient; - return $this; - } - - /** - * Operation v2ApplicationConnectionsGet - * - * Get all Connections - * - * @param string $access_token Application's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $connector_id The id for the connector data source for which the connection is connected (optional) - * @param string $connect_status Indicates whether a connector is currently connected to a service for a user. (optional) - * @param string $connect_error Error message if there is a problem with authorizing this connection. (optional) - * @param string $update_requested_at Time at which an update was requested by a user. (optional) - * @param string $update_status Indicates whether a connector is currently updated. (optional) - * @param string $update_error Indicates if there was an error during the update. (optional) - * @param string $last_successful_updated_at The time at which the connector was last successfully updated. (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse2002 - */ - public function v2ApplicationConnectionsGet($access_token = null, $user_id = null, $connector_id = null, $connect_status = null, $connect_error = null, $update_requested_at = null, $update_status = null, $update_error = null, $last_successful_updated_at = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v2ApplicationConnectionsGetWithHttpInfo($access_token, $user_id, $connector_id, $connect_status, $connect_error, $update_requested_at, $update_status, $update_error, $last_successful_updated_at, $created_at, $updated_at, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v2ApplicationConnectionsGetWithHttpInfo - * - * Get all Connections - * - * @param string $access_token Application's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $connector_id The id for the connector data source for which the connection is connected (optional) - * @param string $connect_status Indicates whether a connector is currently connected to a service for a user. (optional) - * @param string $connect_error Error message if there is a problem with authorizing this connection. (optional) - * @param string $update_requested_at Time at which an update was requested by a user. (optional) - * @param string $update_status Indicates whether a connector is currently updated. (optional) - * @param string $update_error Indicates if there was an error during the update. (optional) - * @param string $last_successful_updated_at The time at which the connector was last successfully updated. (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse2002, HTTP status code, HTTP response headers (array of strings) - */ - public function v2ApplicationConnectionsGetWithHttpInfo($access_token = null, $user_id = null, $connector_id = null, $connect_status = null, $connect_error = null, $update_requested_at = null, $update_status = null, $update_error = null, $last_successful_updated_at = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - // parse inputs - $resourcePath = "/v2/application/connections"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($connector_id !== null) { - $queryParams['connector_id'] = $this->apiClient->getSerializer()->toQueryValue($connector_id); - } - // query params - if ($connect_status !== null) { - $queryParams['connect_status'] = $this->apiClient->getSerializer()->toQueryValue($connect_status); - } - // query params - if ($connect_error !== null) { - $queryParams['connect_error'] = $this->apiClient->getSerializer()->toQueryValue($connect_error); - } - // query params - if ($update_requested_at !== null) { - $queryParams['update_requested_at'] = $this->apiClient->getSerializer()->toQueryValue($update_requested_at); - } - // query params - if ($update_status !== null) { - $queryParams['update_status'] = $this->apiClient->getSerializer()->toQueryValue($update_status); - } - // query params - if ($update_error !== null) { - $queryParams['update_error'] = $this->apiClient->getSerializer()->toQueryValue($update_error); - } - // query params - if ($last_successful_updated_at !== null) { - $queryParams['last_successful_updated_at'] = $this->apiClient->getSerializer()->toQueryValue($last_successful_updated_at); - } - // query params - if ($created_at !== null) { - $queryParams['created_at'] = $this->apiClient->getSerializer()->toQueryValue($created_at); - } - // query params - if ($updated_at !== null) { - $queryParams['updated_at'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // this endpoint requires API key authentication - $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); - if (strlen($apiKey) !== 0) { - $headerParams['api_key'] = $apiKey; - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\InlineResponse2002', - '/v2/application/connections' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse2002', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse2002', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v2ApplicationCredentialsGet - * - * Get all Credentials - * - * @param string $access_token Application's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $connector_id The id for the connector data source from which the credential was obtained (optional) - * @param string $attr_key Attribute name such as token, userid, username, or password (optional) - * @param string $attr_value Encrypted value for the attribute specified (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse2003 - */ - public function v2ApplicationCredentialsGet($access_token = null, $user_id = null, $connector_id = null, $attr_key = null, $attr_value = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v2ApplicationCredentialsGetWithHttpInfo($access_token, $user_id, $connector_id, $attr_key, $attr_value, $created_at, $updated_at, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v2ApplicationCredentialsGetWithHttpInfo - * - * Get all Credentials - * - * @param string $access_token Application's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $connector_id The id for the connector data source from which the credential was obtained (optional) - * @param string $attr_key Attribute name such as token, userid, username, or password (optional) - * @param string $attr_value Encrypted value for the attribute specified (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse2003, HTTP status code, HTTP response headers (array of strings) - */ - public function v2ApplicationCredentialsGetWithHttpInfo($access_token = null, $user_id = null, $connector_id = null, $attr_key = null, $attr_value = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - // parse inputs - $resourcePath = "/v2/application/credentials"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($connector_id !== null) { - $queryParams['connector_id'] = $this->apiClient->getSerializer()->toQueryValue($connector_id); - } - // query params - if ($attr_key !== null) { - $queryParams['attr_key'] = $this->apiClient->getSerializer()->toQueryValue($attr_key); - } - // query params - if ($attr_value !== null) { - $queryParams['attr_value'] = $this->apiClient->getSerializer()->toQueryValue($attr_value); - } - // query params - if ($created_at !== null) { - $queryParams['created_at'] = $this->apiClient->getSerializer()->toQueryValue($created_at); - } - // query params - if ($updated_at !== null) { - $queryParams['updated_at'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // this endpoint requires API key authentication - $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); - if (strlen($apiKey) !== 0) { - $headerParams['api_key'] = $apiKey; - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\InlineResponse2003', - '/v2/application/credentials' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse2003', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse2003', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v2ApplicationMeasurementsGet - * - * Get measurements for all users using your application - * - * @param string $access_token Application's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $client_id The ID of the client application which originally stored the measurement (optional) - * @param int $connector_id The id for the connector data source from which the measurement was obtained (optional) - * @param int $variable_id ID of the variable for which we are creating the measurement records (optional) - * @param string $source_name Application or device used to record the measurement values (optional) - * @param string $start_time start time for the measurement event. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param float $value The value of the measurement after conversion to the default unit for that variable (optional) - * @param int $unit_id The default unit id for the variable (optional) - * @param float $original_value Unconverted value of measurement as originally posted (before conversion to default unit) (optional) - * @param int $original_unit_id Unit id of the measurement as originally submitted (optional) - * @param int $duration The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param string $note An optional note the user may include with their measurement (optional) - * @param float $latitude Latitude at which the measurement was taken (optional) - * @param float $longitude Longitude at which the measurement was taken (optional) - * @param string $location Optional human readable name for the location where the measurement was recorded (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $error An error message if there is a problem with the measurement (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse2004 - */ - public function v2ApplicationMeasurementsGet($access_token = null, $user_id = null, $client_id = null, $connector_id = null, $variable_id = null, $source_name = null, $start_time = null, $value = null, $unit_id = null, $original_value = null, $original_unit_id = null, $duration = null, $note = null, $latitude = null, $longitude = null, $location = null, $created_at = null, $updated_at = null, $error = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v2ApplicationMeasurementsGetWithHttpInfo($access_token, $user_id, $client_id, $connector_id, $variable_id, $source_name, $start_time, $value, $unit_id, $original_value, $original_unit_id, $duration, $note, $latitude, $longitude, $location, $created_at, $updated_at, $error, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v2ApplicationMeasurementsGetWithHttpInfo - * - * Get measurements for all users using your application - * - * @param string $access_token Application's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $client_id The ID of the client application which originally stored the measurement (optional) - * @param int $connector_id The id for the connector data source from which the measurement was obtained (optional) - * @param int $variable_id ID of the variable for which we are creating the measurement records (optional) - * @param string $source_name Application or device used to record the measurement values (optional) - * @param string $start_time start time for the measurement event. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param float $value The value of the measurement after conversion to the default unit for that variable (optional) - * @param int $unit_id The default unit id for the variable (optional) - * @param float $original_value Unconverted value of measurement as originally posted (before conversion to default unit) (optional) - * @param int $original_unit_id Unit id of the measurement as originally submitted (optional) - * @param int $duration The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param string $note An optional note the user may include with their measurement (optional) - * @param float $latitude Latitude at which the measurement was taken (optional) - * @param float $longitude Longitude at which the measurement was taken (optional) - * @param string $location Optional human readable name for the location where the measurement was recorded (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $error An error message if there is a problem with the measurement (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse2004, HTTP status code, HTTP response headers (array of strings) - */ - public function v2ApplicationMeasurementsGetWithHttpInfo($access_token = null, $user_id = null, $client_id = null, $connector_id = null, $variable_id = null, $source_name = null, $start_time = null, $value = null, $unit_id = null, $original_value = null, $original_unit_id = null, $duration = null, $note = null, $latitude = null, $longitude = null, $location = null, $created_at = null, $updated_at = null, $error = null, $limit = null, $offset = null, $sort = null) - { - // parse inputs - $resourcePath = "/v2/application/measurements"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($client_id !== null) { - $queryParams['client_id'] = $this->apiClient->getSerializer()->toQueryValue($client_id); - } - // query params - if ($connector_id !== null) { - $queryParams['connector_id'] = $this->apiClient->getSerializer()->toQueryValue($connector_id); - } - // query params - if ($variable_id !== null) { - $queryParams['variable_id'] = $this->apiClient->getSerializer()->toQueryValue($variable_id); - } - // query params - if ($source_name !== null) { - $queryParams['source_name'] = $this->apiClient->getSerializer()->toQueryValue($source_name); - } - // query params - if ($start_time !== null) { - $queryParams['start_time'] = $this->apiClient->getSerializer()->toQueryValue($start_time); - } - // query params - if ($value !== null) { - $queryParams['value'] = $this->apiClient->getSerializer()->toQueryValue($value); - } - // query params - if ($unit_id !== null) { - $queryParams['unit_id'] = $this->apiClient->getSerializer()->toQueryValue($unit_id); - } - // query params - if ($original_value !== null) { - $queryParams['original_value'] = $this->apiClient->getSerializer()->toQueryValue($original_value); - } - // query params - if ($original_unit_id !== null) { - $queryParams['original_unit_id'] = $this->apiClient->getSerializer()->toQueryValue($original_unit_id); - } - // query params - if ($duration !== null) { - $queryParams['duration'] = $this->apiClient->getSerializer()->toQueryValue($duration); - } - // query params - if ($note !== null) { - $queryParams['note'] = $this->apiClient->getSerializer()->toQueryValue($note); - } - // query params - if ($latitude !== null) { - $queryParams['latitude'] = $this->apiClient->getSerializer()->toQueryValue($latitude); - } - // query params - if ($longitude !== null) { - $queryParams['longitude'] = $this->apiClient->getSerializer()->toQueryValue($longitude); - } - // query params - if ($location !== null) { - $queryParams['location'] = $this->apiClient->getSerializer()->toQueryValue($location); - } - // query params - if ($created_at !== null) { - $queryParams['created_at'] = $this->apiClient->getSerializer()->toQueryValue($created_at); - } - // query params - if ($updated_at !== null) { - $queryParams['updated_at'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); - } - // query params - if ($error !== null) { - $queryParams['error'] = $this->apiClient->getSerializer()->toQueryValue($error); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // this endpoint requires API key authentication - $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); - if (strlen($apiKey) !== 0) { - $headerParams['api_key'] = $apiKey; - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\InlineResponse2004', - '/v2/application/measurements' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse2004', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse2004', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v2ApplicationTrackingRemindersGet - * - * Get tracking reminders - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $client_id The ID of the client application which last created or updated this trackingReminder (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse2005 - */ - public function v2ApplicationTrackingRemindersGet($access_token = null, $user_id = null, $client_id = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v2ApplicationTrackingRemindersGetWithHttpInfo($access_token, $user_id, $client_id, $created_at, $updated_at, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v2ApplicationTrackingRemindersGetWithHttpInfo - * - * Get tracking reminders - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $client_id The ID of the client application which last created or updated this trackingReminder (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse2005, HTTP status code, HTTP response headers (array of strings) - */ - public function v2ApplicationTrackingRemindersGetWithHttpInfo($access_token = null, $user_id = null, $client_id = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - // parse inputs - $resourcePath = "/v2/application/trackingReminders"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($client_id !== null) { - $queryParams['client_id'] = $this->apiClient->getSerializer()->toQueryValue($client_id); - } - // query params - if ($created_at !== null) { - $queryParams['created_at'] = $this->apiClient->getSerializer()->toQueryValue($created_at); - } - // query params - if ($updated_at !== null) { - $queryParams['updated_at'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // this endpoint requires API key authentication - $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); - if (strlen($apiKey) !== 0) { - $headerParams['api_key'] = $apiKey; - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\InlineResponse2005', - '/v2/application/trackingReminders' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse2005', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse2005', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v2ApplicationUpdatesGet - * - * Get all Updates - * - * @param string $access_token Application's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $connector_id connector_id (optional) - * @param int $number_of_measurements number_of_measurements (optional) - * @param bool $success success (optional) - * @param string $message message (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse2006 - */ - public function v2ApplicationUpdatesGet($access_token = null, $user_id = null, $connector_id = null, $number_of_measurements = null, $success = null, $message = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v2ApplicationUpdatesGetWithHttpInfo($access_token, $user_id, $connector_id, $number_of_measurements, $success, $message, $created_at, $updated_at, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v2ApplicationUpdatesGetWithHttpInfo - * - * Get all Updates - * - * @param string $access_token Application's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $connector_id connector_id (optional) - * @param int $number_of_measurements number_of_measurements (optional) - * @param bool $success success (optional) - * @param string $message message (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse2006, HTTP status code, HTTP response headers (array of strings) - */ - public function v2ApplicationUpdatesGetWithHttpInfo($access_token = null, $user_id = null, $connector_id = null, $number_of_measurements = null, $success = null, $message = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - // parse inputs - $resourcePath = "/v2/application/updates"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($connector_id !== null) { - $queryParams['connector_id'] = $this->apiClient->getSerializer()->toQueryValue($connector_id); - } - // query params - if ($number_of_measurements !== null) { - $queryParams['number_of_measurements'] = $this->apiClient->getSerializer()->toQueryValue($number_of_measurements); - } - // query params - if ($success !== null) { - $queryParams['success'] = $this->apiClient->getSerializer()->toQueryValue($success); - } - // query params - if ($message !== null) { - $queryParams['message'] = $this->apiClient->getSerializer()->toQueryValue($message); - } - // query params - if ($created_at !== null) { - $queryParams['created_at'] = $this->apiClient->getSerializer()->toQueryValue($created_at); - } - // query params - if ($updated_at !== null) { - $queryParams['updated_at'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // this endpoint requires API key authentication - $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); - if (strlen($apiKey) !== 0) { - $headerParams['api_key'] = $apiKey; - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\InlineResponse2006', - '/v2/application/updates' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse2006', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse2006', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v2ApplicationUserVariableRelationshipsGet - * - * Get all UserVariableRelationships - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $id id (optional) - * @param string $confidence_level Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors (optional) - * @param float $confidence_score A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors (optional) - * @param string $direction Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. (optional) - * @param int $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param string $error_message error_message (optional) - * @param int $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) - * @param int $outcome_variable_id Variable ID for the outcome variable (optional) - * @param int $predictor_variable_id Variable ID for the predictor variable (optional) - * @param int $predictor_unit_id ID for default unit of the predictor variable (optional) - * @param float $sinn_rank A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. (optional) - * @param string $strength_level Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. (optional) - * @param float $strength_score A value represented to the size of the effect which the predictor appears to have on the outcome. (optional) - * @param string $vote vote (optional) - * @param float $value_predicting_high_outcome Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value (optional) - * @param float $value_predicting_low_outcome Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse2008 - */ - public function v2ApplicationUserVariableRelationshipsGet($access_token = null, $user_id = null, $id = null, $confidence_level = null, $confidence_score = null, $direction = null, $duration_of_action = null, $error_message = null, $onset_delay = null, $outcome_variable_id = null, $predictor_variable_id = null, $predictor_unit_id = null, $sinn_rank = null, $strength_level = null, $strength_score = null, $vote = null, $value_predicting_high_outcome = null, $value_predicting_low_outcome = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v2ApplicationUserVariableRelationshipsGetWithHttpInfo($access_token, $user_id, $id, $confidence_level, $confidence_score, $direction, $duration_of_action, $error_message, $onset_delay, $outcome_variable_id, $predictor_variable_id, $predictor_unit_id, $sinn_rank, $strength_level, $strength_score, $vote, $value_predicting_high_outcome, $value_predicting_low_outcome, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v2ApplicationUserVariableRelationshipsGetWithHttpInfo - * - * Get all UserVariableRelationships - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $id id (optional) - * @param string $confidence_level Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors (optional) - * @param float $confidence_score A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors (optional) - * @param string $direction Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. (optional) - * @param int $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param string $error_message error_message (optional) - * @param int $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) - * @param int $outcome_variable_id Variable ID for the outcome variable (optional) - * @param int $predictor_variable_id Variable ID for the predictor variable (optional) - * @param int $predictor_unit_id ID for default unit of the predictor variable (optional) - * @param float $sinn_rank A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. (optional) - * @param string $strength_level Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. (optional) - * @param float $strength_score A value represented to the size of the effect which the predictor appears to have on the outcome. (optional) - * @param string $vote vote (optional) - * @param float $value_predicting_high_outcome Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value (optional) - * @param float $value_predicting_low_outcome Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) - */ - public function v2ApplicationUserVariableRelationshipsGetWithHttpInfo($access_token = null, $user_id = null, $id = null, $confidence_level = null, $confidence_score = null, $direction = null, $duration_of_action = null, $error_message = null, $onset_delay = null, $outcome_variable_id = null, $predictor_variable_id = null, $predictor_unit_id = null, $sinn_rank = null, $strength_level = null, $strength_score = null, $vote = null, $value_predicting_high_outcome = null, $value_predicting_low_outcome = null, $limit = null, $offset = null, $sort = null) - { - // parse inputs - $resourcePath = "/v2/application/userVariableRelationships"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($id !== null) { - $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); - } - // query params - if ($confidence_level !== null) { - $queryParams['confidence_level'] = $this->apiClient->getSerializer()->toQueryValue($confidence_level); - } - // query params - if ($confidence_score !== null) { - $queryParams['confidence_score'] = $this->apiClient->getSerializer()->toQueryValue($confidence_score); - } - // query params - if ($direction !== null) { - $queryParams['direction'] = $this->apiClient->getSerializer()->toQueryValue($direction); - } - // query params - if ($duration_of_action !== null) { - $queryParams['duration_of_action'] = $this->apiClient->getSerializer()->toQueryValue($duration_of_action); - } - // query params - if ($error_message !== null) { - $queryParams['error_message'] = $this->apiClient->getSerializer()->toQueryValue($error_message); - } - // query params - if ($onset_delay !== null) { - $queryParams['onset_delay'] = $this->apiClient->getSerializer()->toQueryValue($onset_delay); - } - // query params - if ($outcome_variable_id !== null) { - $queryParams['outcome_variable_id'] = $this->apiClient->getSerializer()->toQueryValue($outcome_variable_id); - } - // query params - if ($predictor_variable_id !== null) { - $queryParams['predictor_variable_id'] = $this->apiClient->getSerializer()->toQueryValue($predictor_variable_id); - } - // query params - if ($predictor_unit_id !== null) { - $queryParams['predictor_unit_id'] = $this->apiClient->getSerializer()->toQueryValue($predictor_unit_id); - } - // query params - if ($sinn_rank !== null) { - $queryParams['sinn_rank'] = $this->apiClient->getSerializer()->toQueryValue($sinn_rank); - } - // query params - if ($strength_level !== null) { - $queryParams['strength_level'] = $this->apiClient->getSerializer()->toQueryValue($strength_level); - } - // query params - if ($strength_score !== null) { - $queryParams['strength_score'] = $this->apiClient->getSerializer()->toQueryValue($strength_score); - } - // query params - if ($vote !== null) { - $queryParams['vote'] = $this->apiClient->getSerializer()->toQueryValue($vote); - } - // query params - if ($value_predicting_high_outcome !== null) { - $queryParams['value_predicting_high_outcome'] = $this->apiClient->getSerializer()->toQueryValue($value_predicting_high_outcome); - } - // query params - if ($value_predicting_low_outcome !== null) { - $queryParams['value_predicting_low_outcome'] = $this->apiClient->getSerializer()->toQueryValue($value_predicting_low_outcome); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // this endpoint requires API key authentication - $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); - if (strlen($apiKey) !== 0) { - $headerParams['api_key'] = $apiKey; - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\InlineResponse2008', - '/v2/application/userVariableRelationships' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse2008', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse2008', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v2ApplicationUserVariablesGet - * - * Get all UserVariables - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $client_id The ID of the client application which last created or updated this user variable (optional) - * @param int $parent_id ID of the parent variable if this variable has any parent (optional) - * @param int $variable_id ID of variable (optional) - * @param int $default_unit_id D of unit to use for this variable (optional) - * @param float $minimum_allowed_value The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. (optional) - * @param float $maximum_allowed_value The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. (optional) - * @param float $filling_value When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. (optional) - * @param int $join_with The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables (optional) - * @param int $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) - * @param int $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param int $variable_category_id ID of variable category (optional) - * @param int $updated updated (optional) - * @param int $public Is variable public (optional) - * @param bool $cause_only A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user (optional) - * @param string $filling_type 0 -> No filling, 1 -> Use filling-value (optional) - * @param int $number_of_measurements Number of measurements (optional) - * @param int $number_of_processed_measurements Number of processed measurements (optional) - * @param int $measurements_at_last_analysis Number of measurements at last analysis (optional) - * @param int $last_unit_id ID of last Unit (optional) - * @param int $last_original_unit_id ID of last original Unit (optional) - * @param int $last_original_value Last original value which is stored (optional) - * @param float $last_value Last Value (optional) - * @param int $number_of_correlations Number of correlations for this variable (optional) - * @param string $status status (optional) - * @param string $error_message error_message (optional) - * @param string $last_successful_update_time When this variable or its settings were last updated (optional) - * @param float $standard_deviation Standard deviation (optional) - * @param float $variance Variance (optional) - * @param float $minimum_recorded_value Minimum recorded value of this variable (optional) - * @param float $maximum_recorded_value Maximum recorded value of this variable (optional) - * @param float $mean Mean (optional) - * @param float $median Median (optional) - * @param int $most_common_unit_id Most common Unit ID (optional) - * @param float $most_common_value Most common value (optional) - * @param float $number_of_unique_daily_values Number of unique daily values (optional) - * @param int $number_of_changes Number of changes (optional) - * @param float $skewness Skewness (optional) - * @param float $kurtosis Kurtosis (optional) - * @param float $latitude Latitude (optional) - * @param float $longitude Longitude (optional) - * @param string $location Location (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param bool $outcome Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables (optional) - * @param string $sources Comma-separated list of source names to limit variables to those sources (optional) - * @param int $earliest_source_time Earliest source time (optional) - * @param int $latest_source_time Latest source time (optional) - * @param int $earliest_measurement_time Earliest measurement time (optional) - * @param int $latest_measurement_time Latest measurement time (optional) - * @param int $earliest_filling_time Earliest filling time (optional) - * @param int $latest_filling_time Latest filling time (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse2007 - */ - public function v2ApplicationUserVariablesGet($access_token = null, $user_id = null, $client_id = null, $parent_id = null, $variable_id = null, $default_unit_id = null, $minimum_allowed_value = null, $maximum_allowed_value = null, $filling_value = null, $join_with = null, $onset_delay = null, $duration_of_action = null, $variable_category_id = null, $updated = null, $public = null, $cause_only = null, $filling_type = null, $number_of_measurements = null, $number_of_processed_measurements = null, $measurements_at_last_analysis = null, $last_unit_id = null, $last_original_unit_id = null, $last_original_value = null, $last_value = null, $number_of_correlations = null, $status = null, $error_message = null, $last_successful_update_time = null, $standard_deviation = null, $variance = null, $minimum_recorded_value = null, $maximum_recorded_value = null, $mean = null, $median = null, $most_common_unit_id = null, $most_common_value = null, $number_of_unique_daily_values = null, $number_of_changes = null, $skewness = null, $kurtosis = null, $latitude = null, $longitude = null, $location = null, $created_at = null, $updated_at = null, $outcome = null, $sources = null, $earliest_source_time = null, $latest_source_time = null, $earliest_measurement_time = null, $latest_measurement_time = null, $earliest_filling_time = null, $latest_filling_time = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v2ApplicationUserVariablesGetWithHttpInfo($access_token, $user_id, $client_id, $parent_id, $variable_id, $default_unit_id, $minimum_allowed_value, $maximum_allowed_value, $filling_value, $join_with, $onset_delay, $duration_of_action, $variable_category_id, $updated, $public, $cause_only, $filling_type, $number_of_measurements, $number_of_processed_measurements, $measurements_at_last_analysis, $last_unit_id, $last_original_unit_id, $last_original_value, $last_value, $number_of_correlations, $status, $error_message, $last_successful_update_time, $standard_deviation, $variance, $minimum_recorded_value, $maximum_recorded_value, $mean, $median, $most_common_unit_id, $most_common_value, $number_of_unique_daily_values, $number_of_changes, $skewness, $kurtosis, $latitude, $longitude, $location, $created_at, $updated_at, $outcome, $sources, $earliest_source_time, $latest_source_time, $earliest_measurement_time, $latest_measurement_time, $earliest_filling_time, $latest_filling_time, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v2ApplicationUserVariablesGetWithHttpInfo - * - * Get all UserVariables - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $client_id The ID of the client application which last created or updated this user variable (optional) - * @param int $parent_id ID of the parent variable if this variable has any parent (optional) - * @param int $variable_id ID of variable (optional) - * @param int $default_unit_id D of unit to use for this variable (optional) - * @param float $minimum_allowed_value The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. (optional) - * @param float $maximum_allowed_value The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. (optional) - * @param float $filling_value When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. (optional) - * @param int $join_with The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables (optional) - * @param int $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) - * @param int $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param int $variable_category_id ID of variable category (optional) - * @param int $updated updated (optional) - * @param int $public Is variable public (optional) - * @param bool $cause_only A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user (optional) - * @param string $filling_type 0 -> No filling, 1 -> Use filling-value (optional) - * @param int $number_of_measurements Number of measurements (optional) - * @param int $number_of_processed_measurements Number of processed measurements (optional) - * @param int $measurements_at_last_analysis Number of measurements at last analysis (optional) - * @param int $last_unit_id ID of last Unit (optional) - * @param int $last_original_unit_id ID of last original Unit (optional) - * @param int $last_original_value Last original value which is stored (optional) - * @param float $last_value Last Value (optional) - * @param int $number_of_correlations Number of correlations for this variable (optional) - * @param string $status status (optional) - * @param string $error_message error_message (optional) - * @param string $last_successful_update_time When this variable or its settings were last updated (optional) - * @param float $standard_deviation Standard deviation (optional) - * @param float $variance Variance (optional) - * @param float $minimum_recorded_value Minimum recorded value of this variable (optional) - * @param float $maximum_recorded_value Maximum recorded value of this variable (optional) - * @param float $mean Mean (optional) - * @param float $median Median (optional) - * @param int $most_common_unit_id Most common Unit ID (optional) - * @param float $most_common_value Most common value (optional) - * @param float $number_of_unique_daily_values Number of unique daily values (optional) - * @param int $number_of_changes Number of changes (optional) - * @param float $skewness Skewness (optional) - * @param float $kurtosis Kurtosis (optional) - * @param float $latitude Latitude (optional) - * @param float $longitude Longitude (optional) - * @param string $location Location (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param bool $outcome Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables (optional) - * @param string $sources Comma-separated list of source names to limit variables to those sources (optional) - * @param int $earliest_source_time Earliest source time (optional) - * @param int $latest_source_time Latest source time (optional) - * @param int $earliest_measurement_time Earliest measurement time (optional) - * @param int $latest_measurement_time Latest measurement time (optional) - * @param int $earliest_filling_time Earliest filling time (optional) - * @param int $latest_filling_time Latest filling time (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) - */ - public function v2ApplicationUserVariablesGetWithHttpInfo($access_token = null, $user_id = null, $client_id = null, $parent_id = null, $variable_id = null, $default_unit_id = null, $minimum_allowed_value = null, $maximum_allowed_value = null, $filling_value = null, $join_with = null, $onset_delay = null, $duration_of_action = null, $variable_category_id = null, $updated = null, $public = null, $cause_only = null, $filling_type = null, $number_of_measurements = null, $number_of_processed_measurements = null, $measurements_at_last_analysis = null, $last_unit_id = null, $last_original_unit_id = null, $last_original_value = null, $last_value = null, $number_of_correlations = null, $status = null, $error_message = null, $last_successful_update_time = null, $standard_deviation = null, $variance = null, $minimum_recorded_value = null, $maximum_recorded_value = null, $mean = null, $median = null, $most_common_unit_id = null, $most_common_value = null, $number_of_unique_daily_values = null, $number_of_changes = null, $skewness = null, $kurtosis = null, $latitude = null, $longitude = null, $location = null, $created_at = null, $updated_at = null, $outcome = null, $sources = null, $earliest_source_time = null, $latest_source_time = null, $earliest_measurement_time = null, $latest_measurement_time = null, $earliest_filling_time = null, $latest_filling_time = null, $limit = null, $offset = null, $sort = null) - { - // parse inputs - $resourcePath = "/v2/application/userVariables"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($client_id !== null) { - $queryParams['client_id'] = $this->apiClient->getSerializer()->toQueryValue($client_id); - } - // query params - if ($parent_id !== null) { - $queryParams['parent_id'] = $this->apiClient->getSerializer()->toQueryValue($parent_id); - } - // query params - if ($variable_id !== null) { - $queryParams['variable_id'] = $this->apiClient->getSerializer()->toQueryValue($variable_id); - } - // query params - if ($default_unit_id !== null) { - $queryParams['default_unit_id'] = $this->apiClient->getSerializer()->toQueryValue($default_unit_id); - } - // query params - if ($minimum_allowed_value !== null) { - $queryParams['minimum_allowed_value'] = $this->apiClient->getSerializer()->toQueryValue($minimum_allowed_value); - } - // query params - if ($maximum_allowed_value !== null) { - $queryParams['maximum_allowed_value'] = $this->apiClient->getSerializer()->toQueryValue($maximum_allowed_value); - } - // query params - if ($filling_value !== null) { - $queryParams['filling_value'] = $this->apiClient->getSerializer()->toQueryValue($filling_value); - } - // query params - if ($join_with !== null) { - $queryParams['join_with'] = $this->apiClient->getSerializer()->toQueryValue($join_with); - } - // query params - if ($onset_delay !== null) { - $queryParams['onset_delay'] = $this->apiClient->getSerializer()->toQueryValue($onset_delay); - } - // query params - if ($duration_of_action !== null) { - $queryParams['duration_of_action'] = $this->apiClient->getSerializer()->toQueryValue($duration_of_action); - } - // query params - if ($variable_category_id !== null) { - $queryParams['variable_category_id'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_id); - } - // query params - if ($updated !== null) { - $queryParams['updated'] = $this->apiClient->getSerializer()->toQueryValue($updated); - } - // query params - if ($public !== null) { - $queryParams['public'] = $this->apiClient->getSerializer()->toQueryValue($public); - } - // query params - if ($cause_only !== null) { - $queryParams['cause_only'] = $this->apiClient->getSerializer()->toQueryValue($cause_only); - } - // query params - if ($filling_type !== null) { - $queryParams['filling_type'] = $this->apiClient->getSerializer()->toQueryValue($filling_type); - } - // query params - if ($number_of_measurements !== null) { - $queryParams['number_of_measurements'] = $this->apiClient->getSerializer()->toQueryValue($number_of_measurements); - } - // query params - if ($number_of_processed_measurements !== null) { - $queryParams['number_of_processed_measurements'] = $this->apiClient->getSerializer()->toQueryValue($number_of_processed_measurements); - } - // query params - if ($measurements_at_last_analysis !== null) { - $queryParams['measurements_at_last_analysis'] = $this->apiClient->getSerializer()->toQueryValue($measurements_at_last_analysis); - } - // query params - if ($last_unit_id !== null) { - $queryParams['last_unit_id'] = $this->apiClient->getSerializer()->toQueryValue($last_unit_id); - } - // query params - if ($last_original_unit_id !== null) { - $queryParams['last_original_unit_id'] = $this->apiClient->getSerializer()->toQueryValue($last_original_unit_id); - } - // query params - if ($last_original_value !== null) { - $queryParams['last_original_value'] = $this->apiClient->getSerializer()->toQueryValue($last_original_value); - } - // query params - if ($last_value !== null) { - $queryParams['last_value'] = $this->apiClient->getSerializer()->toQueryValue($last_value); - } - // query params - if ($number_of_correlations !== null) { - $queryParams['number_of_correlations'] = $this->apiClient->getSerializer()->toQueryValue($number_of_correlations); - } - // query params - if ($status !== null) { - $queryParams['status'] = $this->apiClient->getSerializer()->toQueryValue($status); - } - // query params - if ($error_message !== null) { - $queryParams['error_message'] = $this->apiClient->getSerializer()->toQueryValue($error_message); - } - // query params - if ($last_successful_update_time !== null) { - $queryParams['last_successful_update_time'] = $this->apiClient->getSerializer()->toQueryValue($last_successful_update_time); - } - // query params - if ($standard_deviation !== null) { - $queryParams['standard_deviation'] = $this->apiClient->getSerializer()->toQueryValue($standard_deviation); - } - // query params - if ($variance !== null) { - $queryParams['variance'] = $this->apiClient->getSerializer()->toQueryValue($variance); - } - // query params - if ($minimum_recorded_value !== null) { - $queryParams['minimum_recorded_value'] = $this->apiClient->getSerializer()->toQueryValue($minimum_recorded_value); - } - // query params - if ($maximum_recorded_value !== null) { - $queryParams['maximum_recorded_value'] = $this->apiClient->getSerializer()->toQueryValue($maximum_recorded_value); - } - // query params - if ($mean !== null) { - $queryParams['mean'] = $this->apiClient->getSerializer()->toQueryValue($mean); - } - // query params - if ($median !== null) { - $queryParams['median'] = $this->apiClient->getSerializer()->toQueryValue($median); - } - // query params - if ($most_common_unit_id !== null) { - $queryParams['most_common_unit_id'] = $this->apiClient->getSerializer()->toQueryValue($most_common_unit_id); - } - // query params - if ($most_common_value !== null) { - $queryParams['most_common_value'] = $this->apiClient->getSerializer()->toQueryValue($most_common_value); - } - // query params - if ($number_of_unique_daily_values !== null) { - $queryParams['number_of_unique_daily_values'] = $this->apiClient->getSerializer()->toQueryValue($number_of_unique_daily_values); - } - // query params - if ($number_of_changes !== null) { - $queryParams['number_of_changes'] = $this->apiClient->getSerializer()->toQueryValue($number_of_changes); - } - // query params - if ($skewness !== null) { - $queryParams['skewness'] = $this->apiClient->getSerializer()->toQueryValue($skewness); - } - // query params - if ($kurtosis !== null) { - $queryParams['kurtosis'] = $this->apiClient->getSerializer()->toQueryValue($kurtosis); - } - // query params - if ($latitude !== null) { - $queryParams['latitude'] = $this->apiClient->getSerializer()->toQueryValue($latitude); - } - // query params - if ($longitude !== null) { - $queryParams['longitude'] = $this->apiClient->getSerializer()->toQueryValue($longitude); - } - // query params - if ($location !== null) { - $queryParams['location'] = $this->apiClient->getSerializer()->toQueryValue($location); - } - // query params - if ($created_at !== null) { - $queryParams['created_at'] = $this->apiClient->getSerializer()->toQueryValue($created_at); - } - // query params - if ($updated_at !== null) { - $queryParams['updated_at'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); - } - // query params - if ($outcome !== null) { - $queryParams['outcome'] = $this->apiClient->getSerializer()->toQueryValue($outcome); - } - // query params - if ($sources !== null) { - $queryParams['sources'] = $this->apiClient->getSerializer()->toQueryValue($sources); - } - // query params - if ($earliest_source_time !== null) { - $queryParams['earliest_source_time'] = $this->apiClient->getSerializer()->toQueryValue($earliest_source_time); - } - // query params - if ($latest_source_time !== null) { - $queryParams['latest_source_time'] = $this->apiClient->getSerializer()->toQueryValue($latest_source_time); - } - // query params - if ($earliest_measurement_time !== null) { - $queryParams['earliest_measurement_time'] = $this->apiClient->getSerializer()->toQueryValue($earliest_measurement_time); - } - // query params - if ($latest_measurement_time !== null) { - $queryParams['latest_measurement_time'] = $this->apiClient->getSerializer()->toQueryValue($latest_measurement_time); - } - // query params - if ($earliest_filling_time !== null) { - $queryParams['earliest_filling_time'] = $this->apiClient->getSerializer()->toQueryValue($earliest_filling_time); - } - // query params - if ($latest_filling_time !== null) { - $queryParams['latest_filling_time'] = $this->apiClient->getSerializer()->toQueryValue($latest_filling_time); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // this endpoint requires API key authentication - $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); - if (strlen($apiKey) !== 0) { - $headerParams['api_key'] = $apiKey; - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\InlineResponse2007', - '/v2/application/userVariables' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse2007', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse2007', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v2ApplicationVariableUserSourcesGet - * - * Get all VariableUserSources - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $variable_id ID of variable (optional) - * @param int $timestamp Time that this measurement occurred Uses epoch minute (epoch time divided by 60) (optional) - * @param int $earliest_measurement_time Earliest measurement time (optional) - * @param int $latest_measurement_time Latest measurement time (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse2009 - */ - public function v2ApplicationVariableUserSourcesGet($access_token = null, $user_id = null, $variable_id = null, $timestamp = null, $earliest_measurement_time = null, $latest_measurement_time = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v2ApplicationVariableUserSourcesGetWithHttpInfo($access_token, $user_id, $variable_id, $timestamp, $earliest_measurement_time, $latest_measurement_time, $created_at, $updated_at, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v2ApplicationVariableUserSourcesGetWithHttpInfo - * - * Get all VariableUserSources - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $variable_id ID of variable (optional) - * @param int $timestamp Time that this measurement occurred Uses epoch minute (epoch time divided by 60) (optional) - * @param int $earliest_measurement_time Earliest measurement time (optional) - * @param int $latest_measurement_time Latest measurement time (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse2009, HTTP status code, HTTP response headers (array of strings) - */ - public function v2ApplicationVariableUserSourcesGetWithHttpInfo($access_token = null, $user_id = null, $variable_id = null, $timestamp = null, $earliest_measurement_time = null, $latest_measurement_time = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - // parse inputs - $resourcePath = "/v2/application/variableUserSources"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($variable_id !== null) { - $queryParams['variable_id'] = $this->apiClient->getSerializer()->toQueryValue($variable_id); - } - // query params - if ($timestamp !== null) { - $queryParams['timestamp'] = $this->apiClient->getSerializer()->toQueryValue($timestamp); - } - // query params - if ($earliest_measurement_time !== null) { - $queryParams['earliest_measurement_time'] = $this->apiClient->getSerializer()->toQueryValue($earliest_measurement_time); - } - // query params - if ($latest_measurement_time !== null) { - $queryParams['latest_measurement_time'] = $this->apiClient->getSerializer()->toQueryValue($latest_measurement_time); - } - // query params - if ($created_at !== null) { - $queryParams['created_at'] = $this->apiClient->getSerializer()->toQueryValue($created_at); - } - // query params - if ($updated_at !== null) { - $queryParams['updated_at'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // this endpoint requires API key authentication - $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); - if (strlen($apiKey) !== 0) { - $headerParams['api_key'] = $apiKey; - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\InlineResponse2009', - '/v2/application/variableUserSources' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse2009', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse2009', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v2ApplicationVotesGet - * - * Get all Votes - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $client_id The ID of the client application which last created or updated this vote (optional) - * @param int $cause_id ID of predictor variable (optional) - * @param int $effect_id ID of outcome variable (optional) - * @param int $value Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse20010 - */ - public function v2ApplicationVotesGet($access_token = null, $user_id = null, $client_id = null, $cause_id = null, $effect_id = null, $value = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v2ApplicationVotesGetWithHttpInfo($access_token, $user_id, $client_id, $cause_id, $effect_id, $value, $created_at, $updated_at, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v2ApplicationVotesGetWithHttpInfo - * - * Get all Votes - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $client_id The ID of the client application which last created or updated this vote (optional) - * @param int $cause_id ID of predictor variable (optional) - * @param int $effect_id ID of outcome variable (optional) - * @param int $value Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse20010, HTTP status code, HTTP response headers (array of strings) - */ - public function v2ApplicationVotesGetWithHttpInfo($access_token = null, $user_id = null, $client_id = null, $cause_id = null, $effect_id = null, $value = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - // parse inputs - $resourcePath = "/v2/application/votes"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($client_id !== null) { - $queryParams['client_id'] = $this->apiClient->getSerializer()->toQueryValue($client_id); - } - // query params - if ($cause_id !== null) { - $queryParams['cause_id'] = $this->apiClient->getSerializer()->toQueryValue($cause_id); - } - // query params - if ($effect_id !== null) { - $queryParams['effect_id'] = $this->apiClient->getSerializer()->toQueryValue($effect_id); - } - // query params - if ($value !== null) { - $queryParams['value'] = $this->apiClient->getSerializer()->toQueryValue($value); - } - // query params - if ($created_at !== null) { - $queryParams['created_at'] = $this->apiClient->getSerializer()->toQueryValue($created_at); - } - // query params - if ($updated_at !== null) { - $queryParams['updated_at'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // this endpoint requires API key authentication - $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); - if (strlen($apiKey) !== 0) { - $headerParams['api_key'] = $apiKey; - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\InlineResponse20010', - '/v2/application/votes' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse20010', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse20010', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } -} diff --git a/lib/Api/AuthenticationApi.php b/lib/Api/AuthenticationApi.php index aae06de..90e0689 100644 --- a/lib/Api/AuthenticationApi.php +++ b/lib/Api/AuthenticationApi.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -88,43 +88,67 @@ public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) } /** - * Operation v2AuthSocialAuthorizeCodeGet + * Operation getAccessToken * - * Second Step in Social Authentication flow with JWT Token + * Get a user access token * - * @param string $code Authorization code obtained from the provider. (required) - * @param string $provider The current options are `google` and `facebook`. (required) + * @param string $client_secret This is the secret for your obtained clientId. We use this to ensure that only your application uses the clientId. Obtain this by creating a free application at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps). (required) + * @param string $grant_type Grant Type can be 'authorization_code' or 'refresh_token' (required) + * @param string $code Authorization code you received with the previous request. (required) + * @param string $response_type If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. (required) + * @param string $scope Scopes include basic, readmeasurements, and writemeasurements. The `basic` scope allows you to read user info (displayName, email, etc). The `readmeasurements` scope allows one to read a user's data. The `writemeasurements` scope allows you to write user data. Separate multiple scopes by a space. (required) + * @param string $client_id Example: oauth_test_client (optional) + * @param string $redirect_uri The redirect URI is the URL within your client application that will receive the OAuth2 credentials. (optional) + * @param string $state An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return void */ - public function v2AuthSocialAuthorizeCodeGet($code, $provider) + public function getAccessToken($client_secret, $grant_type, $code, $response_type, $scope, $client_id = null, $redirect_uri = null, $state = null) { - list($response) = $this->v2AuthSocialAuthorizeCodeGetWithHttpInfo($code, $provider); + list($response) = $this->getAccessTokenWithHttpInfo($client_secret, $grant_type, $code, $response_type, $scope, $client_id, $redirect_uri, $state); return $response; } /** - * Operation v2AuthSocialAuthorizeCodeGetWithHttpInfo + * Operation getAccessTokenWithHttpInfo * - * Second Step in Social Authentication flow with JWT Token + * Get a user access token * - * @param string $code Authorization code obtained from the provider. (required) - * @param string $provider The current options are `google` and `facebook`. (required) + * @param string $client_secret This is the secret for your obtained clientId. We use this to ensure that only your application uses the clientId. Obtain this by creating a free application at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps). (required) + * @param string $grant_type Grant Type can be 'authorization_code' or 'refresh_token' (required) + * @param string $code Authorization code you received with the previous request. (required) + * @param string $response_type If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. (required) + * @param string $scope Scopes include basic, readmeasurements, and writemeasurements. The `basic` scope allows you to read user info (displayName, email, etc). The `readmeasurements` scope allows one to read a user's data. The `writemeasurements` scope allows you to write user data. Separate multiple scopes by a space. (required) + * @param string $client_id Example: oauth_test_client (optional) + * @param string $redirect_uri The redirect URI is the URL within your client application that will receive the OAuth2 credentials. (optional) + * @param string $state An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function v2AuthSocialAuthorizeCodeGetWithHttpInfo($code, $provider) + public function getAccessTokenWithHttpInfo($client_secret, $grant_type, $code, $response_type, $scope, $client_id = null, $redirect_uri = null, $state = null) { + // verify the required parameter 'client_secret' is set + if ($client_secret === null) { + throw new \InvalidArgumentException('Missing the required parameter $client_secret when calling getAccessToken'); + } + // verify the required parameter 'grant_type' is set + if ($grant_type === null) { + throw new \InvalidArgumentException('Missing the required parameter $grant_type when calling getAccessToken'); + } // verify the required parameter 'code' is set if ($code === null) { - throw new \InvalidArgumentException('Missing the required parameter $code when calling v2AuthSocialAuthorizeCodeGet'); + throw new \InvalidArgumentException('Missing the required parameter $code when calling getAccessToken'); + } + // verify the required parameter 'response_type' is set + if ($response_type === null) { + throw new \InvalidArgumentException('Missing the required parameter $response_type when calling getAccessToken'); } - // verify the required parameter 'provider' is set - if ($provider === null) { - throw new \InvalidArgumentException('Missing the required parameter $provider when calling v2AuthSocialAuthorizeCodeGet'); + // verify the required parameter 'scope' is set + if ($scope === null) { + throw new \InvalidArgumentException('Missing the required parameter $scope when calling getAccessToken'); } // parse inputs - $resourcePath = "/v2/auth/social/authorizeCode"; + $resourcePath = "/v3/oauth2/token"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -136,202 +160,49 @@ public function v2AuthSocialAuthorizeCodeGetWithHttpInfo($code, $provider) $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params - if ($code !== null) { - $queryParams['code'] = $this->apiClient->getSerializer()->toQueryValue($code); + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); } // query params - if ($provider !== null) { - $queryParams['provider'] = $this->apiClient->getSerializer()->toQueryValue($provider); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - null, - '/v2/auth/social/authorizeCode' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - } - - throw $e; - } - } - - /** - * Operation v2AuthSocialAuthorizeTokenGet - * - * Native Social Authentication - * - * @param string $access_token User's OAuth2 access token obtained from Google or FB native SDK (required) - * @param string $provider The current options are `google` and `facebook`. (required) - * @param string $refresh_token Optional refresh token obtained from Google or FB native SDK (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return void - */ - public function v2AuthSocialAuthorizeTokenGet($access_token, $provider, $refresh_token = null) - { - list($response) = $this->v2AuthSocialAuthorizeTokenGetWithHttpInfo($access_token, $provider, $refresh_token); - return $response; - } - - /** - * Operation v2AuthSocialAuthorizeTokenGetWithHttpInfo - * - * Native Social Authentication - * - * @param string $access_token User's OAuth2 access token obtained from Google or FB native SDK (required) - * @param string $provider The current options are `google` and `facebook`. (required) - * @param string $refresh_token Optional refresh token obtained from Google or FB native SDK (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function v2AuthSocialAuthorizeTokenGetWithHttpInfo($access_token, $provider, $refresh_token = null) - { - // verify the required parameter 'access_token' is set - if ($access_token === null) { - throw new \InvalidArgumentException('Missing the required parameter $access_token when calling v2AuthSocialAuthorizeTokenGet'); - } - // verify the required parameter 'provider' is set - if ($provider === null) { - throw new \InvalidArgumentException('Missing the required parameter $provider when calling v2AuthSocialAuthorizeTokenGet'); - } - // parse inputs - $resourcePath = "/v2/auth/social/authorizeToken"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; + if ($client_secret !== null) { + $queryParams['client_secret'] = $this->apiClient->getSerializer()->toQueryValue($client_secret); } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($refresh_token !== null) { - $queryParams['refreshToken'] = $this->apiClient->getSerializer()->toQueryValue($refresh_token); + if ($grant_type !== null) { + $queryParams['grant_type'] = $this->apiClient->getSerializer()->toQueryValue($grant_type); } // query params - if ($access_token !== null) { - $queryParams['accessToken'] = $this->apiClient->getSerializer()->toQueryValue($access_token); + if ($code !== null) { + $queryParams['code'] = $this->apiClient->getSerializer()->toQueryValue($code); } // query params - if ($provider !== null) { - $queryParams['provider'] = $this->apiClient->getSerializer()->toQueryValue($provider); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - null, - '/v2/auth/social/authorizeToken' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - } - - throw $e; - } - } - - /** - * Operation v2AuthSocialLoginGet - * - * First Setp in Social Authentication flow with JWT Token - * - * @param string $redirect_url The redirect URI is the URL within your client application that will receive the OAuth2 credentials. Url should be registered with our social apps. Facebook and Twitter are fine with any redirect url with the same domain base url but Google needs exact redirect url. (required) - * @param string $provider The current options are `google` and `facebook`. (required) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return void - */ - public function v2AuthSocialLoginGet($redirect_url, $provider) - { - list($response) = $this->v2AuthSocialLoginGetWithHttpInfo($redirect_url, $provider); - return $response; - } - - /** - * Operation v2AuthSocialLoginGetWithHttpInfo - * - * First Setp in Social Authentication flow with JWT Token - * - * @param string $redirect_url The redirect URI is the URL within your client application that will receive the OAuth2 credentials. Url should be registered with our social apps. Facebook and Twitter are fine with any redirect url with the same domain base url but Google needs exact redirect url. (required) - * @param string $provider The current options are `google` and `facebook`. (required) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function v2AuthSocialLoginGetWithHttpInfo($redirect_url, $provider) - { - // verify the required parameter 'redirect_url' is set - if ($redirect_url === null) { - throw new \InvalidArgumentException('Missing the required parameter $redirect_url when calling v2AuthSocialLoginGet'); - } - // verify the required parameter 'provider' is set - if ($provider === null) { - throw new \InvalidArgumentException('Missing the required parameter $provider when calling v2AuthSocialLoginGet'); + if ($response_type !== null) { + $queryParams['response_type'] = $this->apiClient->getSerializer()->toQueryValue($response_type); } - // parse inputs - $resourcePath = "/v2/auth/social/login"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; + // query params + if ($scope !== null) { + $queryParams['scope'] = $this->apiClient->getSerializer()->toQueryValue($scope); } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($redirect_url !== null) { - $queryParams['redirectUrl'] = $this->apiClient->getSerializer()->toQueryValue($redirect_url); + if ($redirect_uri !== null) { + $queryParams['redirect_uri'] = $this->apiClient->getSerializer()->toQueryValue($redirect_uri); } // query params - if ($provider !== null) { - $queryParams['provider'] = $this->apiClient->getSerializer()->toQueryValue($provider); + if ($state !== null) { + $queryParams['state'] = $this->apiClient->getSerializer()->toQueryValue($state); } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -345,7 +216,7 @@ public function v2AuthSocialLoginGetWithHttpInfo($redirect_url, $provider) $httpBody, $headerParams, null, - '/v2/auth/social/login' + '/v3/oauth2/token' ); return [null, $statusCode, $httpHeader]; @@ -358,63 +229,55 @@ public function v2AuthSocialLoginGetWithHttpInfo($redirect_url, $provider) } /** - * Operation v2Oauth2AccessTokenGet + * Operation getOauthAuthorizationCode * - * Get a user access token + * Request Authorization Code * - * @param string $client_id This is the unique ID that QuantiModo uses to identify your application. Obtain a client id by emailing info@quantimo.do. (required) - * @param string $client_secret This is the secret for your obtained clientId. QuantiModo uses this to validate that only your application uses the clientId. (required) - * @param string $grant_type Grant Type can be 'authorization_code' or 'refresh_token' (required) - * @param string $code Authorization code you received with the previous request. (required) - * @param string $response_type If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. (optional) - * @param string $scope Scopes include basic, readmeasurements, and writemeasurements. The \"basic\" scope allows you to read user info (displayname, email, etc). The \"readmeasurements\" scope allows one to read a user's data. The \"writemeasurements\" scope allows you to write user data. Separate multiple scopes by a space. (optional) + * @param string $client_secret This is the secret for your obtained clientId. We use this to ensure that only your application uses the clientId. Obtain this by creating a free application at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps). (required) + * @param string $response_type If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. (required) + * @param string $scope Scopes include basic, readmeasurements, and writemeasurements. The `basic` scope allows you to read user info (displayName, email, etc). The `readmeasurements` scope allows one to read a user's data. The `writemeasurements` scope allows you to write user data. Separate multiple scopes by a space. (required) + * @param string $client_id Example: oauth_test_client (optional) * @param string $redirect_uri The redirect URI is the URL within your client application that will receive the OAuth2 credentials. (optional) * @param string $state An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return void */ - public function v2Oauth2AccessTokenGet($client_id, $client_secret, $grant_type, $code, $response_type = null, $scope = null, $redirect_uri = null, $state = null) + public function getOauthAuthorizationCode($client_secret, $response_type, $scope, $client_id = null, $redirect_uri = null, $state = null) { - list($response) = $this->v2Oauth2AccessTokenGetWithHttpInfo($client_id, $client_secret, $grant_type, $code, $response_type, $scope, $redirect_uri, $state); + list($response) = $this->getOauthAuthorizationCodeWithHttpInfo($client_secret, $response_type, $scope, $client_id, $redirect_uri, $state); return $response; } /** - * Operation v2Oauth2AccessTokenGetWithHttpInfo + * Operation getOauthAuthorizationCodeWithHttpInfo * - * Get a user access token + * Request Authorization Code * - * @param string $client_id This is the unique ID that QuantiModo uses to identify your application. Obtain a client id by emailing info@quantimo.do. (required) - * @param string $client_secret This is the secret for your obtained clientId. QuantiModo uses this to validate that only your application uses the clientId. (required) - * @param string $grant_type Grant Type can be 'authorization_code' or 'refresh_token' (required) - * @param string $code Authorization code you received with the previous request. (required) - * @param string $response_type If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. (optional) - * @param string $scope Scopes include basic, readmeasurements, and writemeasurements. The \"basic\" scope allows you to read user info (displayname, email, etc). The \"readmeasurements\" scope allows one to read a user's data. The \"writemeasurements\" scope allows you to write user data. Separate multiple scopes by a space. (optional) + * @param string $client_secret This is the secret for your obtained clientId. We use this to ensure that only your application uses the clientId. Obtain this by creating a free application at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps). (required) + * @param string $response_type If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. (required) + * @param string $scope Scopes include basic, readmeasurements, and writemeasurements. The `basic` scope allows you to read user info (displayName, email, etc). The `readmeasurements` scope allows one to read a user's data. The `writemeasurements` scope allows you to write user data. Separate multiple scopes by a space. (required) + * @param string $client_id Example: oauth_test_client (optional) * @param string $redirect_uri The redirect URI is the URL within your client application that will receive the OAuth2 credentials. (optional) * @param string $state An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function v2Oauth2AccessTokenGetWithHttpInfo($client_id, $client_secret, $grant_type, $code, $response_type = null, $scope = null, $redirect_uri = null, $state = null) + public function getOauthAuthorizationCodeWithHttpInfo($client_secret, $response_type, $scope, $client_id = null, $redirect_uri = null, $state = null) { - // verify the required parameter 'client_id' is set - if ($client_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $client_id when calling v2Oauth2AccessTokenGet'); - } // verify the required parameter 'client_secret' is set if ($client_secret === null) { - throw new \InvalidArgumentException('Missing the required parameter $client_secret when calling v2Oauth2AccessTokenGet'); + throw new \InvalidArgumentException('Missing the required parameter $client_secret when calling getOauthAuthorizationCode'); } - // verify the required parameter 'grant_type' is set - if ($grant_type === null) { - throw new \InvalidArgumentException('Missing the required parameter $grant_type when calling v2Oauth2AccessTokenGet'); + // verify the required parameter 'response_type' is set + if ($response_type === null) { + throw new \InvalidArgumentException('Missing the required parameter $response_type when calling getOauthAuthorizationCode'); } - // verify the required parameter 'code' is set - if ($code === null) { - throw new \InvalidArgumentException('Missing the required parameter $code when calling v2Oauth2AccessTokenGet'); + // verify the required parameter 'scope' is set + if ($scope === null) { + throw new \InvalidArgumentException('Missing the required parameter $scope when calling getOauthAuthorizationCode'); } // parse inputs - $resourcePath = "/v2/oauth2/access_token"; + $resourcePath = "/v3/oauth2/authorize"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -434,14 +297,6 @@ public function v2Oauth2AccessTokenGetWithHttpInfo($client_id, $client_secret, $ $queryParams['client_secret'] = $this->apiClient->getSerializer()->toQueryValue($client_secret); } // query params - if ($grant_type !== null) { - $queryParams['grant_type'] = $this->apiClient->getSerializer()->toQueryValue($grant_type); - } - // query params - if ($code !== null) { - $queryParams['code'] = $this->apiClient->getSerializer()->toQueryValue($code); - } - // query params if ($response_type !== null) { $queryParams['response_type'] = $this->apiClient->getSerializer()->toQueryValue($response_type); } @@ -457,13 +312,18 @@ public function v2Oauth2AccessTokenGetWithHttpInfo($client_id, $client_secret, $ if ($state !== null) { $queryParams['state'] = $this->apiClient->getSerializer()->toQueryValue($state); } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -477,7 +337,7 @@ public function v2Oauth2AccessTokenGetWithHttpInfo($client_id, $client_secret, $ $httpBody, $headerParams, null, - '/v2/oauth2/access_token' + '/v3/oauth2/authorize' ); return [null, $statusCode, $httpHeader]; @@ -490,59 +350,31 @@ public function v2Oauth2AccessTokenGetWithHttpInfo($client_id, $client_secret, $ } /** - * Operation v2OauthAuthorizeGet + * Operation postGoogleIdToken * - * Request Authorization Code + * Post GoogleIdToken * - * @param string $client_id This is the unique ID that QuantiModo uses to identify your application. Obtain a client id by creating a free application at [https://admin.quantimo.do](https://admin.quantimo.do). (required) - * @param string $client_secret This is the secret for your obtained clientId. QuantiModo uses this to validate that only your application uses the clientId. Obtain this by creating a free application at [https://admin.quantimo.do](https://admin.quantimo.do). (required) - * @param string $response_type If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. (required) - * @param string $scope Scopes include basic, readmeasurements, and writemeasurements. The \"basic\" scope allows you to read user info (displayname, email, etc). The \"readmeasurements\" scope allows one to read a user's data. The \"writemeasurements\" scope allows you to write user data. Separate multiple scopes by a space. (required) - * @param string $redirect_uri The redirect URI is the URL within your client application that will receive the OAuth2 credentials. (optional) - * @param string $state An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return void */ - public function v2OauthAuthorizeGet($client_id, $client_secret, $response_type, $scope, $redirect_uri = null, $state = null) + public function postGoogleIdToken() { - list($response) = $this->v2OauthAuthorizeGetWithHttpInfo($client_id, $client_secret, $response_type, $scope, $redirect_uri, $state); + list($response) = $this->postGoogleIdTokenWithHttpInfo(); return $response; } /** - * Operation v2OauthAuthorizeGetWithHttpInfo + * Operation postGoogleIdTokenWithHttpInfo * - * Request Authorization Code + * Post GoogleIdToken * - * @param string $client_id This is the unique ID that QuantiModo uses to identify your application. Obtain a client id by creating a free application at [https://admin.quantimo.do](https://admin.quantimo.do). (required) - * @param string $client_secret This is the secret for your obtained clientId. QuantiModo uses this to validate that only your application uses the clientId. Obtain this by creating a free application at [https://admin.quantimo.do](https://admin.quantimo.do). (required) - * @param string $response_type If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment. (required) - * @param string $scope Scopes include basic, readmeasurements, and writemeasurements. The \"basic\" scope allows you to read user info (displayname, email, etc). The \"readmeasurements\" scope allows one to read a user's data. The \"writemeasurements\" scope allows you to write user data. Separate multiple scopes by a space. (required) - * @param string $redirect_uri The redirect URI is the URL within your client application that will receive the OAuth2 credentials. (optional) - * @param string $state An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function v2OauthAuthorizeGetWithHttpInfo($client_id, $client_secret, $response_type, $scope, $redirect_uri = null, $state = null) + public function postGoogleIdTokenWithHttpInfo() { - // verify the required parameter 'client_id' is set - if ($client_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $client_id when calling v2OauthAuthorizeGet'); - } - // verify the required parameter 'client_secret' is set - if ($client_secret === null) { - throw new \InvalidArgumentException('Missing the required parameter $client_secret when calling v2OauthAuthorizeGet'); - } - // verify the required parameter 'response_type' is set - if ($response_type === null) { - throw new \InvalidArgumentException('Missing the required parameter $response_type when calling v2OauthAuthorizeGet'); - } - // verify the required parameter 'scope' is set - if ($scope === null) { - throw new \InvalidArgumentException('Missing the required parameter $scope when calling v2OauthAuthorizeGet'); - } // parse inputs - $resourcePath = "/v2/oauth/authorize"; + $resourcePath = "/v3/googleIdToken"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -553,51 +385,23 @@ public function v2OauthAuthorizeGetWithHttpInfo($client_id, $client_secret, $res } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($client_id !== null) { - $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); - } - // query params - if ($client_secret !== null) { - $queryParams['client_secret'] = $this->apiClient->getSerializer()->toQueryValue($client_secret); - } - // query params - if ($response_type !== null) { - $queryParams['response_type'] = $this->apiClient->getSerializer()->toQueryValue($response_type); - } - // query params - if ($scope !== null) { - $queryParams['scope'] = $this->apiClient->getSerializer()->toQueryValue($scope); - } - // query params - if ($redirect_uri !== null) { - $queryParams['redirect_uri'] = $this->apiClient->getSerializer()->toQueryValue($redirect_uri); - } - // query params - if ($state !== null) { - $queryParams['state'] = $this->apiClient->getSerializer()->toQueryValue($state); - } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } // make the API Call try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'GET', + 'POST', $queryParams, $httpBody, $headerParams, null, - '/v2/oauth/authorize' + '/v3/googleIdToken' ); return [null, $statusCode, $httpHeader]; diff --git a/lib/Api/ConnectorsApi.php b/lib/Api/ConnectorsApi.php index 0a1a724..9ce837d 100644 --- a/lib/Api/ConnectorsApi.php +++ b/lib/Api/ConnectorsApi.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -88,209 +88,39 @@ public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) } /** - * Operation v1ConnectJsGet - * - * Get embeddable connect javascript - * - * @param string $access_token User's OAuth2 access token (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return void - */ - public function v1ConnectJsGet($access_token = null) - { - list($response) = $this->v1ConnectJsGetWithHttpInfo($access_token); - return $response; - } - - /** - * Operation v1ConnectJsGetWithHttpInfo - * - * Get embeddable connect javascript - * - * @param string $access_token User's OAuth2 access token (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function v1ConnectJsGetWithHttpInfo($access_token = null) - { - // parse inputs - $resourcePath = "/v1/connect.js"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/x-javascript']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // this endpoint requires API key authentication - $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); - if (strlen($apiKey) !== 0) { - $headerParams['api_key'] = $apiKey; - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - null, - '/v1/connect.js' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - } - - throw $e; - } - } - - /** - * Operation v1ConnectMobileGet - * - * Mobile connect page - * - * @param string $access_token User OAuth access token (required) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return void - */ - public function v1ConnectMobileGet($access_token, $user_id = null) - { - list($response) = $this->v1ConnectMobileGetWithHttpInfo($access_token, $user_id); - return $response; - } - - /** - * Operation v1ConnectMobileGetWithHttpInfo - * - * Mobile connect page - * - * @param string $access_token User OAuth access token (required) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function v1ConnectMobileGetWithHttpInfo($access_token, $user_id = null) - { - // verify the required parameter 'access_token' is set - if ($access_token === null) { - throw new \InvalidArgumentException('Missing the required parameter $access_token when calling v1ConnectMobileGet'); - } - // parse inputs - $resourcePath = "/v1/connect/mobile"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['text/html']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // this endpoint requires API key authentication - $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); - if (strlen($apiKey) !== 0) { - $headerParams['api_key'] = $apiKey; - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - null, - '/v1/connect/mobile' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - } - - throw $e; - } - } - - /** - * Operation v1ConnectorsConnectorConnectGet + * Operation connectConnector * * Obtain a token from 3rd party data source * - * @param string $connector Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param string $connector_name Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. (required) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return void */ - public function v1ConnectorsConnectorConnectGet($connector, $access_token = null, $user_id = null) + public function connectConnector($connector_name, $user_id = null) { - list($response) = $this->v1ConnectorsConnectorConnectGetWithHttpInfo($connector, $access_token, $user_id); + list($response) = $this->connectConnectorWithHttpInfo($connector_name, $user_id); return $response; } /** - * Operation v1ConnectorsConnectorConnectGetWithHttpInfo + * Operation connectConnectorWithHttpInfo * * Obtain a token from 3rd party data source * - * @param string $connector Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param string $connector_name Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. (required) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function v1ConnectorsConnectorConnectGetWithHttpInfo($connector, $access_token = null, $user_id = null) + public function connectConnectorWithHttpInfo($connector_name, $user_id = null) { - // verify the required parameter 'connector' is set - if ($connector === null) { - throw new \InvalidArgumentException('Missing the required parameter $connector when calling v1ConnectorsConnectorConnectGet'); + // verify the required parameter 'connector_name' is set + if ($connector_name === null) { + throw new \InvalidArgumentException('Missing the required parameter $connector_name when calling connectConnector'); } // parse inputs - $resourcePath = "/v1/connectors/{connector}/connect"; + $resourcePath = "/v3/connectors/{connectorName}/connect"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -301,29 +131,30 @@ public function v1ConnectorsConnectorConnectGetWithHttpInfo($connector, $access_ } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } // query params if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); } // path params - if ($connector !== null) { + if ($connector_name !== null) { $resourcePath = str_replace( - "{" . "connector" . "}", - $this->apiClient->getSerializer()->toPathValue($connector), + "{" . "connectorName" . "}", + $this->apiClient->getSerializer()->toPathValue($connector_name), $resourcePath ); } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -337,7 +168,7 @@ public function v1ConnectorsConnectorConnectGetWithHttpInfo($connector, $access_ $httpBody, $headerParams, null, - '/v1/connectors/{connector}/connect' + '/v3/connectors/{connectorName}/connect' ); return [null, $statusCode, $httpHeader]; @@ -350,59 +181,37 @@ public function v1ConnectorsConnectorConnectGetWithHttpInfo($connector, $access_ } /** - * Operation v1ConnectorsConnectorConnectInstructionsGet + * Operation disconnectConnector * - * Connection Instructions + * Delete stored connection info * - * @param string $connector Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. (required) - * @param string $parameters JSON Array of Parameters for the request to enable connector. (required) - * @param string $url URL which should be used to enable the connector. (required) - * @param bool $use_popup Should use popup when enabling connector (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param string $connector_name Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. (required) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return void */ - public function v1ConnectorsConnectorConnectInstructionsGet($connector, $parameters, $url, $use_popup, $access_token = null, $user_id = null) + public function disconnectConnector($connector_name) { - list($response) = $this->v1ConnectorsConnectorConnectInstructionsGetWithHttpInfo($connector, $parameters, $url, $use_popup, $access_token, $user_id); + list($response) = $this->disconnectConnectorWithHttpInfo($connector_name); return $response; } /** - * Operation v1ConnectorsConnectorConnectInstructionsGetWithHttpInfo + * Operation disconnectConnectorWithHttpInfo * - * Connection Instructions + * Delete stored connection info * - * @param string $connector Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. (required) - * @param string $parameters JSON Array of Parameters for the request to enable connector. (required) - * @param string $url URL which should be used to enable the connector. (required) - * @param bool $use_popup Should use popup when enabling connector (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param string $connector_name Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. (required) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function v1ConnectorsConnectorConnectInstructionsGetWithHttpInfo($connector, $parameters, $url, $use_popup, $access_token = null, $user_id = null) + public function disconnectConnectorWithHttpInfo($connector_name) { - // verify the required parameter 'connector' is set - if ($connector === null) { - throw new \InvalidArgumentException('Missing the required parameter $connector when calling v1ConnectorsConnectorConnectInstructionsGet'); - } - // verify the required parameter 'parameters' is set - if ($parameters === null) { - throw new \InvalidArgumentException('Missing the required parameter $parameters when calling v1ConnectorsConnectorConnectInstructionsGet'); - } - // verify the required parameter 'url' is set - if ($url === null) { - throw new \InvalidArgumentException('Missing the required parameter $url when calling v1ConnectorsConnectorConnectInstructionsGet'); - } - // verify the required parameter 'use_popup' is set - if ($use_popup === null) { - throw new \InvalidArgumentException('Missing the required parameter $use_popup when calling v1ConnectorsConnectorConnectInstructionsGet'); + // verify the required parameter 'connector_name' is set + if ($connector_name === null) { + throw new \InvalidArgumentException('Missing the required parameter $connector_name when calling disconnectConnector'); } // parse inputs - $resourcePath = "/v1/connectors/{connector}/connectInstructions"; + $resourcePath = "/v3/connectors/{connectorName}/disconnect"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -413,41 +222,26 @@ public function v1ConnectorsConnectorConnectInstructionsGetWithHttpInfo($connect } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($parameters !== null) { - $queryParams['parameters'] = $this->apiClient->getSerializer()->toQueryValue($parameters); - } - // query params - if ($url !== null) { - $queryParams['url'] = $this->apiClient->getSerializer()->toQueryValue($url); - } - // query params - if ($use_popup !== null) { - $queryParams['usePopup'] = $this->apiClient->getSerializer()->toQueryValue($use_popup); - } // path params - if ($connector !== null) { + if ($connector_name !== null) { $resourcePath = str_replace( - "{" . "connector" . "}", - $this->apiClient->getSerializer()->toPathValue($connector), + "{" . "connectorName" . "}", + $this->apiClient->getSerializer()->toPathValue($connector_name), $resourcePath ); } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -461,7 +255,7 @@ public function v1ConnectorsConnectorConnectInstructionsGetWithHttpInfo($connect $httpBody, $headerParams, null, - '/v1/connectors/{connector}/connectInstructions' + '/v3/connectors/{connectorName}/disconnect' ); return [null, $statusCode, $httpHeader]; @@ -474,73 +268,35 @@ public function v1ConnectorsConnectorConnectInstructionsGetWithHttpInfo($connect } /** - * Operation v1ConnectorsConnectorConnectParameterGet + * Operation getConnectors * - * Connect Parameter + * List of Connectors * - * @param string $connector Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. (required) - * @param string $display_name Name of the parameter that is user visible in the form (required) - * @param string $key Name of the property that the user has to enter such as username or password Connector (used in HTTP request) (required) - * @param string $placeholder Placeholder hint value for the parameter input tag. (required) - * @param string $type Type of input field such as those found here http://www.w3schools.com/tags/tag_input.asp (required) - * @param bool $use_popup Should use popup when enabling connector (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $default_value Default parameter value (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\ConnectorInstruction + * @return \QuantiModo\Client\Model\GetConnectorsResponse */ - public function v1ConnectorsConnectorConnectParameterGet($connector, $display_name, $key, $placeholder, $type, $use_popup, $access_token = null, $user_id = null, $default_value = null) + public function getConnectors($app_name = null, $client_id = null) { - list($response) = $this->v1ConnectorsConnectorConnectParameterGetWithHttpInfo($connector, $display_name, $key, $placeholder, $type, $use_popup, $access_token, $user_id, $default_value); + list($response) = $this->getConnectorsWithHttpInfo($app_name, $client_id); return $response; } /** - * Operation v1ConnectorsConnectorConnectParameterGetWithHttpInfo + * Operation getConnectorsWithHttpInfo * - * Connect Parameter + * List of Connectors * - * @param string $connector Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. (required) - * @param string $display_name Name of the parameter that is user visible in the form (required) - * @param string $key Name of the property that the user has to enter such as username or password Connector (used in HTTP request) (required) - * @param string $placeholder Placeholder hint value for the parameter input tag. (required) - * @param string $type Type of input field such as those found here http://www.w3schools.com/tags/tag_input.asp (required) - * @param bool $use_popup Should use popup when enabling connector (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $default_value Default parameter value (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\ConnectorInstruction, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\GetConnectorsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function v1ConnectorsConnectorConnectParameterGetWithHttpInfo($connector, $display_name, $key, $placeholder, $type, $use_popup, $access_token = null, $user_id = null, $default_value = null) + public function getConnectorsWithHttpInfo($app_name = null, $client_id = null) { - // verify the required parameter 'connector' is set - if ($connector === null) { - throw new \InvalidArgumentException('Missing the required parameter $connector when calling v1ConnectorsConnectorConnectParameterGet'); - } - // verify the required parameter 'display_name' is set - if ($display_name === null) { - throw new \InvalidArgumentException('Missing the required parameter $display_name when calling v1ConnectorsConnectorConnectParameterGet'); - } - // verify the required parameter 'key' is set - if ($key === null) { - throw new \InvalidArgumentException('Missing the required parameter $key when calling v1ConnectorsConnectorConnectParameterGet'); - } - // verify the required parameter 'placeholder' is set - if ($placeholder === null) { - throw new \InvalidArgumentException('Missing the required parameter $placeholder when calling v1ConnectorsConnectorConnectParameterGet'); - } - // verify the required parameter 'type' is set - if ($type === null) { - throw new \InvalidArgumentException('Missing the required parameter $type when calling v1ConnectorsConnectorConnectParameterGet'); - } - // verify the required parameter 'use_popup' is set - if ($use_popup === null) { - throw new \InvalidArgumentException('Missing the required parameter $use_popup when calling v1ConnectorsConnectorConnectParameterGet'); - } // parse inputs - $resourcePath = "/v1/connectors/{connector}/connectParameter"; + $resourcePath = "/v3/connectors/list"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -552,52 +308,25 @@ public function v1ConnectorsConnectorConnectParameterGetWithHttpInfo($connector, $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($default_value !== null) { - $queryParams['defaultValue'] = $this->apiClient->getSerializer()->toQueryValue($default_value); - } - // query params - if ($display_name !== null) { - $queryParams['displayName'] = $this->apiClient->getSerializer()->toQueryValue($display_name); - } - // query params - if ($key !== null) { - $queryParams['key'] = $this->apiClient->getSerializer()->toQueryValue($key); - } - // query params - if ($placeholder !== null) { - $queryParams['placeholder'] = $this->apiClient->getSerializer()->toQueryValue($placeholder); - } - // query params - if ($type !== null) { - $queryParams['type'] = $this->apiClient->getSerializer()->toQueryValue($type); + if ($app_name !== null) { + $queryParams['appName'] = $this->apiClient->getSerializer()->toQueryValue($app_name); } // query params - if ($use_popup !== null) { - $queryParams['usePopup'] = $this->apiClient->getSerializer()->toQueryValue($use_popup); - } - // path params - if ($connector !== null) { - $resourcePath = str_replace( - "{" . "connector" . "}", - $this->apiClient->getSerializer()->toPathValue($connector), - $resourcePath - ); + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -610,15 +339,15 @@ public function v1ConnectorsConnectorConnectParameterGetWithHttpInfo($connector, $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\ConnectorInstruction', - '/v1/connectors/{connector}/connectParameter' + '\QuantiModo\Client\Model\GetConnectorsResponse', + '/v3/connectors/list' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\ConnectorInstruction', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\GetConnectorsResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\ConnectorInstruction', $e->getResponseHeaders()); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\GetConnectorsResponse', $e->getResponseHeaders()); $e->setResponseObject($data); break; } @@ -628,66 +357,54 @@ public function v1ConnectorsConnectorConnectParameterGetWithHttpInfo($connector, } /** - * Operation v1ConnectorsConnectorDisconnectGet + * Operation getIntegrationJs * - * Delete stored connection info + * Get embeddable connect javascript * - * @param string $connector Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. (required) + * @param string $client_id Example: oauth_test_client (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return void */ - public function v1ConnectorsConnectorDisconnectGet($connector) + public function getIntegrationJs($client_id = null) { - list($response) = $this->v1ConnectorsConnectorDisconnectGetWithHttpInfo($connector); + list($response) = $this->getIntegrationJsWithHttpInfo($client_id); return $response; } /** - * Operation v1ConnectorsConnectorDisconnectGetWithHttpInfo + * Operation getIntegrationJsWithHttpInfo * - * Delete stored connection info + * Get embeddable connect javascript * - * @param string $connector Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. (required) + * @param string $client_id Example: oauth_test_client (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function v1ConnectorsConnectorDisconnectGetWithHttpInfo($connector) + public function getIntegrationJsWithHttpInfo($client_id = null) { - // verify the required parameter 'connector' is set - if ($connector === null) { - throw new \InvalidArgumentException('Missing the required parameter $connector when calling v1ConnectorsConnectorDisconnectGet'); - } // parse inputs - $resourcePath = "/v1/connectors/{connector}/disconnect"; + $resourcePath = "/v3/integration.js"; $httpBody = ''; $queryParams = []; $headerParams = []; $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + $_header_accept = $this->apiClient->selectHeaderAccept(['application/x-javascript']); if (!is_null($_header_accept)) { $headerParams['Accept'] = $_header_accept; } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // path params - if ($connector !== null) { - $resourcePath = str_replace( - "{" . "connector" . "}", - $this->apiClient->getSerializer()->toPathValue($connector), - $resourcePath - ); + // query params + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } // make the API Call try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( @@ -697,7 +414,7 @@ public function v1ConnectorsConnectorDisconnectGetWithHttpInfo($connector) $httpBody, $headerParams, null, - '/v1/connectors/{connector}/disconnect' + '/v3/integration.js' ); return [null, $statusCode, $httpHeader]; @@ -710,78 +427,54 @@ public function v1ConnectorsConnectorDisconnectGetWithHttpInfo($connector) } /** - * Operation v1ConnectorsConnectorInfoGet + * Operation getMobileConnectPage * - * Get connector info for user + * Mobile connect page * - * @param string $connector Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\ConnectorInfo + * @return void */ - public function v1ConnectorsConnectorInfoGet($connector, $access_token = null, $user_id = null) + public function getMobileConnectPage($user_id = null) { - list($response) = $this->v1ConnectorsConnectorInfoGetWithHttpInfo($connector, $access_token, $user_id); + list($response) = $this->getMobileConnectPageWithHttpInfo($user_id); return $response; } /** - * Operation v1ConnectorsConnectorInfoGetWithHttpInfo + * Operation getMobileConnectPageWithHttpInfo * - * Get connector info for user + * Mobile connect page * - * @param string $connector Lowercase system name of the source application or device. Get a list of available connectors from the /v1/connectors/list endpoint. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\ConnectorInfo, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function v1ConnectorsConnectorInfoGetWithHttpInfo($connector, $access_token = null, $user_id = null) + public function getMobileConnectPageWithHttpInfo($user_id = null) { - // verify the required parameter 'connector' is set - if ($connector === null) { - throw new \InvalidArgumentException('Missing the required parameter $connector when calling v1ConnectorsConnectorInfoGet'); - } // parse inputs - $resourcePath = "/v1/connectors/{connector}/info"; + $resourcePath = "/v3/connect/mobile"; $httpBody = ''; $queryParams = []; $headerParams = []; $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + $_header_accept = $this->apiClient->selectHeaderAccept(['text/html']); if (!is_null($_header_accept)) { $headerParams['Accept'] = $_header_accept; } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } // query params if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); } - // path params - if ($connector !== null) { - $resourcePath = str_replace( - "{" . "connector" . "}", - $this->apiClient->getSerializer()->toPathValue($connector), - $resourcePath - ); - } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } // make the API Call try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( @@ -790,17 +483,13 @@ public function v1ConnectorsConnectorInfoGetWithHttpInfo($connector, $access_tok $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\ConnectorInfo', - '/v1/connectors/{connector}/info' + null, + '/v3/connect/mobile' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\ConnectorInfo', $httpHeader), $statusCode, $httpHeader]; + return [null, $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\ConnectorInfo', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; } throw $e; @@ -808,41 +497,39 @@ public function v1ConnectorsConnectorInfoGetWithHttpInfo($connector, $access_tok } /** - * Operation v1ConnectorsConnectorUpdateGet + * Operation updateConnector * * Sync with data source * - * @param string $connector Lowercase system name of the source application or device (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param string $connector_name Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. (required) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return void */ - public function v1ConnectorsConnectorUpdateGet($connector, $access_token = null, $user_id = null) + public function updateConnector($connector_name, $user_id = null) { - list($response) = $this->v1ConnectorsConnectorUpdateGetWithHttpInfo($connector, $access_token, $user_id); + list($response) = $this->updateConnectorWithHttpInfo($connector_name, $user_id); return $response; } /** - * Operation v1ConnectorsConnectorUpdateGetWithHttpInfo + * Operation updateConnectorWithHttpInfo * * Sync with data source * - * @param string $connector Lowercase system name of the source application or device (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param string $connector_name Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. (required) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function v1ConnectorsConnectorUpdateGetWithHttpInfo($connector, $access_token = null, $user_id = null) + public function updateConnectorWithHttpInfo($connector_name, $user_id = null) { - // verify the required parameter 'connector' is set - if ($connector === null) { - throw new \InvalidArgumentException('Missing the required parameter $connector when calling v1ConnectorsConnectorUpdateGet'); + // verify the required parameter 'connector_name' is set + if ($connector_name === null) { + throw new \InvalidArgumentException('Missing the required parameter $connector_name when calling updateConnector'); } // parse inputs - $resourcePath = "/v1/connectors/{connector}/update"; + $resourcePath = "/v3/connectors/{connectorName}/update"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -853,29 +540,30 @@ public function v1ConnectorsConnectorUpdateGetWithHttpInfo($connector, $access_t } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } // query params if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); } // path params - if ($connector !== null) { + if ($connector_name !== null) { $resourcePath = str_replace( - "{" . "connector" . "}", - $this->apiClient->getSerializer()->toPathValue($connector), + "{" . "connectorName" . "}", + $this->apiClient->getSerializer()->toPathValue($connector_name), $resourcePath ); } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -889,7 +577,7 @@ public function v1ConnectorsConnectorUpdateGetWithHttpInfo($connector, $access_t $httpBody, $headerParams, null, - '/v1/connectors/{connector}/update' + '/v3/connectors/{connectorName}/update' ); return [null, $statusCode, $httpHeader]; @@ -900,76 +588,4 @@ public function v1ConnectorsConnectorUpdateGetWithHttpInfo($connector, $access_t throw $e; } } - - /** - * Operation v1ConnectorsListGet - * - * List of Connectors - * - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Connector[] - */ - public function v1ConnectorsListGet() - { - list($response) = $this->v1ConnectorsListGetWithHttpInfo(); - return $response; - } - - /** - * Operation v1ConnectorsListGetWithHttpInfo - * - * List of Connectors - * - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Connector[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1ConnectorsListGetWithHttpInfo() - { - // parse inputs - $resourcePath = "/v1/connectors/list"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Connector[]', - '/v1/connectors/list' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Connector[]', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Connector[]', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } } diff --git a/lib/Api/CorrelationsApi.php b/lib/Api/CorrelationsApi.php deleted file mode 100644 index a1873ff..0000000 --- a/lib/Api/CorrelationsApi.php +++ /dev/null @@ -1,1452 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Api; - -use \QuantiModo\Client\ApiClient; -use \QuantiModo\Client\ApiException; -use \QuantiModo\Client\Configuration; -use \QuantiModo\Client\ObjectSerializer; - -/** - * CorrelationsApi Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class CorrelationsApi -{ - /** - * API Client - * - * @var \QuantiModo\Client\ApiClient instance of the ApiClient - */ - protected $apiClient; - - /** - * Constructor - * - * @param \QuantiModo\Client\ApiClient|null $apiClient The api client to use - */ - public function __construct(\QuantiModo\Client\ApiClient $apiClient = null) - { - if ($apiClient === null) { - $apiClient = new ApiClient(); - } - - $this->apiClient = $apiClient; - } - - /** - * Get API client - * - * @return \QuantiModo\Client\ApiClient get the API client - */ - public function getApiClient() - { - return $this->apiClient; - } - - /** - * Set the API client - * - * @param \QuantiModo\Client\ApiClient $apiClient set the API client - * - * @return CorrelationsApi - */ - public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) - { - $this->apiClient = $apiClient; - return $this; - } - - /** - * Operation v1AggregatedCorrelationsGet - * - * Get aggregated correlations - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $effect ORIGINAL variable name of the effect variable for which the user desires correlations (optional) - * @param string $cause ORIGINAL variable name of the cause variable for which the user desires correlations (optional) - * @param string $correlation_coefficient Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action (optional) - * @param string $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) - * @param string $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param string $last_updated The time that this measurement was last updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @param bool $outcomes_of_interest Only include correlations for which the effect is an outcome of interest for the user (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Correlation[] - */ - public function v1AggregatedCorrelationsGet($access_token = null, $user_id = null, $effect = null, $cause = null, $correlation_coefficient = null, $onset_delay = null, $duration_of_action = null, $last_updated = null, $limit = null, $offset = null, $sort = null, $outcomes_of_interest = null) - { - list($response) = $this->v1AggregatedCorrelationsGetWithHttpInfo($access_token, $user_id, $effect, $cause, $correlation_coefficient, $onset_delay, $duration_of_action, $last_updated, $limit, $offset, $sort, $outcomes_of_interest); - return $response; - } - - /** - * Operation v1AggregatedCorrelationsGetWithHttpInfo - * - * Get aggregated correlations - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $effect ORIGINAL variable name of the effect variable for which the user desires correlations (optional) - * @param string $cause ORIGINAL variable name of the cause variable for which the user desires correlations (optional) - * @param string $correlation_coefficient Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action (optional) - * @param string $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) - * @param string $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param string $last_updated The time that this measurement was last updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @param bool $outcomes_of_interest Only include correlations for which the effect is an outcome of interest for the user (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Correlation[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1AggregatedCorrelationsGetWithHttpInfo($access_token = null, $user_id = null, $effect = null, $cause = null, $correlation_coefficient = null, $onset_delay = null, $duration_of_action = null, $last_updated = null, $limit = null, $offset = null, $sort = null, $outcomes_of_interest = null) - { - // parse inputs - $resourcePath = "/v1/aggregatedCorrelations"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($effect !== null) { - $queryParams['effect'] = $this->apiClient->getSerializer()->toQueryValue($effect); - } - // query params - if ($cause !== null) { - $queryParams['cause'] = $this->apiClient->getSerializer()->toQueryValue($cause); - } - // query params - if ($correlation_coefficient !== null) { - $queryParams['correlationCoefficient'] = $this->apiClient->getSerializer()->toQueryValue($correlation_coefficient); - } - // query params - if ($onset_delay !== null) { - $queryParams['onsetDelay'] = $this->apiClient->getSerializer()->toQueryValue($onset_delay); - } - // query params - if ($duration_of_action !== null) { - $queryParams['durationOfAction'] = $this->apiClient->getSerializer()->toQueryValue($duration_of_action); - } - // query params - if ($last_updated !== null) { - $queryParams['lastUpdated'] = $this->apiClient->getSerializer()->toQueryValue($last_updated); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - // query params - if ($outcomes_of_interest !== null) { - $queryParams['outcomesOfInterest'] = $this->apiClient->getSerializer()->toQueryValue($outcomes_of_interest); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Correlation[]', - '/v1/aggregatedCorrelations' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Correlation[]', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Correlation[]', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1AggregatedCorrelationsPost - * - * Store or Update a Correlation - * - * @param \QuantiModo\Client\Model\PostCorrelation $body Provides correlation data (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return void - */ - public function v1AggregatedCorrelationsPost($body, $access_token = null, $user_id = null) - { - list($response) = $this->v1AggregatedCorrelationsPostWithHttpInfo($body, $access_token, $user_id); - return $response; - } - - /** - * Operation v1AggregatedCorrelationsPostWithHttpInfo - * - * Store or Update a Correlation - * - * @param \QuantiModo\Client\Model\PostCorrelation $body Provides correlation data (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function v1AggregatedCorrelationsPostWithHttpInfo($body, $access_token = null, $user_id = null) - { - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1AggregatedCorrelationsPost'); - } - // parse inputs - $resourcePath = "/v1/aggregatedCorrelations"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - null, - '/v1/aggregatedCorrelations' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\JsonErrorResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1CorrelationsGet - * - * Get correlations - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $effect ORIGINAL variable name of the effect variable for which the user desires correlations (optional) - * @param string $cause ORIGINAL variable name of the cause variable for which the user desires correlations (optional) - * @param string $correlation_coefficient Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action (optional) - * @param string $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) - * @param string $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param string $last_updated The time that this measurement was last updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @param bool $outcomes_of_interest Only include correlations for which the effect is an outcome of interest for the user (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Correlation[] - */ - public function v1CorrelationsGet($access_token = null, $user_id = null, $effect = null, $cause = null, $correlation_coefficient = null, $onset_delay = null, $duration_of_action = null, $last_updated = null, $limit = null, $offset = null, $sort = null, $outcomes_of_interest = null) - { - list($response) = $this->v1CorrelationsGetWithHttpInfo($access_token, $user_id, $effect, $cause, $correlation_coefficient, $onset_delay, $duration_of_action, $last_updated, $limit, $offset, $sort, $outcomes_of_interest); - return $response; - } - - /** - * Operation v1CorrelationsGetWithHttpInfo - * - * Get correlations - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $effect ORIGINAL variable name of the effect variable for which the user desires correlations (optional) - * @param string $cause ORIGINAL variable name of the cause variable for which the user desires correlations (optional) - * @param string $correlation_coefficient Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action (optional) - * @param string $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) - * @param string $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param string $last_updated The time that this measurement was last updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @param bool $outcomes_of_interest Only include correlations for which the effect is an outcome of interest for the user (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Correlation[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1CorrelationsGetWithHttpInfo($access_token = null, $user_id = null, $effect = null, $cause = null, $correlation_coefficient = null, $onset_delay = null, $duration_of_action = null, $last_updated = null, $limit = null, $offset = null, $sort = null, $outcomes_of_interest = null) - { - // parse inputs - $resourcePath = "/v1/correlations"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($effect !== null) { - $queryParams['effect'] = $this->apiClient->getSerializer()->toQueryValue($effect); - } - // query params - if ($cause !== null) { - $queryParams['cause'] = $this->apiClient->getSerializer()->toQueryValue($cause); - } - // query params - if ($correlation_coefficient !== null) { - $queryParams['correlationCoefficient'] = $this->apiClient->getSerializer()->toQueryValue($correlation_coefficient); - } - // query params - if ($onset_delay !== null) { - $queryParams['onsetDelay'] = $this->apiClient->getSerializer()->toQueryValue($onset_delay); - } - // query params - if ($duration_of_action !== null) { - $queryParams['durationOfAction'] = $this->apiClient->getSerializer()->toQueryValue($duration_of_action); - } - // query params - if ($last_updated !== null) { - $queryParams['lastUpdated'] = $this->apiClient->getSerializer()->toQueryValue($last_updated); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - // query params - if ($outcomes_of_interest !== null) { - $queryParams['outcomesOfInterest'] = $this->apiClient->getSerializer()->toQueryValue($outcomes_of_interest); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Correlation[]', - '/v1/correlations' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Correlation[]', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Correlation[]', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet - * - * Search user correlations for a given cause - * - * @param int $organization_id Organization ID (required) - * @param int $user_id2 User id (required) - * @param string $variable_name Effect variable name (required) - * @param string $organization_token Organization access token (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $include_public Include public correlations, Can be \"1\" or empty. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Correlation[] - */ - public function v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet($organization_id, $user_id2, $variable_name, $organization_token, $access_token = null, $user_id = null, $include_public = null) - { - list($response) = $this->v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGetWithHttpInfo($organization_id, $user_id2, $variable_name, $organization_token, $access_token, $user_id, $include_public); - return $response; - } - - /** - * Operation v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGetWithHttpInfo - * - * Search user correlations for a given cause - * - * @param int $organization_id Organization ID (required) - * @param int $user_id2 User id (required) - * @param string $variable_name Effect variable name (required) - * @param string $organization_token Organization access token (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $include_public Include public correlations, Can be \"1\" or empty. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Correlation[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGetWithHttpInfo($organization_id, $user_id2, $variable_name, $organization_token, $access_token = null, $user_id = null, $include_public = null) - { - // verify the required parameter 'organization_id' is set - if ($organization_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $organization_id when calling v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet'); - } - // verify the required parameter 'user_id2' is set - if ($user_id2 === null) { - throw new \InvalidArgumentException('Missing the required parameter $user_id2 when calling v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet'); - } - // verify the required parameter 'variable_name' is set - if ($variable_name === null) { - throw new \InvalidArgumentException('Missing the required parameter $variable_name when calling v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet'); - } - // verify the required parameter 'organization_token' is set - if ($organization_token === null) { - throw new \InvalidArgumentException('Missing the required parameter $organization_token when calling v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet'); - } - // parse inputs - $resourcePath = "/v1/organizations/{organizationId}/users/{userId}/variables/{variableName}/causes"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($organization_token !== null) { - $queryParams['organization_token'] = $this->apiClient->getSerializer()->toQueryValue($organization_token); - } - // query params - if ($include_public !== null) { - $queryParams['includePublic'] = $this->apiClient->getSerializer()->toQueryValue($include_public); - } - // path params - if ($organization_id !== null) { - $resourcePath = str_replace( - "{" . "organizationId" . "}", - $this->apiClient->getSerializer()->toPathValue($organization_id), - $resourcePath - ); - } - // path params - if ($user_id2 !== null) { - $resourcePath = str_replace( - "{" . "userId" . "}", - $this->apiClient->getSerializer()->toPathValue($user_id2), - $resourcePath - ); - } - // path params - if ($variable_name !== null) { - $resourcePath = str_replace( - "{" . "variableName" . "}", - $this->apiClient->getSerializer()->toPathValue($variable_name), - $resourcePath - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Correlation[]', - '/v1/organizations/{organizationId}/users/{userId}/variables/{variableName}/causes' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Correlation[]', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Correlation[]', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet - * - * Search user correlations for a given cause - * - * @param int $organization_id Organization ID (required) - * @param int $user_id2 User id (required) - * @param string $variable_name Cause variable name (required) - * @param string $organization_token Organization access token (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $include_public Include public correlations, Can be \"1\" or empty. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\CommonResponse[] - */ - public function v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet($organization_id, $user_id2, $variable_name, $organization_token, $access_token = null, $user_id = null, $include_public = null) - { - list($response) = $this->v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGetWithHttpInfo($organization_id, $user_id2, $variable_name, $organization_token, $access_token, $user_id, $include_public); - return $response; - } - - /** - * Operation v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGetWithHttpInfo - * - * Search user correlations for a given cause - * - * @param int $organization_id Organization ID (required) - * @param int $user_id2 User id (required) - * @param string $variable_name Cause variable name (required) - * @param string $organization_token Organization access token (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $include_public Include public correlations, Can be \"1\" or empty. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\CommonResponse[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGetWithHttpInfo($organization_id, $user_id2, $variable_name, $organization_token, $access_token = null, $user_id = null, $include_public = null) - { - // verify the required parameter 'organization_id' is set - if ($organization_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $organization_id when calling v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet'); - } - // verify the required parameter 'user_id2' is set - if ($user_id2 === null) { - throw new \InvalidArgumentException('Missing the required parameter $user_id2 when calling v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet'); - } - // verify the required parameter 'variable_name' is set - if ($variable_name === null) { - throw new \InvalidArgumentException('Missing the required parameter $variable_name when calling v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet'); - } - // verify the required parameter 'organization_token' is set - if ($organization_token === null) { - throw new \InvalidArgumentException('Missing the required parameter $organization_token when calling v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet'); - } - // parse inputs - $resourcePath = "/v1/organizations/{organizationId}/users/{userId}/variables/{variableName}/effects"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($organization_token !== null) { - $queryParams['organization_token'] = $this->apiClient->getSerializer()->toQueryValue($organization_token); - } - // query params - if ($include_public !== null) { - $queryParams['include_public'] = $this->apiClient->getSerializer()->toQueryValue($include_public); - } - // path params - if ($organization_id !== null) { - $resourcePath = str_replace( - "{" . "organizationId" . "}", - $this->apiClient->getSerializer()->toPathValue($organization_id), - $resourcePath - ); - } - // path params - if ($user_id2 !== null) { - $resourcePath = str_replace( - "{" . "userId" . "}", - $this->apiClient->getSerializer()->toPathValue($user_id2), - $resourcePath - ); - } - // path params - if ($variable_name !== null) { - $resourcePath = str_replace( - "{" . "variableName" . "}", - $this->apiClient->getSerializer()->toPathValue($variable_name), - $resourcePath - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\CommonResponse[]', - '/v1/organizations/{organizationId}/users/{userId}/variables/{variableName}/effects' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse[]', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse[]', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1PublicCorrelationsSearchSearchGet - * - * Get average correlations for variables containing search term - * - * @param string $search Name of the variable that you want to know the causes or effects of. (required) - * @param string $effect_or_cause Setting this to effect indicates that the searched variable is the effect and that the causes of this variable should be returned. cause indicates that the searched variable is the cause and the effects should be returned. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param bool $outcomes_of_interest Only include correlations for which the effect is an outcome of interest for the user (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Correlation[] - */ - public function v1PublicCorrelationsSearchSearchGet($search, $effect_or_cause, $access_token = null, $user_id = null, $outcomes_of_interest = null) - { - list($response) = $this->v1PublicCorrelationsSearchSearchGetWithHttpInfo($search, $effect_or_cause, $access_token, $user_id, $outcomes_of_interest); - return $response; - } - - /** - * Operation v1PublicCorrelationsSearchSearchGetWithHttpInfo - * - * Get average correlations for variables containing search term - * - * @param string $search Name of the variable that you want to know the causes or effects of. (required) - * @param string $effect_or_cause Setting this to effect indicates that the searched variable is the effect and that the causes of this variable should be returned. cause indicates that the searched variable is the cause and the effects should be returned. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param bool $outcomes_of_interest Only include correlations for which the effect is an outcome of interest for the user (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Correlation[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1PublicCorrelationsSearchSearchGetWithHttpInfo($search, $effect_or_cause, $access_token = null, $user_id = null, $outcomes_of_interest = null) - { - // verify the required parameter 'search' is set - if ($search === null) { - throw new \InvalidArgumentException('Missing the required parameter $search when calling v1PublicCorrelationsSearchSearchGet'); - } - // verify the required parameter 'effect_or_cause' is set - if ($effect_or_cause === null) { - throw new \InvalidArgumentException('Missing the required parameter $effect_or_cause when calling v1PublicCorrelationsSearchSearchGet'); - } - // parse inputs - $resourcePath = "/v1/public/correlations/search/{search}"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($effect_or_cause !== null) { - $queryParams['effectOrCause'] = $this->apiClient->getSerializer()->toQueryValue($effect_or_cause); - } - // query params - if ($outcomes_of_interest !== null) { - $queryParams['outcomesOfInterest'] = $this->apiClient->getSerializer()->toQueryValue($outcomes_of_interest); - } - // path params - if ($search !== null) { - $resourcePath = str_replace( - "{" . "search" . "}", - $this->apiClient->getSerializer()->toPathValue($search), - $resourcePath - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Correlation[]', - '/v1/public/correlations/search/{search}' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Correlation[]', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Correlation[]', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1VariablesVariableNameCausesGet - * - * Search user correlations for a given effect - * - * @param string $variable_name Effect variable name (required) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Correlation[] - */ - public function v1VariablesVariableNameCausesGet($variable_name) - { - list($response) = $this->v1VariablesVariableNameCausesGetWithHttpInfo($variable_name); - return $response; - } - - /** - * Operation v1VariablesVariableNameCausesGetWithHttpInfo - * - * Search user correlations for a given effect - * - * @param string $variable_name Effect variable name (required) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Correlation[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1VariablesVariableNameCausesGetWithHttpInfo($variable_name) - { - // verify the required parameter 'variable_name' is set - if ($variable_name === null) { - throw new \InvalidArgumentException('Missing the required parameter $variable_name when calling v1VariablesVariableNameCausesGet'); - } - // parse inputs - $resourcePath = "/v1/variables/{variableName}/causes"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // path params - if ($variable_name !== null) { - $resourcePath = str_replace( - "{" . "variableName" . "}", - $this->apiClient->getSerializer()->toPathValue($variable_name), - $resourcePath - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Correlation[]', - '/v1/variables/{variableName}/causes' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Correlation[]', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Correlation[]', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1VariablesVariableNameEffectsGet - * - * Search user correlations for a given cause - * - * @param string $variable_name Cause variable name (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $correlation_coefficient You can use this to get effects with correlations greater than or less than 0 (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Correlation[] - */ - public function v1VariablesVariableNameEffectsGet($variable_name, $access_token = null, $user_id = null, $correlation_coefficient = null) - { - list($response) = $this->v1VariablesVariableNameEffectsGetWithHttpInfo($variable_name, $access_token, $user_id, $correlation_coefficient); - return $response; - } - - /** - * Operation v1VariablesVariableNameEffectsGetWithHttpInfo - * - * Search user correlations for a given cause - * - * @param string $variable_name Cause variable name (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $correlation_coefficient You can use this to get effects with correlations greater than or less than 0 (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Correlation[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1VariablesVariableNameEffectsGetWithHttpInfo($variable_name, $access_token = null, $user_id = null, $correlation_coefficient = null) - { - // verify the required parameter 'variable_name' is set - if ($variable_name === null) { - throw new \InvalidArgumentException('Missing the required parameter $variable_name when calling v1VariablesVariableNameEffectsGet'); - } - // parse inputs - $resourcePath = "/v1/variables/{variableName}/effects"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($correlation_coefficient !== null) { - $queryParams['correlationCoefficient'] = $this->apiClient->getSerializer()->toQueryValue($correlation_coefficient); - } - // path params - if ($variable_name !== null) { - $resourcePath = str_replace( - "{" . "variableName" . "}", - $this->apiClient->getSerializer()->toPathValue($variable_name), - $resourcePath - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Correlation[]', - '/v1/variables/{variableName}/effects' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Correlation[]', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Correlation[]', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1VariablesVariableNamePublicCausesGet - * - * Search public correlations for a given effect - * - * @param string $variable_name Effect variable name (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $correlation_coefficient You can use this to get causes with correlations greater than or less than 0 (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Correlation[] - */ - public function v1VariablesVariableNamePublicCausesGet($variable_name, $access_token = null, $user_id = null, $correlation_coefficient = null) - { - list($response) = $this->v1VariablesVariableNamePublicCausesGetWithHttpInfo($variable_name, $access_token, $user_id, $correlation_coefficient); - return $response; - } - - /** - * Operation v1VariablesVariableNamePublicCausesGetWithHttpInfo - * - * Search public correlations for a given effect - * - * @param string $variable_name Effect variable name (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $correlation_coefficient You can use this to get causes with correlations greater than or less than 0 (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Correlation[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1VariablesVariableNamePublicCausesGetWithHttpInfo($variable_name, $access_token = null, $user_id = null, $correlation_coefficient = null) - { - // verify the required parameter 'variable_name' is set - if ($variable_name === null) { - throw new \InvalidArgumentException('Missing the required parameter $variable_name when calling v1VariablesVariableNamePublicCausesGet'); - } - // parse inputs - $resourcePath = "/v1/variables/{variableName}/public/causes"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($correlation_coefficient !== null) { - $queryParams['correlationCoefficient'] = $this->apiClient->getSerializer()->toQueryValue($correlation_coefficient); - } - // path params - if ($variable_name !== null) { - $resourcePath = str_replace( - "{" . "variableName" . "}", - $this->apiClient->getSerializer()->toPathValue($variable_name), - $resourcePath - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Correlation[]', - '/v1/variables/{variableName}/public/causes' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Correlation[]', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Correlation[]', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1VariablesVariableNamePublicEffectsGet - * - * Search public correlations for a given cause - * - * @param string $variable_name Cause variable name (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Correlation[] - */ - public function v1VariablesVariableNamePublicEffectsGet($variable_name, $access_token = null, $user_id = null) - { - list($response) = $this->v1VariablesVariableNamePublicEffectsGetWithHttpInfo($variable_name, $access_token, $user_id); - return $response; - } - - /** - * Operation v1VariablesVariableNamePublicEffectsGetWithHttpInfo - * - * Search public correlations for a given cause - * - * @param string $variable_name Cause variable name (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Correlation[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1VariablesVariableNamePublicEffectsGetWithHttpInfo($variable_name, $access_token = null, $user_id = null) - { - // verify the required parameter 'variable_name' is set - if ($variable_name === null) { - throw new \InvalidArgumentException('Missing the required parameter $variable_name when calling v1VariablesVariableNamePublicEffectsGet'); - } - // parse inputs - $resourcePath = "/v1/variables/{variableName}/public/effects"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // path params - if ($variable_name !== null) { - $resourcePath = str_replace( - "{" . "variableName" . "}", - $this->apiClient->getSerializer()->toPathValue($variable_name), - $resourcePath - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Correlation[]', - '/v1/variables/{variableName}/public/effects' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Correlation[]', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Correlation[]', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1VotesDeletePost - * - * Delete vote - * - * @param \QuantiModo\Client\Model\VoteDelete $body The cause and effect variable names for the predictor vote to be deleted. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\CommonResponse - */ - public function v1VotesDeletePost($body, $access_token = null, $user_id = null) - { - list($response) = $this->v1VotesDeletePostWithHttpInfo($body, $access_token, $user_id); - return $response; - } - - /** - * Operation v1VotesDeletePostWithHttpInfo - * - * Delete vote - * - * @param \QuantiModo\Client\Model\VoteDelete $body The cause and effect variable names for the predictor vote to be deleted. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function v1VotesDeletePostWithHttpInfo($body, $access_token = null, $user_id = null) - { - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1VotesDeletePost'); - } - // parse inputs - $resourcePath = "/v1/votes/delete"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\CommonResponse', - '/v1/votes/delete' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1VotesPost - * - * Post or update vote - * - * @param \QuantiModo\Client\Model\PostVote $body Contains the cause variable, effect variable, and vote value. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\CommonResponse - */ - public function v1VotesPost($body, $access_token = null, $user_id = null) - { - list($response) = $this->v1VotesPostWithHttpInfo($body, $access_token, $user_id); - return $response; - } - - /** - * Operation v1VotesPostWithHttpInfo - * - * Post or update vote - * - * @param \QuantiModo\Client\Model\PostVote $body Contains the cause variable, effect variable, and vote value. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function v1VotesPostWithHttpInfo($body, $access_token = null, $user_id = null) - { - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1VotesPost'); - } - // parse inputs - $resourcePath = "/v1/votes"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\CommonResponse', - '/v1/votes' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } -} diff --git a/lib/Api/MeasurementsApi.php b/lib/Api/MeasurementsApi.php index f05c2f1..3b377ce 100644 --- a/lib/Api/MeasurementsApi.php +++ b/lib/Api/MeasurementsApi.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -88,880 +88,64 @@ public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) } /** - * Operation v1MeasurementSourcesGet + * Operation deleteMeasurement * - * Get measurement sources - * - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\MeasurementSource - */ - public function v1MeasurementSourcesGet() - { - list($response) = $this->v1MeasurementSourcesGetWithHttpInfo(); - return $response; - } - - /** - * Operation v1MeasurementSourcesGetWithHttpInfo - * - * Get measurement sources - * - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\MeasurementSource, HTTP status code, HTTP response headers (array of strings) - */ - public function v1MeasurementSourcesGetWithHttpInfo() - { - // parse inputs - $resourcePath = "/v1/measurementSources"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\MeasurementSource', - '/v1/measurementSources' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\MeasurementSource', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\MeasurementSource', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1MeasurementSourcesPost - * - * Add a data source - * - * @param \QuantiModo\Client\Model\MeasurementSource $body An array of names of data sources you want to add. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return void - */ - public function v1MeasurementSourcesPost($body, $access_token = null, $user_id = null) - { - list($response) = $this->v1MeasurementSourcesPostWithHttpInfo($body, $access_token, $user_id); - return $response; - } - - /** - * Operation v1MeasurementSourcesPostWithHttpInfo - * - * Add a data source - * - * @param \QuantiModo\Client\Model\MeasurementSource $body An array of names of data sources you want to add. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function v1MeasurementSourcesPostWithHttpInfo($body, $access_token = null, $user_id = null) - { - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1MeasurementSourcesPost'); - } - // parse inputs - $resourcePath = "/v1/measurementSources"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - null, - '/v1/measurementSources' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - } - - throw $e; - } - } - - /** - * Operation v1MeasurementsDailyGet - * - * Get daily measurements for this user - * - * @param string $variable_name Name of the variable you want measurements for (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $abbreviated_unit_name The unit your want the measurements in (optional) - * @param string $start_time The lower limit of measurements returned (UTC Iso8601 \"YYYY-MM-DDThh:mm:ss\" format) (optional) - * @param string $end_time The upper limit of measurements returned (UTC Iso8601 \"YYYY-MM-DDThh:mm:ss\" format) (optional) - * @param int $grouping_width The time (in seconds) over which measurements are grouped together (optional) - * @param string $grouping_timezone The time (in seconds) over which measurements are grouped together (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Measurement - */ - public function v1MeasurementsDailyGet($variable_name, $access_token = null, $user_id = null, $abbreviated_unit_name = null, $start_time = null, $end_time = null, $grouping_width = null, $grouping_timezone = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v1MeasurementsDailyGetWithHttpInfo($variable_name, $access_token, $user_id, $abbreviated_unit_name, $start_time, $end_time, $grouping_width, $grouping_timezone, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v1MeasurementsDailyGetWithHttpInfo - * - * Get daily measurements for this user - * - * @param string $variable_name Name of the variable you want measurements for (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $abbreviated_unit_name The unit your want the measurements in (optional) - * @param string $start_time The lower limit of measurements returned (UTC Iso8601 \"YYYY-MM-DDThh:mm:ss\" format) (optional) - * @param string $end_time The upper limit of measurements returned (UTC Iso8601 \"YYYY-MM-DDThh:mm:ss\" format) (optional) - * @param int $grouping_width The time (in seconds) over which measurements are grouped together (optional) - * @param string $grouping_timezone The time (in seconds) over which measurements are grouped together (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Measurement, HTTP status code, HTTP response headers (array of strings) - */ - public function v1MeasurementsDailyGetWithHttpInfo($variable_name, $access_token = null, $user_id = null, $abbreviated_unit_name = null, $start_time = null, $end_time = null, $grouping_width = null, $grouping_timezone = null, $limit = null, $offset = null, $sort = null) - { - // verify the required parameter 'variable_name' is set - if ($variable_name === null) { - throw new \InvalidArgumentException('Missing the required parameter $variable_name when calling v1MeasurementsDailyGet'); - } - // parse inputs - $resourcePath = "/v1/measurements/daily"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($variable_name !== null) { - $queryParams['variableName'] = $this->apiClient->getSerializer()->toQueryValue($variable_name); - } - // query params - if ($abbreviated_unit_name !== null) { - $queryParams['abbreviatedUnitName'] = $this->apiClient->getSerializer()->toQueryValue($abbreviated_unit_name); - } - // query params - if ($start_time !== null) { - $queryParams['startTime'] = $this->apiClient->getSerializer()->toQueryValue($start_time); - } - // query params - if ($end_time !== null) { - $queryParams['endTime'] = $this->apiClient->getSerializer()->toQueryValue($end_time); - } - // query params - if ($grouping_width !== null) { - $queryParams['groupingWidth'] = $this->apiClient->getSerializer()->toQueryValue($grouping_width); - } - // query params - if ($grouping_timezone !== null) { - $queryParams['groupingTimezone'] = $this->apiClient->getSerializer()->toQueryValue($grouping_timezone); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Measurement', - '/v1/measurements/daily' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Measurement', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Measurement', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1MeasurementsDeletePost - * - * Delete a measurement - * - * @param \QuantiModo\Client\Model\MeasurementDelete $body The startTime and variableId of the measurement to be deleted. (required) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\CommonResponse - */ - public function v1MeasurementsDeletePost($body) - { - list($response) = $this->v1MeasurementsDeletePostWithHttpInfo($body); - return $response; - } - - /** - * Operation v1MeasurementsDeletePostWithHttpInfo - * - * Delete a measurement - * - * @param \QuantiModo\Client\Model\MeasurementDelete $body The startTime and variableId of the measurement to be deleted. (required) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function v1MeasurementsDeletePostWithHttpInfo($body) - { - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1MeasurementsDeletePost'); - } - // parse inputs - $resourcePath = "/v1/measurements/delete"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\CommonResponse', - '/v1/measurements/delete' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1MeasurementsGet - * - * Get measurements for this user - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $id Measurement id (optional) - * @param string $variable_name Name of the variable you want measurements for (optional) - * @param string $variable_category_name Name of the variable category you want measurements for (optional) - * @param string $source_name ID of the source you want measurements for (supports exact name match only) (optional) - * @param string $value Value of measurement (optional) - * @param string $abbreviated_unit_name The unit you want the measurements returned in (optional) - * @param string $earliest_measurement_time The lower limit of measurements returned in ISO 8601 format or epoch seconds (unixtime) (optional) - * @param string $latest_measurement_time The upper limit of measurements returned in ISO 8601 format or epoch seconds (unixtime) (optional) - * @param string $created_at The time the measurement record was first created in the format YYYY-MM-DDThh:mm:ss. Time zone should be UTC and not local. (optional) - * @param string $updated_at The time the measurement record was last changed in the format YYYY-MM-DDThh:mm:ss. Time zone should be UTC and not local. (optional) - * @param int $grouping_width The time (in seconds) over which measurements are grouped together (optional) - * @param string $grouping_timezone The time (in seconds) over which measurements are grouped together (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Measurement - */ - public function v1MeasurementsGet($access_token = null, $user_id = null, $id = null, $variable_name = null, $variable_category_name = null, $source_name = null, $value = null, $abbreviated_unit_name = null, $earliest_measurement_time = null, $latest_measurement_time = null, $created_at = null, $updated_at = null, $grouping_width = null, $grouping_timezone = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v1MeasurementsGetWithHttpInfo($access_token, $user_id, $id, $variable_name, $variable_category_name, $source_name, $value, $abbreviated_unit_name, $earliest_measurement_time, $latest_measurement_time, $created_at, $updated_at, $grouping_width, $grouping_timezone, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v1MeasurementsGetWithHttpInfo - * - * Get measurements for this user - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $id Measurement id (optional) - * @param string $variable_name Name of the variable you want measurements for (optional) - * @param string $variable_category_name Name of the variable category you want measurements for (optional) - * @param string $source_name ID of the source you want measurements for (supports exact name match only) (optional) - * @param string $value Value of measurement (optional) - * @param string $abbreviated_unit_name The unit you want the measurements returned in (optional) - * @param string $earliest_measurement_time The lower limit of measurements returned in ISO 8601 format or epoch seconds (unixtime) (optional) - * @param string $latest_measurement_time The upper limit of measurements returned in ISO 8601 format or epoch seconds (unixtime) (optional) - * @param string $created_at The time the measurement record was first created in the format YYYY-MM-DDThh:mm:ss. Time zone should be UTC and not local. (optional) - * @param string $updated_at The time the measurement record was last changed in the format YYYY-MM-DDThh:mm:ss. Time zone should be UTC and not local. (optional) - * @param int $grouping_width The time (in seconds) over which measurements are grouped together (optional) - * @param string $grouping_timezone The time (in seconds) over which measurements are grouped together (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Measurement, HTTP status code, HTTP response headers (array of strings) - */ - public function v1MeasurementsGetWithHttpInfo($access_token = null, $user_id = null, $id = null, $variable_name = null, $variable_category_name = null, $source_name = null, $value = null, $abbreviated_unit_name = null, $earliest_measurement_time = null, $latest_measurement_time = null, $created_at = null, $updated_at = null, $grouping_width = null, $grouping_timezone = null, $limit = null, $offset = null, $sort = null) - { - // parse inputs - $resourcePath = "/v1/measurements"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($id !== null) { - $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); - } - // query params - if ($variable_name !== null) { - $queryParams['variableName'] = $this->apiClient->getSerializer()->toQueryValue($variable_name); - } - // query params - if ($variable_category_name !== null) { - $queryParams['variableCategoryName'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_name); - } - // query params - if ($source_name !== null) { - $queryParams['sourceName'] = $this->apiClient->getSerializer()->toQueryValue($source_name); - } - // query params - if ($value !== null) { - $queryParams['value'] = $this->apiClient->getSerializer()->toQueryValue($value); - } - // query params - if ($abbreviated_unit_name !== null) { - $queryParams['abbreviatedUnitName'] = $this->apiClient->getSerializer()->toQueryValue($abbreviated_unit_name); - } - // query params - if ($earliest_measurement_time !== null) { - $queryParams['earliestMeasurementTime'] = $this->apiClient->getSerializer()->toQueryValue($earliest_measurement_time); - } - // query params - if ($latest_measurement_time !== null) { - $queryParams['latestMeasurementTime'] = $this->apiClient->getSerializer()->toQueryValue($latest_measurement_time); - } - // query params - if ($created_at !== null) { - $queryParams['createdAt'] = $this->apiClient->getSerializer()->toQueryValue($created_at); - } - // query params - if ($updated_at !== null) { - $queryParams['updatedAt'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); - } - // query params - if ($grouping_width !== null) { - $queryParams['groupingWidth'] = $this->apiClient->getSerializer()->toQueryValue($grouping_width); - } - // query params - if ($grouping_timezone !== null) { - $queryParams['groupingTimezone'] = $this->apiClient->getSerializer()->toQueryValue($grouping_timezone); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Measurement', - '/v1/measurements' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Measurement', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Measurement', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1MeasurementsPost - * - * Post a new set or update existing measurements to the database - * - * @param \QuantiModo\Client\Model\MeasurementSet $body An array of measurements you want to insert. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return void - */ - public function v1MeasurementsPost($body, $access_token = null, $user_id = null) - { - list($response) = $this->v1MeasurementsPostWithHttpInfo($body, $access_token, $user_id); - return $response; - } - - /** - * Operation v1MeasurementsPostWithHttpInfo - * - * Post a new set or update existing measurements to the database - * - * @param \QuantiModo\Client\Model\MeasurementSet $body An array of measurements you want to insert. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function v1MeasurementsPostWithHttpInfo($body, $access_token = null, $user_id = null) - { - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1MeasurementsPost'); - } - // parse inputs - $resourcePath = "/v1/measurements"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - null, - '/v1/measurements' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - } - - throw $e; - } - } - - /** - * Operation v1MeasurementsRangeGet - * - * Get measurements range for this user - * - * @param string $sources Enter source name to limit to specific source (varchar) (optional) - * @param int $user If not specified, uses currently logged in user (bigint) (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\MeasurementRange - */ - public function v1MeasurementsRangeGet($sources = null, $user = null) - { - list($response) = $this->v1MeasurementsRangeGetWithHttpInfo($sources, $user); - return $response; - } - - /** - * Operation v1MeasurementsRangeGetWithHttpInfo - * - * Get measurements range for this user - * - * @param string $sources Enter source name to limit to specific source (varchar) (optional) - * @param int $user If not specified, uses currently logged in user (bigint) (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\MeasurementRange, HTTP status code, HTTP response headers (array of strings) - */ - public function v1MeasurementsRangeGetWithHttpInfo($sources = null, $user = null) - { - // parse inputs - $resourcePath = "/v1/measurementsRange"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($sources !== null) { - $queryParams['sources'] = $this->apiClient->getSerializer()->toQueryValue($sources); - } - // query params - if ($user !== null) { - $queryParams['user'] = $this->apiClient->getSerializer()->toQueryValue($user); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\MeasurementRange', - '/v1/measurementsRange' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\MeasurementRange', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\MeasurementRange', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1MeasurementsUpdatePost - * - * Update a measurement - * - * @param \QuantiModo\Client\Model\MeasurementUpdate $body The id as well as the new startTime, note, and/or value of the measurement to be updated (required) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\CommonResponse - */ - public function v1MeasurementsUpdatePost($body) - { - list($response) = $this->v1MeasurementsUpdatePostWithHttpInfo($body); - return $response; - } - - /** - * Operation v1MeasurementsUpdatePostWithHttpInfo - * - * Update a measurement - * - * @param \QuantiModo\Client\Model\MeasurementUpdate $body The id as well as the new startTime, note, and/or value of the measurement to be updated (required) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function v1MeasurementsUpdatePostWithHttpInfo($body) - { - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1MeasurementsUpdatePost'); - } - // parse inputs - $resourcePath = "/v1/measurements/update"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\CommonResponse', - '/v1/measurements/update' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v2MeasurementsCsvGet - * - * Get Measurements CSV + * Delete a measurement * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\MeasurementDelete $body The startTime and variableId of the measurement to be deleted. (required) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \SplFileObject + * @return \QuantiModo\Client\Model\CommonResponse */ - public function v2MeasurementsCsvGet($access_token = null, $user_id = null) + public function deleteMeasurement($body) { - list($response) = $this->v2MeasurementsCsvGetWithHttpInfo($access_token, $user_id); + list($response) = $this->deleteMeasurementWithHttpInfo($body); return $response; } /** - * Operation v2MeasurementsCsvGetWithHttpInfo + * Operation deleteMeasurementWithHttpInfo * - * Get Measurements CSV + * Delete a measurement * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\MeasurementDelete $body The startTime and variableId of the measurement to be deleted. (required) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \SplFileObject, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) */ - public function v2MeasurementsCsvGetWithHttpInfo($access_token = null, $user_id = null) + public function deleteMeasurementWithHttpInfo($body) { + // verify the required parameter 'body' is set + if ($body === null) { + throw new \InvalidArgumentException('Missing the required parameter $body when calling deleteMeasurement'); + } // parse inputs - $resourcePath = "/v2/measurements/csv"; + $resourcePath = "/v3/measurements/delete"; $httpBody = ''; $queryParams = []; $headerParams = []; $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['text/csv']); + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); if (!is_null($_header_accept)) { $headerParams['Accept'] = $_header_accept; } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -970,19 +154,19 @@ public function v2MeasurementsCsvGetWithHttpInfo($access_token = null, $user_id try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'GET', + 'DELETE', $queryParams, $httpBody, $headerParams, - '\SplFileObject', - '/v2/measurements/csv' + '\QuantiModo\Client\Model\CommonResponse', + '/v3/measurements/delete' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\SplFileObject', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\SplFileObject', $e->getResponseHeaders()); + case 204: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); $e->setResponseObject($data); break; } @@ -992,41 +176,77 @@ public function v2MeasurementsCsvGetWithHttpInfo($access_token = null, $user_id } /** - * Operation v2MeasurementsIdDelete + * Operation getMeasurements * - * Delete Measurement + * Get measurements for this user * - * @param int $id id of Measurement (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param string $variable_name Name of the variable you want measurements for (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param string $variable_category_name Limit results to a specific variable category (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param float $user_id User's id (optional) + * @param string $source_name ID of the source you want measurements for (supports exact name match only) (optional) + * @param string $value Value of measurement (optional) + * @param string $unit_name Example: 86400 (optional) + * @param string $earliest_measurement_time Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $latest_measurement_time Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $created_at When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param int $id Measurement id (optional) + * @param int $grouping_width The time (in seconds) over which measurements are grouped together (optional) + * @param string $grouping_timezone The time (in seconds) over which measurements are grouped together (optional) + * @param bool $do_not_process Example: true (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param bool $do_not_convert Example: 1 (optional) + * @param bool $min_max_filter Example: 1 (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse2001 + * @return \QuantiModo\Client\Model\MeasurementArray */ - public function v2MeasurementsIdDelete($id, $access_token = null, $user_id = null) + public function getMeasurements($variable_name = null, $sort = null, $limit = '100', $offset = null, $variable_category_name = null, $updated_at = null, $user_id = null, $source_name = null, $value = null, $unit_name = null, $earliest_measurement_time = null, $latest_measurement_time = null, $created_at = null, $id = null, $grouping_width = null, $grouping_timezone = null, $do_not_process = null, $app_name = null, $client_id = null, $do_not_convert = null, $min_max_filter = null) { - list($response) = $this->v2MeasurementsIdDeleteWithHttpInfo($id, $access_token, $user_id); + list($response) = $this->getMeasurementsWithHttpInfo($variable_name, $sort, $limit, $offset, $variable_category_name, $updated_at, $user_id, $source_name, $value, $unit_name, $earliest_measurement_time, $latest_measurement_time, $created_at, $id, $grouping_width, $grouping_timezone, $do_not_process, $app_name, $client_id, $do_not_convert, $min_max_filter); return $response; } /** - * Operation v2MeasurementsIdDeleteWithHttpInfo + * Operation getMeasurementsWithHttpInfo * - * Delete Measurement + * Get measurements for this user * - * @param int $id id of Measurement (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param string $variable_name Name of the variable you want measurements for (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param string $variable_category_name Limit results to a specific variable category (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param float $user_id User's id (optional) + * @param string $source_name ID of the source you want measurements for (supports exact name match only) (optional) + * @param string $value Value of measurement (optional) + * @param string $unit_name Example: 86400 (optional) + * @param string $earliest_measurement_time Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $latest_measurement_time Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $created_at When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param int $id Measurement id (optional) + * @param int $grouping_width The time (in seconds) over which measurements are grouped together (optional) + * @param string $grouping_timezone The time (in seconds) over which measurements are grouped together (optional) + * @param bool $do_not_process Example: true (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param bool $do_not_convert Example: 1 (optional) + * @param bool $min_max_filter Example: 1 (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse2001, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\MeasurementArray, HTTP status code, HTTP response headers (array of strings) */ - public function v2MeasurementsIdDeleteWithHttpInfo($id, $access_token = null, $user_id = null) + public function getMeasurementsWithHttpInfo($variable_name = null, $sort = null, $limit = '100', $offset = null, $variable_category_name = null, $updated_at = null, $user_id = null, $source_name = null, $value = null, $unit_name = null, $earliest_measurement_time = null, $latest_measurement_time = null, $created_at = null, $id = null, $grouping_width = null, $grouping_timezone = null, $do_not_process = null, $app_name = null, $client_id = null, $do_not_convert = null, $min_max_filter = null) { - // verify the required parameter 'id' is set - if ($id === null) { - throw new \InvalidArgumentException('Missing the required parameter $id when calling v2MeasurementsIdDelete'); + if (!is_null($offset) && ($offset < 0)) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling MeasurementsApi.getMeasurements, must be bigger than or equal to 0.'); } + // parse inputs - $resourcePath = "/v2/measurements/{id}"; + $resourcePath = "/v3/measurements"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -1038,126 +258,101 @@ public function v2MeasurementsIdDeleteWithHttpInfo($id, $access_token = null, $u $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); + if ($variable_name !== null) { + $queryParams['variableName'] = $this->apiClient->getSerializer()->toQueryValue($variable_name); } // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + if ($sort !== null) { + $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); } - // path params - if ($id !== null) { - $resourcePath = str_replace( - "{" . "id" . "}", - $this->apiClient->getSerializer()->toPathValue($id), - $resourcePath - ); + // query params + if ($limit !== null) { + $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) + // query params + if ($offset !== null) { + $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + // query params + if ($variable_category_name !== null) { + $queryParams['variableCategoryName'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_name); } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'DELETE', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\InlineResponse2001', - '/v2/measurements/{id}' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse2001', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse2001', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; + // query params + if ($updated_at !== null) { + $queryParams['updatedAt'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); } - } - - /** - * Operation v2MeasurementsIdGet - * - * Get Measurement - * - * @param int $id id of Measurement (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse200 - */ - public function v2MeasurementsIdGet($id, $access_token = null, $user_id = null) - { - list($response) = $this->v2MeasurementsIdGetWithHttpInfo($id, $access_token, $user_id); - return $response; - } - - /** - * Operation v2MeasurementsIdGetWithHttpInfo - * - * Get Measurement - * - * @param int $id id of Measurement (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse200, HTTP status code, HTTP response headers (array of strings) - */ - public function v2MeasurementsIdGetWithHttpInfo($id, $access_token = null, $user_id = null) - { - // verify the required parameter 'id' is set - if ($id === null) { - throw new \InvalidArgumentException('Missing the required parameter $id when calling v2MeasurementsIdGet'); + // query params + if ($user_id !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); } - // parse inputs - $resourcePath = "/v2/measurements/{id}"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; + // query params + if ($source_name !== null) { + $queryParams['sourceName'] = $this->apiClient->getSerializer()->toQueryValue($source_name); } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); + if ($value !== null) { + $queryParams['value'] = $this->apiClient->getSerializer()->toQueryValue($value); } // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + if ($unit_name !== null) { + $queryParams['unitName'] = $this->apiClient->getSerializer()->toQueryValue($unit_name); } - // path params + // query params + if ($earliest_measurement_time !== null) { + $queryParams['earliestMeasurementTime'] = $this->apiClient->getSerializer()->toQueryValue($earliest_measurement_time); + } + // query params + if ($latest_measurement_time !== null) { + $queryParams['latestMeasurementTime'] = $this->apiClient->getSerializer()->toQueryValue($latest_measurement_time); + } + // query params + if ($created_at !== null) { + $queryParams['createdAt'] = $this->apiClient->getSerializer()->toQueryValue($created_at); + } + // query params if ($id !== null) { - $resourcePath = str_replace( - "{" . "id" . "}", - $this->apiClient->getSerializer()->toPathValue($id), - $resourcePath - ); + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + // query params + if ($grouping_width !== null) { + $queryParams['groupingWidth'] = $this->apiClient->getSerializer()->toQueryValue($grouping_width); + } + // query params + if ($grouping_timezone !== null) { + $queryParams['groupingTimezone'] = $this->apiClient->getSerializer()->toQueryValue($grouping_timezone); + } + // query params + if ($do_not_process !== null) { + $queryParams['doNotProcess'] = $this->apiClient->getSerializer()->toQueryValue($do_not_process); + } + // query params + if ($app_name !== null) { + $queryParams['appName'] = $this->apiClient->getSerializer()->toQueryValue($app_name); + } + // query params + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); + } + // query params + if ($do_not_convert !== null) { + $queryParams['doNotConvert'] = $this->apiClient->getSerializer()->toQueryValue($do_not_convert); + } + // query params + if ($min_max_filter !== null) { + $queryParams['minMaxFilter'] = $this->apiClient->getSerializer()->toQueryValue($min_max_filter); } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -1170,15 +365,15 @@ public function v2MeasurementsIdGetWithHttpInfo($id, $access_token = null, $user $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\InlineResponse200', - '/v2/measurements/{id}' + '\QuantiModo\Client\Model\MeasurementArray', + '/v3/measurements' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse200', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\MeasurementArray', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse200', $e->getResponseHeaders()); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\MeasurementArray', $e->getResponseHeaders()); $e->setResponseObject($data); break; } @@ -1188,43 +383,59 @@ public function v2MeasurementsIdGetWithHttpInfo($id, $access_token = null, $user } /** - * Operation v2MeasurementsIdPut + * Operation getPairs * - * Update Measurement + * Get pairs of measurements for correlational analysis * - * @param int $id id of Measurement (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param \QuantiModo\Client\Model\Measurement $body Measurement that should be updated (optional) + * @param string $cause_variable_name Variable name of the hypothetical cause variable. Example: Sleep Duration (optional) + * @param string $effect_variable_name Variable name of the hypothetical effect variable. Example: Overall Mood (optional) + * @param string $effect_unit_name Name for the unit effect measurements to be returned in (optional) + * @param float $user_id User's id (optional) + * @param string $cause_unit_name Name for the unit cause measurements to be returned in (optional) + * @param string $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) + * @param string $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) + * @param string $earliest_measurement_time Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $latest_measurement_time Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse2001 + * @return \QuantiModo\Client\Model\PairArray */ - public function v2MeasurementsIdPut($id, $access_token = null, $user_id = null, $body = null) + public function getPairs($cause_variable_name = null, $effect_variable_name = null, $effect_unit_name = null, $user_id = null, $cause_unit_name = null, $onset_delay = null, $duration_of_action = null, $earliest_measurement_time = null, $latest_measurement_time = null, $limit = '100', $offset = null, $sort = null) { - list($response) = $this->v2MeasurementsIdPutWithHttpInfo($id, $access_token, $user_id, $body); + list($response) = $this->getPairsWithHttpInfo($cause_variable_name, $effect_variable_name, $effect_unit_name, $user_id, $cause_unit_name, $onset_delay, $duration_of_action, $earliest_measurement_time, $latest_measurement_time, $limit, $offset, $sort); return $response; } /** - * Operation v2MeasurementsIdPutWithHttpInfo + * Operation getPairsWithHttpInfo * - * Update Measurement + * Get pairs of measurements for correlational analysis * - * @param int $id id of Measurement (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param \QuantiModo\Client\Model\Measurement $body Measurement that should be updated (optional) + * @param string $cause_variable_name Variable name of the hypothetical cause variable. Example: Sleep Duration (optional) + * @param string $effect_variable_name Variable name of the hypothetical effect variable. Example: Overall Mood (optional) + * @param string $effect_unit_name Name for the unit effect measurements to be returned in (optional) + * @param float $user_id User's id (optional) + * @param string $cause_unit_name Name for the unit cause measurements to be returned in (optional) + * @param string $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) + * @param string $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) + * @param string $earliest_measurement_time Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $latest_measurement_time Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse2001, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\PairArray, HTTP status code, HTTP response headers (array of strings) */ - public function v2MeasurementsIdPutWithHttpInfo($id, $access_token = null, $user_id = null, $body = null) + public function getPairsWithHttpInfo($cause_variable_name = null, $effect_variable_name = null, $effect_unit_name = null, $user_id = null, $cause_unit_name = null, $onset_delay = null, $duration_of_action = null, $earliest_measurement_time = null, $latest_measurement_time = null, $limit = '100', $offset = null, $sort = null) { - // verify the required parameter 'id' is set - if ($id === null) { - throw new \InvalidArgumentException('Missing the required parameter $id when calling v2MeasurementsIdPut'); + if (!is_null($offset) && ($offset < 0)) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling MeasurementsApi.getPairs, must be bigger than or equal to 0.'); } + // parse inputs - $resourcePath = "/v2/measurements/{id}"; + $resourcePath = "/v3/pairs"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -1236,25 +447,52 @@ public function v2MeasurementsIdPutWithHttpInfo($id, $access_token = null, $user $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); + if ($cause_variable_name !== null) { + $queryParams['causeVariableName'] = $this->apiClient->getSerializer()->toQueryValue($cause_variable_name); + } + // query params + if ($effect_variable_name !== null) { + $queryParams['effectVariableName'] = $this->apiClient->getSerializer()->toQueryValue($effect_variable_name); + } + // query params + if ($effect_unit_name !== null) { + $queryParams['effectUnitName'] = $this->apiClient->getSerializer()->toQueryValue($effect_unit_name); } // query params if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); } - // path params - if ($id !== null) { - $resourcePath = str_replace( - "{" . "id" . "}", - $this->apiClient->getSerializer()->toPathValue($id), - $resourcePath - ); + // query params + if ($cause_unit_name !== null) { + $queryParams['causeUnitName'] = $this->apiClient->getSerializer()->toQueryValue($cause_unit_name); } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; + // query params + if ($onset_delay !== null) { + $queryParams['onsetDelay'] = $this->apiClient->getSerializer()->toQueryValue($onset_delay); + } + // query params + if ($duration_of_action !== null) { + $queryParams['durationOfAction'] = $this->apiClient->getSerializer()->toQueryValue($duration_of_action); + } + // query params + if ($earliest_measurement_time !== null) { + $queryParams['earliestMeasurementTime'] = $this->apiClient->getSerializer()->toQueryValue($earliest_measurement_time); + } + // query params + if ($latest_measurement_time !== null) { + $queryParams['latestMeasurementTime'] = $this->apiClient->getSerializer()->toQueryValue($latest_measurement_time); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); } // for model (json/xml) @@ -1263,6 +501,11 @@ public function v2MeasurementsIdPutWithHttpInfo($id, $access_token = null, $user } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -1271,19 +514,19 @@ public function v2MeasurementsIdPutWithHttpInfo($id, $access_token = null, $user try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'PUT', + 'GET', $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\InlineResponse2001', - '/v2/measurements/{id}' + '\QuantiModo\Client\Model\PairArray', + '/v3/pairs' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse2001', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\PairArray', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse2001', $e->getResponseHeaders()); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\PairArray', $e->getResponseHeaders()); $e->setResponseObject($data); break; } @@ -1293,35 +536,33 @@ public function v2MeasurementsIdPutWithHttpInfo($id, $access_token = null, $user } /** - * Operation v2MeasurementsRequestCsvPost + * Operation measurementExportRequest * * Post Request for Measurements CSV * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return int */ - public function v2MeasurementsRequestCsvPost($access_token = null, $user_id = null) + public function measurementExportRequest($user_id = null) { - list($response) = $this->v2MeasurementsRequestCsvPostWithHttpInfo($access_token, $user_id); + list($response) = $this->measurementExportRequestWithHttpInfo($user_id); return $response; } /** - * Operation v2MeasurementsRequestCsvPostWithHttpInfo + * Operation measurementExportRequestWithHttpInfo * * Post Request for Measurements CSV * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return array of int, HTTP status code, HTTP response headers (array of strings) */ - public function v2MeasurementsRequestCsvPostWithHttpInfo($access_token = null, $user_id = null) + public function measurementExportRequestWithHttpInfo($user_id = null) { // parse inputs - $resourcePath = "/v2/measurements/request_csv"; + $resourcePath = "/v2/measurements/exportRequest"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -1332,21 +573,22 @@ public function v2MeasurementsRequestCsvPostWithHttpInfo($access_token = null, $ } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } // query params if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -1360,13 +602,13 @@ public function v2MeasurementsRequestCsvPostWithHttpInfo($access_token = null, $ $httpBody, $headerParams, 'int', - '/v2/measurements/request_csv' + '/v2/measurements/exportRequest' ); return [$this->apiClient->getSerializer()->deserialize($response, 'int', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 201: $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); $e->setResponseObject($data); break; @@ -1377,35 +619,39 @@ public function v2MeasurementsRequestCsvPostWithHttpInfo($access_token = null, $ } /** - * Operation v2MeasurementsRequestPdfPost + * Operation postMeasurements * - * Post Request for Measurements PDF + * Post a new set or update existing measurements to the database * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\MeasurementSet[] $body An array of measurement sets containing measurement items you want to insert. (required) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return int + * @return \QuantiModo\Client\Model\PostMeasurementsResponse */ - public function v2MeasurementsRequestPdfPost($access_token = null, $user_id = null) + public function postMeasurements($body, $user_id = null) { - list($response) = $this->v2MeasurementsRequestPdfPostWithHttpInfo($access_token, $user_id); + list($response) = $this->postMeasurementsWithHttpInfo($body, $user_id); return $response; } /** - * Operation v2MeasurementsRequestPdfPostWithHttpInfo + * Operation postMeasurementsWithHttpInfo * - * Post Request for Measurements PDF + * Post a new set or update existing measurements to the database * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\MeasurementSet[] $body An array of measurement sets containing measurement items you want to insert. (required) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of int, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\PostMeasurementsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function v2MeasurementsRequestPdfPostWithHttpInfo($access_token = null, $user_id = null) + public function postMeasurementsWithHttpInfo($body, $user_id = null) { + // verify the required parameter 'body' is set + if ($body === null) { + throw new \InvalidArgumentException('Missing the required parameter $body when calling postMeasurements'); + } // parse inputs - $resourcePath = "/v2/measurements/request_pdf"; + $resourcePath = "/v3/measurements/post"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -1416,21 +662,27 @@ public function v2MeasurementsRequestPdfPostWithHttpInfo($access_token = null, $ } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } // query params if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + } + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -1443,15 +695,15 @@ public function v2MeasurementsRequestPdfPostWithHttpInfo($access_token = null, $ $queryParams, $httpBody, $headerParams, - 'int', - '/v2/measurements/request_pdf' + '\QuantiModo\Client\Model\PostMeasurementsResponse', + '/v3/measurements/post' ); - return [$this->apiClient->getSerializer()->deserialize($response, 'int', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\PostMeasurementsResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + case 201: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\PostMeasurementsResponse', $e->getResponseHeaders()); $e->setResponseObject($data); break; } @@ -1461,35 +713,37 @@ public function v2MeasurementsRequestPdfPostWithHttpInfo($access_token = null, $ } /** - * Operation v2MeasurementsRequestXlsPost + * Operation v3MeasurementsUpdatePost * - * Post Request for Measurements XLS + * Update a measurement * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\MeasurementUpdate $body The id as well as the new startTime, note, and/or value of the measurement to be updated (required) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return int + * @return \QuantiModo\Client\Model\CommonResponse */ - public function v2MeasurementsRequestXlsPost($access_token = null, $user_id = null) + public function v3MeasurementsUpdatePost($body) { - list($response) = $this->v2MeasurementsRequestXlsPostWithHttpInfo($access_token, $user_id); + list($response) = $this->v3MeasurementsUpdatePostWithHttpInfo($body); return $response; } /** - * Operation v2MeasurementsRequestXlsPostWithHttpInfo + * Operation v3MeasurementsUpdatePostWithHttpInfo * - * Post Request for Measurements XLS + * Update a measurement * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\MeasurementUpdate $body The id as well as the new startTime, note, and/or value of the measurement to be updated (required) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of int, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) */ - public function v2MeasurementsRequestXlsPostWithHttpInfo($access_token = null, $user_id = null) + public function v3MeasurementsUpdatePostWithHttpInfo($body) { + // verify the required parameter 'body' is set + if ($body === null) { + throw new \InvalidArgumentException('Missing the required parameter $body when calling v3MeasurementsUpdatePost'); + } // parse inputs - $resourcePath = "/v2/measurements/request_xls"; + $resourcePath = "/v3/measurements/update"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -1500,21 +754,23 @@ public function v2MeasurementsRequestXlsPostWithHttpInfo($access_token = null, $ } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -1527,15 +783,15 @@ public function v2MeasurementsRequestXlsPostWithHttpInfo($access_token = null, $ $queryParams, $httpBody, $headerParams, - 'int', - '/v2/measurements/request_xls' + '\QuantiModo\Client\Model\CommonResponse', + '/v3/measurements/update' ); - return [$this->apiClient->getSerializer()->deserialize($response, 'int', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + case 201: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); $e->setResponseObject($data); break; } diff --git a/lib/Api/NotificationsApi.php b/lib/Api/NotificationsApi.php new file mode 100644 index 0000000..c32b252 --- /dev/null +++ b/lib/Api/NotificationsApi.php @@ -0,0 +1,217 @@ +apiClient = $apiClient; + } + + /** + * Get API client + * + * @return \QuantiModo\Client\ApiClient get the API client + */ + public function getApiClient() + { + return $this->apiClient; + } + + /** + * Set the API client + * + * @param \QuantiModo\Client\ApiClient $apiClient set the API client + * + * @return NotificationsApi + */ + public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) + { + $this->apiClient = $apiClient; + return $this; + } + + /** + * Operation getNotificationPreferences + * + * Get NotificationPreferences + * + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return void + */ + public function getNotificationPreferences() + { + list($response) = $this->getNotificationPreferencesWithHttpInfo(); + return $response; + } + + /** + * Operation getNotificationPreferencesWithHttpInfo + * + * Get NotificationPreferences + * + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function getNotificationPreferencesWithHttpInfo() + { + // parse inputs + $resourcePath = "/v3/notificationPreferences"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + null, + '/v3/notificationPreferences' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + } + + throw $e; + } + } + + /** + * Operation postDeviceTokens + * + * Post DeviceTokens + * + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return void + */ + public function postDeviceTokens() + { + list($response) = $this->postDeviceTokensWithHttpInfo(); + return $response; + } + + /** + * Operation postDeviceTokensWithHttpInfo + * + * Post DeviceTokens + * + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function postDeviceTokensWithHttpInfo() + { + // parse inputs + $resourcePath = "/v3/deviceTokens"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/v3/deviceTokens' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + } + + throw $e; + } + } +} diff --git a/lib/Api/OrganizationsApi.php b/lib/Api/OrganizationsApi.php deleted file mode 100644 index a1c5fd7..0000000 --- a/lib/Api/OrganizationsApi.php +++ /dev/null @@ -1,215 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Api; - -use \QuantiModo\Client\ApiClient; -use \QuantiModo\Client\ApiException; -use \QuantiModo\Client\Configuration; -use \QuantiModo\Client\ObjectSerializer; - -/** - * OrganizationsApi Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class OrganizationsApi -{ - /** - * API Client - * - * @var \QuantiModo\Client\ApiClient instance of the ApiClient - */ - protected $apiClient; - - /** - * Constructor - * - * @param \QuantiModo\Client\ApiClient|null $apiClient The api client to use - */ - public function __construct(\QuantiModo\Client\ApiClient $apiClient = null) - { - if ($apiClient === null) { - $apiClient = new ApiClient(); - } - - $this->apiClient = $apiClient; - } - - /** - * Get API client - * - * @return \QuantiModo\Client\ApiClient get the API client - */ - public function getApiClient() - { - return $this->apiClient; - } - - /** - * Set the API client - * - * @param \QuantiModo\Client\ApiClient $apiClient set the API client - * - * @return OrganizationsApi - */ - public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) - { - $this->apiClient = $apiClient; - return $this; - } - - /** - * Operation v1OrganizationsOrganizationIdUsersPost - * - * Get user tokens for existing users, create new users - * - * @param int $organization_id Organization ID (required) - * @param \QuantiModo\Client\Model\UserTokenRequest $body Provides organization token and user ID (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\UserTokenSuccessfulResponse - */ - public function v1OrganizationsOrganizationIdUsersPost($organization_id, $body, $access_token = null, $user_id = null) - { - list($response) = $this->v1OrganizationsOrganizationIdUsersPostWithHttpInfo($organization_id, $body, $access_token, $user_id); - return $response; - } - - /** - * Operation v1OrganizationsOrganizationIdUsersPostWithHttpInfo - * - * Get user tokens for existing users, create new users - * - * @param int $organization_id Organization ID (required) - * @param \QuantiModo\Client\Model\UserTokenRequest $body Provides organization token and user ID (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\UserTokenSuccessfulResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function v1OrganizationsOrganizationIdUsersPostWithHttpInfo($organization_id, $body, $access_token = null, $user_id = null) - { - // verify the required parameter 'organization_id' is set - if ($organization_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $organization_id when calling v1OrganizationsOrganizationIdUsersPost'); - } - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1OrganizationsOrganizationIdUsersPost'); - } - // parse inputs - $resourcePath = "/v1/organizations/{organizationId}/users"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // path params - if ($organization_id !== null) { - $resourcePath = str_replace( - "{" . "organizationId" . "}", - $this->apiClient->getSerializer()->toPathValue($organization_id), - $resourcePath - ); - } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // this endpoint requires API key authentication - $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); - if (strlen($apiKey) !== 0) { - $headerParams['api_key'] = $apiKey; - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\UserTokenSuccessfulResponse', - '/v1/organizations/{organizationId}/users' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\UserTokenSuccessfulResponse', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\UserTokenSuccessfulResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - case 201: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\UserTokenSuccessfulResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - case 400: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\UserTokenFailedResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - case 403: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\UserTokenFailedResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } -} diff --git a/lib/Api/PairsApi.php b/lib/Api/PairsApi.php deleted file mode 100644 index a61fd3d..0000000 --- a/lib/Api/PairsApi.php +++ /dev/null @@ -1,429 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Api; - -use \QuantiModo\Client\ApiClient; -use \QuantiModo\Client\ApiException; -use \QuantiModo\Client\Configuration; -use \QuantiModo\Client\ObjectSerializer; - -/** - * PairsApi Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class PairsApi -{ - /** - * API Client - * - * @var \QuantiModo\Client\ApiClient instance of the ApiClient - */ - protected $apiClient; - - /** - * Constructor - * - * @param \QuantiModo\Client\ApiClient|null $apiClient The api client to use - */ - public function __construct(\QuantiModo\Client\ApiClient $apiClient = null) - { - if ($apiClient === null) { - $apiClient = new ApiClient(); - } - - $this->apiClient = $apiClient; - } - - /** - * Get API client - * - * @return \QuantiModo\Client\ApiClient get the API client - */ - public function getApiClient() - { - return $this->apiClient; - } - - /** - * Set the API client - * - * @param \QuantiModo\Client\ApiClient $apiClient set the API client - * - * @return PairsApi - */ - public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) - { - $this->apiClient = $apiClient; - return $this; - } - - /** - * Operation v1PairsCsvGet - * - * Get pairs - * - * @param string $cause Original variable name for the explanatory or independent variable (required) - * @param string $effect Original variable name for the outcome or dependent variable (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $cause_source Name of data source that the cause measurements should come from (optional) - * @param string $cause_unit Abbreviated name for the unit cause measurements to be returned in (optional) - * @param string $delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) - * @param string $duration The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param string $effect_source Name of data source that the effectmeasurements should come from (optional) - * @param string $effect_unit Abbreviated name for the unit effect measurements to be returned in (optional) - * @param string $end_time The most recent date (in epoch time) for which we should return measurements (optional) - * @param string $start_time The earliest date (in epoch time) for which we should return measurements (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Pairs[] - */ - public function v1PairsCsvGet($cause, $effect, $access_token = null, $user_id = null, $cause_source = null, $cause_unit = null, $delay = null, $duration = null, $effect_source = null, $effect_unit = null, $end_time = null, $start_time = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v1PairsCsvGetWithHttpInfo($cause, $effect, $access_token, $user_id, $cause_source, $cause_unit, $delay, $duration, $effect_source, $effect_unit, $end_time, $start_time, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v1PairsCsvGetWithHttpInfo - * - * Get pairs - * - * @param string $cause Original variable name for the explanatory or independent variable (required) - * @param string $effect Original variable name for the outcome or dependent variable (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $cause_source Name of data source that the cause measurements should come from (optional) - * @param string $cause_unit Abbreviated name for the unit cause measurements to be returned in (optional) - * @param string $delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) - * @param string $duration The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param string $effect_source Name of data source that the effectmeasurements should come from (optional) - * @param string $effect_unit Abbreviated name for the unit effect measurements to be returned in (optional) - * @param string $end_time The most recent date (in epoch time) for which we should return measurements (optional) - * @param string $start_time The earliest date (in epoch time) for which we should return measurements (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Pairs[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1PairsCsvGetWithHttpInfo($cause, $effect, $access_token = null, $user_id = null, $cause_source = null, $cause_unit = null, $delay = null, $duration = null, $effect_source = null, $effect_unit = null, $end_time = null, $start_time = null, $limit = null, $offset = null, $sort = null) - { - // verify the required parameter 'cause' is set - if ($cause === null) { - throw new \InvalidArgumentException('Missing the required parameter $cause when calling v1PairsCsvGet'); - } - // verify the required parameter 'effect' is set - if ($effect === null) { - throw new \InvalidArgumentException('Missing the required parameter $effect when calling v1PairsCsvGet'); - } - // parse inputs - $resourcePath = "/v1/pairsCsv"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($cause !== null) { - $queryParams['cause'] = $this->apiClient->getSerializer()->toQueryValue($cause); - } - // query params - if ($cause_source !== null) { - $queryParams['causeSource'] = $this->apiClient->getSerializer()->toQueryValue($cause_source); - } - // query params - if ($cause_unit !== null) { - $queryParams['causeUnit'] = $this->apiClient->getSerializer()->toQueryValue($cause_unit); - } - // query params - if ($delay !== null) { - $queryParams['delay'] = $this->apiClient->getSerializer()->toQueryValue($delay); - } - // query params - if ($duration !== null) { - $queryParams['duration'] = $this->apiClient->getSerializer()->toQueryValue($duration); - } - // query params - if ($effect !== null) { - $queryParams['effect'] = $this->apiClient->getSerializer()->toQueryValue($effect); - } - // query params - if ($effect_source !== null) { - $queryParams['effectSource'] = $this->apiClient->getSerializer()->toQueryValue($effect_source); - } - // query params - if ($effect_unit !== null) { - $queryParams['effectUnit'] = $this->apiClient->getSerializer()->toQueryValue($effect_unit); - } - // query params - if ($end_time !== null) { - $queryParams['endTime'] = $this->apiClient->getSerializer()->toQueryValue($end_time); - } - // query params - if ($start_time !== null) { - $queryParams['startTime'] = $this->apiClient->getSerializer()->toQueryValue($start_time); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Pairs[]', - '/v1/pairsCsv' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Pairs[]', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Pairs[]', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1PairsGet - * - * Get pairs - * - * @param string $cause Original variable name for the explanatory or independent variable (required) - * @param string $effect Original variable name for the outcome or dependent variable (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $cause_source Name of data source that the cause measurements should come from (optional) - * @param string $cause_unit Abbreviated name for the unit cause measurements to be returned in (optional) - * @param string $delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) - * @param string $duration The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param string $effect_source Name of data source that the effectmeasurements should come from (optional) - * @param string $effect_unit Abbreviated name for the unit effect measurements to be returned in (optional) - * @param string $end_time The most recent date (in epoch time) for which we should return measurements (optional) - * @param string $start_time The earliest date (in epoch time) for which we should return measurements (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Pairs[] - */ - public function v1PairsGet($cause, $effect, $access_token = null, $user_id = null, $cause_source = null, $cause_unit = null, $delay = null, $duration = null, $effect_source = null, $effect_unit = null, $end_time = null, $start_time = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v1PairsGetWithHttpInfo($cause, $effect, $access_token, $user_id, $cause_source, $cause_unit, $delay, $duration, $effect_source, $effect_unit, $end_time, $start_time, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v1PairsGetWithHttpInfo - * - * Get pairs - * - * @param string $cause Original variable name for the explanatory or independent variable (required) - * @param string $effect Original variable name for the outcome or dependent variable (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $cause_source Name of data source that the cause measurements should come from (optional) - * @param string $cause_unit Abbreviated name for the unit cause measurements to be returned in (optional) - * @param string $delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. (optional) - * @param string $duration The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. (optional) - * @param string $effect_source Name of data source that the effectmeasurements should come from (optional) - * @param string $effect_unit Abbreviated name for the unit effect measurements to be returned in (optional) - * @param string $end_time The most recent date (in epoch time) for which we should return measurements (optional) - * @param string $start_time The earliest date (in epoch time) for which we should return measurements (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Pairs[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1PairsGetWithHttpInfo($cause, $effect, $access_token = null, $user_id = null, $cause_source = null, $cause_unit = null, $delay = null, $duration = null, $effect_source = null, $effect_unit = null, $end_time = null, $start_time = null, $limit = null, $offset = null, $sort = null) - { - // verify the required parameter 'cause' is set - if ($cause === null) { - throw new \InvalidArgumentException('Missing the required parameter $cause when calling v1PairsGet'); - } - // verify the required parameter 'effect' is set - if ($effect === null) { - throw new \InvalidArgumentException('Missing the required parameter $effect when calling v1PairsGet'); - } - // parse inputs - $resourcePath = "/v1/pairs"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($cause !== null) { - $queryParams['cause'] = $this->apiClient->getSerializer()->toQueryValue($cause); - } - // query params - if ($cause_source !== null) { - $queryParams['causeSource'] = $this->apiClient->getSerializer()->toQueryValue($cause_source); - } - // query params - if ($cause_unit !== null) { - $queryParams['causeUnit'] = $this->apiClient->getSerializer()->toQueryValue($cause_unit); - } - // query params - if ($delay !== null) { - $queryParams['delay'] = $this->apiClient->getSerializer()->toQueryValue($delay); - } - // query params - if ($duration !== null) { - $queryParams['duration'] = $this->apiClient->getSerializer()->toQueryValue($duration); - } - // query params - if ($effect !== null) { - $queryParams['effect'] = $this->apiClient->getSerializer()->toQueryValue($effect); - } - // query params - if ($effect_source !== null) { - $queryParams['effectSource'] = $this->apiClient->getSerializer()->toQueryValue($effect_source); - } - // query params - if ($effect_unit !== null) { - $queryParams['effectUnit'] = $this->apiClient->getSerializer()->toQueryValue($effect_unit); - } - // query params - if ($end_time !== null) { - $queryParams['endTime'] = $this->apiClient->getSerializer()->toQueryValue($end_time); - } - // query params - if ($start_time !== null) { - $queryParams['startTime'] = $this->apiClient->getSerializer()->toQueryValue($start_time); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Pairs[]', - '/v1/pairs' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Pairs[]', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Pairs[]', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } -} diff --git a/lib/Api/RemindersApi.php b/lib/Api/RemindersApi.php index 4ed52f4..4140578 100644 --- a/lib/Api/RemindersApi.php +++ b/lib/Api/RemindersApi.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -88,161 +88,39 @@ public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) } /** - * Operation v1TrackingReminderNotificationsGet + * Operation deleteTrackingReminder * - * Get specific pending tracking reminders - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $variable_category_name Limit tracking reminder notifications to a specific variable category (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse20012 - */ - public function v1TrackingReminderNotificationsGet($access_token = null, $user_id = null, $variable_category_name = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v1TrackingReminderNotificationsGetWithHttpInfo($access_token, $user_id, $variable_category_name, $created_at, $updated_at, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v1TrackingReminderNotificationsGetWithHttpInfo - * - * Get specific pending tracking reminders - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $variable_category_name Limit tracking reminder notifications to a specific variable category (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse20012, HTTP status code, HTTP response headers (array of strings) - */ - public function v1TrackingReminderNotificationsGetWithHttpInfo($access_token = null, $user_id = null, $variable_category_name = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - // parse inputs - $resourcePath = "/v1/trackingReminderNotifications"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($variable_category_name !== null) { - $queryParams['variableCategoryName'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_name); - } - // query params - if ($created_at !== null) { - $queryParams['createdAt'] = $this->apiClient->getSerializer()->toQueryValue($created_at); - } - // query params - if ($updated_at !== null) { - $queryParams['updatedAt'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\InlineResponse20012', - '/v1/trackingReminderNotifications' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse20012', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse20012', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1TrackingReminderNotificationsSkipPost - * - * Skip a pending tracking reminder + * Delete tracking reminder * - * @param \QuantiModo\Client\Model\TrackingReminderNotificationSkip $body Id of the pending reminder to be skipped or deleted (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\TrackingReminderDelete $body Id of reminder to be deleted (required) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return \QuantiModo\Client\Model\CommonResponse */ - public function v1TrackingReminderNotificationsSkipPost($body, $access_token = null, $user_id = null) + public function deleteTrackingReminder($body, $user_id = null) { - list($response) = $this->v1TrackingReminderNotificationsSkipPostWithHttpInfo($body, $access_token, $user_id); + list($response) = $this->deleteTrackingReminderWithHttpInfo($body, $user_id); return $response; } /** - * Operation v1TrackingReminderNotificationsSkipPostWithHttpInfo + * Operation deleteTrackingReminderWithHttpInfo * - * Skip a pending tracking reminder + * Delete tracking reminder * - * @param \QuantiModo\Client\Model\TrackingReminderNotificationSkip $body Id of the pending reminder to be skipped or deleted (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\TrackingReminderDelete $body Id of reminder to be deleted (required) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) */ - public function v1TrackingReminderNotificationsSkipPostWithHttpInfo($body, $access_token = null, $user_id = null) + public function deleteTrackingReminderWithHttpInfo($body, $user_id = null) { // verify the required parameter 'body' is set if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1TrackingReminderNotificationsSkipPost'); + throw new \InvalidArgumentException('Missing the required parameter $body when calling deleteTrackingReminder'); } // parse inputs - $resourcePath = "/v1/trackingReminderNotifications/skip"; + $resourcePath = "/v3/trackingReminders/delete"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -253,13 +131,9 @@ public function v1TrackingReminderNotificationsSkipPostWithHttpInfo($body, $acce } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } // query params if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); } // body params $_tempBody = null; @@ -273,6 +147,11 @@ public function v1TrackingReminderNotificationsSkipPostWithHttpInfo($body, $acce } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -281,18 +160,18 @@ public function v1TrackingReminderNotificationsSkipPostWithHttpInfo($body, $acce try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'POST', + 'DELETE', $queryParams, $httpBody, $headerParams, '\QuantiModo\Client\Model\CommonResponse', - '/v1/trackingReminderNotifications/skip' + '/v3/trackingReminders/delete' ); return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 204: $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); $e->setResponseObject($data); break; @@ -303,41 +182,59 @@ public function v1TrackingReminderNotificationsSkipPostWithHttpInfo($body, $acce } /** - * Operation v1TrackingReminderNotificationsSnoozePost - * - * Snooze a pending tracking reminder - * - * @param \QuantiModo\Client\Model\TrackingReminderNotificationSnooze $body Id of the pending reminder to be snoozed (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * Operation getTrackingReminderNotifications + * + * Get specific tracking reminder notifications + * + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param float $user_id User's id (optional) + * @param string $created_at When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param string $variable_category_name Limit results to a specific variable category (optional) + * @param string $reminder_time Example: (lt)2017-07-31 21:43:26 (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param bool $only_past Example: 1 (optional) + * @param bool $include_deleted Example: (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\CommonResponse + * @return \QuantiModo\Client\Model\GetTrackingReminderNotificationsResponse */ - public function v1TrackingReminderNotificationsSnoozePost($body, $access_token = null, $user_id = null) + public function getTrackingReminderNotifications($sort = null, $user_id = null, $created_at = null, $updated_at = null, $limit = '100', $offset = null, $variable_category_name = null, $reminder_time = null, $app_name = null, $client_id = null, $only_past = null, $include_deleted = null) { - list($response) = $this->v1TrackingReminderNotificationsSnoozePostWithHttpInfo($body, $access_token, $user_id); + list($response) = $this->getTrackingReminderNotificationsWithHttpInfo($sort, $user_id, $created_at, $updated_at, $limit, $offset, $variable_category_name, $reminder_time, $app_name, $client_id, $only_past, $include_deleted); return $response; } /** - * Operation v1TrackingReminderNotificationsSnoozePostWithHttpInfo - * - * Snooze a pending tracking reminder - * - * @param \QuantiModo\Client\Model\TrackingReminderNotificationSnooze $body Id of the pending reminder to be snoozed (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * Operation getTrackingReminderNotificationsWithHttpInfo + * + * Get specific tracking reminder notifications + * + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param float $user_id User's id (optional) + * @param string $created_at When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param string $variable_category_name Limit results to a specific variable category (optional) + * @param string $reminder_time Example: (lt)2017-07-31 21:43:26 (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param bool $only_past Example: 1 (optional) + * @param bool $include_deleted Example: (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\GetTrackingReminderNotificationsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function v1TrackingReminderNotificationsSnoozePostWithHttpInfo($body, $access_token = null, $user_id = null) + public function getTrackingReminderNotificationsWithHttpInfo($sort = null, $user_id = null, $created_at = null, $updated_at = null, $limit = '100', $offset = null, $variable_category_name = null, $reminder_time = null, $app_name = null, $client_id = null, $only_past = null, $include_deleted = null) { - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1TrackingReminderNotificationsSnoozePost'); + if (!is_null($offset) && ($offset < 0)) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling RemindersApi.getTrackingReminderNotifications, must be bigger than or equal to 0.'); } + // parse inputs - $resourcePath = "/v1/trackingReminderNotifications/snooze"; + $resourcePath = "/v3/trackingReminderNotifications"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -349,17 +246,52 @@ public function v1TrackingReminderNotificationsSnoozePostWithHttpInfo($body, $ac $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); + if ($sort !== null) { + $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); } // query params if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; + // query params + if ($created_at !== null) { + $queryParams['createdAt'] = $this->apiClient->getSerializer()->toQueryValue($created_at); + } + // query params + if ($updated_at !== null) { + $queryParams['updatedAt'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); + } + // query params + if ($variable_category_name !== null) { + $queryParams['variableCategoryName'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_name); + } + // query params + if ($reminder_time !== null) { + $queryParams['reminderTime'] = $this->apiClient->getSerializer()->toQueryValue($reminder_time); + } + // query params + if ($app_name !== null) { + $queryParams['appName'] = $this->apiClient->getSerializer()->toQueryValue($app_name); + } + // query params + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); + } + // query params + if ($only_past !== null) { + $queryParams['onlyPast'] = $this->apiClient->getSerializer()->toQueryValue($only_past); + } + // query params + if ($include_deleted !== null) { + $queryParams['includeDeleted'] = $this->apiClient->getSerializer()->toQueryValue($include_deleted); } // for model (json/xml) @@ -368,6 +300,11 @@ public function v1TrackingReminderNotificationsSnoozePostWithHttpInfo($body, $ac } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -376,19 +313,19 @@ public function v1TrackingReminderNotificationsSnoozePostWithHttpInfo($body, $ac try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'POST', + 'GET', $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\CommonResponse', - '/v1/trackingReminderNotifications/snooze' + '\QuantiModo\Client\Model\GetTrackingReminderNotificationsResponse', + '/v3/trackingReminderNotifications' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\GetTrackingReminderNotificationsResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\GetTrackingReminderNotificationsResponse', $e->getResponseHeaders()); $e->setResponseObject($data); break; } @@ -398,41 +335,55 @@ public function v1TrackingReminderNotificationsSnoozePostWithHttpInfo($body, $ac } /** - * Operation v1TrackingReminderNotificationsTrackPost + * Operation getTrackingReminders * - * Track a pending tracking reminder + * Get repeating tracking reminder settings * - * @param \QuantiModo\Client\Model\TrackingReminderNotificationTrack $body Id of the pending reminder to be tracked (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param float $user_id User's id (optional) + * @param string $variable_category_name Limit results to a specific variable category (optional) + * @param string $created_at When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param string $app_version Example: 2.1.1.0 (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\CommonResponse + * @return \QuantiModo\Client\Model\TrackingReminderArray */ - public function v1TrackingReminderNotificationsTrackPost($body, $access_token = null, $user_id = null) + public function getTrackingReminders($user_id = null, $variable_category_name = null, $created_at = null, $updated_at = null, $limit = '100', $offset = null, $sort = null, $app_name = null, $client_id = null, $app_version = null) { - list($response) = $this->v1TrackingReminderNotificationsTrackPostWithHttpInfo($body, $access_token, $user_id); + list($response) = $this->getTrackingRemindersWithHttpInfo($user_id, $variable_category_name, $created_at, $updated_at, $limit, $offset, $sort, $app_name, $client_id, $app_version); return $response; } /** - * Operation v1TrackingReminderNotificationsTrackPostWithHttpInfo + * Operation getTrackingRemindersWithHttpInfo * - * Track a pending tracking reminder + * Get repeating tracking reminder settings * - * @param \QuantiModo\Client\Model\TrackingReminderNotificationTrack $body Id of the pending reminder to be tracked (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param float $user_id User's id (optional) + * @param string $variable_category_name Limit results to a specific variable category (optional) + * @param string $created_at When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param string $app_version Example: 2.1.1.0 (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\TrackingReminderArray, HTTP status code, HTTP response headers (array of strings) */ - public function v1TrackingReminderNotificationsTrackPostWithHttpInfo($body, $access_token = null, $user_id = null) + public function getTrackingRemindersWithHttpInfo($user_id = null, $variable_category_name = null, $created_at = null, $updated_at = null, $limit = '100', $offset = null, $sort = null, $app_name = null, $client_id = null, $app_version = null) { - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1TrackingReminderNotificationsTrackPost'); + if (!is_null($offset) && ($offset < 0)) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling RemindersApi.getTrackingReminders, must be bigger than or equal to 0.'); } + // parse inputs - $resourcePath = "/v1/trackingReminderNotifications/track"; + $resourcePath = "/v3/trackingReminders"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -444,17 +395,44 @@ public function v1TrackingReminderNotificationsTrackPostWithHttpInfo($body, $acc $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); + if ($user_id !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); } // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + if ($variable_category_name !== null) { + $queryParams['variableCategoryName'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_name); } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; + // query params + if ($created_at !== null) { + $queryParams['createdAt'] = $this->apiClient->getSerializer()->toQueryValue($created_at); + } + // query params + if ($updated_at !== null) { + $queryParams['updatedAt'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); + } + // query params + if ($app_name !== null) { + $queryParams['appName'] = $this->apiClient->getSerializer()->toQueryValue($app_name); + } + // query params + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); + } + // query params + if ($app_version !== null) { + $queryParams['appVersion'] = $this->apiClient->getSerializer()->toQueryValue($app_version); } // for model (json/xml) @@ -463,6 +441,11 @@ public function v1TrackingReminderNotificationsTrackPostWithHttpInfo($body, $acc } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -471,19 +454,19 @@ public function v1TrackingReminderNotificationsTrackPostWithHttpInfo($body, $acc try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'POST', + 'GET', $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\CommonResponse', - '/v1/trackingReminderNotifications/track' + '\QuantiModo\Client\Model\TrackingReminderArray', + '/v3/trackingReminders' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\TrackingReminderArray', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\TrackingReminderArray', $e->getResponseHeaders()); $e->setResponseObject($data); break; } @@ -493,41 +476,43 @@ public function v1TrackingReminderNotificationsTrackPostWithHttpInfo($body, $acc } /** - * Operation v1TrackingRemindersDeletePost + * Operation postTrackingReminderNotifications * - * Delete tracking reminder + * Snooze, skip, or track a tracking reminder notification * - * @param \QuantiModo\Client\Model\TrackingReminderDelete $body Id of reminder to be deleted (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\TrackingReminderNotificationPost[] $body Id of the tracking reminder notification to be snoozed (required) + * @param float $user_id User's id (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return \QuantiModo\Client\Model\CommonResponse */ - public function v1TrackingRemindersDeletePost($body, $access_token = null, $user_id = null) + public function postTrackingReminderNotifications($body, $user_id = null, $app_name = null, $client_id = null) { - list($response) = $this->v1TrackingRemindersDeletePostWithHttpInfo($body, $access_token, $user_id); + list($response) = $this->postTrackingReminderNotificationsWithHttpInfo($body, $user_id, $app_name, $client_id); return $response; } /** - * Operation v1TrackingRemindersDeletePostWithHttpInfo + * Operation postTrackingReminderNotificationsWithHttpInfo * - * Delete tracking reminder + * Snooze, skip, or track a tracking reminder notification * - * @param \QuantiModo\Client\Model\TrackingReminderDelete $body Id of reminder to be deleted (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\TrackingReminderNotificationPost[] $body Id of the tracking reminder notification to be snoozed (required) + * @param float $user_id User's id (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) */ - public function v1TrackingRemindersDeletePostWithHttpInfo($body, $access_token = null, $user_id = null) + public function postTrackingReminderNotificationsWithHttpInfo($body, $user_id = null, $app_name = null, $client_id = null) { // verify the required parameter 'body' is set if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1TrackingRemindersDeletePost'); + throw new \InvalidArgumentException('Missing the required parameter $body when calling postTrackingReminderNotifications'); } // parse inputs - $resourcePath = "/v1/trackingReminders/delete"; + $resourcePath = "/v3/trackingReminderNotifications"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -539,12 +524,16 @@ public function v1TrackingRemindersDeletePostWithHttpInfo($body, $access_token = $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); + if ($user_id !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); } // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + if ($app_name !== null) { + $queryParams['appName'] = $this->apiClient->getSerializer()->toQueryValue($app_name); + } + // query params + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); } // body params $_tempBody = null; @@ -558,6 +547,11 @@ public function v1TrackingRemindersDeletePostWithHttpInfo($body, $access_token = } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -571,13 +565,13 @@ public function v1TrackingRemindersDeletePostWithHttpInfo($body, $access_token = $httpBody, $headerParams, '\QuantiModo\Client\Model\CommonResponse', - '/v1/trackingReminders/delete' + '/v3/trackingReminderNotifications' ); return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 201: $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); $e->setResponseObject($data); break; @@ -588,157 +582,37 @@ public function v1TrackingRemindersDeletePostWithHttpInfo($body, $access_token = } /** - * Operation v1TrackingRemindersGet - * - * Get repeating tracking reminder settings - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $variable_category_name Limit tracking reminders to a specific variable category (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse2005 - */ - public function v1TrackingRemindersGet($access_token = null, $user_id = null, $variable_category_name = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v1TrackingRemindersGetWithHttpInfo($access_token, $user_id, $variable_category_name, $created_at, $updated_at, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v1TrackingRemindersGetWithHttpInfo - * - * Get repeating tracking reminder settings - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $variable_category_name Limit tracking reminders to a specific variable category (optional) - * @param string $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. (optional) - * @param string $updated_at When the record was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional) - * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) - * @param string $sort Sort by given field. If the field is prefixed with '-', it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse2005, HTTP status code, HTTP response headers (array of strings) - */ - public function v1TrackingRemindersGetWithHttpInfo($access_token = null, $user_id = null, $variable_category_name = null, $created_at = null, $updated_at = null, $limit = null, $offset = null, $sort = null) - { - // parse inputs - $resourcePath = "/v1/trackingReminders"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($variable_category_name !== null) { - $queryParams['variableCategoryName'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_name); - } - // query params - if ($created_at !== null) { - $queryParams['createdAt'] = $this->apiClient->getSerializer()->toQueryValue($created_at); - } - // query params - if ($updated_at !== null) { - $queryParams['updatedAt'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\InlineResponse2005', - '/v1/trackingReminders' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse2005', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse2005', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1TrackingRemindersPost + * Operation postTrackingReminders * * Store a Tracking Reminder * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param \QuantiModo\Client\Model\TrackingReminder $body TrackingReminder that should be stored (optional) + * @param \QuantiModo\Client\Model\TrackingReminderArray $body TrackingReminder that should be stored (required) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\InlineResponse20011 + * @return \QuantiModo\Client\Model\PostTrackingRemindersResponse */ - public function v1TrackingRemindersPost($access_token = null, $user_id = null, $body = null) + public function postTrackingReminders($body) { - list($response) = $this->v1TrackingRemindersPostWithHttpInfo($access_token, $user_id, $body); + list($response) = $this->postTrackingRemindersWithHttpInfo($body); return $response; } /** - * Operation v1TrackingRemindersPostWithHttpInfo + * Operation postTrackingRemindersWithHttpInfo * * Store a Tracking Reminder * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param \QuantiModo\Client\Model\TrackingReminder $body TrackingReminder that should be stored (optional) + * @param \QuantiModo\Client\Model\TrackingReminderArray $body TrackingReminder that should be stored (required) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\InlineResponse20011, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\PostTrackingRemindersResponse, HTTP status code, HTTP response headers (array of strings) */ - public function v1TrackingRemindersPostWithHttpInfo($access_token = null, $user_id = null, $body = null) + public function postTrackingRemindersWithHttpInfo($body) { + // verify the required parameter 'body' is set + if ($body === null) { + throw new \InvalidArgumentException('Missing the required parameter $body when calling postTrackingReminders'); + } // parse inputs - $resourcePath = "/v1/trackingReminders"; + $resourcePath = "/v3/trackingReminders"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -749,14 +623,6 @@ public function v1TrackingRemindersPostWithHttpInfo($access_token = null, $user_ } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } // body params $_tempBody = null; if (isset($body)) { @@ -769,6 +635,11 @@ public function v1TrackingRemindersPostWithHttpInfo($access_token = null, $user_ } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -781,15 +652,15 @@ public function v1TrackingRemindersPostWithHttpInfo($access_token = null, $user_ $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\InlineResponse20011', - '/v1/trackingReminders' + '\QuantiModo\Client\Model\PostTrackingRemindersResponse', + '/v3/trackingReminders' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\InlineResponse20011', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\PostTrackingRemindersResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\InlineResponse20011', $e->getResponseHeaders()); + case 201: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\PostTrackingRemindersResponse', $e->getResponseHeaders()); $e->setResponseObject($data); break; } diff --git a/lib/Api/StudyApi.php b/lib/Api/StudyApi.php new file mode 100644 index 0000000..6b85d2b --- /dev/null +++ b/lib/Api/StudyApi.php @@ -0,0 +1,157 @@ +apiClient = $apiClient; + } + + /** + * Get API client + * + * @return \QuantiModo\Client\ApiClient get the API client + */ + public function getApiClient() + { + return $this->apiClient; + } + + /** + * Set the API client + * + * @param \QuantiModo\Client\ApiClient $apiClient set the API client + * + * @return StudyApi + */ + public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) + { + $this->apiClient = $apiClient; + return $this; + } + + /** + * Operation postStudyPublish + * + * Post Study Publish + * + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return \QuantiModo\Client\Model\PostStudyPublishResponse + */ + public function postStudyPublish() + { + list($response) = $this->postStudyPublishWithHttpInfo(); + return $response; + } + + /** + * Operation postStudyPublishWithHttpInfo + * + * Post Study Publish + * + * @throws \QuantiModo\Client\ApiException on non-2xx response + * @return array of \QuantiModo\Client\Model\PostStudyPublishResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function postStudyPublishWithHttpInfo() + { + // parse inputs + $resourcePath = "/v3/study/publish"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\QuantiModo\Client\Model\PostStudyPublishResponse', + '/v3/study/publish' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\PostStudyPublishResponse', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\PostStudyPublishResponse', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } +} diff --git a/lib/Api/TagsApi.php b/lib/Api/TagsApi.php deleted file mode 100644 index 53e4121..0000000 --- a/lib/Api/TagsApi.php +++ /dev/null @@ -1,276 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Api; - -use \QuantiModo\Client\ApiClient; -use \QuantiModo\Client\ApiException; -use \QuantiModo\Client\Configuration; -use \QuantiModo\Client\ObjectSerializer; - -/** - * TagsApi Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class TagsApi -{ - /** - * API Client - * - * @var \QuantiModo\Client\ApiClient instance of the ApiClient - */ - protected $apiClient; - - /** - * Constructor - * - * @param \QuantiModo\Client\ApiClient|null $apiClient The api client to use - */ - public function __construct(\QuantiModo\Client\ApiClient $apiClient = null) - { - if ($apiClient === null) { - $apiClient = new ApiClient(); - } - - $this->apiClient = $apiClient; - } - - /** - * Get API client - * - * @return \QuantiModo\Client\ApiClient get the API client - */ - public function getApiClient() - { - return $this->apiClient; - } - - /** - * Set the API client - * - * @param \QuantiModo\Client\ApiClient $apiClient set the API client - * - * @return TagsApi - */ - public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) - { - $this->apiClient = $apiClient; - return $this; - } - - /** - * Operation v1UserTagsDeletePost - * - * Delete user tag or ingredient - * - * @param int $tagged_variable_id This is the id of the variable being tagged with an ingredient or something. (required) - * @param int $tag_variable_id This is the id of the ingredient variable whose value is determined based on the value of the tagged variable. (required) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\CommonResponse - */ - public function v1UserTagsDeletePost($tagged_variable_id, $tag_variable_id) - { - list($response) = $this->v1UserTagsDeletePostWithHttpInfo($tagged_variable_id, $tag_variable_id); - return $response; - } - - /** - * Operation v1UserTagsDeletePostWithHttpInfo - * - * Delete user tag or ingredient - * - * @param int $tagged_variable_id This is the id of the variable being tagged with an ingredient or something. (required) - * @param int $tag_variable_id This is the id of the ingredient variable whose value is determined based on the value of the tagged variable. (required) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function v1UserTagsDeletePostWithHttpInfo($tagged_variable_id, $tag_variable_id) - { - // verify the required parameter 'tagged_variable_id' is set - if ($tagged_variable_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $tagged_variable_id when calling v1UserTagsDeletePost'); - } - // verify the required parameter 'tag_variable_id' is set - if ($tag_variable_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $tag_variable_id when calling v1UserTagsDeletePost'); - } - // parse inputs - $resourcePath = "/v1/userTags/delete"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($tagged_variable_id !== null) { - $queryParams['taggedVariableId'] = $this->apiClient->getSerializer()->toQueryValue($tagged_variable_id); - } - // query params - if ($tag_variable_id !== null) { - $queryParams['tagVariableId'] = $this->apiClient->getSerializer()->toQueryValue($tag_variable_id); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\CommonResponse', - '/v1/userTags/delete' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1UserTagsPost - * - * Post or update user tags or ingredients - * - * @param \QuantiModo\Client\Model\UserTag $body Contains the new user tag data (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\CommonResponse - */ - public function v1UserTagsPost($body, $access_token = null, $user_id = null) - { - list($response) = $this->v1UserTagsPostWithHttpInfo($body, $access_token, $user_id); - return $response; - } - - /** - * Operation v1UserTagsPostWithHttpInfo - * - * Post or update user tags or ingredients - * - * @param \QuantiModo\Client\Model\UserTag $body Contains the new user tag data (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function v1UserTagsPostWithHttpInfo($body, $access_token = null, $user_id = null) - { - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1UserTagsPost'); - } - // parse inputs - $resourcePath = "/v1/userTags"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\CommonResponse', - '/v1/userTags' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } -} diff --git a/lib/Api/UnitsApi.php b/lib/Api/UnitsApi.php index 00b5047..06d5e90 100644 --- a/lib/Api/UnitsApi.php +++ b/lib/Api/UnitsApi.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -88,31 +88,31 @@ public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) } /** - * Operation v1UnitCategoriesGet + * Operation getUnitCategories * * Get unit categories * * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\UnitCategory + * @return \QuantiModo\Client\Model\UnitCategory[] */ - public function v1UnitCategoriesGet() + public function getUnitCategories() { - list($response) = $this->v1UnitCategoriesGetWithHttpInfo(); + list($response) = $this->getUnitCategoriesWithHttpInfo(); return $response; } /** - * Operation v1UnitCategoriesGetWithHttpInfo + * Operation getUnitCategoriesWithHttpInfo * * Get unit categories * * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\UnitCategory, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\UnitCategory[], HTTP status code, HTTP response headers (array of strings) */ - public function v1UnitCategoriesGetWithHttpInfo() + public function getUnitCategoriesWithHttpInfo() { // parse inputs - $resourcePath = "/v1/unitCategories"; + $resourcePath = "/v3/unitCategories"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -123,121 +123,18 @@ public function v1UnitCategoriesGetWithHttpInfo() } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\UnitCategory', - '/v1/unitCategories' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\UnitCategory', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\UnitCategory', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1UnitsGet - * - * Get all available units - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $id Unit id (optional) - * @param string $unit_name Unit name (optional) - * @param string $abbreviated_unit_name Restrict the results to a specific unit by providing the unit abbreviation. (optional) - * @param string $unit_category_name Restrict the results to a specific unit category by providing the unit category name. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Unit[] - */ - public function v1UnitsGet($access_token = null, $user_id = null, $id = null, $unit_name = null, $abbreviated_unit_name = null, $unit_category_name = null) - { - list($response) = $this->v1UnitsGetWithHttpInfo($access_token, $user_id, $id, $unit_name, $abbreviated_unit_name, $unit_category_name); - return $response; - } - - /** - * Operation v1UnitsGetWithHttpInfo - * - * Get all available units - * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $id Unit id (optional) - * @param string $unit_name Unit name (optional) - * @param string $abbreviated_unit_name Restrict the results to a specific unit by providing the unit abbreviation. (optional) - * @param string $unit_category_name Restrict the results to a specific unit category by providing the unit category name. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Unit[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1UnitsGetWithHttpInfo($access_token = null, $user_id = null, $id = null, $unit_name = null, $abbreviated_unit_name = null, $unit_category_name = null) - { - // parse inputs - $resourcePath = "/v1/units"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($id !== null) { - $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); - } - // query params - if ($unit_name !== null) { - $queryParams['unitName'] = $this->apiClient->getSerializer()->toQueryValue($unit_name); - } - // query params - if ($abbreviated_unit_name !== null) { - $queryParams['abbreviatedUnitName'] = $this->apiClient->getSerializer()->toQueryValue($abbreviated_unit_name); - } - // query params - if ($unit_category_name !== null) { - $queryParams['unitCategoryName'] = $this->apiClient->getSerializer()->toQueryValue($unit_category_name); - } - // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -250,15 +147,15 @@ public function v1UnitsGetWithHttpInfo($access_token = null, $user_id = null, $i $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\Unit[]', - '/v1/units' + '\QuantiModo\Client\Model\UnitCategory[]', + '/v3/unitCategories' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Unit[]', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\UnitCategory[]', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Unit[]', $e->getResponseHeaders()); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\UnitCategory[]', $e->getResponseHeaders()); $e->setResponseObject($data); break; } @@ -268,43 +165,31 @@ public function v1UnitsGetWithHttpInfo($access_token = null, $user_id = null, $i } /** - * Operation v1UnitsVariableGet + * Operation getUnits * - * Units for Variable + * Get units * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $unit_name Name of Unit you want to retrieve (optional) - * @param string $abbreviated_unit_name Abbreviated Unit Name of the unit you want (optional) - * @param string $unit_category_name Name of the category you want units for (optional) - * @param string $variable Name of the variable you want units for (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return \QuantiModo\Client\Model\Unit[] */ - public function v1UnitsVariableGet($access_token = null, $user_id = null, $unit_name = null, $abbreviated_unit_name = null, $unit_category_name = null, $variable = null) + public function getUnits() { - list($response) = $this->v1UnitsVariableGetWithHttpInfo($access_token, $user_id, $unit_name, $abbreviated_unit_name, $unit_category_name, $variable); + list($response) = $this->getUnitsWithHttpInfo(); return $response; } /** - * Operation v1UnitsVariableGetWithHttpInfo + * Operation getUnitsWithHttpInfo * - * Units for Variable + * Get units * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $unit_name Name of Unit you want to retrieve (optional) - * @param string $abbreviated_unit_name Abbreviated Unit Name of the unit you want (optional) - * @param string $unit_category_name Name of the category you want units for (optional) - * @param string $variable Name of the variable you want units for (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return array of \QuantiModo\Client\Model\Unit[], HTTP status code, HTTP response headers (array of strings) */ - public function v1UnitsVariableGetWithHttpInfo($access_token = null, $user_id = null, $unit_name = null, $abbreviated_unit_name = null, $unit_category_name = null, $variable = null) + public function getUnitsWithHttpInfo() { // parse inputs - $resourcePath = "/v1/unitsVariable"; + $resourcePath = "/v3/units"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -315,37 +200,18 @@ public function v1UnitsVariableGetWithHttpInfo($access_token = null, $user_id = } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($unit_name !== null) { - $queryParams['unitName'] = $this->apiClient->getSerializer()->toQueryValue($unit_name); - } - // query params - if ($abbreviated_unit_name !== null) { - $queryParams['abbreviatedUnitName'] = $this->apiClient->getSerializer()->toQueryValue($abbreviated_unit_name); - } - // query params - if ($unit_category_name !== null) { - $queryParams['unitCategoryName'] = $this->apiClient->getSerializer()->toQueryValue($unit_category_name); - } - // query params - if ($variable !== null) { - $queryParams['variable'] = $this->apiClient->getSerializer()->toQueryValue($variable); - } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -359,7 +225,7 @@ public function v1UnitsVariableGetWithHttpInfo($access_token = null, $user_id = $httpBody, $headerParams, '\QuantiModo\Client\Model\Unit[]', - '/v1/unitsVariable' + '/v3/units' ); return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Unit[]', $httpHeader), $statusCode, $httpHeader]; diff --git a/lib/Api/UserApi.php b/lib/Api/UserApi.php index 62ed35a..1ca5252 100644 --- a/lib/Api/UserApi.php +++ b/lib/Api/UserApi.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -88,47 +88,55 @@ public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) } /** - * Operation v1OrganizationsOrganizationIdUsersPost + * Operation getUser * - * Get user tokens for existing users, create new users + * Get user info * - * @param int $organization_id Organization ID (required) - * @param \QuantiModo\Client\Model\UserTokenRequest $body Provides organization token and user ID (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param float $user_id User's id (optional) + * @param string $created_at When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $app_version Example: 2.1.1.0 (optional) + * @param int $client_user_id Example: 74802 (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\UserTokenSuccessfulResponse + * @return \QuantiModo\Client\Model\User */ - public function v1OrganizationsOrganizationIdUsersPost($organization_id, $body, $access_token = null, $user_id = null) + public function getUser($user_id = null, $created_at = null, $updated_at = null, $limit = '100', $offset = null, $sort = null, $client_id = null, $app_name = null, $app_version = null, $client_user_id = null) { - list($response) = $this->v1OrganizationsOrganizationIdUsersPostWithHttpInfo($organization_id, $body, $access_token, $user_id); + list($response) = $this->getUserWithHttpInfo($user_id, $created_at, $updated_at, $limit, $offset, $sort, $client_id, $app_name, $app_version, $client_user_id); return $response; } /** - * Operation v1OrganizationsOrganizationIdUsersPostWithHttpInfo + * Operation getUserWithHttpInfo * - * Get user tokens for existing users, create new users + * Get user info * - * @param int $organization_id Organization ID (required) - * @param \QuantiModo\Client\Model\UserTokenRequest $body Provides organization token and user ID (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param float $user_id User's id (optional) + * @param string $created_at When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $app_version Example: 2.1.1.0 (optional) + * @param int $client_user_id Example: 74802 (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\UserTokenSuccessfulResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\User, HTTP status code, HTTP response headers (array of strings) */ - public function v1OrganizationsOrganizationIdUsersPostWithHttpInfo($organization_id, $body, $access_token = null, $user_id = null) + public function getUserWithHttpInfo($user_id = null, $created_at = null, $updated_at = null, $limit = '100', $offset = null, $sort = null, $client_id = null, $app_name = null, $app_version = null, $client_user_id = null) { - // verify the required parameter 'organization_id' is set - if ($organization_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $organization_id when calling v1OrganizationsOrganizationIdUsersPost'); - } - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1OrganizationsOrganizationIdUsersPost'); + if (!is_null($offset) && ($offset < 0)) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling UserApi.getUser, must be bigger than or equal to 0.'); } + // parse inputs - $resourcePath = "/v1/organizations/{organizationId}/users"; + $resourcePath = "/v3/user"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -140,25 +148,44 @@ public function v1OrganizationsOrganizationIdUsersPostWithHttpInfo($organization $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); + if ($user_id !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); } // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + if ($created_at !== null) { + $queryParams['createdAt'] = $this->apiClient->getSerializer()->toQueryValue($created_at); } - // path params - if ($organization_id !== null) { - $resourcePath = str_replace( - "{" . "organizationId" . "}", - $this->apiClient->getSerializer()->toPathValue($organization_id), - $resourcePath - ); + // query params + if ($updated_at !== null) { + $queryParams['updatedAt'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; + // query params + if ($limit !== null) { + $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); + } + // query params + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); + } + // query params + if ($app_name !== null) { + $queryParams['appName'] = $this->apiClient->getSerializer()->toQueryValue($app_name); + } + // query params + if ($app_version !== null) { + $queryParams['appVersion'] = $this->apiClient->getSerializer()->toQueryValue($app_version); + } + // query params + if ($client_user_id !== null) { + $queryParams['clientUserId'] = $this->apiClient->getSerializer()->toQueryValue($client_user_id); } // for model (json/xml) @@ -167,44 +194,32 @@ public function v1OrganizationsOrganizationIdUsersPostWithHttpInfo($organization } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); } - // this endpoint requires API key authentication - $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); - if (strlen($apiKey) !== 0) { - $headerParams['api_key'] = $apiKey; - } // make the API Call try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'POST', + 'GET', $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\UserTokenSuccessfulResponse', - '/v1/organizations/{organizationId}/users' + '\QuantiModo\Client\Model\User', + '/v3/user' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\UserTokenSuccessfulResponse', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\User', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\UserTokenSuccessfulResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - case 201: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\UserTokenSuccessfulResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - case 400: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\UserTokenFailedResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - case 403: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\UserTokenFailedResponse', $e->getResponseHeaders()); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\User', $e->getResponseHeaders()); $e->setResponseObject($data); break; } @@ -214,31 +229,35 @@ public function v1OrganizationsOrganizationIdUsersPostWithHttpInfo($organization } /** - * Operation v1UserMeGet + * Operation postUserSettings * - * Get all available units for variableGet authenticated user + * Post UserSettings * + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\User + * @return \QuantiModo\Client\Model\PostUserSettingsResponse */ - public function v1UserMeGet() + public function postUserSettings($app_name = null, $client_id = null) { - list($response) = $this->v1UserMeGetWithHttpInfo(); + list($response) = $this->postUserSettingsWithHttpInfo($app_name, $client_id); return $response; } /** - * Operation v1UserMeGetWithHttpInfo + * Operation postUserSettingsWithHttpInfo * - * Get all available units for variableGet authenticated user + * Post UserSettings * + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\User, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\PostUserSettingsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function v1UserMeGetWithHttpInfo() + public function postUserSettingsWithHttpInfo($app_name = null, $client_id = null) { // parse inputs - $resourcePath = "/v1/user/me"; + $resourcePath = "/v3/userSettings"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -249,34 +268,38 @@ public function v1UserMeGetWithHttpInfo() } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - + // query params + if ($app_name !== null) { + $queryParams['appName'] = $this->apiClient->getSerializer()->toQueryValue($app_name); + } + // query params + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); + } + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } // make the API Call try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'GET', + 'POST', $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\User', - '/v1/user/me' + '\QuantiModo\Client\Model\PostUserSettingsResponse', + '/v3/userSettings' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\User', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\PostUserSettingsResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\User', $e->getResponseHeaders()); + case 201: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\PostUserSettingsResponse', $e->getResponseHeaders()); $e->setResponseObject($data); break; } diff --git a/lib/Api/VariablesApi.php b/lib/Api/VariablesApi.php index 81bb7d4..e20a653 100644 --- a/lib/Api/VariablesApi.php +++ b/lib/Api/VariablesApi.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -88,211 +88,43 @@ public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) } /** - * Operation v1PublicVariablesGet + * Operation deleteUserTag * - * Get public variables + * Delete user tag or ingredient * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $id Common variable id (optional) - * @param int $user_id2 User id (optional) - * @param string $category Filter data by category (optional) - * @param string $name Original name of the variable (supports exact name match only) (optional) - * @param string $last_updated Filter by the last time any of the properties of the variable were changed. Uses UTC format \"YYYY-MM-DDThh:mm:ss\" (optional) - * @param string $source The name of the data source that created the variable (supports exact name match only). So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here (optional) - * @param string $latest_measurement_time Filter variables based on the last time a measurement for them was created or updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" (optional) - * @param string $number_of_raw_measurements Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. (optional) - * @param string $last_source Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here. (supports exact name match only) (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) + * @param int $tagged_variable_id This is the id of the variable being tagged with an ingredient or something. (required) + * @param int $tag_variable_id This is the id of the ingredient variable whose value is determined based on the value of the tagged variable. (required) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Variable + * @return \QuantiModo\Client\Model\CommonResponse */ - public function v1PublicVariablesGet($access_token = null, $user_id = null, $id = null, $user_id2 = null, $category = null, $name = null, $last_updated = null, $source = null, $latest_measurement_time = null, $number_of_raw_measurements = null, $last_source = null, $limit = null, $offset = null, $sort = null) + public function deleteUserTag($tagged_variable_id, $tag_variable_id) { - list($response) = $this->v1PublicVariablesGetWithHttpInfo($access_token, $user_id, $id, $user_id2, $category, $name, $last_updated, $source, $latest_measurement_time, $number_of_raw_measurements, $last_source, $limit, $offset, $sort); + list($response) = $this->deleteUserTagWithHttpInfo($tagged_variable_id, $tag_variable_id); return $response; } /** - * Operation v1PublicVariablesGetWithHttpInfo + * Operation deleteUserTagWithHttpInfo * - * Get public variables + * Delete user tag or ingredient * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $id Common variable id (optional) - * @param int $user_id2 User id (optional) - * @param string $category Filter data by category (optional) - * @param string $name Original name of the variable (supports exact name match only) (optional) - * @param string $last_updated Filter by the last time any of the properties of the variable were changed. Uses UTC format \"YYYY-MM-DDThh:mm:ss\" (optional) - * @param string $source The name of the data source that created the variable (supports exact name match only). So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here (optional) - * @param string $latest_measurement_time Filter variables based on the last time a measurement for them was created or updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" (optional) - * @param string $number_of_raw_measurements Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. (optional) - * @param string $last_source Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here. (supports exact name match only) (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) + * @param int $tagged_variable_id This is the id of the variable being tagged with an ingredient or something. (required) + * @param int $tag_variable_id This is the id of the ingredient variable whose value is determined based on the value of the tagged variable. (required) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Variable, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) */ - public function v1PublicVariablesGetWithHttpInfo($access_token = null, $user_id = null, $id = null, $user_id2 = null, $category = null, $name = null, $last_updated = null, $source = null, $latest_measurement_time = null, $number_of_raw_measurements = null, $last_source = null, $limit = null, $offset = null, $sort = null) + public function deleteUserTagWithHttpInfo($tagged_variable_id, $tag_variable_id) { - // parse inputs - $resourcePath = "/v1/public/variables"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; + // verify the required parameter 'tagged_variable_id' is set + if ($tagged_variable_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $tagged_variable_id when calling deleteUserTag'); } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($id !== null) { - $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); - } - // query params - if ($user_id2 !== null) { - $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id2); - } - // query params - if ($category !== null) { - $queryParams['category'] = $this->apiClient->getSerializer()->toQueryValue($category); - } - // query params - if ($name !== null) { - $queryParams['name'] = $this->apiClient->getSerializer()->toQueryValue($name); - } - // query params - if ($last_updated !== null) { - $queryParams['lastUpdated'] = $this->apiClient->getSerializer()->toQueryValue($last_updated); - } - // query params - if ($source !== null) { - $queryParams['source'] = $this->apiClient->getSerializer()->toQueryValue($source); - } - // query params - if ($latest_measurement_time !== null) { - $queryParams['latestMeasurementTime'] = $this->apiClient->getSerializer()->toQueryValue($latest_measurement_time); - } - // query params - if ($number_of_raw_measurements !== null) { - $queryParams['numberOfRawMeasurements'] = $this->apiClient->getSerializer()->toQueryValue($number_of_raw_measurements); - } - // query params - if ($last_source !== null) { - $queryParams['lastSource'] = $this->apiClient->getSerializer()->toQueryValue($last_source); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\Variable', - '/v1/public/variables' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Variable', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Variable', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1PublicVariablesSearchSearchGet - * - * Get top 5 PUBLIC variables with the most correlations - * - * @param string $search Search query can be some fraction of a variable name. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $variable_category_name Filter variables by category name. The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. (optional) - * @param string $source Specify a data source name to only return variables from a specific data source. (optional) - * @param string $effect_or_cause Indicate if you only want variables that have user correlations. Possible values are effect and cause. (optional) - * @param string $public_effect_or_cause Indicate if you only want variables that have aggregated correlations. Possible values are effect and cause. (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Variable - */ - public function v1PublicVariablesSearchSearchGet($search, $access_token = null, $user_id = null, $variable_category_name = null, $source = null, $effect_or_cause = null, $public_effect_or_cause = null, $limit = null, $offset = null, $sort = null) - { - list($response) = $this->v1PublicVariablesSearchSearchGetWithHttpInfo($search, $access_token, $user_id, $variable_category_name, $source, $effect_or_cause, $public_effect_or_cause, $limit, $offset, $sort); - return $response; - } - - /** - * Operation v1PublicVariablesSearchSearchGetWithHttpInfo - * - * Get top 5 PUBLIC variables with the most correlations - * - * @param string $search Search query can be some fraction of a variable name. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $variable_category_name Filter variables by category name. The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. (optional) - * @param string $source Specify a data source name to only return variables from a specific data source. (optional) - * @param string $effect_or_cause Indicate if you only want variables that have user correlations. Possible values are effect and cause. (optional) - * @param string $public_effect_or_cause Indicate if you only want variables that have aggregated correlations. Possible values are effect and cause. (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Variable, HTTP status code, HTTP response headers (array of strings) - */ - public function v1PublicVariablesSearchSearchGetWithHttpInfo($search, $access_token = null, $user_id = null, $variable_category_name = null, $source = null, $effect_or_cause = null, $public_effect_or_cause = null, $limit = null, $offset = null, $sort = null) - { - // verify the required parameter 'search' is set - if ($search === null) { - throw new \InvalidArgumentException('Missing the required parameter $search when calling v1PublicVariablesSearchSearchGet'); + // verify the required parameter 'tag_variable_id' is set + if ($tag_variable_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $tag_variable_id when calling deleteUserTag'); } // parse inputs - $resourcePath = "/v1/public/variables/search/{search}"; + $resourcePath = "/v3/userTags/delete"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -304,56 +136,25 @@ public function v1PublicVariablesSearchSearchGetWithHttpInfo($search, $access_to $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($variable_category_name !== null) { - $queryParams['variableCategoryName'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_name); - } - // query params - if ($source !== null) { - $queryParams['source'] = $this->apiClient->getSerializer()->toQueryValue($source); + if ($tagged_variable_id !== null) { + $queryParams['taggedVariableId'] = $this->apiClient->getSerializer()->toQueryValue($tagged_variable_id); } // query params - if ($effect_or_cause !== null) { - $queryParams['effectOrCause'] = $this->apiClient->getSerializer()->toQueryValue($effect_or_cause); + if ($tag_variable_id !== null) { + $queryParams['tagVariableId'] = $this->apiClient->getSerializer()->toQueryValue($tag_variable_id); } - // query params - if ($public_effect_or_cause !== null) { - $queryParams['publicEffectOrCause'] = $this->apiClient->getSerializer()->toQueryValue($public_effect_or_cause); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - // path params - if ($search !== null) { - $resourcePath = str_replace( - "{" . "search" . "}", - $this->apiClient->getSerializer()->toPathValue($search), - $resourcePath - ); - } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -362,19 +163,19 @@ public function v1PublicVariablesSearchSearchGetWithHttpInfo($search, $access_to try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'GET', + 'DELETE', $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\Variable', - '/v1/public/variables/search/{search}' + '\QuantiModo\Client\Model\CommonResponse', + '/v3/userTags/delete' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Variable', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Variable', $e->getResponseHeaders()); + case 204: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); $e->setResponseObject($data); break; } @@ -384,7 +185,7 @@ public function v1PublicVariablesSearchSearchGetWithHttpInfo($search, $access_to } /** - * Operation v1UserVariablesDeletePost + * Operation deleteUserVariable * * Delete All Measurements For Variable * @@ -392,14 +193,14 @@ public function v1PublicVariablesSearchSearchGetWithHttpInfo($search, $access_to * @throws \QuantiModo\Client\ApiException on non-2xx response * @return void */ - public function v1UserVariablesDeletePost($variable_id) + public function deleteUserVariable($variable_id) { - list($response) = $this->v1UserVariablesDeletePostWithHttpInfo($variable_id); + list($response) = $this->deleteUserVariableWithHttpInfo($variable_id); return $response; } /** - * Operation v1UserVariablesDeletePostWithHttpInfo + * Operation deleteUserVariableWithHttpInfo * * Delete All Measurements For Variable * @@ -407,14 +208,14 @@ public function v1UserVariablesDeletePost($variable_id) * @throws \QuantiModo\Client\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function v1UserVariablesDeletePostWithHttpInfo($variable_id) + public function deleteUserVariableWithHttpInfo($variable_id) { // verify the required parameter 'variable_id' is set if ($variable_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $variable_id when calling v1UserVariablesDeletePost'); + throw new \InvalidArgumentException('Missing the required parameter $variable_id when calling deleteUserVariable'); } // parse inputs - $resourcePath = "/v1/userVariables/delete"; + $resourcePath = "/v3/userVariables/delete"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -437,6 +238,11 @@ public function v1UserVariablesDeletePostWithHttpInfo($variable_id) } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -445,12 +251,12 @@ public function v1UserVariablesDeletePostWithHttpInfo($variable_id) try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'POST', + 'DELETE', $queryParams, $httpBody, $headerParams, null, - '/v1/userVariables/delete' + '/v3/userVariables/delete' ); return [null, $statusCode, $httpHeader]; @@ -463,37 +269,79 @@ public function v1UserVariablesDeletePostWithHttpInfo($variable_id) } /** - * Operation v1UserVariablesPost + * Operation getCommonVariables * - * Update User Settings for a Variable + * Get common variables with aggregated instead of user-specific data * - * @param \QuantiModo\Client\Model\UserVariables $user_variables Variable user settings data (required) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param float $user_id User's id (optional) + * @param string $variable_category_name Limit results to a specific variable category (optional) + * @param string $name Name of the variable. To get results matching a substring, add % as a wildcard as the first and/or last character of a query string parameter. In order to get variables that contain `Mood`, the following query should be used: ?variableName=%Mood% (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $source_name ID of the source you want measurements for (supports exact name match only) (optional) + * @param string $earliest_measurement_time Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $latest_measurement_time Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $number_of_raw_measurements Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. (optional) + * @param string $last_source_name Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $id Common variable id (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param string $effect_or_cause Example: (optional) + * @param string $public_effect_or_cause Example: (optional) + * @param bool $exact_match Example: (optional) + * @param bool $manual_tracking Example: (optional) + * @param int $variable_category_id Example: 13 (optional) + * @param bool $include_private Example: (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param string $search_phrase Example: %Body Fat% (optional) + * @param string $synonyms Example: %McDonalds hotcake% (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return void + * @return \QuantiModo\Client\Model\CommonVariableArray */ - public function v1UserVariablesPost($user_variables) + public function getCommonVariables($offset = null, $user_id = null, $variable_category_name = null, $name = null, $updated_at = null, $source_name = null, $earliest_measurement_time = null, $latest_measurement_time = null, $number_of_raw_measurements = null, $last_source_name = null, $limit = '100', $id = null, $sort = null, $effect_or_cause = null, $public_effect_or_cause = null, $exact_match = null, $manual_tracking = null, $variable_category_id = null, $include_private = null, $client_id = null, $search_phrase = null, $synonyms = null) { - list($response) = $this->v1UserVariablesPostWithHttpInfo($user_variables); + list($response) = $this->getCommonVariablesWithHttpInfo($offset, $user_id, $variable_category_name, $name, $updated_at, $source_name, $earliest_measurement_time, $latest_measurement_time, $number_of_raw_measurements, $last_source_name, $limit, $id, $sort, $effect_or_cause, $public_effect_or_cause, $exact_match, $manual_tracking, $variable_category_id, $include_private, $client_id, $search_phrase, $synonyms); return $response; } /** - * Operation v1UserVariablesPostWithHttpInfo + * Operation getCommonVariablesWithHttpInfo * - * Update User Settings for a Variable + * Get common variables with aggregated instead of user-specific data * - * @param \QuantiModo\Client\Model\UserVariables $user_variables Variable user settings data (required) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param float $user_id User's id (optional) + * @param string $variable_category_name Limit results to a specific variable category (optional) + * @param string $name Name of the variable. To get results matching a substring, add % as a wildcard as the first and/or last character of a query string parameter. In order to get variables that contain `Mood`, the following query should be used: ?variableName=%Mood% (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $source_name ID of the source you want measurements for (supports exact name match only) (optional) + * @param string $earliest_measurement_time Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $latest_measurement_time Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $number_of_raw_measurements Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. (optional) + * @param string $last_source_name Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $id Common variable id (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param string $effect_or_cause Example: (optional) + * @param string $public_effect_or_cause Example: (optional) + * @param bool $exact_match Example: (optional) + * @param bool $manual_tracking Example: (optional) + * @param int $variable_category_id Example: 13 (optional) + * @param bool $include_private Example: (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param string $search_phrase Example: %Body Fat% (optional) + * @param string $synonyms Example: %McDonalds hotcake% (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\CommonVariableArray, HTTP status code, HTTP response headers (array of strings) */ - public function v1UserVariablesPostWithHttpInfo($user_variables) + public function getCommonVariablesWithHttpInfo($offset = null, $user_id = null, $variable_category_name = null, $name = null, $updated_at = null, $source_name = null, $earliest_measurement_time = null, $latest_measurement_time = null, $number_of_raw_measurements = null, $last_source_name = null, $limit = '100', $id = null, $sort = null, $effect_or_cause = null, $public_effect_or_cause = null, $exact_match = null, $manual_tracking = null, $variable_category_id = null, $include_private = null, $client_id = null, $search_phrase = null, $synonyms = null) { - // verify the required parameter 'user_variables' is set - if ($user_variables === null) { - throw new \InvalidArgumentException('Missing the required parameter $user_variables when calling v1UserVariablesPost'); + if (!is_null($offset) && ($offset < 0)) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling VariablesApi.getCommonVariables, must be bigger than or equal to 0.'); } + // parse inputs - $resourcePath = "/v1/userVariables"; + $resourcePath = "/v3/public/variables"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -504,10 +352,93 @@ public function v1UserVariablesPostWithHttpInfo($user_variables) } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // body params - $_tempBody = null; - if (isset($user_variables)) { - $_tempBody = $user_variables; + // query params + if ($offset !== null) { + $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); + } + // query params + if ($user_id !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + } + // query params + if ($variable_category_name !== null) { + $queryParams['variableCategoryName'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_name); + } + // query params + if ($name !== null) { + $queryParams['name'] = $this->apiClient->getSerializer()->toQueryValue($name); + } + // query params + if ($updated_at !== null) { + $queryParams['updatedAt'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); + } + // query params + if ($source_name !== null) { + $queryParams['sourceName'] = $this->apiClient->getSerializer()->toQueryValue($source_name); + } + // query params + if ($earliest_measurement_time !== null) { + $queryParams['earliestMeasurementTime'] = $this->apiClient->getSerializer()->toQueryValue($earliest_measurement_time); + } + // query params + if ($latest_measurement_time !== null) { + $queryParams['latestMeasurementTime'] = $this->apiClient->getSerializer()->toQueryValue($latest_measurement_time); + } + // query params + if ($number_of_raw_measurements !== null) { + $queryParams['numberOfRawMeasurements'] = $this->apiClient->getSerializer()->toQueryValue($number_of_raw_measurements); + } + // query params + if ($last_source_name !== null) { + $queryParams['lastSourceName'] = $this->apiClient->getSerializer()->toQueryValue($last_source_name); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); + } + // query params + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); + } + // query params + if ($effect_or_cause !== null) { + $queryParams['effectOrCause'] = $this->apiClient->getSerializer()->toQueryValue($effect_or_cause); + } + // query params + if ($public_effect_or_cause !== null) { + $queryParams['publicEffectOrCause'] = $this->apiClient->getSerializer()->toQueryValue($public_effect_or_cause); + } + // query params + if ($exact_match !== null) { + $queryParams['exactMatch'] = $this->apiClient->getSerializer()->toQueryValue($exact_match); + } + // query params + if ($manual_tracking !== null) { + $queryParams['manualTracking'] = $this->apiClient->getSerializer()->toQueryValue($manual_tracking); + } + // query params + if ($variable_category_id !== null) { + $queryParams['variableCategoryId'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_id); + } + // query params + if ($include_private !== null) { + $queryParams['includePrivate'] = $this->apiClient->getSerializer()->toQueryValue($include_private); + } + // query params + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); + } + // query params + if ($search_phrase !== null) { + $queryParams['searchPhrase'] = $this->apiClient->getSerializer()->toQueryValue($search_phrase); + } + // query params + if ($synonyms !== null) { + $queryParams['synonyms'] = $this->apiClient->getSerializer()->toQueryValue($synonyms); } // for model (json/xml) @@ -516,6 +447,11 @@ public function v1UserVariablesPostWithHttpInfo($user_variables) } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -524,17 +460,21 @@ public function v1UserVariablesPostWithHttpInfo($user_variables) try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'POST', + 'GET', $queryParams, $httpBody, $headerParams, - null, - '/v1/userVariables' + '\QuantiModo\Client\Model\CommonVariableArray', + '/v3/public/variables' ); - return [null, $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonVariableArray', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonVariableArray', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; } throw $e; @@ -542,37 +482,71 @@ public function v1UserVariablesPostWithHttpInfo($user_variables) } /** - * Operation v1UserVariablesResetPost + * Operation getUserVariables * - * Reset user settings for a variable to defaults + * Get variables along with related user-specific analysis settings and statistics * - * @param \QuantiModo\Client\Model\UserVariableDelete $variable_id Id of the variable that should be reset (required) + * @param bool $include_charts Return highcharts configs that can be used if you have highcharts.js included on the page. This only works if the id or name query parameter is also provided. (optional) + * @param string $number_of_raw_measurements Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. (optional) + * @param float $user_id User's id (optional) + * @param string $variable_category_name Limit results to a specific variable category (optional) + * @param string $name Name of the variable. To get results matching a substring, add % as a wildcard as the first and/or last character of a query string parameter. In order to get variables that contain `Mood`, the following query should be used: ?variableName=%Mood% (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $source_name ID of the source you want measurements for (supports exact name match only) (optional) + * @param string $earliest_measurement_time Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $latest_measurement_time Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param int $id Common variable id (optional) + * @param string $last_source_name Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param bool $include_public Example: true (optional) + * @param bool $manual_tracking Example: (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return void + * @return \QuantiModo\Client\Model\UserVariable[] */ - public function v1UserVariablesResetPost($variable_id) + public function getUserVariables($include_charts = null, $number_of_raw_measurements = null, $user_id = null, $variable_category_name = null, $name = null, $updated_at = null, $source_name = null, $earliest_measurement_time = null, $latest_measurement_time = null, $id = null, $last_source_name = null, $limit = '100', $offset = null, $sort = null, $include_public = null, $manual_tracking = null, $app_name = null, $client_id = null) { - list($response) = $this->v1UserVariablesResetPostWithHttpInfo($variable_id); + list($response) = $this->getUserVariablesWithHttpInfo($include_charts, $number_of_raw_measurements, $user_id, $variable_category_name, $name, $updated_at, $source_name, $earliest_measurement_time, $latest_measurement_time, $id, $last_source_name, $limit, $offset, $sort, $include_public, $manual_tracking, $app_name, $client_id); return $response; } /** - * Operation v1UserVariablesResetPostWithHttpInfo + * Operation getUserVariablesWithHttpInfo * - * Reset user settings for a variable to defaults + * Get variables along with related user-specific analysis settings and statistics * - * @param \QuantiModo\Client\Model\UserVariableDelete $variable_id Id of the variable that should be reset (required) + * @param bool $include_charts Return highcharts configs that can be used if you have highcharts.js included on the page. This only works if the id or name query parameter is also provided. (optional) + * @param string $number_of_raw_measurements Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. (optional) + * @param float $user_id User's id (optional) + * @param string $variable_category_name Limit results to a specific variable category (optional) + * @param string $name Name of the variable. To get results matching a substring, add % as a wildcard as the first and/or last character of a query string parameter. In order to get variables that contain `Mood`, the following query should be used: ?variableName=%Mood% (optional) + * @param string $updated_at When the record was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $source_name ID of the source you want measurements for (supports exact name match only) (optional) + * @param string $earliest_measurement_time Excluded records with measurement times earlier than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param string $latest_measurement_time Excluded records with measurement times later than this value. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. (optional) + * @param int $id Common variable id (optional) + * @param string $last_source_name Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here (optional) + * @param int $limit The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. (optional, default to 100) + * @param int $offset OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. (optional) + * @param string $sort Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. (optional) + * @param bool $include_public Example: true (optional) + * @param bool $manual_tracking Example: (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param string $client_id Example: oauth_test_client (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\UserVariable[], HTTP status code, HTTP response headers (array of strings) */ - public function v1UserVariablesResetPostWithHttpInfo($variable_id) + public function getUserVariablesWithHttpInfo($include_charts = null, $number_of_raw_measurements = null, $user_id = null, $variable_category_name = null, $name = null, $updated_at = null, $source_name = null, $earliest_measurement_time = null, $latest_measurement_time = null, $id = null, $last_source_name = null, $limit = '100', $offset = null, $sort = null, $include_public = null, $manual_tracking = null, $app_name = null, $client_id = null) { - // verify the required parameter 'variable_id' is set - if ($variable_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $variable_id when calling v1UserVariablesResetPost'); + if (!is_null($offset) && ($offset < 0)) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling VariablesApi.getUserVariables, must be bigger than or equal to 0.'); } + // parse inputs - $resourcePath = "/v1/userVariables/reset"; + $resourcePath = "/v3/userVariables"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -583,86 +557,90 @@ public function v1UserVariablesResetPostWithHttpInfo($variable_id) } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // body params - $_tempBody = null; - if (isset($variable_id)) { - $_tempBody = $variable_id; + // query params + if ($include_charts !== null) { + $queryParams['includeCharts'] = $this->apiClient->getSerializer()->toQueryValue($include_charts); } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) + // query params + if ($number_of_raw_measurements !== null) { + $queryParams['numberOfRawMeasurements'] = $this->apiClient->getSerializer()->toQueryValue($number_of_raw_measurements); } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + // query params + if ($user_id !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - null, - '/v1/userVariables/reset' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - } - - throw $e; + // query params + if ($variable_category_name !== null) { + $queryParams['variableCategoryName'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_name); } - } - - /** - * Operation v1VariableCategoriesGet - * - * Variable categories - * - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\VariableCategory[] - */ - public function v1VariableCategoriesGet() - { - list($response) = $this->v1VariableCategoriesGetWithHttpInfo(); - return $response; - } - - /** - * Operation v1VariableCategoriesGetWithHttpInfo - * - * Variable categories - * - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\VariableCategory[], HTTP status code, HTTP response headers (array of strings) - */ - public function v1VariableCategoriesGetWithHttpInfo() - { - // parse inputs - $resourcePath = "/v1/variableCategories"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; + // query params + if ($name !== null) { + $queryParams['name'] = $this->apiClient->getSerializer()->toQueryValue($name); + } + // query params + if ($updated_at !== null) { + $queryParams['updatedAt'] = $this->apiClient->getSerializer()->toQueryValue($updated_at); + } + // query params + if ($source_name !== null) { + $queryParams['sourceName'] = $this->apiClient->getSerializer()->toQueryValue($source_name); + } + // query params + if ($earliest_measurement_time !== null) { + $queryParams['earliestMeasurementTime'] = $this->apiClient->getSerializer()->toQueryValue($earliest_measurement_time); + } + // query params + if ($latest_measurement_time !== null) { + $queryParams['latestMeasurementTime'] = $this->apiClient->getSerializer()->toQueryValue($latest_measurement_time); + } + // query params + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + // query params + if ($last_source_name !== null) { + $queryParams['lastSourceName'] = $this->apiClient->getSerializer()->toQueryValue($last_source_name); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); + } + // query params + if ($include_public !== null) { + $queryParams['includePublic'] = $this->apiClient->getSerializer()->toQueryValue($include_public); + } + // query params + if ($manual_tracking !== null) { + $queryParams['manualTracking'] = $this->apiClient->getSerializer()->toQueryValue($manual_tracking); + } + // query params + if ($app_name !== null) { + $queryParams['appName'] = $this->apiClient->getSerializer()->toQueryValue($app_name); + } + // query params + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -675,15 +653,15 @@ public function v1VariableCategoriesGetWithHttpInfo() $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\VariableCategory[]', - '/v1/variableCategories' + '\QuantiModo\Client\Model\UserVariable[]', + '/v3/userVariables' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\VariableCategory[]', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\UserVariable[]', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\VariableCategory[]', $e->getResponseHeaders()); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\UserVariable[]', $e->getResponseHeaders()); $e->setResponseObject($data); break; } @@ -693,59 +671,31 @@ public function v1VariableCategoriesGetWithHttpInfo() } /** - * Operation v1VariablesGet + * Operation getVariableCategories * - * Get variables with user's settings + * Variable categories * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $id Common variable id (optional) - * @param int $user_id2 User id (optional) - * @param string $category Filter data by category (optional) - * @param string $name Original name of the variable (supports exact name match only) (optional) - * @param string $last_updated Filter by the last time any of the properties of the variable were changed. Uses UTC format \"YYYY-MM-DDThh:mm:ss\" (optional) - * @param string $source The name of the data source that created the variable (supports exact name match only). So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here (optional) - * @param string $latest_measurement_time Filter variables based on the last time a measurement for them was created or updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" (optional) - * @param string $number_of_raw_measurements Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. (optional) - * @param string $last_source Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here. (supports exact name match only) (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Variable + * @return \QuantiModo\Client\Model\VariableCategory[] */ - public function v1VariablesGet($access_token = null, $user_id = null, $id = null, $user_id2 = null, $category = null, $name = null, $last_updated = null, $source = null, $latest_measurement_time = null, $number_of_raw_measurements = null, $last_source = null, $limit = null, $offset = null, $sort = null) + public function getVariableCategories() { - list($response) = $this->v1VariablesGetWithHttpInfo($access_token, $user_id, $id, $user_id2, $category, $name, $last_updated, $source, $latest_measurement_time, $number_of_raw_measurements, $last_source, $limit, $offset, $sort); + list($response) = $this->getVariableCategoriesWithHttpInfo(); return $response; } /** - * Operation v1VariablesGetWithHttpInfo + * Operation getVariableCategoriesWithHttpInfo * - * Get variables with user's settings + * Variable categories * - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param int $id Common variable id (optional) - * @param int $user_id2 User id (optional) - * @param string $category Filter data by category (optional) - * @param string $name Original name of the variable (supports exact name match only) (optional) - * @param string $last_updated Filter by the last time any of the properties of the variable were changed. Uses UTC format \"YYYY-MM-DDThh:mm:ss\" (optional) - * @param string $source The name of the data source that created the variable (supports exact name match only). So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here (optional) - * @param string $latest_measurement_time Filter variables based on the last time a measurement for them was created or updated in the UTC format \"YYYY-MM-DDThh:mm:ss\" (optional) - * @param string $number_of_raw_measurements Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. (optional) - * @param string $last_source Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here. (supports exact name match only) (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) - * @param int $sort Sort by given field. If the field is prefixed with `-, it will sort in descending order. (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Variable, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\VariableCategory[], HTTP status code, HTTP response headers (array of strings) */ - public function v1VariablesGetWithHttpInfo($access_token = null, $user_id = null, $id = null, $user_id2 = null, $category = null, $name = null, $last_updated = null, $source = null, $latest_measurement_time = null, $number_of_raw_measurements = null, $last_source = null, $limit = null, $offset = null, $sort = null) + public function getVariableCategoriesWithHttpInfo() { // parse inputs - $resourcePath = "/v1/variables"; + $resourcePath = "/v3/variableCategories"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -756,77 +706,22 @@ public function v1VariablesGetWithHttpInfo($access_token = null, $user_id = null } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // query params - if ($id !== null) { - $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); - } - // query params - if ($user_id2 !== null) { - $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id2); - } - // query params - if ($category !== null) { - $queryParams['category'] = $this->apiClient->getSerializer()->toQueryValue($category); - } - // query params - if ($name !== null) { - $queryParams['name'] = $this->apiClient->getSerializer()->toQueryValue($name); - } - // query params - if ($last_updated !== null) { - $queryParams['lastUpdated'] = $this->apiClient->getSerializer()->toQueryValue($last_updated); - } - // query params - if ($source !== null) { - $queryParams['source'] = $this->apiClient->getSerializer()->toQueryValue($source); - } - // query params - if ($latest_measurement_time !== null) { - $queryParams['latestMeasurementTime'] = $this->apiClient->getSerializer()->toQueryValue($latest_measurement_time); - } - // query params - if ($number_of_raw_measurements !== null) { - $queryParams['numberOfRawMeasurements'] = $this->apiClient->getSerializer()->toQueryValue($number_of_raw_measurements); - } - // query params - if ($last_source !== null) { - $queryParams['lastSource'] = $this->apiClient->getSerializer()->toQueryValue($last_source); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort); - } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); } - // this endpoint requires HTTP basic authentication - if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { - $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); - } // make the API Call try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( @@ -835,15 +730,15 @@ public function v1VariablesGetWithHttpInfo($access_token = null, $user_id = null $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\Variable', - '/v1/variables' + '\QuantiModo\Client\Model\VariableCategory[]', + '/v3/variableCategories' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Variable', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\VariableCategory[]', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Variable', $e->getResponseHeaders()); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\VariableCategory[]', $e->getResponseHeaders()); $e->setResponseObject($data); break; } @@ -853,41 +748,39 @@ public function v1VariablesGetWithHttpInfo($access_token = null, $user_id = null } /** - * Operation v1VariablesPost + * Operation postUserTags * - * Create Variables + * Post or update user tags or ingredients * - * @param \QuantiModo\Client\Model\VariablesNew $body Original name for the variable. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\UserTag $body Contains the new user tag data (required) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return void + * @return \QuantiModo\Client\Model\CommonResponse */ - public function v1VariablesPost($body, $access_token = null, $user_id = null) + public function postUserTags($body, $user_id = null) { - list($response) = $this->v1VariablesPostWithHttpInfo($body, $access_token, $user_id); + list($response) = $this->postUserTagsWithHttpInfo($body, $user_id); return $response; } /** - * Operation v1VariablesPostWithHttpInfo + * Operation postUserTagsWithHttpInfo * - * Create Variables + * Post or update user tags or ingredients * - * @param \QuantiModo\Client\Model\VariablesNew $body Original name for the variable. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\UserTag $body Contains the new user tag data (required) + * @param float $user_id User's id (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) */ - public function v1VariablesPostWithHttpInfo($body, $access_token = null, $user_id = null) + public function postUserTagsWithHttpInfo($body, $user_id = null) { // verify the required parameter 'body' is set if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1VariablesPost'); + throw new \InvalidArgumentException('Missing the required parameter $body when calling postUserTags'); } // parse inputs - $resourcePath = "/v1/variables"; + $resourcePath = "/v3/userTags"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -898,13 +791,9 @@ public function v1VariablesPostWithHttpInfo($body, $access_token = null, $user_i } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } // query params if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($user_id); } // body params $_tempBody = null; @@ -918,6 +807,11 @@ public function v1VariablesPostWithHttpInfo($body, $access_token = null, $user_i } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -930,13 +824,17 @@ public function v1VariablesPostWithHttpInfo($body, $access_token = null, $user_i $queryParams, $httpBody, $headerParams, - null, - '/v1/variables' + '\QuantiModo\Client\Model\CommonResponse', + '/v3/userTags' ); - return [null, $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { + case 201: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; } throw $e; @@ -944,57 +842,57 @@ public function v1VariablesPostWithHttpInfo($body, $access_token = null, $user_i } /** - * Operation v1VariablesSearchSearchGet + * Operation postUserVariables * - * Get variables by search query + * Update User Settings for a Variable * - * @param string $search Search query which may be an entire variable name or a fragment of one. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $variable_category_name Filter variables by category name. The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. (optional) - * @param bool $include_public Set to true if you would like to include public variables when no user variables are found. (optional) - * @param bool $manual_tracking Set to true if you would like to exlude variables like apps and website names. (optional) - * @param string $source Specify a data source name to only return variables from a specific data source. (optional) - * @param string $effect_or_cause Indicate if you only want variables that have user correlations. Possible values are effect and cause. (optional) - * @param string $public_effect_or_cause Indicate if you only want variables that have aggregated correlations. Possible values are effect and cause. (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) + * @param \QuantiModo\Client\Model\UserVariable[] $user_variables Variable user settings data (required) + * @param bool $include_private Example: (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param bool $include_public Example: true (optional) + * @param string $search_phrase Example: %Body Fat% (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param bool $exact_match Example: (optional) + * @param bool $manual_tracking Example: (optional) + * @param string $variable_category_name Limit results to a specific variable category (optional) + * @param int $variable_category_id Example: 13 (optional) + * @param string $synonyms Example: %McDonalds hotcake% (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Variable[] + * @return \QuantiModo\Client\Model\CommonResponse */ - public function v1VariablesSearchSearchGet($search, $access_token = null, $user_id = null, $variable_category_name = null, $include_public = null, $manual_tracking = null, $source = null, $effect_or_cause = null, $public_effect_or_cause = null, $limit = null, $offset = null) + public function postUserVariables($user_variables, $include_private = null, $client_id = null, $include_public = null, $search_phrase = null, $app_name = null, $exact_match = null, $manual_tracking = null, $variable_category_name = null, $variable_category_id = null, $synonyms = null) { - list($response) = $this->v1VariablesSearchSearchGetWithHttpInfo($search, $access_token, $user_id, $variable_category_name, $include_public, $manual_tracking, $source, $effect_or_cause, $public_effect_or_cause, $limit, $offset); + list($response) = $this->postUserVariablesWithHttpInfo($user_variables, $include_private, $client_id, $include_public, $search_phrase, $app_name, $exact_match, $manual_tracking, $variable_category_name, $variable_category_id, $synonyms); return $response; } /** - * Operation v1VariablesSearchSearchGetWithHttpInfo + * Operation postUserVariablesWithHttpInfo * - * Get variables by search query + * Update User Settings for a Variable * - * @param string $search Search query which may be an entire variable name or a fragment of one. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @param string $variable_category_name Filter variables by category name. The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. (optional) - * @param bool $include_public Set to true if you would like to include public variables when no user variables are found. (optional) - * @param bool $manual_tracking Set to true if you would like to exlude variables like apps and website names. (optional) - * @param string $source Specify a data source name to only return variables from a specific data source. (optional) - * @param string $effect_or_cause Indicate if you only want variables that have user correlations. Possible values are effect and cause. (optional) - * @param string $public_effect_or_cause Indicate if you only want variables that have aggregated correlations. Possible values are effect and cause. (optional) - * @param int $limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. (optional) - * @param int $offset Now suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10. (optional) + * @param \QuantiModo\Client\Model\UserVariable[] $user_variables Variable user settings data (required) + * @param bool $include_private Example: (optional) + * @param string $client_id Example: oauth_test_client (optional) + * @param bool $include_public Example: true (optional) + * @param string $search_phrase Example: %Body Fat% (optional) + * @param string $app_name Example: MoodiModo (optional) + * @param bool $exact_match Example: (optional) + * @param bool $manual_tracking Example: (optional) + * @param string $variable_category_name Limit results to a specific variable category (optional) + * @param int $variable_category_id Example: 13 (optional) + * @param string $synonyms Example: %McDonalds hotcake% (optional) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Variable[], HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) */ - public function v1VariablesSearchSearchGetWithHttpInfo($search, $access_token = null, $user_id = null, $variable_category_name = null, $include_public = null, $manual_tracking = null, $source = null, $effect_or_cause = null, $public_effect_or_cause = null, $limit = null, $offset = null) + public function postUserVariablesWithHttpInfo($user_variables, $include_private = null, $client_id = null, $include_public = null, $search_phrase = null, $app_name = null, $exact_match = null, $manual_tracking = null, $variable_category_name = null, $variable_category_id = null, $synonyms = null) { - // verify the required parameter 'search' is set - if ($search === null) { - throw new \InvalidArgumentException('Missing the required parameter $search when calling v1VariablesSearchSearchGet'); + // verify the required parameter 'user_variables' is set + if ($user_variables === null) { + throw new \InvalidArgumentException('Missing the required parameter $user_variables when calling postUserVariables'); } // parse inputs - $resourcePath = "/v1/variables/search/{search}"; + $resourcePath = "/v3/userVariables"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -1006,60 +904,62 @@ public function v1VariablesSearchSearchGetWithHttpInfo($search, $access_token = $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); + if ($include_private !== null) { + $queryParams['includePrivate'] = $this->apiClient->getSerializer()->toQueryValue($include_private); } // query params - if ($variable_category_name !== null) { - $queryParams['variableCategoryName'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_name); + if ($client_id !== null) { + $queryParams['clientId'] = $this->apiClient->getSerializer()->toQueryValue($client_id); } // query params if ($include_public !== null) { $queryParams['includePublic'] = $this->apiClient->getSerializer()->toQueryValue($include_public); } // query params - if ($manual_tracking !== null) { - $queryParams['manualTracking'] = $this->apiClient->getSerializer()->toQueryValue($manual_tracking); + if ($search_phrase !== null) { + $queryParams['searchPhrase'] = $this->apiClient->getSerializer()->toQueryValue($search_phrase); } // query params - if ($source !== null) { - $queryParams['source'] = $this->apiClient->getSerializer()->toQueryValue($source); + if ($app_name !== null) { + $queryParams['appName'] = $this->apiClient->getSerializer()->toQueryValue($app_name); } // query params - if ($effect_or_cause !== null) { - $queryParams['effectOrCause'] = $this->apiClient->getSerializer()->toQueryValue($effect_or_cause); + if ($exact_match !== null) { + $queryParams['exactMatch'] = $this->apiClient->getSerializer()->toQueryValue($exact_match); } // query params - if ($public_effect_or_cause !== null) { - $queryParams['publicEffectOrCause'] = $this->apiClient->getSerializer()->toQueryValue($public_effect_or_cause); + if ($manual_tracking !== null) { + $queryParams['manualTracking'] = $this->apiClient->getSerializer()->toQueryValue($manual_tracking); } // query params - if ($limit !== null) { - $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); + if ($variable_category_name !== null) { + $queryParams['variableCategoryName'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_name); } // query params - if ($offset !== null) { - $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); + if ($variable_category_id !== null) { + $queryParams['variableCategoryId'] = $this->apiClient->getSerializer()->toQueryValue($variable_category_id); } - // path params - if ($search !== null) { - $resourcePath = str_replace( - "{" . "search" . "}", - $this->apiClient->getSerializer()->toPathValue($search), - $resourcePath - ); + // query params + if ($synonyms !== null) { + $queryParams['synonyms'] = $this->apiClient->getSerializer()->toQueryValue($synonyms); } - + // body params + $_tempBody = null; + if (isset($user_variables)) { + $_tempBody = $user_variables; + } + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -1068,19 +968,19 @@ public function v1VariablesSearchSearchGetWithHttpInfo($search, $access_token = try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'GET', + 'POST', $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\Variable[]', - '/v1/variables/search/{search}' + '\QuantiModo\Client\Model\CommonResponse', + '/v3/userVariables' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Variable[]', $httpHeader), $statusCode, $httpHeader]; + return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Variable[]', $e->getResponseHeaders()); + case 201: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); $e->setResponseObject($data); break; } @@ -1090,41 +990,37 @@ public function v1VariablesSearchSearchGetWithHttpInfo($search, $access_token = } /** - * Operation v1VariablesVariableNameGet + * Operation resetUserVariableSettings * - * Get info about a variable + * Reset user settings for a variable to defaults * - * @param string $variable_name Variable name (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\UserVariableDelete $variable_id Id of the variable whose measurements should be deleted (required) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\Variable + * @return void */ - public function v1VariablesVariableNameGet($variable_name, $access_token = null, $user_id = null) + public function resetUserVariableSettings($variable_id) { - list($response) = $this->v1VariablesVariableNameGetWithHttpInfo($variable_name, $access_token, $user_id); + list($response) = $this->resetUserVariableSettingsWithHttpInfo($variable_id); return $response; } /** - * Operation v1VariablesVariableNameGetWithHttpInfo + * Operation resetUserVariableSettingsWithHttpInfo * - * Get info about a variable + * Reset user settings for a variable to defaults * - * @param string $variable_name Variable name (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) + * @param \QuantiModo\Client\Model\UserVariableDelete $variable_id Id of the variable whose measurements should be deleted (required) * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\Variable, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function v1VariablesVariableNameGetWithHttpInfo($variable_name, $access_token = null, $user_id = null) + public function resetUserVariableSettingsWithHttpInfo($variable_id) { - // verify the required parameter 'variable_name' is set - if ($variable_name === null) { - throw new \InvalidArgumentException('Missing the required parameter $variable_name when calling v1VariablesVariableNameGet'); + // verify the required parameter 'variable_id' is set + if ($variable_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $variable_id when calling resetUserVariableSettings'); } // parse inputs - $resourcePath = "/v1/variables/{variableName}"; + $resourcePath = "/v3/userVariables/reset"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -1135,29 +1031,23 @@ public function v1VariablesVariableNameGetWithHttpInfo($variable_name, $access_t } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // path params - if ($variable_name !== null) { - $resourcePath = str_replace( - "{" . "variableName" . "}", - $this->apiClient->getSerializer()->toPathValue($variable_name), - $resourcePath - ); + // body params + $_tempBody = null; + if (isset($variable_id)) { + $_tempBody = $variable_id; } - + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } + // this endpoint requires API key authentication + $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); + if (strlen($apiKey) !== 0) { + $queryParams['access_token'] = $apiKey; + } // this endpoint requires OAuth (access token) if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); @@ -1166,21 +1056,17 @@ public function v1VariablesVariableNameGetWithHttpInfo($variable_name, $access_t try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'GET', + 'POST', $queryParams, $httpBody, $headerParams, - '\QuantiModo\Client\Model\Variable', - '/v1/variables/{variableName}' + null, + '/v3/userVariables/reset' ); - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\Variable', $httpHeader), $statusCode, $httpHeader]; + return [null, $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\Variable', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; } throw $e; diff --git a/lib/Api/VotesApi.php b/lib/Api/VotesApi.php deleted file mode 100644 index 511cf9f..0000000 --- a/lib/Api/VotesApi.php +++ /dev/null @@ -1,279 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Api; - -use \QuantiModo\Client\ApiClient; -use \QuantiModo\Client\ApiException; -use \QuantiModo\Client\Configuration; -use \QuantiModo\Client\ObjectSerializer; - -/** - * VotesApi Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class VotesApi -{ - /** - * API Client - * - * @var \QuantiModo\Client\ApiClient instance of the ApiClient - */ - protected $apiClient; - - /** - * Constructor - * - * @param \QuantiModo\Client\ApiClient|null $apiClient The api client to use - */ - public function __construct(\QuantiModo\Client\ApiClient $apiClient = null) - { - if ($apiClient === null) { - $apiClient = new ApiClient(); - } - - $this->apiClient = $apiClient; - } - - /** - * Get API client - * - * @return \QuantiModo\Client\ApiClient get the API client - */ - public function getApiClient() - { - return $this->apiClient; - } - - /** - * Set the API client - * - * @param \QuantiModo\Client\ApiClient $apiClient set the API client - * - * @return VotesApi - */ - public function setApiClient(\QuantiModo\Client\ApiClient $apiClient) - { - $this->apiClient = $apiClient; - return $this; - } - - /** - * Operation v1VotesDeletePost - * - * Delete vote - * - * @param \QuantiModo\Client\Model\VoteDelete $body The cause and effect variable names for the predictor vote to be deleted. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\CommonResponse - */ - public function v1VotesDeletePost($body, $access_token = null, $user_id = null) - { - list($response) = $this->v1VotesDeletePostWithHttpInfo($body, $access_token, $user_id); - return $response; - } - - /** - * Operation v1VotesDeletePostWithHttpInfo - * - * Delete vote - * - * @param \QuantiModo\Client\Model\VoteDelete $body The cause and effect variable names for the predictor vote to be deleted. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function v1VotesDeletePostWithHttpInfo($body, $access_token = null, $user_id = null) - { - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1VotesDeletePost'); - } - // parse inputs - $resourcePath = "/v1/votes/delete"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\CommonResponse', - '/v1/votes/delete' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - - /** - * Operation v1VotesPost - * - * Post or update vote - * - * @param \QuantiModo\Client\Model\PostVote $body Contains the cause variable, effect variable, and vote value. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return \QuantiModo\Client\Model\CommonResponse - */ - public function v1VotesPost($body, $access_token = null, $user_id = null) - { - list($response) = $this->v1VotesPostWithHttpInfo($body, $access_token, $user_id); - return $response; - } - - /** - * Operation v1VotesPostWithHttpInfo - * - * Post or update vote - * - * @param \QuantiModo\Client\Model\PostVote $body Contains the cause variable, effect variable, and vote value. (required) - * @param string $access_token User's OAuth2 access token (optional) - * @param int $user_id User's id (optional) - * @throws \QuantiModo\Client\ApiException on non-2xx response - * @return array of \QuantiModo\Client\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function v1VotesPostWithHttpInfo($body, $access_token = null, $user_id = null) - { - // verify the required parameter 'body' is set - if ($body === null) { - throw new \InvalidArgumentException('Missing the required parameter $body when calling v1VotesPost'); - } - // parse inputs - $resourcePath = "/v1/votes"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // query params - if ($access_token !== null) { - $queryParams['access_token'] = $this->apiClient->getSerializer()->toQueryValue($access_token); - } - // query params - if ($user_id !== null) { - $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id); - } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - '\QuantiModo\Client\Model\CommonResponse', - '/v1/votes' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\QuantiModo\Client\Model\CommonResponse', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\QuantiModo\Client\Model\CommonResponse', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } -} diff --git a/lib/ApiClient.php b/lib/ApiClient.php index 25f7405..f71b66f 100644 --- a/lib/ApiClient.php +++ b/lib/ApiClient.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -167,7 +167,7 @@ public function callApi($resourcePath, $method, $queryParams, $postData, $header if ($this->config->getCurlConnectTimeout() != 0) { curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $this->config->getCurlConnectTimeout()); } - + // return the result on success, rather than just true curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); @@ -199,6 +199,10 @@ public function callApi($resourcePath, $method, $queryParams, $postData, $header $url = ($url . '?' . http_build_query($queryParams)); } + if ($this->config->getAllowEncoding()) { + curl_setopt($curl, CURLOPT_ENCODING, ''); + } + if ($method === self::$POST) { curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $postData); diff --git a/lib/ApiException.php b/lib/ApiException.php index b6c2f9f..61ac3b9 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/lib/Configuration.php b/lib/Configuration.php index 7fbc60c..6aa041a 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -109,7 +109,7 @@ class Configuration * * @var string */ - protected $userAgent = 'Swagger-Codegen/5.0.4/php'; + protected $userAgent = 'Swagger-Codegen/5.8.1103/php'; /** * Debug switch (default set to false) @@ -177,6 +177,13 @@ class Configuration */ protected $proxyPassword; + /** + * Allow Curl encoding header + * + * @var bool + */ + protected $allowEncoding = false; + /** * Constructor */ @@ -445,6 +452,18 @@ public function setCurlConnectTimeout($seconds) return $this; } + /** + * Set whether to accept encoding + * @param bool $allowEncoding + * + * @return $this + */ + public function setAllowEncoding($allowEncoding) + { + $this->allowEncoding = $allowEncoding; + return $this; + } + /** * Gets the HTTP connect timeout value * @@ -455,6 +474,15 @@ public function getCurlConnectTimeout() return $this->curlConnectTimeout; } + /** + * Get whether to allow encoding + * + * @return bool + */ + public function getAllowEncoding() + { + return $this->allowEncoding; + } /** * Sets the HTTP Proxy Host @@ -699,8 +727,8 @@ public static function toDebugReport() $report = 'PHP SDK (QuantiModo\Client) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' OpenAPI Spec Version: 2.0' . PHP_EOL; - $report .= ' SDK Package Version: 5.0.4' . PHP_EOL; + $report .= ' OpenAPI Spec Version: 5.8.100414' . PHP_EOL; + $report .= ' SDK Package Version: 5.8.1103' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/Animation.php b/lib/Model/Animation.php new file mode 100644 index 0000000..b5b6b2f --- /dev/null +++ b/lib/Model/Animation.php @@ -0,0 +1,248 @@ + 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'duration' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'duration' => 'duration' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'duration' => 'setDuration' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'duration' => 'getDuration' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['duration'] = isset($data['duration']) ? $data['duration'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['duration'] === null) { + $invalid_properties[] = "'duration' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['duration'] === null) { + return false; + } + return true; + } + + + /** + * Gets duration + * @return int + */ + public function getDuration() + { + return $this->container['duration']; + } + + /** + * Sets duration + * @param int $duration Example: 0 + * @return $this + */ + public function setDuration($duration) + { + $this->container['duration'] = $duration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Button.php b/lib/Model/Button.php new file mode 100644 index 0000000..73614c7 --- /dev/null +++ b/lib/Model/Button.php @@ -0,0 +1,281 @@ + 'string', + 'text' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'link' => null, + 'text' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'link' => 'link', + 'text' => 'text' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'link' => 'setLink', + 'text' => 'setText' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'link' => 'getLink', + 'text' => 'getText' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['link'] = isset($data['link']) ? $data['link'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['link'] === null) { + $invalid_properties[] = "'link' can't be null"; + } + if ($this->container['text'] === null) { + $invalid_properties[] = "'text' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['link'] === null) { + return false; + } + if ($this->container['text'] === null) { + return false; + } + return true; + } + + + /** + * Gets link + * @return string + */ + public function getLink() + { + return $this->container['link']; + } + + /** + * Sets link + * @param string $link Example: https://local.quantimo.do + * @return $this + */ + public function setLink($link) + { + $this->container['link'] = $link; + + return $this; + } + + /** + * Gets text + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * @param string $text Example: Start Tracking + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Chart.php b/lib/Model/Chart.php new file mode 100644 index 0000000..28c82b9 --- /dev/null +++ b/lib/Model/Chart.php @@ -0,0 +1,512 @@ + '\QuantiModo\Client\Model\Animation', + 'chart_config' => '\QuantiModo\Client\Model\ChartConfig', + 'chart_id' => 'string', + 'chart_title' => 'string', + 'explanation' => 'string', + 'height' => 'int', + 'render_to' => 'string', + 'type' => 'string', + 'zoom_type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'animation' => null, + 'chart_config' => null, + 'chart_id' => null, + 'chart_title' => null, + 'explanation' => null, + 'height' => null, + 'render_to' => null, + 'type' => null, + 'zoom_type' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'animation' => 'animation', + 'chart_config' => 'chartConfig', + 'chart_id' => 'chartId', + 'chart_title' => 'chartTitle', + 'explanation' => 'explanation', + 'height' => 'height', + 'render_to' => 'renderTo', + 'type' => 'type', + 'zoom_type' => 'zoomType' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'animation' => 'setAnimation', + 'chart_config' => 'setChartConfig', + 'chart_id' => 'setChartId', + 'chart_title' => 'setChartTitle', + 'explanation' => 'setExplanation', + 'height' => 'setHeight', + 'render_to' => 'setRenderTo', + 'type' => 'setType', + 'zoom_type' => 'setZoomType' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'animation' => 'getAnimation', + 'chart_config' => 'getChartConfig', + 'chart_id' => 'getChartId', + 'chart_title' => 'getChartTitle', + 'explanation' => 'getExplanation', + 'height' => 'getHeight', + 'render_to' => 'getRenderTo', + 'type' => 'getType', + 'zoom_type' => 'getZoomType' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['animation'] = isset($data['animation']) ? $data['animation'] : null; + $this->container['chart_config'] = isset($data['chart_config']) ? $data['chart_config'] : null; + $this->container['chart_id'] = isset($data['chart_id']) ? $data['chart_id'] : null; + $this->container['chart_title'] = isset($data['chart_title']) ? $data['chart_title'] : null; + $this->container['explanation'] = isset($data['explanation']) ? $data['explanation'] : null; + $this->container['height'] = isset($data['height']) ? $data['height'] : null; + $this->container['render_to'] = isset($data['render_to']) ? $data['render_to'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['zoom_type'] = isset($data['zoom_type']) ? $data['zoom_type'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['animation'] === null) { + $invalid_properties[] = "'animation' can't be null"; + } + if ($this->container['chart_config'] === null) { + $invalid_properties[] = "'chart_config' can't be null"; + } + if ($this->container['chart_id'] === null) { + $invalid_properties[] = "'chart_id' can't be null"; + } + if ($this->container['chart_title'] === null) { + $invalid_properties[] = "'chart_title' can't be null"; + } + if ($this->container['explanation'] === null) { + $invalid_properties[] = "'explanation' can't be null"; + } + if ($this->container['height'] === null) { + $invalid_properties[] = "'height' can't be null"; + } + if ($this->container['render_to'] === null) { + $invalid_properties[] = "'render_to' can't be null"; + } + if ($this->container['type'] === null) { + $invalid_properties[] = "'type' can't be null"; + } + if ($this->container['zoom_type'] === null) { + $invalid_properties[] = "'zoom_type' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['animation'] === null) { + return false; + } + if ($this->container['chart_config'] === null) { + return false; + } + if ($this->container['chart_id'] === null) { + return false; + } + if ($this->container['chart_title'] === null) { + return false; + } + if ($this->container['explanation'] === null) { + return false; + } + if ($this->container['height'] === null) { + return false; + } + if ($this->container['render_to'] === null) { + return false; + } + if ($this->container['type'] === null) { + return false; + } + if ($this->container['zoom_type'] === null) { + return false; + } + return true; + } + + + /** + * Gets animation + * @return \QuantiModo\Client\Model\Animation + */ + public function getAnimation() + { + return $this->container['animation']; + } + + /** + * Sets animation + * @param \QuantiModo\Client\Model\Animation $animation + * @return $this + */ + public function setAnimation($animation) + { + $this->container['animation'] = $animation; + + return $this; + } + + /** + * Gets chart_config + * @return \QuantiModo\Client\Model\ChartConfig + */ + public function getChartConfig() + { + return $this->container['chart_config']; + } + + /** + * Sets chart_config + * @param \QuantiModo\Client\Model\ChartConfig $chart_config + * @return $this + */ + public function setChartConfig($chart_config) + { + $this->container['chart_config'] = $chart_config; + + return $this; + } + + /** + * Gets chart_id + * @return string + */ + public function getChartId() + { + return $this->container['chart_id']; + } + + /** + * Sets chart_id + * @param string $chart_id Example: correlationScatterPlot + * @return $this + */ + public function setChartId($chart_id) + { + $this->container['chart_id'] = $chart_id; + + return $this; + } + + /** + * Gets chart_title + * @return string + */ + public function getChartTitle() + { + return $this->container['chart_title']; + } + + /** + * Sets chart_title + * @param string $chart_title Example: Reference And Learning Hours following Barometric Pressure (R = 0.147) + * @return $this + */ + public function setChartTitle($chart_title) + { + $this->container['chart_title'] = $chart_title; + + return $this; + } + + /** + * Gets explanation + * @return string + */ + public function getExplanation() + { + return $this->container['explanation']; + } + + /** + * Sets explanation + * @param string $explanation Example: The chart above indicates that an increase in Barometric Pressure is usually followed by an increase in Reference And Learning Hours. + * @return $this + */ + public function setExplanation($explanation) + { + $this->container['explanation'] = $explanation; + + return $this; + } + + /** + * Gets height + * @return int + */ + public function getHeight() + { + return $this->container['height']; + } + + /** + * Sets height + * @param int $height Example: 300 + * @return $this + */ + public function setHeight($height) + { + $this->container['height'] = $height; + + return $this; + } + + /** + * Gets render_to + * @return string + */ + public function getRenderTo() + { + return $this->container['render_to']; + } + + /** + * Sets render_to + * @param string $render_to Example: BarContainer + * @return $this + */ + public function setRenderTo($render_to) + { + $this->container['render_to'] = $render_to; + + return $this; + } + + /** + * Gets type + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * @param string $type Example: scatter + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets zoom_type + * @return string + */ + public function getZoomType() + { + return $this->container['zoom_type']; + } + + /** + * Sets zoom_type + * @param string $zoom_type Example: xy + * @return $this + */ + public function setZoomType($zoom_type) + { + $this->container['zoom_type'] = $zoom_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ChartConfig.php b/lib/Model/ChartConfig.php new file mode 100644 index 0000000..d92b946 --- /dev/null +++ b/lib/Model/ChartConfig.php @@ -0,0 +1,446 @@ + 'bool', + 'options' => '\QuantiModo\Client\Model\Option', + 'series' => '\QuantiModo\Client\Model\Series[]', + 'subtitle' => '\QuantiModo\Client\Model\Subtitle', + 'title' => '\QuantiModo\Client\Model\Title', + 'x_axis' => '\QuantiModo\Client\Model\XAxi', + 'y_axis' => '\QuantiModo\Client\Model\YAxi' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'loading' => null, + 'options' => null, + 'series' => null, + 'subtitle' => null, + 'title' => null, + 'x_axis' => null, + 'y_axis' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'loading' => 'loading', + 'options' => 'options', + 'series' => 'series', + 'subtitle' => 'subtitle', + 'title' => 'title', + 'x_axis' => 'xAxis', + 'y_axis' => 'yAxis' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'loading' => 'setLoading', + 'options' => 'setOptions', + 'series' => 'setSeries', + 'subtitle' => 'setSubtitle', + 'title' => 'setTitle', + 'x_axis' => 'setXAxis', + 'y_axis' => 'setYAxis' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'loading' => 'getLoading', + 'options' => 'getOptions', + 'series' => 'getSeries', + 'subtitle' => 'getSubtitle', + 'title' => 'getTitle', + 'x_axis' => 'getXAxis', + 'y_axis' => 'getYAxis' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['loading'] = isset($data['loading']) ? $data['loading'] : null; + $this->container['options'] = isset($data['options']) ? $data['options'] : null; + $this->container['series'] = isset($data['series']) ? $data['series'] : null; + $this->container['subtitle'] = isset($data['subtitle']) ? $data['subtitle'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + $this->container['x_axis'] = isset($data['x_axis']) ? $data['x_axis'] : null; + $this->container['y_axis'] = isset($data['y_axis']) ? $data['y_axis'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['loading'] === null) { + $invalid_properties[] = "'loading' can't be null"; + } + if ($this->container['options'] === null) { + $invalid_properties[] = "'options' can't be null"; + } + if ($this->container['series'] === null) { + $invalid_properties[] = "'series' can't be null"; + } + if ($this->container['subtitle'] === null) { + $invalid_properties[] = "'subtitle' can't be null"; + } + if ($this->container['title'] === null) { + $invalid_properties[] = "'title' can't be null"; + } + if ($this->container['x_axis'] === null) { + $invalid_properties[] = "'x_axis' can't be null"; + } + if ($this->container['y_axis'] === null) { + $invalid_properties[] = "'y_axis' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['loading'] === null) { + return false; + } + if ($this->container['options'] === null) { + return false; + } + if ($this->container['series'] === null) { + return false; + } + if ($this->container['subtitle'] === null) { + return false; + } + if ($this->container['title'] === null) { + return false; + } + if ($this->container['x_axis'] === null) { + return false; + } + if ($this->container['y_axis'] === null) { + return false; + } + return true; + } + + + /** + * Gets loading + * @return bool + */ + public function getLoading() + { + return $this->container['loading']; + } + + /** + * Sets loading + * @param bool $loading Example: false + * @return $this + */ + public function setLoading($loading) + { + $this->container['loading'] = $loading; + + return $this; + } + + /** + * Gets options + * @return \QuantiModo\Client\Model\Option + */ + public function getOptions() + { + return $this->container['options']; + } + + /** + * Sets options + * @param \QuantiModo\Client\Model\Option $options + * @return $this + */ + public function setOptions($options) + { + $this->container['options'] = $options; + + return $this; + } + + /** + * Gets series + * @return \QuantiModo\Client\Model\Series[] + */ + public function getSeries() + { + return $this->container['series']; + } + + /** + * Sets series + * @param \QuantiModo\Client\Model\Series[] $series + * @return $this + */ + public function setSeries($series) + { + $this->container['series'] = $series; + + return $this; + } + + /** + * Gets subtitle + * @return \QuantiModo\Client\Model\Subtitle + */ + public function getSubtitle() + { + return $this->container['subtitle']; + } + + /** + * Sets subtitle + * @param \QuantiModo\Client\Model\Subtitle $subtitle + * @return $this + */ + public function setSubtitle($subtitle) + { + $this->container['subtitle'] = $subtitle; + + return $this; + } + + /** + * Gets title + * @return \QuantiModo\Client\Model\Title + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * @param \QuantiModo\Client\Model\Title $title + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets x_axis + * @return \QuantiModo\Client\Model\XAxi + */ + public function getXAxis() + { + return $this->container['x_axis']; + } + + /** + * Sets x_axis + * @param \QuantiModo\Client\Model\XAxi $x_axis + * @return $this + */ + public function setXAxis($x_axis) + { + $this->container['x_axis'] = $x_axis; + + return $this; + } + + /** + * Gets y_axis + * @return \QuantiModo\Client\Model\YAxi + */ + public function getYAxis() + { + return $this->container['y_axis']; + } + + /** + * Sets y_axis + * @param \QuantiModo\Client\Model\YAxi $y_axis + * @return $this + */ + public function setYAxis($y_axis) + { + $this->container['y_axis'] = $y_axis; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ChartStyle.php b/lib/Model/ChartStyle.php new file mode 100644 index 0000000..641c014 --- /dev/null +++ b/lib/Model/ChartStyle.php @@ -0,0 +1,248 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'background' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'background' => 'background' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'background' => 'setBackground' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'background' => 'getBackground' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['background'] = isset($data['background']) ? $data['background'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['background'] === null) { + $invalid_properties[] = "'background' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['background'] === null) { + return false; + } + return true; + } + + + /** + * Gets background + * @return string + */ + public function getBackground() + { + return $this->container['background']; + } + + /** + * Sets background + * @param string $background Example: url(/res/loading3.gif) no-repeat center + * @return $this + */ + public function setBackground($background) + { + $this->container['background'] = $background; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Column.php b/lib/Model/Column.php new file mode 100644 index 0000000..735154f --- /dev/null +++ b/lib/Model/Column.php @@ -0,0 +1,380 @@ + 'int', + 'color_by_point' => 'bool', + 'enable_mouse_tracking' => 'bool', + 'point_padding' => 'double', + 'point_width' => 'double' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'border_width' => null, + 'color_by_point' => null, + 'enable_mouse_tracking' => null, + 'point_padding' => 'double', + 'point_width' => 'double' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'border_width' => 'borderWidth', + 'color_by_point' => 'colorByPoint', + 'enable_mouse_tracking' => 'enableMouseTracking', + 'point_padding' => 'pointPadding', + 'point_width' => 'pointWidth' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'border_width' => 'setBorderWidth', + 'color_by_point' => 'setColorByPoint', + 'enable_mouse_tracking' => 'setEnableMouseTracking', + 'point_padding' => 'setPointPadding', + 'point_width' => 'setPointWidth' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'border_width' => 'getBorderWidth', + 'color_by_point' => 'getColorByPoint', + 'enable_mouse_tracking' => 'getEnableMouseTracking', + 'point_padding' => 'getPointPadding', + 'point_width' => 'getPointWidth' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['border_width'] = isset($data['border_width']) ? $data['border_width'] : null; + $this->container['color_by_point'] = isset($data['color_by_point']) ? $data['color_by_point'] : null; + $this->container['enable_mouse_tracking'] = isset($data['enable_mouse_tracking']) ? $data['enable_mouse_tracking'] : null; + $this->container['point_padding'] = isset($data['point_padding']) ? $data['point_padding'] : null; + $this->container['point_width'] = isset($data['point_width']) ? $data['point_width'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['border_width'] === null) { + $invalid_properties[] = "'border_width' can't be null"; + } + if ($this->container['color_by_point'] === null) { + $invalid_properties[] = "'color_by_point' can't be null"; + } + if ($this->container['enable_mouse_tracking'] === null) { + $invalid_properties[] = "'enable_mouse_tracking' can't be null"; + } + if ($this->container['point_padding'] === null) { + $invalid_properties[] = "'point_padding' can't be null"; + } + if ($this->container['point_width'] === null) { + $invalid_properties[] = "'point_width' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['border_width'] === null) { + return false; + } + if ($this->container['color_by_point'] === null) { + return false; + } + if ($this->container['enable_mouse_tracking'] === null) { + return false; + } + if ($this->container['point_padding'] === null) { + return false; + } + if ($this->container['point_width'] === null) { + return false; + } + return true; + } + + + /** + * Gets border_width + * @return int + */ + public function getBorderWidth() + { + return $this->container['border_width']; + } + + /** + * Sets border_width + * @param int $border_width Example: 0 + * @return $this + */ + public function setBorderWidth($border_width) + { + $this->container['border_width'] = $border_width; + + return $this; + } + + /** + * Gets color_by_point + * @return bool + */ + public function getColorByPoint() + { + return $this->container['color_by_point']; + } + + /** + * Sets color_by_point + * @param bool $color_by_point Example: true + * @return $this + */ + public function setColorByPoint($color_by_point) + { + $this->container['color_by_point'] = $color_by_point; + + return $this; + } + + /** + * Gets enable_mouse_tracking + * @return bool + */ + public function getEnableMouseTracking() + { + return $this->container['enable_mouse_tracking']; + } + + /** + * Sets enable_mouse_tracking + * @param bool $enable_mouse_tracking Example: true + * @return $this + */ + public function setEnableMouseTracking($enable_mouse_tracking) + { + $this->container['enable_mouse_tracking'] = $enable_mouse_tracking; + + return $this; + } + + /** + * Gets point_padding + * @return double + */ + public function getPointPadding() + { + return $this->container['point_padding']; + } + + /** + * Sets point_padding + * @param double $point_padding Example: 0.2 + * @return $this + */ + public function setPointPadding($point_padding) + { + $this->container['point_padding'] = $point_padding; + + return $this; + } + + /** + * Gets point_width + * @return double + */ + public function getPointWidth() + { + return $this->container['point_width']; + } + + /** + * Sets point_width + * @param double $point_width Example: 33.333333333333 + * @return $this + */ + public function setPointWidth($point_width) + { + $this->container['point_width'] = $point_width; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CommonResponse.php b/lib/Model/CommonResponse.php index 87803cf..83fa4c5 100644 --- a/lib/Model/CommonResponse.php +++ b/lib/Model/CommonResponse.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,23 +54,41 @@ class CommonResponse implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'status' => 'int', + 'data' => '\QuantiModo\Client\Model\GetStudyDataResponse', 'message' => 'string', + 'status' => 'int', 'success' => 'bool' ]; + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'data' => null, + 'message' => null, + 'status' => null, + 'success' => null + ]; + public static function swaggerTypes() { return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', + 'data' => 'data', 'message' => 'message', + 'status' => 'status', 'success' => 'success' ]; @@ -80,8 +98,9 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', + 'data' => 'setData', 'message' => 'setMessage', + 'status' => 'setStatus', 'success' => 'setSuccess' ]; @@ -91,8 +110,9 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', + 'data' => 'getData', 'message' => 'getMessage', + 'status' => 'getStatus', 'success' => 'getSuccess' ]; @@ -127,8 +147,9 @@ public static function getters() */ public function __construct(array $data = null) { - $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; $this->container['success'] = isset($data['success']) ? $data['success'] : null; } @@ -170,22 +191,22 @@ public function valid() /** - * Gets status - * @return int + * Gets data + * @return \QuantiModo\Client\Model\GetStudyDataResponse */ - public function getStatus() + public function getData() { - return $this->container['status']; + return $this->container['data']; } /** - * Sets status - * @param int $status Status code + * Sets data + * @param \QuantiModo\Client\Model\GetStudyDataResponse $data * @return $this */ - public function setStatus($status) + public function setData($data) { - $this->container['status'] = $status; + $this->container['data'] = $data; return $this; } @@ -211,6 +232,27 @@ public function setMessage($message) return $this; } + /** + * Gets status + * @return int + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * @param int $status Status code + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + /** * Gets success * @return bool diff --git a/lib/Model/CommonVariable.php b/lib/Model/CommonVariable.php new file mode 100644 index 0000000..fec9052 --- /dev/null +++ b/lib/Model/CommonVariable.php @@ -0,0 +1,4201 @@ + 'string', + 'available_units' => '\QuantiModo\Client\Model\Unit[]', + 'category' => 'string', + 'cause_only' => 'int', + 'charts_link_dynamic' => 'string', + 'charts_link_email' => 'string', + 'charts_link_facebook' => 'string', + 'charts_link_google' => 'string', + 'charts_link_static' => 'string', + 'charts_link_twitter' => 'string', + 'child_user_tag_variables' => '\QuantiModo\Client\Model\UserVariableArray', + 'client_id' => 'string', + 'combination_operation' => 'string', + 'common_alias' => 'string', + 'common_tagged_variables' => '\QuantiModo\Client\Model\CommonVariableArray', + 'common_tag_variables' => '\QuantiModo\Client\Model\CommonVariableArray', + 'common_variable_most_common_connector_id' => 'int', + 'common_variable_updated_at' => '\DateTime', + 'created_at' => '\DateTime', + 'data_source' => '\QuantiModo\Client\Model\DataSource', + 'highcharts' => '\QuantiModo\Client\Model\HighchartArray', + 'unit_abbreviated_name' => 'string', + 'unit_category_id' => 'int', + 'unit_category_name' => 'string', + 'unit_id' => 'int', + 'unit_name' => 'string', + 'description' => 'string', + 'duration_of_action' => 'int', + 'duration_of_action_in_hours' => 'int', + 'earliest_filling_time' => 'int', + 'earliest_measurement_time' => 'int', + 'earliest_source_time' => 'int', + 'experiment_end_time' => '\DateTime', + 'experiment_end_time_seconds' => '\DateTime', + 'experiment_end_time_string' => '\DateTime', + 'experiment_start_time' => '\DateTime', + 'experiment_start_time_seconds' => '\DateTime', + 'experiment_start_time_string' => '\DateTime', + 'filling_type' => 'string', + 'filling_value' => 'double', + 'id' => 'int', + 'image_url' => 'string', + 'informational_url' => 'string', + 'ingredient_of_user_tag_variables' => '\QuantiModo\Client\Model\UserVariableArray', + 'ingredient_user_tag_variables' => '\QuantiModo\Client\Model\UserVariableArray', + 'input_type' => 'string', + 'ion_icon' => 'string', + 'joined_user_tag_variables' => '\QuantiModo\Client\Model\UserVariableArray', + 'joined_variables' => '\QuantiModo\Client\Model\CommonVariable[]', + 'join_with' => 'string', + 'kurtosis' => 'double', + 'last_original_unit_id' => 'int', + 'last_original_value' => 'double', + 'last_processed_daily_value' => 'double', + 'last_source' => 'int', + 'last_successful_update_time' => '\DateTime', + 'last_unit' => 'string', + 'last_unit_id' => 'int', + 'last_value' => 'int', + 'latest_filling_time' => 'int', + 'latest_measurement_time' => 'int', + 'latest_source_time' => 'int', + 'latest_user_measurement_time' => 'int', + 'manual_tracking' => 'bool', + 'maximum_allowed_value' => 'double', + 'maximum_recorded_value' => 'double', + 'mean' => 'double', + 'measurements_at_last_analysis' => 'int', + 'median' => 'double', + 'minimum_allowed_value' => 'double', + 'minimum_recorded_value' => 'double', + 'most_common_connector_id' => 'int', + 'most_common_original_unit_id' => 'int', + 'most_common_unit' => 'string', + 'most_common_value' => 'int', + 'name' => 'string', + 'number_of_aggregate_correlations_as_cause' => 'int', + 'number_of_aggregate_correlations_as_effect' => 'int', + 'number_of_changes' => 'int', + 'number_of_correlations' => 'int', + 'number_of_measurements' => 'int', + 'number_of_processed_daily_measurements' => 'int', + 'number_of_raw_measurements' => 'int', + 'number_of_tracking_reminders' => 'int', + 'number_of_unique_daily_values' => 'int', + 'number_of_unique_values' => 'int', + 'number_of_user_correlations_as_cause' => 'int', + 'number_of_user_correlations_as_effect' => 'int', + 'number_of_user_variables' => 'int', + 'onset_delay' => 'int', + 'onset_delay_in_hours' => 'int', + 'outcome' => 'int', + 'outcome_of_interest' => 'int', + 'parent' => 'int', + 'parent_id' => 'string', + 'parent_user_tag_variables' => '\QuantiModo\Client\Model\UserVariableArray', + 'png_path' => 'string', + 'png_url' => 'string', + 'predictor_of_interest' => 'int', + 'price' => 'string', + 'product_url' => 'string', + 'public' => 'bool', + 'raw_measurements_at_last_analysis' => 'int', + 'second_most_common_value' => 'double', + 'second_to_last_value' => 'double', + 'share_user_measurements' => 'bool', + 'skewness' => 'double', + 'sources' => 'string', + 'standard_deviation' => 'double', + 'status' => 'string', + 'subtitle' => 'string', + 'sub_variables' => '\QuantiModo\Client\Model\CommonVariable[]', + 'svg_url' => 'string', + 'third_most_common_value' => 'double', + 'third_to_last_value' => 'double', + 'updated' => 'int', + 'updated_at' => '\DateTime', + 'user_id' => 'int', + 'valence' => 'string', + 'variable_category_id' => 'int', + 'variable_category_image_url' => 'string', + 'variable_category_name' => 'string', + 'variable_filling_value' => 'double', + 'variable_id' => 'int', + 'variable_name' => 'string', + 'variance' => 'double', + 'wikipedia_title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'alias' => null, + 'available_units' => null, + 'category' => null, + 'cause_only' => null, + 'charts_link_dynamic' => null, + 'charts_link_email' => null, + 'charts_link_facebook' => null, + 'charts_link_google' => null, + 'charts_link_static' => null, + 'charts_link_twitter' => null, + 'child_user_tag_variables' => null, + 'client_id' => null, + 'combination_operation' => null, + 'common_alias' => null, + 'common_tagged_variables' => null, + 'common_tag_variables' => null, + 'common_variable_most_common_connector_id' => null, + 'common_variable_updated_at' => 'date-time', + 'created_at' => 'date-time', + 'data_source' => null, + 'highcharts' => null, + 'unit_abbreviated_name' => null, + 'unit_category_id' => null, + 'unit_category_name' => null, + 'unit_id' => null, + 'unit_name' => null, + 'description' => null, + 'duration_of_action' => null, + 'duration_of_action_in_hours' => null, + 'earliest_filling_time' => null, + 'earliest_measurement_time' => null, + 'earliest_source_time' => null, + 'experiment_end_time' => 'date-time', + 'experiment_end_time_seconds' => 'date-time', + 'experiment_end_time_string' => 'date-time', + 'experiment_start_time' => 'date-time', + 'experiment_start_time_seconds' => 'date-time', + 'experiment_start_time_string' => 'date-time', + 'filling_type' => null, + 'filling_value' => 'double', + 'id' => null, + 'image_url' => null, + 'informational_url' => null, + 'ingredient_of_user_tag_variables' => null, + 'ingredient_user_tag_variables' => null, + 'input_type' => null, + 'ion_icon' => null, + 'joined_user_tag_variables' => null, + 'joined_variables' => null, + 'join_with' => null, + 'kurtosis' => 'double', + 'last_original_unit_id' => null, + 'last_original_value' => 'double', + 'last_processed_daily_value' => 'double', + 'last_source' => null, + 'last_successful_update_time' => 'date-time', + 'last_unit' => null, + 'last_unit_id' => null, + 'last_value' => null, + 'latest_filling_time' => null, + 'latest_measurement_time' => null, + 'latest_source_time' => null, + 'latest_user_measurement_time' => null, + 'manual_tracking' => null, + 'maximum_allowed_value' => 'double', + 'maximum_recorded_value' => 'double', + 'mean' => 'double', + 'measurements_at_last_analysis' => null, + 'median' => 'double', + 'minimum_allowed_value' => 'double', + 'minimum_recorded_value' => 'double', + 'most_common_connector_id' => null, + 'most_common_original_unit_id' => null, + 'most_common_unit' => null, + 'most_common_value' => null, + 'name' => null, + 'number_of_aggregate_correlations_as_cause' => null, + 'number_of_aggregate_correlations_as_effect' => null, + 'number_of_changes' => null, + 'number_of_correlations' => null, + 'number_of_measurements' => null, + 'number_of_processed_daily_measurements' => null, + 'number_of_raw_measurements' => null, + 'number_of_tracking_reminders' => null, + 'number_of_unique_daily_values' => null, + 'number_of_unique_values' => null, + 'number_of_user_correlations_as_cause' => null, + 'number_of_user_correlations_as_effect' => null, + 'number_of_user_variables' => null, + 'onset_delay' => null, + 'onset_delay_in_hours' => null, + 'outcome' => null, + 'outcome_of_interest' => null, + 'parent' => null, + 'parent_id' => null, + 'parent_user_tag_variables' => null, + 'png_path' => null, + 'png_url' => null, + 'predictor_of_interest' => null, + 'price' => null, + 'product_url' => null, + 'public' => null, + 'raw_measurements_at_last_analysis' => null, + 'second_most_common_value' => 'double', + 'second_to_last_value' => 'double', + 'share_user_measurements' => null, + 'skewness' => 'double', + 'sources' => null, + 'standard_deviation' => 'double', + 'status' => null, + 'subtitle' => null, + 'sub_variables' => null, + 'svg_url' => null, + 'third_most_common_value' => 'double', + 'third_to_last_value' => 'double', + 'updated' => null, + 'updated_at' => 'date-time', + 'user_id' => null, + 'valence' => null, + 'variable_category_id' => null, + 'variable_category_image_url' => null, + 'variable_category_name' => null, + 'variable_filling_value' => 'double', + 'variable_id' => null, + 'variable_name' => null, + 'variance' => 'double', + 'wikipedia_title' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'alias' => 'alias', + 'available_units' => 'availableUnits', + 'category' => 'category', + 'cause_only' => 'causeOnly', + 'charts_link_dynamic' => 'chartsLinkDynamic', + 'charts_link_email' => 'chartsLinkEmail', + 'charts_link_facebook' => 'chartsLinkFacebook', + 'charts_link_google' => 'chartsLinkGoogle', + 'charts_link_static' => 'chartsLinkStatic', + 'charts_link_twitter' => 'chartsLinkTwitter', + 'child_user_tag_variables' => 'childUserTagVariables', + 'client_id' => 'clientId', + 'combination_operation' => 'combinationOperation', + 'common_alias' => 'commonAlias', + 'common_tagged_variables' => 'commonTaggedVariables', + 'common_tag_variables' => 'commonTagVariables', + 'common_variable_most_common_connector_id' => 'commonVariableMostCommonConnectorId', + 'common_variable_updated_at' => 'commonVariableUpdatedAt', + 'created_at' => 'createdAt', + 'data_source' => 'dataSource', + 'highcharts' => 'highcharts', + 'unit_abbreviated_name' => 'unitAbbreviatedName', + 'unit_category_id' => 'unitCategoryId', + 'unit_category_name' => 'unitCategoryName', + 'unit_id' => 'unitId', + 'unit_name' => 'unitName', + 'description' => 'description', + 'duration_of_action' => 'durationOfAction', + 'duration_of_action_in_hours' => 'durationOfActionInHours', + 'earliest_filling_time' => 'earliestFillingTime', + 'earliest_measurement_time' => 'earliestMeasurementTime', + 'earliest_source_time' => 'earliestSourceTime', + 'experiment_end_time' => 'experimentEndTime', + 'experiment_end_time_seconds' => 'experimentEndTimeSeconds', + 'experiment_end_time_string' => 'experimentEndTimeString', + 'experiment_start_time' => 'experimentStartTime', + 'experiment_start_time_seconds' => 'experimentStartTimeSeconds', + 'experiment_start_time_string' => 'experimentStartTimeString', + 'filling_type' => 'fillingType', + 'filling_value' => 'fillingValue', + 'id' => 'id', + 'image_url' => 'imageUrl', + 'informational_url' => 'informationalUrl', + 'ingredient_of_user_tag_variables' => 'ingredientOfUserTagVariables', + 'ingredient_user_tag_variables' => 'ingredientUserTagVariables', + 'input_type' => 'inputType', + 'ion_icon' => 'ionIcon', + 'joined_user_tag_variables' => 'joinedUserTagVariables', + 'joined_variables' => 'joinedVariables', + 'join_with' => 'joinWith', + 'kurtosis' => 'kurtosis', + 'last_original_unit_id' => 'lastOriginalUnitId', + 'last_original_value' => 'lastOriginalValue', + 'last_processed_daily_value' => 'lastProcessedDailyValue', + 'last_source' => 'lastSource', + 'last_successful_update_time' => 'lastSuccessfulUpdateTime', + 'last_unit' => 'lastUnit', + 'last_unit_id' => 'lastUnitId', + 'last_value' => 'lastValue', + 'latest_filling_time' => 'latestFillingTime', + 'latest_measurement_time' => 'latestMeasurementTime', + 'latest_source_time' => 'latestSourceTime', + 'latest_user_measurement_time' => 'latestUserMeasurementTime', + 'manual_tracking' => 'manualTracking', + 'maximum_allowed_value' => 'maximumAllowedValue', + 'maximum_recorded_value' => 'maximumRecordedValue', + 'mean' => 'mean', + 'measurements_at_last_analysis' => 'measurementsAtLastAnalysis', + 'median' => 'median', + 'minimum_allowed_value' => 'minimumAllowedValue', + 'minimum_recorded_value' => 'minimumRecordedValue', + 'most_common_connector_id' => 'mostCommonConnectorId', + 'most_common_original_unit_id' => 'mostCommonOriginalUnitId', + 'most_common_unit' => 'mostCommonUnit', + 'most_common_value' => 'mostCommonValue', + 'name' => 'name', + 'number_of_aggregate_correlations_as_cause' => 'numberOfAggregateCorrelationsAsCause', + 'number_of_aggregate_correlations_as_effect' => 'numberOfAggregateCorrelationsAsEffect', + 'number_of_changes' => 'numberOfChanges', + 'number_of_correlations' => 'numberOfCorrelations', + 'number_of_measurements' => 'numberOfMeasurements', + 'number_of_processed_daily_measurements' => 'numberOfProcessedDailyMeasurements', + 'number_of_raw_measurements' => 'numberOfRawMeasurements', + 'number_of_tracking_reminders' => 'numberOfTrackingReminders', + 'number_of_unique_daily_values' => 'numberOfUniqueDailyValues', + 'number_of_unique_values' => 'numberOfUniqueValues', + 'number_of_user_correlations_as_cause' => 'numberOfUserCorrelationsAsCause', + 'number_of_user_correlations_as_effect' => 'numberOfUserCorrelationsAsEffect', + 'number_of_user_variables' => 'numberOfUserVariables', + 'onset_delay' => 'onsetDelay', + 'onset_delay_in_hours' => 'onsetDelayInHours', + 'outcome' => 'outcome', + 'outcome_of_interest' => 'outcomeOfInterest', + 'parent' => 'parent', + 'parent_id' => 'parentId', + 'parent_user_tag_variables' => 'parentUserTagVariables', + 'png_path' => 'pngPath', + 'png_url' => 'pngUrl', + 'predictor_of_interest' => 'predictorOfInterest', + 'price' => 'price', + 'product_url' => 'productUrl', + 'public' => 'public', + 'raw_measurements_at_last_analysis' => 'rawMeasurementsAtLastAnalysis', + 'second_most_common_value' => 'secondMostCommonValue', + 'second_to_last_value' => 'secondToLastValue', + 'share_user_measurements' => 'shareUserMeasurements', + 'skewness' => 'skewness', + 'sources' => 'sources', + 'standard_deviation' => 'standardDeviation', + 'status' => 'status', + 'subtitle' => 'subtitle', + 'sub_variables' => 'subVariables', + 'svg_url' => 'svgUrl', + 'third_most_common_value' => 'thirdMostCommonValue', + 'third_to_last_value' => 'thirdToLastValue', + 'updated' => 'updated', + 'updated_at' => 'updatedAt', + 'user_id' => 'userId', + 'valence' => 'valence', + 'variable_category_id' => 'variableCategoryId', + 'variable_category_image_url' => 'variableCategoryImageUrl', + 'variable_category_name' => 'variableCategoryName', + 'variable_filling_value' => 'variableFillingValue', + 'variable_id' => 'variableId', + 'variable_name' => 'variableName', + 'variance' => 'variance', + 'wikipedia_title' => 'wikipediaTitle' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'alias' => 'setAlias', + 'available_units' => 'setAvailableUnits', + 'category' => 'setCategory', + 'cause_only' => 'setCauseOnly', + 'charts_link_dynamic' => 'setChartsLinkDynamic', + 'charts_link_email' => 'setChartsLinkEmail', + 'charts_link_facebook' => 'setChartsLinkFacebook', + 'charts_link_google' => 'setChartsLinkGoogle', + 'charts_link_static' => 'setChartsLinkStatic', + 'charts_link_twitter' => 'setChartsLinkTwitter', + 'child_user_tag_variables' => 'setChildUserTagVariables', + 'client_id' => 'setClientId', + 'combination_operation' => 'setCombinationOperation', + 'common_alias' => 'setCommonAlias', + 'common_tagged_variables' => 'setCommonTaggedVariables', + 'common_tag_variables' => 'setCommonTagVariables', + 'common_variable_most_common_connector_id' => 'setCommonVariableMostCommonConnectorId', + 'common_variable_updated_at' => 'setCommonVariableUpdatedAt', + 'created_at' => 'setCreatedAt', + 'data_source' => 'setDataSource', + 'highcharts' => 'setHighcharts', + 'unit_abbreviated_name' => 'setUnitAbbreviatedName', + 'unit_category_id' => 'setUnitCategoryId', + 'unit_category_name' => 'setUnitCategoryName', + 'unit_id' => 'setUnitId', + 'unit_name' => 'setUnitName', + 'description' => 'setDescription', + 'duration_of_action' => 'setDurationOfAction', + 'duration_of_action_in_hours' => 'setDurationOfActionInHours', + 'earliest_filling_time' => 'setEarliestFillingTime', + 'earliest_measurement_time' => 'setEarliestMeasurementTime', + 'earliest_source_time' => 'setEarliestSourceTime', + 'experiment_end_time' => 'setExperimentEndTime', + 'experiment_end_time_seconds' => 'setExperimentEndTimeSeconds', + 'experiment_end_time_string' => 'setExperimentEndTimeString', + 'experiment_start_time' => 'setExperimentStartTime', + 'experiment_start_time_seconds' => 'setExperimentStartTimeSeconds', + 'experiment_start_time_string' => 'setExperimentStartTimeString', + 'filling_type' => 'setFillingType', + 'filling_value' => 'setFillingValue', + 'id' => 'setId', + 'image_url' => 'setImageUrl', + 'informational_url' => 'setInformationalUrl', + 'ingredient_of_user_tag_variables' => 'setIngredientOfUserTagVariables', + 'ingredient_user_tag_variables' => 'setIngredientUserTagVariables', + 'input_type' => 'setInputType', + 'ion_icon' => 'setIonIcon', + 'joined_user_tag_variables' => 'setJoinedUserTagVariables', + 'joined_variables' => 'setJoinedVariables', + 'join_with' => 'setJoinWith', + 'kurtosis' => 'setKurtosis', + 'last_original_unit_id' => 'setLastOriginalUnitId', + 'last_original_value' => 'setLastOriginalValue', + 'last_processed_daily_value' => 'setLastProcessedDailyValue', + 'last_source' => 'setLastSource', + 'last_successful_update_time' => 'setLastSuccessfulUpdateTime', + 'last_unit' => 'setLastUnit', + 'last_unit_id' => 'setLastUnitId', + 'last_value' => 'setLastValue', + 'latest_filling_time' => 'setLatestFillingTime', + 'latest_measurement_time' => 'setLatestMeasurementTime', + 'latest_source_time' => 'setLatestSourceTime', + 'latest_user_measurement_time' => 'setLatestUserMeasurementTime', + 'manual_tracking' => 'setManualTracking', + 'maximum_allowed_value' => 'setMaximumAllowedValue', + 'maximum_recorded_value' => 'setMaximumRecordedValue', + 'mean' => 'setMean', + 'measurements_at_last_analysis' => 'setMeasurementsAtLastAnalysis', + 'median' => 'setMedian', + 'minimum_allowed_value' => 'setMinimumAllowedValue', + 'minimum_recorded_value' => 'setMinimumRecordedValue', + 'most_common_connector_id' => 'setMostCommonConnectorId', + 'most_common_original_unit_id' => 'setMostCommonOriginalUnitId', + 'most_common_unit' => 'setMostCommonUnit', + 'most_common_value' => 'setMostCommonValue', + 'name' => 'setName', + 'number_of_aggregate_correlations_as_cause' => 'setNumberOfAggregateCorrelationsAsCause', + 'number_of_aggregate_correlations_as_effect' => 'setNumberOfAggregateCorrelationsAsEffect', + 'number_of_changes' => 'setNumberOfChanges', + 'number_of_correlations' => 'setNumberOfCorrelations', + 'number_of_measurements' => 'setNumberOfMeasurements', + 'number_of_processed_daily_measurements' => 'setNumberOfProcessedDailyMeasurements', + 'number_of_raw_measurements' => 'setNumberOfRawMeasurements', + 'number_of_tracking_reminders' => 'setNumberOfTrackingReminders', + 'number_of_unique_daily_values' => 'setNumberOfUniqueDailyValues', + 'number_of_unique_values' => 'setNumberOfUniqueValues', + 'number_of_user_correlations_as_cause' => 'setNumberOfUserCorrelationsAsCause', + 'number_of_user_correlations_as_effect' => 'setNumberOfUserCorrelationsAsEffect', + 'number_of_user_variables' => 'setNumberOfUserVariables', + 'onset_delay' => 'setOnsetDelay', + 'onset_delay_in_hours' => 'setOnsetDelayInHours', + 'outcome' => 'setOutcome', + 'outcome_of_interest' => 'setOutcomeOfInterest', + 'parent' => 'setParent', + 'parent_id' => 'setParentId', + 'parent_user_tag_variables' => 'setParentUserTagVariables', + 'png_path' => 'setPngPath', + 'png_url' => 'setPngUrl', + 'predictor_of_interest' => 'setPredictorOfInterest', + 'price' => 'setPrice', + 'product_url' => 'setProductUrl', + 'public' => 'setPublic', + 'raw_measurements_at_last_analysis' => 'setRawMeasurementsAtLastAnalysis', + 'second_most_common_value' => 'setSecondMostCommonValue', + 'second_to_last_value' => 'setSecondToLastValue', + 'share_user_measurements' => 'setShareUserMeasurements', + 'skewness' => 'setSkewness', + 'sources' => 'setSources', + 'standard_deviation' => 'setStandardDeviation', + 'status' => 'setStatus', + 'subtitle' => 'setSubtitle', + 'sub_variables' => 'setSubVariables', + 'svg_url' => 'setSvgUrl', + 'third_most_common_value' => 'setThirdMostCommonValue', + 'third_to_last_value' => 'setThirdToLastValue', + 'updated' => 'setUpdated', + 'updated_at' => 'setUpdatedAt', + 'user_id' => 'setUserId', + 'valence' => 'setValence', + 'variable_category_id' => 'setVariableCategoryId', + 'variable_category_image_url' => 'setVariableCategoryImageUrl', + 'variable_category_name' => 'setVariableCategoryName', + 'variable_filling_value' => 'setVariableFillingValue', + 'variable_id' => 'setVariableId', + 'variable_name' => 'setVariableName', + 'variance' => 'setVariance', + 'wikipedia_title' => 'setWikipediaTitle' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'alias' => 'getAlias', + 'available_units' => 'getAvailableUnits', + 'category' => 'getCategory', + 'cause_only' => 'getCauseOnly', + 'charts_link_dynamic' => 'getChartsLinkDynamic', + 'charts_link_email' => 'getChartsLinkEmail', + 'charts_link_facebook' => 'getChartsLinkFacebook', + 'charts_link_google' => 'getChartsLinkGoogle', + 'charts_link_static' => 'getChartsLinkStatic', + 'charts_link_twitter' => 'getChartsLinkTwitter', + 'child_user_tag_variables' => 'getChildUserTagVariables', + 'client_id' => 'getClientId', + 'combination_operation' => 'getCombinationOperation', + 'common_alias' => 'getCommonAlias', + 'common_tagged_variables' => 'getCommonTaggedVariables', + 'common_tag_variables' => 'getCommonTagVariables', + 'common_variable_most_common_connector_id' => 'getCommonVariableMostCommonConnectorId', + 'common_variable_updated_at' => 'getCommonVariableUpdatedAt', + 'created_at' => 'getCreatedAt', + 'data_source' => 'getDataSource', + 'highcharts' => 'getHighcharts', + 'unit_abbreviated_name' => 'getUnitAbbreviatedName', + 'unit_category_id' => 'getUnitCategoryId', + 'unit_category_name' => 'getUnitCategoryName', + 'unit_id' => 'getUnitId', + 'unit_name' => 'getUnitName', + 'description' => 'getDescription', + 'duration_of_action' => 'getDurationOfAction', + 'duration_of_action_in_hours' => 'getDurationOfActionInHours', + 'earliest_filling_time' => 'getEarliestFillingTime', + 'earliest_measurement_time' => 'getEarliestMeasurementTime', + 'earliest_source_time' => 'getEarliestSourceTime', + 'experiment_end_time' => 'getExperimentEndTime', + 'experiment_end_time_seconds' => 'getExperimentEndTimeSeconds', + 'experiment_end_time_string' => 'getExperimentEndTimeString', + 'experiment_start_time' => 'getExperimentStartTime', + 'experiment_start_time_seconds' => 'getExperimentStartTimeSeconds', + 'experiment_start_time_string' => 'getExperimentStartTimeString', + 'filling_type' => 'getFillingType', + 'filling_value' => 'getFillingValue', + 'id' => 'getId', + 'image_url' => 'getImageUrl', + 'informational_url' => 'getInformationalUrl', + 'ingredient_of_user_tag_variables' => 'getIngredientOfUserTagVariables', + 'ingredient_user_tag_variables' => 'getIngredientUserTagVariables', + 'input_type' => 'getInputType', + 'ion_icon' => 'getIonIcon', + 'joined_user_tag_variables' => 'getJoinedUserTagVariables', + 'joined_variables' => 'getJoinedVariables', + 'join_with' => 'getJoinWith', + 'kurtosis' => 'getKurtosis', + 'last_original_unit_id' => 'getLastOriginalUnitId', + 'last_original_value' => 'getLastOriginalValue', + 'last_processed_daily_value' => 'getLastProcessedDailyValue', + 'last_source' => 'getLastSource', + 'last_successful_update_time' => 'getLastSuccessfulUpdateTime', + 'last_unit' => 'getLastUnit', + 'last_unit_id' => 'getLastUnitId', + 'last_value' => 'getLastValue', + 'latest_filling_time' => 'getLatestFillingTime', + 'latest_measurement_time' => 'getLatestMeasurementTime', + 'latest_source_time' => 'getLatestSourceTime', + 'latest_user_measurement_time' => 'getLatestUserMeasurementTime', + 'manual_tracking' => 'getManualTracking', + 'maximum_allowed_value' => 'getMaximumAllowedValue', + 'maximum_recorded_value' => 'getMaximumRecordedValue', + 'mean' => 'getMean', + 'measurements_at_last_analysis' => 'getMeasurementsAtLastAnalysis', + 'median' => 'getMedian', + 'minimum_allowed_value' => 'getMinimumAllowedValue', + 'minimum_recorded_value' => 'getMinimumRecordedValue', + 'most_common_connector_id' => 'getMostCommonConnectorId', + 'most_common_original_unit_id' => 'getMostCommonOriginalUnitId', + 'most_common_unit' => 'getMostCommonUnit', + 'most_common_value' => 'getMostCommonValue', + 'name' => 'getName', + 'number_of_aggregate_correlations_as_cause' => 'getNumberOfAggregateCorrelationsAsCause', + 'number_of_aggregate_correlations_as_effect' => 'getNumberOfAggregateCorrelationsAsEffect', + 'number_of_changes' => 'getNumberOfChanges', + 'number_of_correlations' => 'getNumberOfCorrelations', + 'number_of_measurements' => 'getNumberOfMeasurements', + 'number_of_processed_daily_measurements' => 'getNumberOfProcessedDailyMeasurements', + 'number_of_raw_measurements' => 'getNumberOfRawMeasurements', + 'number_of_tracking_reminders' => 'getNumberOfTrackingReminders', + 'number_of_unique_daily_values' => 'getNumberOfUniqueDailyValues', + 'number_of_unique_values' => 'getNumberOfUniqueValues', + 'number_of_user_correlations_as_cause' => 'getNumberOfUserCorrelationsAsCause', + 'number_of_user_correlations_as_effect' => 'getNumberOfUserCorrelationsAsEffect', + 'number_of_user_variables' => 'getNumberOfUserVariables', + 'onset_delay' => 'getOnsetDelay', + 'onset_delay_in_hours' => 'getOnsetDelayInHours', + 'outcome' => 'getOutcome', + 'outcome_of_interest' => 'getOutcomeOfInterest', + 'parent' => 'getParent', + 'parent_id' => 'getParentId', + 'parent_user_tag_variables' => 'getParentUserTagVariables', + 'png_path' => 'getPngPath', + 'png_url' => 'getPngUrl', + 'predictor_of_interest' => 'getPredictorOfInterest', + 'price' => 'getPrice', + 'product_url' => 'getProductUrl', + 'public' => 'getPublic', + 'raw_measurements_at_last_analysis' => 'getRawMeasurementsAtLastAnalysis', + 'second_most_common_value' => 'getSecondMostCommonValue', + 'second_to_last_value' => 'getSecondToLastValue', + 'share_user_measurements' => 'getShareUserMeasurements', + 'skewness' => 'getSkewness', + 'sources' => 'getSources', + 'standard_deviation' => 'getStandardDeviation', + 'status' => 'getStatus', + 'subtitle' => 'getSubtitle', + 'sub_variables' => 'getSubVariables', + 'svg_url' => 'getSvgUrl', + 'third_most_common_value' => 'getThirdMostCommonValue', + 'third_to_last_value' => 'getThirdToLastValue', + 'updated' => 'getUpdated', + 'updated_at' => 'getUpdatedAt', + 'user_id' => 'getUserId', + 'valence' => 'getValence', + 'variable_category_id' => 'getVariableCategoryId', + 'variable_category_image_url' => 'getVariableCategoryImageUrl', + 'variable_category_name' => 'getVariableCategoryName', + 'variable_filling_value' => 'getVariableFillingValue', + 'variable_id' => 'getVariableId', + 'variable_name' => 'getVariableName', + 'variance' => 'getVariance', + 'wikipedia_title' => 'getWikipediaTitle' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + const COMBINATION_OPERATION_MEAN = 'MEAN'; + const COMBINATION_OPERATION_SUM = 'SUM'; + + + + /** + * Gets allowable values of the enum + * @return string[] + */ + public function getCombinationOperationAllowableValues() + { + return [ + self::COMBINATION_OPERATION_MEAN, + self::COMBINATION_OPERATION_SUM, + ]; + } + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['alias'] = isset($data['alias']) ? $data['alias'] : null; + $this->container['available_units'] = isset($data['available_units']) ? $data['available_units'] : null; + $this->container['category'] = isset($data['category']) ? $data['category'] : null; + $this->container['cause_only'] = isset($data['cause_only']) ? $data['cause_only'] : null; + $this->container['charts_link_dynamic'] = isset($data['charts_link_dynamic']) ? $data['charts_link_dynamic'] : null; + $this->container['charts_link_email'] = isset($data['charts_link_email']) ? $data['charts_link_email'] : null; + $this->container['charts_link_facebook'] = isset($data['charts_link_facebook']) ? $data['charts_link_facebook'] : null; + $this->container['charts_link_google'] = isset($data['charts_link_google']) ? $data['charts_link_google'] : null; + $this->container['charts_link_static'] = isset($data['charts_link_static']) ? $data['charts_link_static'] : null; + $this->container['charts_link_twitter'] = isset($data['charts_link_twitter']) ? $data['charts_link_twitter'] : null; + $this->container['child_user_tag_variables'] = isset($data['child_user_tag_variables']) ? $data['child_user_tag_variables'] : null; + $this->container['client_id'] = isset($data['client_id']) ? $data['client_id'] : null; + $this->container['combination_operation'] = isset($data['combination_operation']) ? $data['combination_operation'] : null; + $this->container['common_alias'] = isset($data['common_alias']) ? $data['common_alias'] : null; + $this->container['common_tagged_variables'] = isset($data['common_tagged_variables']) ? $data['common_tagged_variables'] : null; + $this->container['common_tag_variables'] = isset($data['common_tag_variables']) ? $data['common_tag_variables'] : null; + $this->container['common_variable_most_common_connector_id'] = isset($data['common_variable_most_common_connector_id']) ? $data['common_variable_most_common_connector_id'] : null; + $this->container['common_variable_updated_at'] = isset($data['common_variable_updated_at']) ? $data['common_variable_updated_at'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['data_source'] = isset($data['data_source']) ? $data['data_source'] : null; + $this->container['highcharts'] = isset($data['highcharts']) ? $data['highcharts'] : null; + $this->container['unit_abbreviated_name'] = isset($data['unit_abbreviated_name']) ? $data['unit_abbreviated_name'] : null; + $this->container['unit_category_id'] = isset($data['unit_category_id']) ? $data['unit_category_id'] : null; + $this->container['unit_category_name'] = isset($data['unit_category_name']) ? $data['unit_category_name'] : null; + $this->container['unit_id'] = isset($data['unit_id']) ? $data['unit_id'] : null; + $this->container['unit_name'] = isset($data['unit_name']) ? $data['unit_name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['duration_of_action'] = isset($data['duration_of_action']) ? $data['duration_of_action'] : null; + $this->container['duration_of_action_in_hours'] = isset($data['duration_of_action_in_hours']) ? $data['duration_of_action_in_hours'] : null; + $this->container['earliest_filling_time'] = isset($data['earliest_filling_time']) ? $data['earliest_filling_time'] : null; + $this->container['earliest_measurement_time'] = isset($data['earliest_measurement_time']) ? $data['earliest_measurement_time'] : null; + $this->container['earliest_source_time'] = isset($data['earliest_source_time']) ? $data['earliest_source_time'] : null; + $this->container['experiment_end_time'] = isset($data['experiment_end_time']) ? $data['experiment_end_time'] : null; + $this->container['experiment_end_time_seconds'] = isset($data['experiment_end_time_seconds']) ? $data['experiment_end_time_seconds'] : null; + $this->container['experiment_end_time_string'] = isset($data['experiment_end_time_string']) ? $data['experiment_end_time_string'] : null; + $this->container['experiment_start_time'] = isset($data['experiment_start_time']) ? $data['experiment_start_time'] : null; + $this->container['experiment_start_time_seconds'] = isset($data['experiment_start_time_seconds']) ? $data['experiment_start_time_seconds'] : null; + $this->container['experiment_start_time_string'] = isset($data['experiment_start_time_string']) ? $data['experiment_start_time_string'] : null; + $this->container['filling_type'] = isset($data['filling_type']) ? $data['filling_type'] : null; + $this->container['filling_value'] = isset($data['filling_value']) ? $data['filling_value'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['image_url'] = isset($data['image_url']) ? $data['image_url'] : null; + $this->container['informational_url'] = isset($data['informational_url']) ? $data['informational_url'] : null; + $this->container['ingredient_of_user_tag_variables'] = isset($data['ingredient_of_user_tag_variables']) ? $data['ingredient_of_user_tag_variables'] : null; + $this->container['ingredient_user_tag_variables'] = isset($data['ingredient_user_tag_variables']) ? $data['ingredient_user_tag_variables'] : null; + $this->container['input_type'] = isset($data['input_type']) ? $data['input_type'] : null; + $this->container['ion_icon'] = isset($data['ion_icon']) ? $data['ion_icon'] : null; + $this->container['joined_user_tag_variables'] = isset($data['joined_user_tag_variables']) ? $data['joined_user_tag_variables'] : null; + $this->container['joined_variables'] = isset($data['joined_variables']) ? $data['joined_variables'] : null; + $this->container['join_with'] = isset($data['join_with']) ? $data['join_with'] : null; + $this->container['kurtosis'] = isset($data['kurtosis']) ? $data['kurtosis'] : null; + $this->container['last_original_unit_id'] = isset($data['last_original_unit_id']) ? $data['last_original_unit_id'] : null; + $this->container['last_original_value'] = isset($data['last_original_value']) ? $data['last_original_value'] : null; + $this->container['last_processed_daily_value'] = isset($data['last_processed_daily_value']) ? $data['last_processed_daily_value'] : null; + $this->container['last_source'] = isset($data['last_source']) ? $data['last_source'] : null; + $this->container['last_successful_update_time'] = isset($data['last_successful_update_time']) ? $data['last_successful_update_time'] : null; + $this->container['last_unit'] = isset($data['last_unit']) ? $data['last_unit'] : null; + $this->container['last_unit_id'] = isset($data['last_unit_id']) ? $data['last_unit_id'] : null; + $this->container['last_value'] = isset($data['last_value']) ? $data['last_value'] : null; + $this->container['latest_filling_time'] = isset($data['latest_filling_time']) ? $data['latest_filling_time'] : null; + $this->container['latest_measurement_time'] = isset($data['latest_measurement_time']) ? $data['latest_measurement_time'] : null; + $this->container['latest_source_time'] = isset($data['latest_source_time']) ? $data['latest_source_time'] : null; + $this->container['latest_user_measurement_time'] = isset($data['latest_user_measurement_time']) ? $data['latest_user_measurement_time'] : null; + $this->container['manual_tracking'] = isset($data['manual_tracking']) ? $data['manual_tracking'] : null; + $this->container['maximum_allowed_value'] = isset($data['maximum_allowed_value']) ? $data['maximum_allowed_value'] : null; + $this->container['maximum_recorded_value'] = isset($data['maximum_recorded_value']) ? $data['maximum_recorded_value'] : null; + $this->container['mean'] = isset($data['mean']) ? $data['mean'] : null; + $this->container['measurements_at_last_analysis'] = isset($data['measurements_at_last_analysis']) ? $data['measurements_at_last_analysis'] : null; + $this->container['median'] = isset($data['median']) ? $data['median'] : null; + $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; + $this->container['minimum_recorded_value'] = isset($data['minimum_recorded_value']) ? $data['minimum_recorded_value'] : null; + $this->container['most_common_connector_id'] = isset($data['most_common_connector_id']) ? $data['most_common_connector_id'] : null; + $this->container['most_common_original_unit_id'] = isset($data['most_common_original_unit_id']) ? $data['most_common_original_unit_id'] : null; + $this->container['most_common_unit'] = isset($data['most_common_unit']) ? $data['most_common_unit'] : null; + $this->container['most_common_value'] = isset($data['most_common_value']) ? $data['most_common_value'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['number_of_aggregate_correlations_as_cause'] = isset($data['number_of_aggregate_correlations_as_cause']) ? $data['number_of_aggregate_correlations_as_cause'] : null; + $this->container['number_of_aggregate_correlations_as_effect'] = isset($data['number_of_aggregate_correlations_as_effect']) ? $data['number_of_aggregate_correlations_as_effect'] : null; + $this->container['number_of_changes'] = isset($data['number_of_changes']) ? $data['number_of_changes'] : null; + $this->container['number_of_correlations'] = isset($data['number_of_correlations']) ? $data['number_of_correlations'] : null; + $this->container['number_of_measurements'] = isset($data['number_of_measurements']) ? $data['number_of_measurements'] : null; + $this->container['number_of_processed_daily_measurements'] = isset($data['number_of_processed_daily_measurements']) ? $data['number_of_processed_daily_measurements'] : null; + $this->container['number_of_raw_measurements'] = isset($data['number_of_raw_measurements']) ? $data['number_of_raw_measurements'] : null; + $this->container['number_of_tracking_reminders'] = isset($data['number_of_tracking_reminders']) ? $data['number_of_tracking_reminders'] : null; + $this->container['number_of_unique_daily_values'] = isset($data['number_of_unique_daily_values']) ? $data['number_of_unique_daily_values'] : null; + $this->container['number_of_unique_values'] = isset($data['number_of_unique_values']) ? $data['number_of_unique_values'] : null; + $this->container['number_of_user_correlations_as_cause'] = isset($data['number_of_user_correlations_as_cause']) ? $data['number_of_user_correlations_as_cause'] : null; + $this->container['number_of_user_correlations_as_effect'] = isset($data['number_of_user_correlations_as_effect']) ? $data['number_of_user_correlations_as_effect'] : null; + $this->container['number_of_user_variables'] = isset($data['number_of_user_variables']) ? $data['number_of_user_variables'] : null; + $this->container['onset_delay'] = isset($data['onset_delay']) ? $data['onset_delay'] : null; + $this->container['onset_delay_in_hours'] = isset($data['onset_delay_in_hours']) ? $data['onset_delay_in_hours'] : null; + $this->container['outcome'] = isset($data['outcome']) ? $data['outcome'] : null; + $this->container['outcome_of_interest'] = isset($data['outcome_of_interest']) ? $data['outcome_of_interest'] : null; + $this->container['parent'] = isset($data['parent']) ? $data['parent'] : null; + $this->container['parent_id'] = isset($data['parent_id']) ? $data['parent_id'] : null; + $this->container['parent_user_tag_variables'] = isset($data['parent_user_tag_variables']) ? $data['parent_user_tag_variables'] : null; + $this->container['png_path'] = isset($data['png_path']) ? $data['png_path'] : null; + $this->container['png_url'] = isset($data['png_url']) ? $data['png_url'] : null; + $this->container['predictor_of_interest'] = isset($data['predictor_of_interest']) ? $data['predictor_of_interest'] : null; + $this->container['price'] = isset($data['price']) ? $data['price'] : null; + $this->container['product_url'] = isset($data['product_url']) ? $data['product_url'] : null; + $this->container['public'] = isset($data['public']) ? $data['public'] : null; + $this->container['raw_measurements_at_last_analysis'] = isset($data['raw_measurements_at_last_analysis']) ? $data['raw_measurements_at_last_analysis'] : null; + $this->container['second_most_common_value'] = isset($data['second_most_common_value']) ? $data['second_most_common_value'] : null; + $this->container['second_to_last_value'] = isset($data['second_to_last_value']) ? $data['second_to_last_value'] : null; + $this->container['share_user_measurements'] = isset($data['share_user_measurements']) ? $data['share_user_measurements'] : null; + $this->container['skewness'] = isset($data['skewness']) ? $data['skewness'] : null; + $this->container['sources'] = isset($data['sources']) ? $data['sources'] : null; + $this->container['standard_deviation'] = isset($data['standard_deviation']) ? $data['standard_deviation'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['subtitle'] = isset($data['subtitle']) ? $data['subtitle'] : null; + $this->container['sub_variables'] = isset($data['sub_variables']) ? $data['sub_variables'] : null; + $this->container['svg_url'] = isset($data['svg_url']) ? $data['svg_url'] : null; + $this->container['third_most_common_value'] = isset($data['third_most_common_value']) ? $data['third_most_common_value'] : null; + $this->container['third_to_last_value'] = isset($data['third_to_last_value']) ? $data['third_to_last_value'] : null; + $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; + $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; + $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; + $this->container['valence'] = isset($data['valence']) ? $data['valence'] : null; + $this->container['variable_category_id'] = isset($data['variable_category_id']) ? $data['variable_category_id'] : null; + $this->container['variable_category_image_url'] = isset($data['variable_category_image_url']) ? $data['variable_category_image_url'] : null; + $this->container['variable_category_name'] = isset($data['variable_category_name']) ? $data['variable_category_name'] : null; + $this->container['variable_filling_value'] = isset($data['variable_filling_value']) ? $data['variable_filling_value'] : null; + $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; + $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; + $this->container['variance'] = isset($data['variance']) ? $data['variance'] : null; + $this->container['wikipedia_title'] = isset($data['wikipedia_title']) ? $data['wikipedia_title'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['alias'] === null) { + $invalid_properties[] = "'alias' can't be null"; + } + if ($this->container['available_units'] === null) { + $invalid_properties[] = "'available_units' can't be null"; + } + if ($this->container['cause_only'] === null) { + $invalid_properties[] = "'cause_only' can't be null"; + } + if ($this->container['charts_link_dynamic'] === null) { + $invalid_properties[] = "'charts_link_dynamic' can't be null"; + } + if ($this->container['charts_link_email'] === null) { + $invalid_properties[] = "'charts_link_email' can't be null"; + } + if ($this->container['charts_link_facebook'] === null) { + $invalid_properties[] = "'charts_link_facebook' can't be null"; + } + if ($this->container['charts_link_google'] === null) { + $invalid_properties[] = "'charts_link_google' can't be null"; + } + if ($this->container['charts_link_static'] === null) { + $invalid_properties[] = "'charts_link_static' can't be null"; + } + if ($this->container['charts_link_twitter'] === null) { + $invalid_properties[] = "'charts_link_twitter' can't be null"; + } + if ($this->container['child_user_tag_variables'] === null) { + $invalid_properties[] = "'child_user_tag_variables' can't be null"; + } + if ($this->container['client_id'] === null) { + $invalid_properties[] = "'client_id' can't be null"; + } + if ($this->container['combination_operation'] === null) { + $invalid_properties[] = "'combination_operation' can't be null"; + } + $allowed_values = $this->getCombinationOperationAllowableValues(); + if (!in_array($this->container['combination_operation'], $allowed_values)) { + $invalid_properties[] = sprintf( + "invalid value for 'combination_operation', must be one of '%s'", + implode("', '", $allowed_values) + ); + } + + if ($this->container['common_tagged_variables'] === null) { + $invalid_properties[] = "'common_tagged_variables' can't be null"; + } + if ($this->container['common_tag_variables'] === null) { + $invalid_properties[] = "'common_tag_variables' can't be null"; + } + if ($this->container['common_variable_most_common_connector_id'] === null) { + $invalid_properties[] = "'common_variable_most_common_connector_id' can't be null"; + } + if ($this->container['common_variable_updated_at'] === null) { + $invalid_properties[] = "'common_variable_updated_at' can't be null"; + } + if ($this->container['data_source'] === null) { + $invalid_properties[] = "'data_source' can't be null"; + } + if ($this->container['unit_abbreviated_name'] === null) { + $invalid_properties[] = "'unit_abbreviated_name' can't be null"; + } + if ($this->container['unit_id'] === null) { + $invalid_properties[] = "'unit_id' can't be null"; + } + if ($this->container['duration_of_action'] === null) { + $invalid_properties[] = "'duration_of_action' can't be null"; + } + if ($this->container['earliest_filling_time'] === null) { + $invalid_properties[] = "'earliest_filling_time' can't be null"; + } + if ($this->container['earliest_measurement_time'] === null) { + $invalid_properties[] = "'earliest_measurement_time' can't be null"; + } + if ($this->container['earliest_source_time'] === null) { + $invalid_properties[] = "'earliest_source_time' can't be null"; + } + if ($this->container['experiment_end_time'] === null) { + $invalid_properties[] = "'experiment_end_time' can't be null"; + } + if ($this->container['experiment_end_time_seconds'] === null) { + $invalid_properties[] = "'experiment_end_time_seconds' can't be null"; + } + if ($this->container['experiment_end_time_string'] === null) { + $invalid_properties[] = "'experiment_end_time_string' can't be null"; + } + if ($this->container['experiment_start_time'] === null) { + $invalid_properties[] = "'experiment_start_time' can't be null"; + } + if ($this->container['experiment_start_time_seconds'] === null) { + $invalid_properties[] = "'experiment_start_time_seconds' can't be null"; + } + if ($this->container['experiment_start_time_string'] === null) { + $invalid_properties[] = "'experiment_start_time_string' can't be null"; + } + if ($this->container['filling_type'] === null) { + $invalid_properties[] = "'filling_type' can't be null"; + } + if ($this->container['filling_value'] === null) { + $invalid_properties[] = "'filling_value' can't be null"; + } + if ($this->container['informational_url'] === null) { + $invalid_properties[] = "'informational_url' can't be null"; + } + if ($this->container['ingredient_of_user_tag_variables'] === null) { + $invalid_properties[] = "'ingredient_of_user_tag_variables' can't be null"; + } + if ($this->container['ingredient_user_tag_variables'] === null) { + $invalid_properties[] = "'ingredient_user_tag_variables' can't be null"; + } + if ($this->container['joined_user_tag_variables'] === null) { + $invalid_properties[] = "'joined_user_tag_variables' can't be null"; + } + if ($this->container['joined_variables'] === null) { + $invalid_properties[] = "'joined_variables' can't be null"; + } + if ($this->container['join_with'] === null) { + $invalid_properties[] = "'join_with' can't be null"; + } + if ($this->container['last_original_unit_id'] === null) { + $invalid_properties[] = "'last_original_unit_id' can't be null"; + } + if ($this->container['last_original_value'] === null) { + $invalid_properties[] = "'last_original_value' can't be null"; + } + if ($this->container['last_processed_daily_value'] === null) { + $invalid_properties[] = "'last_processed_daily_value' can't be null"; + } + if ($this->container['last_source'] === null) { + $invalid_properties[] = "'last_source' can't be null"; + } + if ($this->container['last_successful_update_time'] === null) { + $invalid_properties[] = "'last_successful_update_time' can't be null"; + } + if ($this->container['last_unit'] === null) { + $invalid_properties[] = "'last_unit' can't be null"; + } + if ($this->container['last_unit_id'] === null) { + $invalid_properties[] = "'last_unit_id' can't be null"; + } + if ($this->container['last_value'] === null) { + $invalid_properties[] = "'last_value' can't be null"; + } + if ($this->container['latest_filling_time'] === null) { + $invalid_properties[] = "'latest_filling_time' can't be null"; + } + if ($this->container['latest_measurement_time'] === null) { + $invalid_properties[] = "'latest_measurement_time' can't be null"; + } + if ($this->container['latest_source_time'] === null) { + $invalid_properties[] = "'latest_source_time' can't be null"; + } + if ($this->container['latest_user_measurement_time'] === null) { + $invalid_properties[] = "'latest_user_measurement_time' can't be null"; + } + if ($this->container['maximum_allowed_value'] === null) { + $invalid_properties[] = "'maximum_allowed_value' can't be null"; + } + if ($this->container['maximum_recorded_value'] === null) { + $invalid_properties[] = "'maximum_recorded_value' can't be null"; + } + if ($this->container['measurements_at_last_analysis'] === null) { + $invalid_properties[] = "'measurements_at_last_analysis' can't be null"; + } + if ($this->container['minimum_allowed_value'] === null) { + $invalid_properties[] = "'minimum_allowed_value' can't be null"; + } + if ($this->container['minimum_recorded_value'] === null) { + $invalid_properties[] = "'minimum_recorded_value' can't be null"; + } + if ($this->container['most_common_unit'] === null) { + $invalid_properties[] = "'most_common_unit' can't be null"; + } + if ($this->container['most_common_value'] === null) { + $invalid_properties[] = "'most_common_value' can't be null"; + } + if ($this->container['name'] === null) { + $invalid_properties[] = "'name' can't be null"; + } + if ($this->container['number_of_changes'] === null) { + $invalid_properties[] = "'number_of_changes' can't be null"; + } + if ($this->container['number_of_correlations'] === null) { + $invalid_properties[] = "'number_of_correlations' can't be null"; + } + if ($this->container['number_of_processed_daily_measurements'] === null) { + $invalid_properties[] = "'number_of_processed_daily_measurements' can't be null"; + } + if ($this->container['number_of_raw_measurements'] === null) { + $invalid_properties[] = "'number_of_raw_measurements' can't be null"; + } + if ($this->container['number_of_unique_daily_values'] === null) { + $invalid_properties[] = "'number_of_unique_daily_values' can't be null"; + } + if ($this->container['number_of_user_correlations_as_cause'] === null) { + $invalid_properties[] = "'number_of_user_correlations_as_cause' can't be null"; + } + if ($this->container['number_of_user_correlations_as_effect'] === null) { + $invalid_properties[] = "'number_of_user_correlations_as_effect' can't be null"; + } + if ($this->container['onset_delay'] === null) { + $invalid_properties[] = "'onset_delay' can't be null"; + } + if ($this->container['onset_delay_in_hours'] === null) { + $invalid_properties[] = "'onset_delay_in_hours' can't be null"; + } + if ($this->container['outcome'] === null) { + $invalid_properties[] = "'outcome' can't be null"; + } + if ($this->container['outcome_of_interest'] === null) { + $invalid_properties[] = "'outcome_of_interest' can't be null"; + } + if ($this->container['parent'] === null) { + $invalid_properties[] = "'parent' can't be null"; + } + if ($this->container['parent_id'] === null) { + $invalid_properties[] = "'parent_id' can't be null"; + } + if ($this->container['parent_user_tag_variables'] === null) { + $invalid_properties[] = "'parent_user_tag_variables' can't be null"; + } + if ($this->container['predictor_of_interest'] === null) { + $invalid_properties[] = "'predictor_of_interest' can't be null"; + } + if ($this->container['price'] === null) { + $invalid_properties[] = "'price' can't be null"; + } + if ($this->container['product_url'] === null) { + $invalid_properties[] = "'product_url' can't be null"; + } + if ($this->container['raw_measurements_at_last_analysis'] === null) { + $invalid_properties[] = "'raw_measurements_at_last_analysis' can't be null"; + } + if ($this->container['second_to_last_value'] === null) { + $invalid_properties[] = "'second_to_last_value' can't be null"; + } + if ($this->container['share_user_measurements'] === null) { + $invalid_properties[] = "'share_user_measurements' can't be null"; + } + if ($this->container['sources'] === null) { + $invalid_properties[] = "'sources' can't be null"; + } + if ($this->container['status'] === null) { + $invalid_properties[] = "'status' can't be null"; + } + if ($this->container['sub_variables'] === null) { + $invalid_properties[] = "'sub_variables' can't be null"; + } + if ($this->container['third_to_last_value'] === null) { + $invalid_properties[] = "'third_to_last_value' can't be null"; + } + if ($this->container['updated'] === null) { + $invalid_properties[] = "'updated' can't be null"; + } + if ($this->container['user_id'] === null) { + $invalid_properties[] = "'user_id' can't be null"; + } + if ($this->container['variable_category_name'] === null) { + $invalid_properties[] = "'variable_category_name' can't be null"; + } + if ($this->container['variable_filling_value'] === null) { + $invalid_properties[] = "'variable_filling_value' can't be null"; + } + if ($this->container['variable_id'] === null) { + $invalid_properties[] = "'variable_id' can't be null"; + } + if ($this->container['wikipedia_title'] === null) { + $invalid_properties[] = "'wikipedia_title' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['alias'] === null) { + return false; + } + if ($this->container['available_units'] === null) { + return false; + } + if ($this->container['cause_only'] === null) { + return false; + } + if ($this->container['charts_link_dynamic'] === null) { + return false; + } + if ($this->container['charts_link_email'] === null) { + return false; + } + if ($this->container['charts_link_facebook'] === null) { + return false; + } + if ($this->container['charts_link_google'] === null) { + return false; + } + if ($this->container['charts_link_static'] === null) { + return false; + } + if ($this->container['charts_link_twitter'] === null) { + return false; + } + if ($this->container['child_user_tag_variables'] === null) { + return false; + } + if ($this->container['client_id'] === null) { + return false; + } + if ($this->container['combination_operation'] === null) { + return false; + } + $allowed_values = $this->getCombinationOperationAllowableValues(); + if (!in_array($this->container['combination_operation'], $allowed_values)) { + return false; + } + if ($this->container['common_tagged_variables'] === null) { + return false; + } + if ($this->container['common_tag_variables'] === null) { + return false; + } + if ($this->container['common_variable_most_common_connector_id'] === null) { + return false; + } + if ($this->container['common_variable_updated_at'] === null) { + return false; + } + if ($this->container['data_source'] === null) { + return false; + } + if ($this->container['unit_abbreviated_name'] === null) { + return false; + } + if ($this->container['unit_id'] === null) { + return false; + } + if ($this->container['duration_of_action'] === null) { + return false; + } + if ($this->container['earliest_filling_time'] === null) { + return false; + } + if ($this->container['earliest_measurement_time'] === null) { + return false; + } + if ($this->container['earliest_source_time'] === null) { + return false; + } + if ($this->container['experiment_end_time'] === null) { + return false; + } + if ($this->container['experiment_end_time_seconds'] === null) { + return false; + } + if ($this->container['experiment_end_time_string'] === null) { + return false; + } + if ($this->container['experiment_start_time'] === null) { + return false; + } + if ($this->container['experiment_start_time_seconds'] === null) { + return false; + } + if ($this->container['experiment_start_time_string'] === null) { + return false; + } + if ($this->container['filling_type'] === null) { + return false; + } + if ($this->container['filling_value'] === null) { + return false; + } + if ($this->container['informational_url'] === null) { + return false; + } + if ($this->container['ingredient_of_user_tag_variables'] === null) { + return false; + } + if ($this->container['ingredient_user_tag_variables'] === null) { + return false; + } + if ($this->container['joined_user_tag_variables'] === null) { + return false; + } + if ($this->container['joined_variables'] === null) { + return false; + } + if ($this->container['join_with'] === null) { + return false; + } + if ($this->container['last_original_unit_id'] === null) { + return false; + } + if ($this->container['last_original_value'] === null) { + return false; + } + if ($this->container['last_processed_daily_value'] === null) { + return false; + } + if ($this->container['last_source'] === null) { + return false; + } + if ($this->container['last_successful_update_time'] === null) { + return false; + } + if ($this->container['last_unit'] === null) { + return false; + } + if ($this->container['last_unit_id'] === null) { + return false; + } + if ($this->container['last_value'] === null) { + return false; + } + if ($this->container['latest_filling_time'] === null) { + return false; + } + if ($this->container['latest_measurement_time'] === null) { + return false; + } + if ($this->container['latest_source_time'] === null) { + return false; + } + if ($this->container['latest_user_measurement_time'] === null) { + return false; + } + if ($this->container['maximum_allowed_value'] === null) { + return false; + } + if ($this->container['maximum_recorded_value'] === null) { + return false; + } + if ($this->container['measurements_at_last_analysis'] === null) { + return false; + } + if ($this->container['minimum_allowed_value'] === null) { + return false; + } + if ($this->container['minimum_recorded_value'] === null) { + return false; + } + if ($this->container['most_common_unit'] === null) { + return false; + } + if ($this->container['most_common_value'] === null) { + return false; + } + if ($this->container['name'] === null) { + return false; + } + if ($this->container['number_of_changes'] === null) { + return false; + } + if ($this->container['number_of_correlations'] === null) { + return false; + } + if ($this->container['number_of_processed_daily_measurements'] === null) { + return false; + } + if ($this->container['number_of_raw_measurements'] === null) { + return false; + } + if ($this->container['number_of_unique_daily_values'] === null) { + return false; + } + if ($this->container['number_of_user_correlations_as_cause'] === null) { + return false; + } + if ($this->container['number_of_user_correlations_as_effect'] === null) { + return false; + } + if ($this->container['onset_delay'] === null) { + return false; + } + if ($this->container['onset_delay_in_hours'] === null) { + return false; + } + if ($this->container['outcome'] === null) { + return false; + } + if ($this->container['outcome_of_interest'] === null) { + return false; + } + if ($this->container['parent'] === null) { + return false; + } + if ($this->container['parent_id'] === null) { + return false; + } + if ($this->container['parent_user_tag_variables'] === null) { + return false; + } + if ($this->container['predictor_of_interest'] === null) { + return false; + } + if ($this->container['price'] === null) { + return false; + } + if ($this->container['product_url'] === null) { + return false; + } + if ($this->container['raw_measurements_at_last_analysis'] === null) { + return false; + } + if ($this->container['second_to_last_value'] === null) { + return false; + } + if ($this->container['share_user_measurements'] === null) { + return false; + } + if ($this->container['sources'] === null) { + return false; + } + if ($this->container['status'] === null) { + return false; + } + if ($this->container['sub_variables'] === null) { + return false; + } + if ($this->container['third_to_last_value'] === null) { + return false; + } + if ($this->container['updated'] === null) { + return false; + } + if ($this->container['user_id'] === null) { + return false; + } + if ($this->container['variable_category_name'] === null) { + return false; + } + if ($this->container['variable_filling_value'] === null) { + return false; + } + if ($this->container['variable_id'] === null) { + return false; + } + if ($this->container['wikipedia_title'] === null) { + return false; + } + return true; + } + + + /** + * Gets alias + * @return string + */ + public function getAlias() + { + return $this->container['alias']; + } + + /** + * Sets alias + * @param string $alias Example: + * @return $this + */ + public function setAlias($alias) + { + $this->container['alias'] = $alias; + + return $this; + } + + /** + * Gets available_units + * @return \QuantiModo\Client\Model\Unit[] + */ + public function getAvailableUnits() + { + return $this->container['available_units']; + } + + /** + * Sets available_units + * @param \QuantiModo\Client\Model\Unit[] $available_units + * @return $this + */ + public function setAvailableUnits($available_units) + { + $this->container['available_units'] = $available_units; + + return $this; + } + + /** + * Gets category + * @return string + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * @param string $category Example: Sleep + * @return $this + */ + public function setCategory($category) + { + $this->container['category'] = $category; + + return $this; + } + + /** + * Gets cause_only + * @return int + */ + public function getCauseOnly() + { + return $this->container['cause_only']; + } + + /** + * Sets cause_only + * @param int $cause_only A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user. + * @return $this + */ + public function setCauseOnly($cause_only) + { + $this->container['cause_only'] = $cause_only; + + return $this; + } + + /** + * Gets charts_link_dynamic + * @return string + */ + public function getChartsLinkDynamic() + { + return $this->container['charts_link_dynamic']; + } + + /** + * Sets charts_link_dynamic + * @param string $charts_link_dynamic Example: https://local.quantimo.do/ionic/Modo/www/#/app/charts/Barometric%20Pressure?variableName=Barometric%20Pressure&userId=230&pngUrl=https%3A%2F%2Fapp.quantimo.do%2Fionic%2FModo%2Fwww%2Fimg%2Fvariable_categories%2Fenvironment.png + * @return $this + */ + public function setChartsLinkDynamic($charts_link_dynamic) + { + $this->container['charts_link_dynamic'] = $charts_link_dynamic; + + return $this; + } + + /** + * Gets charts_link_email + * @return string + */ + public function getChartsLinkEmail() + { + return $this->container['charts_link_email']; + } + + /** + * Sets charts_link_email + * @param string $charts_link_email Example: mailto:?subject=Check%20out%20my%20Barometric%20Pressure%20data%21&body=See%20my%20Barometric%20Pressure%20history%20at%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DBarometric%2520Pressure%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Fenvironment.png%0A%0AHave%20a%20great%20day! + * @return $this + */ + public function setChartsLinkEmail($charts_link_email) + { + $this->container['charts_link_email'] = $charts_link_email; + + return $this; + } + + /** + * Gets charts_link_facebook + * @return string + */ + public function getChartsLinkFacebook() + { + return $this->container['charts_link_facebook']; + } + + /** + * Sets charts_link_facebook + * @param string $charts_link_facebook Example: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DBarometric%2520Pressure%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Fenvironment.png + * @return $this + */ + public function setChartsLinkFacebook($charts_link_facebook) + { + $this->container['charts_link_facebook'] = $charts_link_facebook; + + return $this; + } + + /** + * Gets charts_link_google + * @return string + */ + public function getChartsLinkGoogle() + { + return $this->container['charts_link_google']; + } + + /** + * Sets charts_link_google + * @param string $charts_link_google Example: https://plus.google.com/share?url=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DBarometric%2520Pressure%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Fenvironment.png + * @return $this + */ + public function setChartsLinkGoogle($charts_link_google) + { + $this->container['charts_link_google'] = $charts_link_google; + + return $this; + } + + /** + * Gets charts_link_static + * @return string + */ + public function getChartsLinkStatic() + { + return $this->container['charts_link_static']; + } + + /** + * Sets charts_link_static + * @param string $charts_link_static Example: https://local.quantimo.do/api/v2/charts?variableName=Barometric%20Pressure&userId=230&pngUrl=https%3A%2F%2Fapp.quantimo.do%2Fionic%2FModo%2Fwww%2Fimg%2Fvariable_categories%2Fenvironment.png + * @return $this + */ + public function setChartsLinkStatic($charts_link_static) + { + $this->container['charts_link_static'] = $charts_link_static; + + return $this; + } + + /** + * Gets charts_link_twitter + * @return string + */ + public function getChartsLinkTwitter() + { + return $this->container['charts_link_twitter']; + } + + /** + * Sets charts_link_twitter + * @param string $charts_link_twitter Example: https://twitter.com/home?status=Check%20out%20my%20Barometric%20Pressure%20data%21%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DBarometric%2520Pressure%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Fenvironment.png%20%40quantimodo + * @return $this + */ + public function setChartsLinkTwitter($charts_link_twitter) + { + $this->container['charts_link_twitter'] = $charts_link_twitter; + + return $this; + } + + /** + * Gets child_user_tag_variables + * @return \QuantiModo\Client\Model\UserVariableArray + */ + public function getChildUserTagVariables() + { + return $this->container['child_user_tag_variables']; + } + + /** + * Sets child_user_tag_variables + * @param \QuantiModo\Client\Model\UserVariableArray $child_user_tag_variables + * @return $this + */ + public function setChildUserTagVariables($child_user_tag_variables) + { + $this->container['child_user_tag_variables'] = $child_user_tag_variables; + + return $this; + } + + /** + * Gets client_id + * @return string + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * @param string $client_id Example: local + * @return $this + */ + public function setClientId($client_id) + { + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets combination_operation + * @return string + */ + public function getCombinationOperation() + { + return $this->container['combination_operation']; + } + + /** + * Sets combination_operation + * @param string $combination_operation Way to aggregate measurements over time. Options are \"MEAN\" or \"SUM\". SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED. + * @return $this + */ + public function setCombinationOperation($combination_operation) + { + $allowed_values = $this->getCombinationOperationAllowableValues(); + if (!in_array($combination_operation, $allowed_values)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'combination_operation', must be one of '%s'", + implode("', '", $allowed_values) + ) + ); + } + $this->container['combination_operation'] = $combination_operation; + + return $this; + } + + /** + * Gets common_alias + * @return string + */ + public function getCommonAlias() + { + return $this->container['common_alias']; + } + + /** + * Sets common_alias + * @param string $common_alias Example: Mood_(psychology) + * @return $this + */ + public function setCommonAlias($common_alias) + { + $this->container['common_alias'] = $common_alias; + + return $this; + } + + /** + * Gets common_tagged_variables + * @return \QuantiModo\Client\Model\CommonVariableArray + */ + public function getCommonTaggedVariables() + { + return $this->container['common_tagged_variables']; + } + + /** + * Sets common_tagged_variables + * @param \QuantiModo\Client\Model\CommonVariableArray $common_tagged_variables + * @return $this + */ + public function setCommonTaggedVariables($common_tagged_variables) + { + $this->container['common_tagged_variables'] = $common_tagged_variables; + + return $this; + } + + /** + * Gets common_tag_variables + * @return \QuantiModo\Client\Model\CommonVariableArray + */ + public function getCommonTagVariables() + { + return $this->container['common_tag_variables']; + } + + /** + * Sets common_tag_variables + * @param \QuantiModo\Client\Model\CommonVariableArray $common_tag_variables + * @return $this + */ + public function setCommonTagVariables($common_tag_variables) + { + $this->container['common_tag_variables'] = $common_tag_variables; + + return $this; + } + + /** + * Gets common_variable_most_common_connector_id + * @return int + */ + public function getCommonVariableMostCommonConnectorId() + { + return $this->container['common_variable_most_common_connector_id']; + } + + /** + * Sets common_variable_most_common_connector_id + * @param int $common_variable_most_common_connector_id Example: 13 + * @return $this + */ + public function setCommonVariableMostCommonConnectorId($common_variable_most_common_connector_id) + { + $this->container['common_variable_most_common_connector_id'] = $common_variable_most_common_connector_id; + + return $this; + } + + /** + * Gets common_variable_updated_at + * @return \DateTime + */ + public function getCommonVariableUpdatedAt() + { + return $this->container['common_variable_updated_at']; + } + + /** + * Sets common_variable_updated_at + * @param \DateTime $common_variable_updated_at Example: 2017-07-30 20:47:38 + * @return $this + */ + public function setCommonVariableUpdatedAt($common_variable_updated_at) + { + $this->container['common_variable_updated_at'] = $common_variable_updated_at; + + return $this; + } + + /** + * Gets created_at + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * @param \DateTime $created_at Example: 2014-10-23 03:41:06 + * @return $this + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets data_source + * @return \QuantiModo\Client\Model\DataSource + */ + public function getDataSource() + { + return $this->container['data_source']; + } + + /** + * Sets data_source + * @param \QuantiModo\Client\Model\DataSource $data_source + * @return $this + */ + public function setDataSource($data_source) + { + $this->container['data_source'] = $data_source; + + return $this; + } + + /** + * Gets highcharts + * @return \QuantiModo\Client\Model\HighchartArray + */ + public function getHighcharts() + { + return $this->container['highcharts']; + } + + /** + * Sets highcharts + * @param \QuantiModo\Client\Model\HighchartArray $highcharts + * @return $this + */ + public function setHighcharts($highcharts) + { + $this->container['highcharts'] = $highcharts; + + return $this; + } + + /** + * Gets unit_abbreviated_name + * @return string + */ + public function getUnitAbbreviatedName() + { + return $this->container['unit_abbreviated_name']; + } + + /** + * Sets unit_abbreviated_name + * @param string $unit_abbreviated_name Abbreviated name of the default unit for the variable + * @return $this + */ + public function setUnitAbbreviatedName($unit_abbreviated_name) + { + $this->container['unit_abbreviated_name'] = $unit_abbreviated_name; + + return $this; + } + + /** + * Gets unit_category_id + * @return int + */ + public function getUnitCategoryId() + { + return $this->container['unit_category_id']; + } + + /** + * Sets unit_category_id + * @param int $unit_category_id Example: 1 + * @return $this + */ + public function setUnitCategoryId($unit_category_id) + { + $this->container['unit_category_id'] = $unit_category_id; + + return $this; + } + + /** + * Gets unit_category_name + * @return string + */ + public function getUnitCategoryName() + { + return $this->container['unit_category_name']; + } + + /** + * Sets unit_category_name + * @param string $unit_category_name Example: Duration + * @return $this + */ + public function setUnitCategoryName($unit_category_name) + { + $this->container['unit_category_name'] = $unit_category_name; + + return $this; + } + + /** + * Gets unit_id + * @return int + */ + public function getUnitId() + { + return $this->container['unit_id']; + } + + /** + * Sets unit_id + * @param int $unit_id Id of the default unit for the variable + * @return $this + */ + public function setUnitId($unit_id) + { + $this->container['unit_id'] = $unit_id; + + return $this; + } + + /** + * Gets unit_name + * @return string + */ + public function getUnitName() + { + return $this->container['unit_name']; + } + + /** + * Sets unit_name + * @param string $unit_name Example: Hours + * @return $this + */ + public function setUnitName($unit_name) + { + $this->container['unit_name'] = $unit_name; + + return $this; + } + + /** + * Gets description + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * @param string $description Example: positive + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets duration_of_action + * @return int + */ + public function getDurationOfAction() + { + return $this->container['duration_of_action']; + } + + /** + * Sets duration_of_action + * @param int $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. + * @return $this + */ + public function setDurationOfAction($duration_of_action) + { + $this->container['duration_of_action'] = $duration_of_action; + + return $this; + } + + /** + * Gets duration_of_action_in_hours + * @return int + */ + public function getDurationOfActionInHours() + { + return $this->container['duration_of_action_in_hours']; + } + + /** + * Sets duration_of_action_in_hours + * @param int $duration_of_action_in_hours Example: 168 + * @return $this + */ + public function setDurationOfActionInHours($duration_of_action_in_hours) + { + $this->container['duration_of_action_in_hours'] = $duration_of_action_in_hours; + + return $this; + } + + /** + * Gets earliest_filling_time + * @return int + */ + public function getEarliestFillingTime() + { + return $this->container['earliest_filling_time']; + } + + /** + * Sets earliest_filling_time + * @param int $earliest_filling_time Example: 1362099600 + * @return $this + */ + public function setEarliestFillingTime($earliest_filling_time) + { + $this->container['earliest_filling_time'] = $earliest_filling_time; + + return $this; + } + + /** + * Gets earliest_measurement_time + * @return int + */ + public function getEarliestMeasurementTime() + { + return $this->container['earliest_measurement_time']; + } + + /** + * Sets earliest_measurement_time + * @param int $earliest_measurement_time Earliest measurement time + * @return $this + */ + public function setEarliestMeasurementTime($earliest_measurement_time) + { + $this->container['earliest_measurement_time'] = $earliest_measurement_time; + + return $this; + } + + /** + * Gets earliest_source_time + * @return int + */ + public function getEarliestSourceTime() + { + return $this->container['earliest_source_time']; + } + + /** + * Sets earliest_source_time + * @param int $earliest_source_time Example: 1334473200 + * @return $this + */ + public function setEarliestSourceTime($earliest_source_time) + { + $this->container['earliest_source_time'] = $earliest_source_time; + + return $this; + } + + /** + * Gets experiment_end_time + * @return \DateTime + */ + public function getExperimentEndTime() + { + return $this->container['experiment_end_time']; + } + + /** + * Sets experiment_end_time + * @param \DateTime $experiment_end_time Example: + * @return $this + */ + public function setExperimentEndTime($experiment_end_time) + { + $this->container['experiment_end_time'] = $experiment_end_time; + + return $this; + } + + /** + * Gets experiment_end_time_seconds + * @return \DateTime + */ + public function getExperimentEndTimeSeconds() + { + return $this->container['experiment_end_time_seconds']; + } + + /** + * Sets experiment_end_time_seconds + * @param \DateTime $experiment_end_time_seconds Example: + * @return $this + */ + public function setExperimentEndTimeSeconds($experiment_end_time_seconds) + { + $this->container['experiment_end_time_seconds'] = $experiment_end_time_seconds; + + return $this; + } + + /** + * Gets experiment_end_time_string + * @return \DateTime + */ + public function getExperimentEndTimeString() + { + return $this->container['experiment_end_time_string']; + } + + /** + * Sets experiment_end_time_string + * @param \DateTime $experiment_end_time_string Example: + * @return $this + */ + public function setExperimentEndTimeString($experiment_end_time_string) + { + $this->container['experiment_end_time_string'] = $experiment_end_time_string; + + return $this; + } + + /** + * Gets experiment_start_time + * @return \DateTime + */ + public function getExperimentStartTime() + { + return $this->container['experiment_start_time']; + } + + /** + * Sets experiment_start_time + * @param \DateTime $experiment_start_time Example: + * @return $this + */ + public function setExperimentStartTime($experiment_start_time) + { + $this->container['experiment_start_time'] = $experiment_start_time; + + return $this; + } + + /** + * Gets experiment_start_time_seconds + * @return \DateTime + */ + public function getExperimentStartTimeSeconds() + { + return $this->container['experiment_start_time_seconds']; + } + + /** + * Sets experiment_start_time_seconds + * @param \DateTime $experiment_start_time_seconds Example: + * @return $this + */ + public function setExperimentStartTimeSeconds($experiment_start_time_seconds) + { + $this->container['experiment_start_time_seconds'] = $experiment_start_time_seconds; + + return $this; + } + + /** + * Gets experiment_start_time_string + * @return \DateTime + */ + public function getExperimentStartTimeString() + { + return $this->container['experiment_start_time_string']; + } + + /** + * Sets experiment_start_time_string + * @param \DateTime $experiment_start_time_string Example: + * @return $this + */ + public function setExperimentStartTimeString($experiment_start_time_string) + { + $this->container['experiment_start_time_string'] = $experiment_start_time_string; + + return $this; + } + + /** + * Gets filling_type + * @return string + */ + public function getFillingType() + { + return $this->container['filling_type']; + } + + /** + * Sets filling_type + * @param string $filling_type Example: + * @return $this + */ + public function setFillingType($filling_type) + { + $this->container['filling_type'] = $filling_type; + + return $this; + } + + /** + * Gets filling_value + * @return double + */ + public function getFillingValue() + { + return $this->container['filling_value']; + } + + /** + * Sets filling_value + * @param double $filling_value When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. + * @return $this + */ + public function setFillingValue($filling_value) + { + $this->container['filling_value'] = $filling_value; + + return $this; + } + + /** + * Gets id + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param int $id Variable ID + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets image_url + * @return string + */ + public function getImageUrl() + { + return $this->container['image_url']; + } + + /** + * Sets image_url + * @param string $image_url + * @return $this + */ + public function setImageUrl($image_url) + { + $this->container['image_url'] = $image_url; + + return $this; + } + + /** + * Gets informational_url + * @return string + */ + public function getInformationalUrl() + { + return $this->container['informational_url']; + } + + /** + * Sets informational_url + * @param string $informational_url Example: + * @return $this + */ + public function setInformationalUrl($informational_url) + { + $this->container['informational_url'] = $informational_url; + + return $this; + } + + /** + * Gets ingredient_of_user_tag_variables + * @return \QuantiModo\Client\Model\UserVariableArray + */ + public function getIngredientOfUserTagVariables() + { + return $this->container['ingredient_of_user_tag_variables']; + } + + /** + * Sets ingredient_of_user_tag_variables + * @param \QuantiModo\Client\Model\UserVariableArray $ingredient_of_user_tag_variables + * @return $this + */ + public function setIngredientOfUserTagVariables($ingredient_of_user_tag_variables) + { + $this->container['ingredient_of_user_tag_variables'] = $ingredient_of_user_tag_variables; + + return $this; + } + + /** + * Gets ingredient_user_tag_variables + * @return \QuantiModo\Client\Model\UserVariableArray + */ + public function getIngredientUserTagVariables() + { + return $this->container['ingredient_user_tag_variables']; + } + + /** + * Sets ingredient_user_tag_variables + * @param \QuantiModo\Client\Model\UserVariableArray $ingredient_user_tag_variables + * @return $this + */ + public function setIngredientUserTagVariables($ingredient_user_tag_variables) + { + $this->container['ingredient_user_tag_variables'] = $ingredient_user_tag_variables; + + return $this; + } + + /** + * Gets input_type + * @return string + */ + public function getInputType() + { + return $this->container['input_type']; + } + + /** + * Sets input_type + * @param string $input_type Example: slider + * @return $this + */ + public function setInputType($input_type) + { + $this->container['input_type'] = $input_type; + + return $this; + } + + /** + * Gets ion_icon + * @return string + */ + public function getIonIcon() + { + return $this->container['ion_icon']; + } + + /** + * Sets ion_icon + * @param string $ion_icon + * @return $this + */ + public function setIonIcon($ion_icon) + { + $this->container['ion_icon'] = $ion_icon; + + return $this; + } + + /** + * Gets joined_user_tag_variables + * @return \QuantiModo\Client\Model\UserVariableArray + */ + public function getJoinedUserTagVariables() + { + return $this->container['joined_user_tag_variables']; + } + + /** + * Sets joined_user_tag_variables + * @param \QuantiModo\Client\Model\UserVariableArray $joined_user_tag_variables + * @return $this + */ + public function setJoinedUserTagVariables($joined_user_tag_variables) + { + $this->container['joined_user_tag_variables'] = $joined_user_tag_variables; + + return $this; + } + + /** + * Gets joined_variables + * @return \QuantiModo\Client\Model\CommonVariable[] + */ + public function getJoinedVariables() + { + return $this->container['joined_variables']; + } + + /** + * Sets joined_variables + * @param \QuantiModo\Client\Model\CommonVariable[] $joined_variables Array of Variables that are joined with this Variable + * @return $this + */ + public function setJoinedVariables($joined_variables) + { + $this->container['joined_variables'] = $joined_variables; + + return $this; + } + + /** + * Gets join_with + * @return string + */ + public function getJoinWith() + { + return $this->container['join_with']; + } + + /** + * Sets join_with + * @param string $join_with The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables. + * @return $this + */ + public function setJoinWith($join_with) + { + $this->container['join_with'] = $join_with; + + return $this; + } + + /** + * Gets kurtosis + * @return double + */ + public function getKurtosis() + { + return $this->container['kurtosis']; + } + + /** + * Sets kurtosis + * @param double $kurtosis Example: 10.764488721491 + * @return $this + */ + public function setKurtosis($kurtosis) + { + $this->container['kurtosis'] = $kurtosis; + + return $this; + } + + /** + * Gets last_original_unit_id + * @return int + */ + public function getLastOriginalUnitId() + { + return $this->container['last_original_unit_id']; + } + + /** + * Sets last_original_unit_id + * @param int $last_original_unit_id Example: 47 + * @return $this + */ + public function setLastOriginalUnitId($last_original_unit_id) + { + $this->container['last_original_unit_id'] = $last_original_unit_id; + + return $this; + } + + /** + * Gets last_original_value + * @return double + */ + public function getLastOriginalValue() + { + return $this->container['last_original_value']; + } + + /** + * Sets last_original_value + * @param double $last_original_value Example: 100900 + * @return $this + */ + public function setLastOriginalValue($last_original_value) + { + $this->container['last_original_value'] = $last_original_value; + + return $this; + } + + /** + * Gets last_processed_daily_value + * @return double + */ + public function getLastProcessedDailyValue() + { + return $this->container['last_processed_daily_value']; + } + + /** + * Sets last_processed_daily_value + * @param double $last_processed_daily_value Example: 100900 + * @return $this + */ + public function setLastProcessedDailyValue($last_processed_daily_value) + { + $this->container['last_processed_daily_value'] = $last_processed_daily_value; + + return $this; + } + + /** + * Gets last_source + * @return int + */ + public function getLastSource() + { + return $this->container['last_source']; + } + + /** + * Sets last_source + * @param int $last_source Last source + * @return $this + */ + public function setLastSource($last_source) + { + $this->container['last_source'] = $last_source; + + return $this; + } + + /** + * Gets last_successful_update_time + * @return \DateTime + */ + public function getLastSuccessfulUpdateTime() + { + return $this->container['last_successful_update_time']; + } + + /** + * Sets last_successful_update_time + * @param \DateTime $last_successful_update_time Example: 2017-02-08 17:43:01 + * @return $this + */ + public function setLastSuccessfulUpdateTime($last_successful_update_time) + { + $this->container['last_successful_update_time'] = $last_successful_update_time; + + return $this; + } + + /** + * Gets last_unit + * @return string + */ + public function getLastUnit() + { + return $this->container['last_unit']; + } + + /** + * Sets last_unit + * @param string $last_unit Last unit + * @return $this + */ + public function setLastUnit($last_unit) + { + $this->container['last_unit'] = $last_unit; + + return $this; + } + + /** + * Gets last_unit_id + * @return int + */ + public function getLastUnitId() + { + return $this->container['last_unit_id']; + } + + /** + * Sets last_unit_id + * @param int $last_unit_id Example: 47 + * @return $this + */ + public function setLastUnitId($last_unit_id) + { + $this->container['last_unit_id'] = $last_unit_id; + + return $this; + } + + /** + * Gets last_value + * @return int + */ + public function getLastValue() + { + return $this->container['last_value']; + } + + /** + * Sets last_value + * @param int $last_value Last value + * @return $this + */ + public function setLastValue($last_value) + { + $this->container['last_value'] = $last_value; + + return $this; + } + + /** + * Gets latest_filling_time + * @return int + */ + public function getLatestFillingTime() + { + return $this->container['latest_filling_time']; + } + + /** + * Sets latest_filling_time + * @param int $latest_filling_time Example: 1501722000 + * @return $this + */ + public function setLatestFillingTime($latest_filling_time) + { + $this->container['latest_filling_time'] = $latest_filling_time; + + return $this; + } + + /** + * Gets latest_measurement_time + * @return int + */ + public function getLatestMeasurementTime() + { + return $this->container['latest_measurement_time']; + } + + /** + * Sets latest_measurement_time + * @param int $latest_measurement_time Latest measurement time + * @return $this + */ + public function setLatestMeasurementTime($latest_measurement_time) + { + $this->container['latest_measurement_time'] = $latest_measurement_time; + + return $this; + } + + /** + * Gets latest_source_time + * @return int + */ + public function getLatestSourceTime() + { + return $this->container['latest_source_time']; + } + + /** + * Sets latest_source_time + * @param int $latest_source_time Example: 1501722000 + * @return $this + */ + public function setLatestSourceTime($latest_source_time) + { + $this->container['latest_source_time'] = $latest_source_time; + + return $this; + } + + /** + * Gets latest_user_measurement_time + * @return int + */ + public function getLatestUserMeasurementTime() + { + return $this->container['latest_user_measurement_time']; + } + + /** + * Sets latest_user_measurement_time + * @param int $latest_user_measurement_time Example: 1501722000 + * @return $this + */ + public function setLatestUserMeasurementTime($latest_user_measurement_time) + { + $this->container['latest_user_measurement_time'] = $latest_user_measurement_time; + + return $this; + } + + /** + * Gets manual_tracking + * @return bool + */ + public function getManualTracking() + { + return $this->container['manual_tracking']; + } + + /** + * Sets manual_tracking + * @param bool $manual_tracking Example: 1 + * @return $this + */ + public function setManualTracking($manual_tracking) + { + $this->container['manual_tracking'] = $manual_tracking; + + return $this; + } + + /** + * Gets maximum_allowed_value + * @return double + */ + public function getMaximumAllowedValue() + { + return $this->container['maximum_allowed_value']; + } + + /** + * Sets maximum_allowed_value + * @param double $maximum_allowed_value The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. + * @return $this + */ + public function setMaximumAllowedValue($maximum_allowed_value) + { + $this->container['maximum_allowed_value'] = $maximum_allowed_value; + + return $this; + } + + /** + * Gets maximum_recorded_value + * @return double + */ + public function getMaximumRecordedValue() + { + return $this->container['maximum_recorded_value']; + } + + /** + * Sets maximum_recorded_value + * @param double $maximum_recorded_value Example: 104700 + * @return $this + */ + public function setMaximumRecordedValue($maximum_recorded_value) + { + $this->container['maximum_recorded_value'] = $maximum_recorded_value; + + return $this; + } + + /** + * Gets mean + * @return double + */ + public function getMean() + { + return $this->container['mean']; + } + + /** + * Sets mean + * @param double $mean Example: 2202.3886251393 + * @return $this + */ + public function setMean($mean) + { + $this->container['mean'] = $mean; + + return $this; + } + + /** + * Gets measurements_at_last_analysis + * @return int + */ + public function getMeasurementsAtLastAnalysis() + { + return $this->container['measurements_at_last_analysis']; + } + + /** + * Sets measurements_at_last_analysis + * @param int $measurements_at_last_analysis Example: 9795 + * @return $this + */ + public function setMeasurementsAtLastAnalysis($measurements_at_last_analysis) + { + $this->container['measurements_at_last_analysis'] = $measurements_at_last_analysis; + + return $this; + } + + /** + * Gets median + * @return double + */ + public function getMedian() + { + return $this->container['median']; + } + + /** + * Sets median + * @param double $median Example: 2255.9284755781 + * @return $this + */ + public function setMedian($median) + { + $this->container['median'] = $median; + + return $this; + } + + /** + * Gets minimum_allowed_value + * @return double + */ + public function getMinimumAllowedValue() + { + return $this->container['minimum_allowed_value']; + } + + /** + * Sets minimum_allowed_value + * @param double $minimum_allowed_value The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. + * @return $this + */ + public function setMinimumAllowedValue($minimum_allowed_value) + { + $this->container['minimum_allowed_value'] = $minimum_allowed_value; + + return $this; + } + + /** + * Gets minimum_recorded_value + * @return double + */ + public function getMinimumRecordedValue() + { + return $this->container['minimum_recorded_value']; + } + + /** + * Sets minimum_recorded_value + * @param double $minimum_recorded_value Example: 1008.74 + * @return $this + */ + public function setMinimumRecordedValue($minimum_recorded_value) + { + $this->container['minimum_recorded_value'] = $minimum_recorded_value; + + return $this; + } + + /** + * Gets most_common_connector_id + * @return int + */ + public function getMostCommonConnectorId() + { + return $this->container['most_common_connector_id']; + } + + /** + * Sets most_common_connector_id + * @param int $most_common_connector_id Example: 7 + * @return $this + */ + public function setMostCommonConnectorId($most_common_connector_id) + { + $this->container['most_common_connector_id'] = $most_common_connector_id; + + return $this; + } + + /** + * Gets most_common_original_unit_id + * @return int + */ + public function getMostCommonOriginalUnitId() + { + return $this->container['most_common_original_unit_id']; + } + + /** + * Sets most_common_original_unit_id + * @param int $most_common_original_unit_id Example: 2 + * @return $this + */ + public function setMostCommonOriginalUnitId($most_common_original_unit_id) + { + $this->container['most_common_original_unit_id'] = $most_common_original_unit_id; + + return $this; + } + + /** + * Gets most_common_unit + * @return string + */ + public function getMostCommonUnit() + { + return $this->container['most_common_unit']; + } + + /** + * Sets most_common_unit + * @param string $most_common_unit Most common unit + * @return $this + */ + public function setMostCommonUnit($most_common_unit) + { + $this->container['most_common_unit'] = $most_common_unit; + + return $this; + } + + /** + * Gets most_common_value + * @return int + */ + public function getMostCommonValue() + { + return $this->container['most_common_value']; + } + + /** + * Sets most_common_value + * @param int $most_common_value Most common value + * @return $this + */ + public function setMostCommonValue($most_common_value) + { + $this->container['most_common_value'] = $most_common_value; + + return $this; + } + + /** + * Gets name + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * @param string $name User-defined variable display name. + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets number_of_aggregate_correlations_as_cause + * @return int + */ + public function getNumberOfAggregateCorrelationsAsCause() + { + return $this->container['number_of_aggregate_correlations_as_cause']; + } + + /** + * Sets number_of_aggregate_correlations_as_cause + * @param int $number_of_aggregate_correlations_as_cause Example: 386 + * @return $this + */ + public function setNumberOfAggregateCorrelationsAsCause($number_of_aggregate_correlations_as_cause) + { + $this->container['number_of_aggregate_correlations_as_cause'] = $number_of_aggregate_correlations_as_cause; + + return $this; + } + + /** + * Gets number_of_aggregate_correlations_as_effect + * @return int + */ + public function getNumberOfAggregateCorrelationsAsEffect() + { + return $this->container['number_of_aggregate_correlations_as_effect']; + } + + /** + * Sets number_of_aggregate_correlations_as_effect + * @param int $number_of_aggregate_correlations_as_effect Example: 2074 + * @return $this + */ + public function setNumberOfAggregateCorrelationsAsEffect($number_of_aggregate_correlations_as_effect) + { + $this->container['number_of_aggregate_correlations_as_effect'] = $number_of_aggregate_correlations_as_effect; + + return $this; + } + + /** + * Gets number_of_changes + * @return int + */ + public function getNumberOfChanges() + { + return $this->container['number_of_changes']; + } + + /** + * Sets number_of_changes + * @param int $number_of_changes Example: 1317 + * @return $this + */ + public function setNumberOfChanges($number_of_changes) + { + $this->container['number_of_changes'] = $number_of_changes; + + return $this; + } + + /** + * Gets number_of_correlations + * @return int + */ + public function getNumberOfCorrelations() + { + return $this->container['number_of_correlations']; + } + + /** + * Sets number_of_correlations + * @param int $number_of_correlations Number of correlations + * @return $this + */ + public function setNumberOfCorrelations($number_of_correlations) + { + $this->container['number_of_correlations'] = $number_of_correlations; + + return $this; + } + + /** + * Gets number_of_measurements + * @return int + */ + public function getNumberOfMeasurements() + { + return $this->container['number_of_measurements']; + } + + /** + * Sets number_of_measurements + * @param int $number_of_measurements Example: 308554 + * @return $this + */ + public function setNumberOfMeasurements($number_of_measurements) + { + $this->container['number_of_measurements'] = $number_of_measurements; + + return $this; + } + + /** + * Gets number_of_processed_daily_measurements + * @return int + */ + public function getNumberOfProcessedDailyMeasurements() + { + return $this->container['number_of_processed_daily_measurements']; + } + + /** + * Sets number_of_processed_daily_measurements + * @param int $number_of_processed_daily_measurements Example: 1364 + * @return $this + */ + public function setNumberOfProcessedDailyMeasurements($number_of_processed_daily_measurements) + { + $this->container['number_of_processed_daily_measurements'] = $number_of_processed_daily_measurements; + + return $this; + } + + /** + * Gets number_of_raw_measurements + * @return int + */ + public function getNumberOfRawMeasurements() + { + return $this->container['number_of_raw_measurements']; + } + + /** + * Sets number_of_raw_measurements + * @param int $number_of_raw_measurements Number of measurements + * @return $this + */ + public function setNumberOfRawMeasurements($number_of_raw_measurements) + { + $this->container['number_of_raw_measurements'] = $number_of_raw_measurements; + + return $this; + } + + /** + * Gets number_of_tracking_reminders + * @return int + */ + public function getNumberOfTrackingReminders() + { + return $this->container['number_of_tracking_reminders']; + } + + /** + * Sets number_of_tracking_reminders + * @param int $number_of_tracking_reminders Example: 6 + * @return $this + */ + public function setNumberOfTrackingReminders($number_of_tracking_reminders) + { + $this->container['number_of_tracking_reminders'] = $number_of_tracking_reminders; + + return $this; + } + + /** + * Gets number_of_unique_daily_values + * @return int + */ + public function getNumberOfUniqueDailyValues() + { + return $this->container['number_of_unique_daily_values']; + } + + /** + * Sets number_of_unique_daily_values + * @param int $number_of_unique_daily_values Example: 283 + * @return $this + */ + public function setNumberOfUniqueDailyValues($number_of_unique_daily_values) + { + $this->container['number_of_unique_daily_values'] = $number_of_unique_daily_values; + + return $this; + } + + /** + * Gets number_of_unique_values + * @return int + */ + public function getNumberOfUniqueValues() + { + return $this->container['number_of_unique_values']; + } + + /** + * Sets number_of_unique_values + * @param int $number_of_unique_values Example: 74 + * @return $this + */ + public function setNumberOfUniqueValues($number_of_unique_values) + { + $this->container['number_of_unique_values'] = $number_of_unique_values; + + return $this; + } + + /** + * Gets number_of_user_correlations_as_cause + * @return int + */ + public function getNumberOfUserCorrelationsAsCause() + { + return $this->container['number_of_user_correlations_as_cause']; + } + + /** + * Sets number_of_user_correlations_as_cause + * @param int $number_of_user_correlations_as_cause Example: 155 + * @return $this + */ + public function setNumberOfUserCorrelationsAsCause($number_of_user_correlations_as_cause) + { + $this->container['number_of_user_correlations_as_cause'] = $number_of_user_correlations_as_cause; + + return $this; + } + + /** + * Gets number_of_user_correlations_as_effect + * @return int + */ + public function getNumberOfUserCorrelationsAsEffect() + { + return $this->container['number_of_user_correlations_as_effect']; + } + + /** + * Sets number_of_user_correlations_as_effect + * @param int $number_of_user_correlations_as_effect Example: 0 + * @return $this + */ + public function setNumberOfUserCorrelationsAsEffect($number_of_user_correlations_as_effect) + { + $this->container['number_of_user_correlations_as_effect'] = $number_of_user_correlations_as_effect; + + return $this; + } + + /** + * Gets number_of_user_variables + * @return int + */ + public function getNumberOfUserVariables() + { + return $this->container['number_of_user_variables']; + } + + /** + * Sets number_of_user_variables + * @param int $number_of_user_variables Example: 307 + * @return $this + */ + public function setNumberOfUserVariables($number_of_user_variables) + { + $this->container['number_of_user_variables'] = $number_of_user_variables; + + return $this; + } + + /** + * Gets onset_delay + * @return int + */ + public function getOnsetDelay() + { + return $this->container['onset_delay']; + } + + /** + * Sets onset_delay + * @param int $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. + * @return $this + */ + public function setOnsetDelay($onset_delay) + { + $this->container['onset_delay'] = $onset_delay; + + return $this; + } + + /** + * Gets onset_delay_in_hours + * @return int + */ + public function getOnsetDelayInHours() + { + return $this->container['onset_delay_in_hours']; + } + + /** + * Sets onset_delay_in_hours + * @param int $onset_delay_in_hours Example: 0 + * @return $this + */ + public function setOnsetDelayInHours($onset_delay_in_hours) + { + $this->container['onset_delay_in_hours'] = $onset_delay_in_hours; + + return $this; + } + + /** + * Gets outcome + * @return int + */ + public function getOutcome() + { + return $this->container['outcome']; + } + + /** + * Sets outcome + * @param int $outcome Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. + * @return $this + */ + public function setOutcome($outcome) + { + $this->container['outcome'] = $outcome; + + return $this; + } + + /** + * Gets outcome_of_interest + * @return int + */ + public function getOutcomeOfInterest() + { + return $this->container['outcome_of_interest']; + } + + /** + * Sets outcome_of_interest + * @param int $outcome_of_interest Example: 0 + * @return $this + */ + public function setOutcomeOfInterest($outcome_of_interest) + { + $this->container['outcome_of_interest'] = $outcome_of_interest; + + return $this; + } + + /** + * Gets parent + * @return int + */ + public function getParent() + { + return $this->container['parent']; + } + + /** + * Sets parent + * @param int $parent Id of the parent variable if this variable has any parent + * @return $this + */ + public function setParent($parent) + { + $this->container['parent'] = $parent; + + return $this; + } + + /** + * Gets parent_id + * @return string + */ + public function getParentId() + { + return $this->container['parent_id']; + } + + /** + * Sets parent_id + * @param string $parent_id Example: + * @return $this + */ + public function setParentId($parent_id) + { + $this->container['parent_id'] = $parent_id; + + return $this; + } + + /** + * Gets parent_user_tag_variables + * @return \QuantiModo\Client\Model\UserVariableArray + */ + public function getParentUserTagVariables() + { + return $this->container['parent_user_tag_variables']; + } + + /** + * Sets parent_user_tag_variables + * @param \QuantiModo\Client\Model\UserVariableArray $parent_user_tag_variables + * @return $this + */ + public function setParentUserTagVariables($parent_user_tag_variables) + { + $this->container['parent_user_tag_variables'] = $parent_user_tag_variables; + + return $this; + } + + /** + * Gets png_path + * @return string + */ + public function getPngPath() + { + return $this->container['png_path']; + } + + /** + * Sets png_path + * @param string $png_path Example: img/variable_categories/sleep.png + * @return $this + */ + public function setPngPath($png_path) + { + $this->container['png_path'] = $png_path; + + return $this; + } + + /** + * Gets png_url + * @return string + */ + public function getPngUrl() + { + return $this->container['png_url']; + } + + /** + * Sets png_url + * @param string $png_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/sleep.png + * @return $this + */ + public function setPngUrl($png_url) + { + $this->container['png_url'] = $png_url; + + return $this; + } + + /** + * Gets predictor_of_interest + * @return int + */ + public function getPredictorOfInterest() + { + return $this->container['predictor_of_interest']; + } + + /** + * Sets predictor_of_interest + * @param int $predictor_of_interest Example: 0 + * @return $this + */ + public function setPredictorOfInterest($predictor_of_interest) + { + $this->container['predictor_of_interest'] = $predictor_of_interest; + + return $this; + } + + /** + * Gets price + * @return string + */ + public function getPrice() + { + return $this->container['price']; + } + + /** + * Sets price + * @param string $price Example: + * @return $this + */ + public function setPrice($price) + { + $this->container['price'] = $price; + + return $this; + } + + /** + * Gets product_url + * @return string + */ + public function getProductUrl() + { + return $this->container['product_url']; + } + + /** + * Sets product_url + * @param string $product_url Example: + * @return $this + */ + public function setProductUrl($product_url) + { + $this->container['product_url'] = $product_url; + + return $this; + } + + /** + * Gets public + * @return bool + */ + public function getPublic() + { + return $this->container['public']; + } + + /** + * Sets public + * @param bool $public Example: 1 + * @return $this + */ + public function setPublic($public) + { + $this->container['public'] = $public; + + return $this; + } + + /** + * Gets raw_measurements_at_last_analysis + * @return int + */ + public function getRawMeasurementsAtLastAnalysis() + { + return $this->container['raw_measurements_at_last_analysis']; + } + + /** + * Sets raw_measurements_at_last_analysis + * @param int $raw_measurements_at_last_analysis The number of measurements that a given user had for this variable the last time a correlation calculation was performed. Generally correlation values are only updated once the current number of measurements for a variable is more than 10% greater than the rawMeasurementsAtLastAnalysis. This avoids a computationally-demanding recalculation when there's not enough new data to make a significant difference in the correlation. + * @return $this + */ + public function setRawMeasurementsAtLastAnalysis($raw_measurements_at_last_analysis) + { + $this->container['raw_measurements_at_last_analysis'] = $raw_measurements_at_last_analysis; + + return $this; + } + + /** + * Gets second_most_common_value + * @return double + */ + public function getSecondMostCommonValue() + { + return $this->container['second_most_common_value']; + } + + /** + * Sets second_most_common_value + * @param double $second_most_common_value Example: 8 + * @return $this + */ + public function setSecondMostCommonValue($second_most_common_value) + { + $this->container['second_most_common_value'] = $second_most_common_value; + + return $this; + } + + /** + * Gets second_to_last_value + * @return double + */ + public function getSecondToLastValue() + { + return $this->container['second_to_last_value']; + } + + /** + * Sets second_to_last_value + * @param double $second_to_last_value Example: 101800 + * @return $this + */ + public function setSecondToLastValue($second_to_last_value) + { + $this->container['second_to_last_value'] = $second_to_last_value; + + return $this; + } + + /** + * Gets share_user_measurements + * @return bool + */ + public function getShareUserMeasurements() + { + return $this->container['share_user_measurements']; + } + + /** + * Sets share_user_measurements + * @param bool $share_user_measurements Example: false + * @return $this + */ + public function setShareUserMeasurements($share_user_measurements) + { + $this->container['share_user_measurements'] = $share_user_measurements; + + return $this; + } + + /** + * Gets skewness + * @return double + */ + public function getSkewness() + { + return $this->container['skewness']; + } + + /** + * Sets skewness + * @param double $skewness Example: 0.2461351905455 + * @return $this + */ + public function setSkewness($skewness) + { + $this->container['skewness'] = $skewness; + + return $this; + } + + /** + * Gets sources + * @return string + */ + public function getSources() + { + return $this->container['sources']; + } + + /** + * Sets sources + * @param string $sources Comma-separated list of source names to limit variables to those sources + * @return $this + */ + public function setSources($sources) + { + $this->container['sources'] = $sources; + + return $this; + } + + /** + * Gets standard_deviation + * @return double + */ + public function getStandardDeviation() + { + return $this->container['standard_deviation']; + } + + /** + * Sets standard_deviation + * @param double $standard_deviation Example: 1840.535129803 + * @return $this + */ + public function setStandardDeviation($standard_deviation) + { + $this->container['standard_deviation'] = $standard_deviation; + + return $this; + } + + /** + * Gets status + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * @param string $status Example: UPDATED + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets subtitle + * @return string + */ + public function getSubtitle() + { + return $this->container['subtitle']; + } + + /** + * Sets subtitle + * @param string $subtitle Based on sort filter and can be shown beneath variable name on search list + * @return $this + */ + public function setSubtitle($subtitle) + { + $this->container['subtitle'] = $subtitle; + + return $this; + } + + /** + * Gets sub_variables + * @return \QuantiModo\Client\Model\CommonVariable[] + */ + public function getSubVariables() + { + return $this->container['sub_variables']; + } + + /** + * Sets sub_variables + * @param \QuantiModo\Client\Model\CommonVariable[] $sub_variables Array of Variables that are sub variables to this Variable + * @return $this + */ + public function setSubVariables($sub_variables) + { + $this->container['sub_variables'] = $sub_variables; + + return $this; + } + + /** + * Gets svg_url + * @return string + */ + public function getSvgUrl() + { + return $this->container['svg_url']; + } + + /** + * Sets svg_url + * @param string $svg_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/sleep.svg + * @return $this + */ + public function setSvgUrl($svg_url) + { + $this->container['svg_url'] = $svg_url; + + return $this; + } + + /** + * Gets third_most_common_value + * @return double + */ + public function getThirdMostCommonValue() + { + return $this->container['third_most_common_value']; + } + + /** + * Sets third_most_common_value + * @param double $third_most_common_value Example: 7 + * @return $this + */ + public function setThirdMostCommonValue($third_most_common_value) + { + $this->container['third_most_common_value'] = $third_most_common_value; + + return $this; + } + + /** + * Gets third_to_last_value + * @return double + */ + public function getThirdToLastValue() + { + return $this->container['third_to_last_value']; + } + + /** + * Sets third_to_last_value + * @param double $third_to_last_value Example: 102000 + * @return $this + */ + public function setThirdToLastValue($third_to_last_value) + { + $this->container['third_to_last_value'] = $third_to_last_value; + + return $this; + } + + /** + * Gets updated + * @return int + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * @param int $updated When this variable or its settings were last updated + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets updated_at + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * @param \DateTime $updated_at Example: 2017-07-31 03:57:06 + * @return $this + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets user_id + * @return int + */ + public function getUserId() + { + return $this->container['user_id']; + } + + /** + * Sets user_id + * @param int $user_id Example: 230 + * @return $this + */ + public function setUserId($user_id) + { + $this->container['user_id'] = $user_id; + + return $this; + } + + /** + * Gets valence + * @return string + */ + public function getValence() + { + return $this->container['valence']; + } + + /** + * Sets valence + * @param string $valence Example: positive + * @return $this + */ + public function setValence($valence) + { + $this->container['valence'] = $valence; + + return $this; + } + + /** + * Gets variable_category_id + * @return int + */ + public function getVariableCategoryId() + { + return $this->container['variable_category_id']; + } + + /** + * Sets variable_category_id + * @param int $variable_category_id Example: 6 + * @return $this + */ + public function setVariableCategoryId($variable_category_id) + { + $this->container['variable_category_id'] = $variable_category_id; + + return $this; + } + + /** + * Gets variable_category_image_url + * @return string + */ + public function getVariableCategoryImageUrl() + { + return $this->container['variable_category_image_url']; + } + + /** + * Sets variable_category_image_url + * @param string $variable_category_image_url Example: https://maxcdn.icons8.com/Color/PNG/96/Household/sleeping_in_bed-96.png + * @return $this + */ + public function setVariableCategoryImageUrl($variable_category_image_url) + { + $this->container['variable_category_image_url'] = $variable_category_image_url; + + return $this; + } + + /** + * Gets variable_category_name + * @return string + */ + public function getVariableCategoryName() + { + return $this->container['variable_category_name']; + } + + /** + * Sets variable_category_name + * @param string $variable_category_name Variable category like Mood, Sleep, Physical Activity, Treatment, Symptom, etc. + * @return $this + */ + public function setVariableCategoryName($variable_category_name) + { + $this->container['variable_category_name'] = $variable_category_name; + + return $this; + } + + /** + * Gets variable_filling_value + * @return double + */ + public function getVariableFillingValue() + { + return $this->container['variable_filling_value']; + } + + /** + * Sets variable_filling_value + * @param double $variable_filling_value Example: -1 + * @return $this + */ + public function setVariableFillingValue($variable_filling_value) + { + $this->container['variable_filling_value'] = $variable_filling_value; + + return $this; + } + + /** + * Gets variable_id + * @return int + */ + public function getVariableId() + { + return $this->container['variable_id']; + } + + /** + * Sets variable_id + * @param int $variable_id Example: 96380 + * @return $this + */ + public function setVariableId($variable_id) + { + $this->container['variable_id'] = $variable_id; + + return $this; + } + + /** + * Gets variable_name + * @return string + */ + public function getVariableName() + { + return $this->container['variable_name']; + } + + /** + * Sets variable_name + * @param string $variable_name Example: Sleep Duration + * @return $this + */ + public function setVariableName($variable_name) + { + $this->container['variable_name'] = $variable_name; + + return $this; + } + + /** + * Gets variance + * @return double + */ + public function getVariance() + { + return $this->container['variance']; + } + + /** + * Sets variance + * @param double $variance Example: 115947037.40816 + * @return $this + */ + public function setVariance($variance) + { + $this->container['variance'] = $variance; + + return $this; + } + + /** + * Gets wikipedia_title + * @return string + */ + public function getWikipediaTitle() + { + return $this->container['wikipedia_title']; + } + + /** + * Sets wikipedia_title + * @param string $wikipedia_title Example: + * @return $this + */ + public function setWikipediaTitle($wikipedia_title) + { + $this->container['wikipedia_title'] = $wikipedia_title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CommonVariableArray.php b/lib/Model/CommonVariableArray.php new file mode 100644 index 0000000..9179646 --- /dev/null +++ b/lib/Model/CommonVariableArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Connection.php b/lib/Model/Connection.php deleted file mode 100644 index e161e45..0000000 --- a/lib/Model/Connection.php +++ /dev/null @@ -1,489 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * Connection Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class Connection implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'Connection'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'id' => 'int', - 'user_id' => 'int', - 'connector_id' => 'int', - 'connect_status' => 'string', - 'connect_error' => 'string', - 'update_requested_at' => '\DateTime', - 'update_status' => 'string', - 'update_error' => 'string', - 'last_successful_updated_at' => '\DateTime', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'user_id' => 'userId', - 'connector_id' => 'connectorId', - 'connect_status' => 'connectStatus', - 'connect_error' => 'connectError', - 'update_requested_at' => 'updateRequestedAt', - 'update_status' => 'updateStatus', - 'update_error' => 'updateError', - 'last_successful_updated_at' => 'lastSuccessfulUpdatedAt', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'user_id' => 'setUserId', - 'connector_id' => 'setConnectorId', - 'connect_status' => 'setConnectStatus', - 'connect_error' => 'setConnectError', - 'update_requested_at' => 'setUpdateRequestedAt', - 'update_status' => 'setUpdateStatus', - 'update_error' => 'setUpdateError', - 'last_successful_updated_at' => 'setLastSuccessfulUpdatedAt', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'user_id' => 'getUserId', - 'connector_id' => 'getConnectorId', - 'connect_status' => 'getConnectStatus', - 'connect_error' => 'getConnectError', - 'update_requested_at' => 'getUpdateRequestedAt', - 'update_status' => 'getUpdateStatus', - 'update_error' => 'getUpdateError', - 'last_successful_updated_at' => 'getLastSuccessfulUpdatedAt', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; - $this->container['connector_id'] = isset($data['connector_id']) ? $data['connector_id'] : null; - $this->container['connect_status'] = isset($data['connect_status']) ? $data['connect_status'] : null; - $this->container['connect_error'] = isset($data['connect_error']) ? $data['connect_error'] : null; - $this->container['update_requested_at'] = isset($data['update_requested_at']) ? $data['update_requested_at'] : null; - $this->container['update_status'] = isset($data['update_status']) ? $data['update_status'] : null; - $this->container['update_error'] = isset($data['update_error']) ? $data['update_error'] : null; - $this->container['last_successful_updated_at'] = isset($data['last_successful_updated_at']) ? $data['last_successful_updated_at'] : null; - $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; - $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets id - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * @param int $id id - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets user_id - * @return int - */ - public function getUserId() - { - return $this->container['user_id']; - } - - /** - * Sets user_id - * @param int $user_id ID of user that owns this correlation - * @return $this - */ - public function setUserId($user_id) - { - $this->container['user_id'] = $user_id; - - return $this; - } - - /** - * Gets connector_id - * @return int - */ - public function getConnectorId() - { - return $this->container['connector_id']; - } - - /** - * Sets connector_id - * @param int $connector_id The id for the connector data source for which the connection is connected - * @return $this - */ - public function setConnectorId($connector_id) - { - $this->container['connector_id'] = $connector_id; - - return $this; - } - - /** - * Gets connect_status - * @return string - */ - public function getConnectStatus() - { - return $this->container['connect_status']; - } - - /** - * Sets connect_status - * @param string $connect_status Indicates whether a connector is currently connected to a service for a user. - * @return $this - */ - public function setConnectStatus($connect_status) - { - $this->container['connect_status'] = $connect_status; - - return $this; - } - - /** - * Gets connect_error - * @return string - */ - public function getConnectError() - { - return $this->container['connect_error']; - } - - /** - * Sets connect_error - * @param string $connect_error Error message if there is a problem with authorizing this connection. - * @return $this - */ - public function setConnectError($connect_error) - { - $this->container['connect_error'] = $connect_error; - - return $this; - } - - /** - * Gets update_requested_at - * @return \DateTime - */ - public function getUpdateRequestedAt() - { - return $this->container['update_requested_at']; - } - - /** - * Sets update_requested_at - * @param \DateTime $update_requested_at Time at which an update was requested by a user. - * @return $this - */ - public function setUpdateRequestedAt($update_requested_at) - { - $this->container['update_requested_at'] = $update_requested_at; - - return $this; - } - - /** - * Gets update_status - * @return string - */ - public function getUpdateStatus() - { - return $this->container['update_status']; - } - - /** - * Sets update_status - * @param string $update_status Indicates whether a connector is currently updated. - * @return $this - */ - public function setUpdateStatus($update_status) - { - $this->container['update_status'] = $update_status; - - return $this; - } - - /** - * Gets update_error - * @return string - */ - public function getUpdateError() - { - return $this->container['update_error']; - } - - /** - * Sets update_error - * @param string $update_error Indicates if there was an error during the update. - * @return $this - */ - public function setUpdateError($update_error) - { - $this->container['update_error'] = $update_error; - - return $this; - } - - /** - * Gets last_successful_updated_at - * @return \DateTime - */ - public function getLastSuccessfulUpdatedAt() - { - return $this->container['last_successful_updated_at']; - } - - /** - * Sets last_successful_updated_at - * @param \DateTime $last_successful_updated_at The time at which the connector was last successfully updated. - * @return $this - */ - public function setLastSuccessfulUpdatedAt($last_successful_updated_at) - { - $this->container['last_successful_updated_at'] = $last_successful_updated_at; - - return $this; - } - - /** - * Gets created_at - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * @param \DateTime $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format - * @return $this - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * @return \DateTime - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * @param \DateTime $updated_at When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format - * @return $this - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/Connector.php b/lib/Model/Connector.php index 50f29f2..0abde34 100644 --- a/lib/Model/Connector.php +++ b/lib/Model/Connector.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,16 +54,75 @@ class Connector implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'id' => 'int', - 'name' => 'string', - 'display_name' => 'string', - 'image' => 'string', - 'get_it_url' => 'string', + 'affiliate' => 'bool', + 'buttons' => '\QuantiModo\Client\Model\Button[]', + 'client_id' => 'string', 'connected' => 'string', + 'connect_error' => 'string', 'connect_instructions' => 'string', + 'connector_client_id' => 'string', + 'connector_id' => 'int', + 'connect_status' => 'string', + 'created_at' => '\DateTime', + 'default_variable_category_name' => 'string', + 'display_name' => 'string', + 'enabled' => 'int', + 'get_it_url' => 'string', + 'id' => 'int', + 'image' => 'string', + 'image_html' => 'string', + 'last_successful_updated_at' => '\DateTime', 'last_update' => 'int', + 'linked_display_name_html' => 'string', + 'long_description' => 'string', + 'message' => 'string', + 'name' => 'string', + 'oauth' => 'object', + 'scopes' => '\QuantiModo\Client\Model\Scope[]', + 'short_description' => 'string', 'total_measurements_in_last_update' => 'int', - 'no_data_yet' => 'bool' + 'updated_at' => '\DateTime', + 'update_requested_at' => '\DateTime', + 'update_status' => 'string', + 'user_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'affiliate' => null, + 'buttons' => null, + 'client_id' => null, + 'connected' => null, + 'connect_error' => null, + 'connect_instructions' => null, + 'connector_client_id' => null, + 'connector_id' => null, + 'connect_status' => null, + 'created_at' => 'date-time', + 'default_variable_category_name' => null, + 'display_name' => null, + 'enabled' => null, + 'get_it_url' => null, + 'id' => null, + 'image' => null, + 'image_html' => null, + 'last_successful_updated_at' => 'date-time', + 'last_update' => null, + 'linked_display_name_html' => null, + 'long_description' => null, + 'message' => null, + 'name' => null, + 'oauth' => null, + 'scopes' => null, + 'short_description' => null, + 'total_measurements_in_last_update' => null, + 'updated_at' => 'date-time', + 'update_requested_at' => 'date-time', + 'update_status' => null, + 'user_id' => null ]; public static function swaggerTypes() @@ -71,21 +130,47 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'name' => 'name', - 'display_name' => 'displayName', - 'image' => 'image', - 'get_it_url' => 'getItUrl', + 'affiliate' => 'affiliate', + 'buttons' => 'buttons', + 'client_id' => 'clientId', 'connected' => 'connected', + 'connect_error' => 'connectError', 'connect_instructions' => 'connectInstructions', + 'connector_client_id' => 'connectorClientId', + 'connector_id' => 'connectorId', + 'connect_status' => 'connectStatus', + 'created_at' => 'createdAt', + 'default_variable_category_name' => 'defaultVariableCategoryName', + 'display_name' => 'displayName', + 'enabled' => 'enabled', + 'get_it_url' => 'getItUrl', + 'id' => 'id', + 'image' => 'image', + 'image_html' => 'imageHtml', + 'last_successful_updated_at' => 'lastSuccessfulUpdatedAt', 'last_update' => 'lastUpdate', + 'linked_display_name_html' => 'linkedDisplayNameHtml', + 'long_description' => 'longDescription', + 'message' => 'message', + 'name' => 'name', + 'oauth' => 'oauth', + 'scopes' => 'scopes', + 'short_description' => 'shortDescription', 'total_measurements_in_last_update' => 'totalMeasurementsInLastUpdate', - 'no_data_yet' => 'noDataYet' + 'updated_at' => 'updatedAt', + 'update_requested_at' => 'updateRequestedAt', + 'update_status' => 'updateStatus', + 'user_id' => 'userId' ]; @@ -94,16 +179,37 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'name' => 'setName', - 'display_name' => 'setDisplayName', - 'image' => 'setImage', - 'get_it_url' => 'setGetItUrl', + 'affiliate' => 'setAffiliate', + 'buttons' => 'setButtons', + 'client_id' => 'setClientId', 'connected' => 'setConnected', + 'connect_error' => 'setConnectError', 'connect_instructions' => 'setConnectInstructions', + 'connector_client_id' => 'setConnectorClientId', + 'connector_id' => 'setConnectorId', + 'connect_status' => 'setConnectStatus', + 'created_at' => 'setCreatedAt', + 'default_variable_category_name' => 'setDefaultVariableCategoryName', + 'display_name' => 'setDisplayName', + 'enabled' => 'setEnabled', + 'get_it_url' => 'setGetItUrl', + 'id' => 'setId', + 'image' => 'setImage', + 'image_html' => 'setImageHtml', + 'last_successful_updated_at' => 'setLastSuccessfulUpdatedAt', 'last_update' => 'setLastUpdate', + 'linked_display_name_html' => 'setLinkedDisplayNameHtml', + 'long_description' => 'setLongDescription', + 'message' => 'setMessage', + 'name' => 'setName', + 'oauth' => 'setOauth', + 'scopes' => 'setScopes', + 'short_description' => 'setShortDescription', 'total_measurements_in_last_update' => 'setTotalMeasurementsInLastUpdate', - 'no_data_yet' => 'setNoDataYet' + 'updated_at' => 'setUpdatedAt', + 'update_requested_at' => 'setUpdateRequestedAt', + 'update_status' => 'setUpdateStatus', + 'user_id' => 'setUserId' ]; @@ -112,16 +218,37 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'name' => 'getName', - 'display_name' => 'getDisplayName', - 'image' => 'getImage', - 'get_it_url' => 'getGetItUrl', + 'affiliate' => 'getAffiliate', + 'buttons' => 'getButtons', + 'client_id' => 'getClientId', 'connected' => 'getConnected', + 'connect_error' => 'getConnectError', 'connect_instructions' => 'getConnectInstructions', + 'connector_client_id' => 'getConnectorClientId', + 'connector_id' => 'getConnectorId', + 'connect_status' => 'getConnectStatus', + 'created_at' => 'getCreatedAt', + 'default_variable_category_name' => 'getDefaultVariableCategoryName', + 'display_name' => 'getDisplayName', + 'enabled' => 'getEnabled', + 'get_it_url' => 'getGetItUrl', + 'id' => 'getId', + 'image' => 'getImage', + 'image_html' => 'getImageHtml', + 'last_successful_updated_at' => 'getLastSuccessfulUpdatedAt', 'last_update' => 'getLastUpdate', + 'linked_display_name_html' => 'getLinkedDisplayNameHtml', + 'long_description' => 'getLongDescription', + 'message' => 'getMessage', + 'name' => 'getName', + 'oauth' => 'getOauth', + 'scopes' => 'getScopes', + 'short_description' => 'getShortDescription', 'total_measurements_in_last_update' => 'getTotalMeasurementsInLastUpdate', - 'no_data_yet' => 'getNoDataYet' + 'updated_at' => 'getUpdatedAt', + 'update_requested_at' => 'getUpdateRequestedAt', + 'update_status' => 'getUpdateStatus', + 'user_id' => 'getUserId' ]; public static function attributeMap() @@ -155,16 +282,37 @@ public static function getters() */ public function __construct(array $data = null) { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['display_name'] = isset($data['display_name']) ? $data['display_name'] : null; - $this->container['image'] = isset($data['image']) ? $data['image'] : null; - $this->container['get_it_url'] = isset($data['get_it_url']) ? $data['get_it_url'] : null; + $this->container['affiliate'] = isset($data['affiliate']) ? $data['affiliate'] : null; + $this->container['buttons'] = isset($data['buttons']) ? $data['buttons'] : null; + $this->container['client_id'] = isset($data['client_id']) ? $data['client_id'] : null; $this->container['connected'] = isset($data['connected']) ? $data['connected'] : null; + $this->container['connect_error'] = isset($data['connect_error']) ? $data['connect_error'] : null; $this->container['connect_instructions'] = isset($data['connect_instructions']) ? $data['connect_instructions'] : null; + $this->container['connector_client_id'] = isset($data['connector_client_id']) ? $data['connector_client_id'] : null; + $this->container['connector_id'] = isset($data['connector_id']) ? $data['connector_id'] : null; + $this->container['connect_status'] = isset($data['connect_status']) ? $data['connect_status'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['default_variable_category_name'] = isset($data['default_variable_category_name']) ? $data['default_variable_category_name'] : null; + $this->container['display_name'] = isset($data['display_name']) ? $data['display_name'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['get_it_url'] = isset($data['get_it_url']) ? $data['get_it_url'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['image'] = isset($data['image']) ? $data['image'] : null; + $this->container['image_html'] = isset($data['image_html']) ? $data['image_html'] : null; + $this->container['last_successful_updated_at'] = isset($data['last_successful_updated_at']) ? $data['last_successful_updated_at'] : null; $this->container['last_update'] = isset($data['last_update']) ? $data['last_update'] : null; + $this->container['linked_display_name_html'] = isset($data['linked_display_name_html']) ? $data['linked_display_name_html'] : null; + $this->container['long_description'] = isset($data['long_description']) ? $data['long_description'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['oauth'] = isset($data['oauth']) ? $data['oauth'] : null; + $this->container['scopes'] = isset($data['scopes']) ? $data['scopes'] : null; + $this->container['short_description'] = isset($data['short_description']) ? $data['short_description'] : null; $this->container['total_measurements_in_last_update'] = isset($data['total_measurements_in_last_update']) ? $data['total_measurements_in_last_update'] : null; - $this->container['no_data_yet'] = isset($data['no_data_yet']) ? $data['no_data_yet'] : null; + $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; + $this->container['update_requested_at'] = isset($data['update_requested_at']) ? $data['update_requested_at'] : null; + $this->container['update_status'] = isset($data['update_status']) ? $data['update_status'] : null; + $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; } /** @@ -176,36 +324,33 @@ public function listInvalidProperties() { $invalid_properties = []; - if ($this->container['id'] === null) { - $invalid_properties[] = "'id' can't be null"; + if ($this->container['connected'] === null) { + $invalid_properties[] = "'connected' can't be null"; } - if ($this->container['name'] === null) { - $invalid_properties[] = "'name' can't be null"; + if ($this->container['connect_instructions'] === null) { + $invalid_properties[] = "'connect_instructions' can't be null"; } if ($this->container['display_name'] === null) { $invalid_properties[] = "'display_name' can't be null"; } - if ($this->container['image'] === null) { - $invalid_properties[] = "'image' can't be null"; - } if ($this->container['get_it_url'] === null) { $invalid_properties[] = "'get_it_url' can't be null"; } - if ($this->container['connected'] === null) { - $invalid_properties[] = "'connected' can't be null"; + if ($this->container['id'] === null) { + $invalid_properties[] = "'id' can't be null"; } - if ($this->container['connect_instructions'] === null) { - $invalid_properties[] = "'connect_instructions' can't be null"; + if ($this->container['image'] === null) { + $invalid_properties[] = "'image' can't be null"; } if ($this->container['last_update'] === null) { $invalid_properties[] = "'last_update' can't be null"; } + if ($this->container['name'] === null) { + $invalid_properties[] = "'name' can't be null"; + } if ($this->container['total_measurements_in_last_update'] === null) { $invalid_properties[] = "'total_measurements_in_last_update' can't be null"; } - if ($this->container['no_data_yet'] === null) { - $invalid_properties[] = "'no_data_yet' can't be null"; - } return $invalid_properties; } @@ -218,34 +363,31 @@ public function listInvalidProperties() public function valid() { - if ($this->container['id'] === null) { + if ($this->container['connected'] === null) { return false; } - if ($this->container['name'] === null) { + if ($this->container['connect_instructions'] === null) { return false; } if ($this->container['display_name'] === null) { return false; } - if ($this->container['image'] === null) { - return false; - } if ($this->container['get_it_url'] === null) { return false; } - if ($this->container['connected'] === null) { + if ($this->container['id'] === null) { return false; } - if ($this->container['connect_instructions'] === null) { + if ($this->container['image'] === null) { return false; } if ($this->container['last_update'] === null) { return false; } - if ($this->container['total_measurements_in_last_update'] === null) { + if ($this->container['name'] === null) { return false; } - if ($this->container['no_data_yet'] === null) { + if ($this->container['total_measurements_in_last_update'] === null) { return false; } return true; @@ -253,43 +395,232 @@ public function valid() /** - * Gets id + * Gets affiliate + * @return bool + */ + public function getAffiliate() + { + return $this->container['affiliate']; + } + + /** + * Sets affiliate + * @param bool $affiliate Example: false + * @return $this + */ + public function setAffiliate($affiliate) + { + $this->container['affiliate'] = $affiliate; + + return $this; + } + + /** + * Gets buttons + * @return \QuantiModo\Client\Model\Button[] + */ + public function getButtons() + { + return $this->container['buttons']; + } + + /** + * Sets buttons + * @param \QuantiModo\Client\Model\Button[] $buttons + * @return $this + */ + public function setButtons($buttons) + { + $this->container['buttons'] = $buttons; + + return $this; + } + + /** + * Gets client_id + * @return string + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * @param string $client_id Example: ghostInspector + * @return $this + */ + public function setClientId($client_id) + { + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets connected + * @return string + */ + public function getConnected() + { + return $this->container['connected']; + } + + /** + * Sets connected + * @param string $connected True if the authenticated user has this connector enabled + * @return $this + */ + public function setConnected($connected) + { + $this->container['connected'] = $connected; + + return $this; + } + + /** + * Gets connect_error + * @return string + */ + public function getConnectError() + { + return $this->container['connect_error']; + } + + /** + * Sets connect_error + * @param string $connect_error Example: Your token is expired. Please re-connect + * @return $this + */ + public function setConnectError($connect_error) + { + $this->container['connect_error'] = $connect_error; + + return $this; + } + + /** + * Gets connect_instructions + * @return string + */ + public function getConnectInstructions() + { + return $this->container['connect_instructions']; + } + + /** + * Sets connect_instructions + * @param string $connect_instructions URL and parameters used when connecting to a service + * @return $this + */ + public function setConnectInstructions($connect_instructions) + { + $this->container['connect_instructions'] = $connect_instructions; + + return $this; + } + + /** + * Gets connector_client_id + * @return string + */ + public function getConnectorClientId() + { + return $this->container['connector_client_id']; + } + + /** + * Sets connector_client_id + * @param string $connector_client_id Example: 225078261031461 + * @return $this + */ + public function setConnectorClientId($connector_client_id) + { + $this->container['connector_client_id'] = $connector_client_id; + + return $this; + } + + /** + * Gets connector_id * @return int */ - public function getId() + public function getConnectorId() { - return $this->container['id']; + return $this->container['connector_id']; } /** - * Sets id - * @param int $id Connector ID number + * Sets connector_id + * @param int $connector_id Example: 8 * @return $this */ - public function setId($id) + public function setConnectorId($connector_id) { - $this->container['id'] = $id; + $this->container['connector_id'] = $connector_id; return $this; } /** - * Gets name + * Gets connect_status * @return string */ - public function getName() + public function getConnectStatus() { - return $this->container['name']; + return $this->container['connect_status']; } /** - * Sets name - * @param string $name Connector lowercase system name + * Sets connect_status + * @param string $connect_status Example: CONNECTED * @return $this */ - public function setName($name) + public function setConnectStatus($connect_status) { - $this->container['name'] = $name; + $this->container['connect_status'] = $connect_status; + + return $this; + } + + /** + * Gets created_at + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * @param \DateTime $created_at Example: 2000-01-01 00:00:00 + * @return $this + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets default_variable_category_name + * @return string + */ + public function getDefaultVariableCategoryName() + { + return $this->container['default_variable_category_name']; + } + + /** + * Sets default_variable_category_name + * @param string $default_variable_category_name Example: Social Interactions + * @return $this + */ + public function setDefaultVariableCategoryName($default_variable_category_name) + { + $this->container['default_variable_category_name'] = $default_variable_category_name; return $this; } @@ -316,22 +647,22 @@ public function setDisplayName($display_name) } /** - * Gets image - * @return string + * Gets enabled + * @return int */ - public function getImage() + public function getEnabled() { - return $this->container['image']; + return $this->container['enabled']; } /** - * Sets image - * @param string $image URL to the image of the connector logo + * Sets enabled + * @param int $enabled Example: 1 * @return $this */ - public function setImage($image) + public function setEnabled($enabled) { - $this->container['image'] = $image; + $this->container['enabled'] = $enabled; return $this; } @@ -358,43 +689,85 @@ public function setGetItUrl($get_it_url) } /** - * Gets connected + * Gets id + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param int $id Connector ID number + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets image * @return string */ - public function getConnected() + public function getImage() { - return $this->container['connected']; + return $this->container['image']; } /** - * Sets connected - * @param string $connected True if the authenticated user has this connector enabled + * Sets image + * @param string $image URL to the image of the connector logo * @return $this */ - public function setConnected($connected) + public function setImage($image) { - $this->container['connected'] = $connected; + $this->container['image'] = $image; return $this; } /** - * Gets connect_instructions + * Gets image_html * @return string */ - public function getConnectInstructions() + public function getImageHtml() { - return $this->container['connect_instructions']; + return $this->container['image_html']; } /** - * Sets connect_instructions - * @param string $connect_instructions URL and parameters used when connecting to a service + * Sets image_html + * @param string $image_html Example: \"Facebook\" * @return $this */ - public function setConnectInstructions($connect_instructions) + public function setImageHtml($image_html) { - $this->container['connect_instructions'] = $connect_instructions; + $this->container['image_html'] = $image_html; + + return $this; + } + + /** + * Gets last_successful_updated_at + * @return \DateTime + */ + public function getLastSuccessfulUpdatedAt() + { + return $this->container['last_successful_updated_at']; + } + + /** + * Sets last_successful_updated_at + * @param \DateTime $last_successful_updated_at Example: 2017-07-31 10:10:34 + * @return $this + */ + public function setLastSuccessfulUpdatedAt($last_successful_updated_at) + { + $this->container['last_successful_updated_at'] = $last_successful_updated_at; return $this; } @@ -420,6 +793,153 @@ public function setLastUpdate($last_update) return $this; } + /** + * Gets linked_display_name_html + * @return string + */ + public function getLinkedDisplayNameHtml() + { + return $this->container['linked_display_name_html']; + } + + /** + * Sets linked_display_name_html + * @param string $linked_display_name_html Example: Facebook + * @return $this + */ + public function setLinkedDisplayNameHtml($linked_display_name_html) + { + $this->container['linked_display_name_html'] = $linked_display_name_html; + + return $this; + } + + /** + * Gets long_description + * @return string + */ + public function getLongDescription() + { + return $this->container['long_description']; + } + + /** + * Sets long_description + * @param string $long_description Example: Facebook is a social networking website where users may create a personal profile, add other users as friends, and exchange messages. + * @return $this + */ + public function setLongDescription($long_description) + { + $this->container['long_description'] = $long_description; + + return $this; + } + + /** + * Gets message + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * @param string $message Example: Got 412 new measurements on 2017-07-31 10:10:34 + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets name + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * @param string $name Connector lowercase system name + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets oauth + * @return object + */ + public function getOauth() + { + return $this->container['oauth']; + } + + /** + * Sets oauth + * @param object $oauth Example: {} + * @return $this + */ + public function setOauth($oauth) + { + $this->container['oauth'] = $oauth; + + return $this; + } + + /** + * Gets scopes + * @return \QuantiModo\Client\Model\Scope[] + */ + public function getScopes() + { + return $this->container['scopes']; + } + + /** + * Sets scopes + * @param \QuantiModo\Client\Model\Scope[] $scopes + * @return $this + */ + public function setScopes($scopes) + { + $this->container['scopes'] = $scopes; + + return $this; + } + + /** + * Gets short_description + * @return string + */ + public function getShortDescription() + { + return $this->container['short_description']; + } + + /** + * Sets short_description + * @param string $short_description Example: Tracks social interaction. QuantiModo requires permission to access your Facebook \"user likes\" and \"user posts\". + * @return $this + */ + public function setShortDescription($short_description) + { + $this->container['short_description'] = $short_description; + + return $this; + } + /** * Gets total_measurements_in_last_update * @return int @@ -442,22 +962,85 @@ public function setTotalMeasurementsInLastUpdate($total_measurements_in_last_upd } /** - * Gets no_data_yet - * @return bool + * Gets updated_at + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * @param \DateTime $updated_at Example: 2017-07-31 10:10:34 + * @return $this + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets update_requested_at + * @return \DateTime + */ + public function getUpdateRequestedAt() + { + return $this->container['update_requested_at']; + } + + /** + * Sets update_requested_at + * @param \DateTime $update_requested_at Example: 2017-07-18 05:16:31 + * @return $this + */ + public function setUpdateRequestedAt($update_requested_at) + { + $this->container['update_requested_at'] = $update_requested_at; + + return $this; + } + + /** + * Gets update_status + * @return string + */ + public function getUpdateStatus() + { + return $this->container['update_status']; + } + + /** + * Sets update_status + * @param string $update_status Example: UPDATED + * @return $this + */ + public function setUpdateStatus($update_status) + { + $this->container['update_status'] = $update_status; + + return $this; + } + + /** + * Gets user_id + * @return int */ - public function getNoDataYet() + public function getUserId() { - return $this->container['no_data_yet']; + return $this->container['user_id']; } /** - * Sets no_data_yet - * @param bool $no_data_yet True if user has no measurements for this connector + * Sets user_id + * @param int $user_id Example: 230 * @return $this */ - public function setNoDataYet($no_data_yet) + public function setUserId($user_id) { - $this->container['no_data_yet'] = $no_data_yet; + $this->container['user_id'] = $user_id; return $this; } diff --git a/lib/Model/ConnectorArray.php b/lib/Model/ConnectorArray.php new file mode 100644 index 0000000..8a76619 --- /dev/null +++ b/lib/Model/ConnectorArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ConnectorInfo.php b/lib/Model/ConnectorInfo.php deleted file mode 100644 index d0c8b6a..0000000 --- a/lib/Model/ConnectorInfo.php +++ /dev/null @@ -1,331 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * ConnectorInfo Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class ConnectorInfo implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'ConnectorInfo'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'id' => 'int', - 'connected' => 'bool', - 'error' => 'string', - 'history' => '\QuantiModo\Client\Model\ConnectorInfoHistoryItem[]' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'connected' => 'connected', - 'error' => 'error', - 'history' => 'history' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'connected' => 'setConnected', - 'error' => 'setError', - 'history' => 'setHistory' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'connected' => 'getConnected', - 'error' => 'getError', - 'history' => 'getHistory' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['connected'] = isset($data['connected']) ? $data['connected'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - $this->container['history'] = isset($data['history']) ? $data['history'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['id'] === null) { - $invalid_properties[] = "'id' can't be null"; - } - if ($this->container['connected'] === null) { - $invalid_properties[] = "'connected' can't be null"; - } - if ($this->container['error'] === null) { - $invalid_properties[] = "'error' can't be null"; - } - if ($this->container['history'] === null) { - $invalid_properties[] = "'history' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['id'] === null) { - return false; - } - if ($this->container['connected'] === null) { - return false; - } - if ($this->container['error'] === null) { - return false; - } - if ($this->container['history'] === null) { - return false; - } - return true; - } - - - /** - * Gets id - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * @param int $id Connector ID number - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets connected - * @return bool - */ - public function getConnected() - { - return $this->container['connected']; - } - - /** - * Sets connected - * @param bool $connected True if the authenticated user has this connector enabled - * @return $this - */ - public function setConnected($connected) - { - $this->container['connected'] = $connected; - - return $this; - } - - /** - * Gets error - * @return string - */ - public function getError() - { - return $this->container['error']; - } - - /** - * Sets error - * @param string $error Error message. Empty if connected. - * @return $this - */ - public function setError($error) - { - $this->container['error'] = $error; - - return $this; - } - - /** - * Gets history - * @return \QuantiModo\Client\Model\ConnectorInfoHistoryItem[] - */ - public function getHistory() - { - return $this->container['history']; - } - - /** - * Sets history - * @param \QuantiModo\Client\Model\ConnectorInfoHistoryItem[] $history - * @return $this - */ - public function setHistory($history) - { - $this->container['history'] = $history; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/ConnectorInfoHistoryItem.php b/lib/Model/ConnectorInfoHistoryItem.php deleted file mode 100644 index 75daaa5..0000000 --- a/lib/Model/ConnectorInfoHistoryItem.php +++ /dev/null @@ -1,331 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * ConnectorInfoHistoryItem Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class ConnectorInfoHistoryItem implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'ConnectorInfoHistoryItem'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'number_of_measurements' => 'int', - 'success' => 'bool', - 'message' => 'string', - 'created_at' => 'string' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'number_of_measurements' => 'numberOfMeasurements', - 'success' => 'success', - 'message' => 'message', - 'created_at' => 'createdAt' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'number_of_measurements' => 'setNumberOfMeasurements', - 'success' => 'setSuccess', - 'message' => 'setMessage', - 'created_at' => 'setCreatedAt' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'number_of_measurements' => 'getNumberOfMeasurements', - 'success' => 'getSuccess', - 'message' => 'getMessage', - 'created_at' => 'getCreatedAt' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['number_of_measurements'] = isset($data['number_of_measurements']) ? $data['number_of_measurements'] : null; - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['number_of_measurements'] === null) { - $invalid_properties[] = "'number_of_measurements' can't be null"; - } - if ($this->container['success'] === null) { - $invalid_properties[] = "'success' can't be null"; - } - if ($this->container['message'] === null) { - $invalid_properties[] = "'message' can't be null"; - } - if ($this->container['created_at'] === null) { - $invalid_properties[] = "'created_at' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['number_of_measurements'] === null) { - return false; - } - if ($this->container['success'] === null) { - return false; - } - if ($this->container['message'] === null) { - return false; - } - if ($this->container['created_at'] === null) { - return false; - } - return true; - } - - - /** - * Gets number_of_measurements - * @return int - */ - public function getNumberOfMeasurements() - { - return $this->container['number_of_measurements']; - } - - /** - * Sets number_of_measurements - * @param int $number_of_measurements Number of measurements - * @return $this - */ - public function setNumberOfMeasurements($number_of_measurements) - { - $this->container['number_of_measurements'] = $number_of_measurements; - - return $this; - } - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success True if the update was successfull - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets message - * @return string - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * @param string $message Error message. - * @return $this - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets created_at - * @return string - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * @param string $created_at Date and time of the update in UTC time zone - * @return $this - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/ConnectorInstruction.php b/lib/Model/ConnectorInstruction.php index 9c94152..fd4fba1 100644 --- a/lib/Model/ConnectorInstruction.php +++ b/lib/Model/ConnectorInstruction.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,23 +54,38 @@ class ConnectorInstruction implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'url' => 'string', 'parameters' => 'string[]', + 'url' => 'string', 'use_popup' => 'bool' ]; + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'parameters' => null, + 'url' => null, + 'use_popup' => null + ]; + public static function swaggerTypes() { return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'url' => 'url', 'parameters' => 'parameters', + 'url' => 'url', 'use_popup' => 'usePopup' ]; @@ -80,8 +95,8 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'url' => 'setUrl', 'parameters' => 'setParameters', + 'url' => 'setUrl', 'use_popup' => 'setUsePopup' ]; @@ -91,8 +106,8 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'url' => 'getUrl', 'parameters' => 'getParameters', + 'url' => 'getUrl', 'use_popup' => 'getUsePopup' ]; @@ -127,8 +142,8 @@ public static function getters() */ public function __construct(array $data = null) { - $this->container['url'] = isset($data['url']) ? $data['url'] : null; $this->container['parameters'] = isset($data['parameters']) ? $data['parameters'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; $this->container['use_popup'] = isset($data['use_popup']) ? $data['use_popup'] : null; } @@ -158,43 +173,43 @@ public function valid() /** - * Gets url - * @return string + * Gets parameters + * @return string[] */ - public function getUrl() + public function getParameters() { - return $this->container['url']; + return $this->container['parameters']; } /** - * Sets url - * @param string $url url + * Sets parameters + * @param string[] $parameters parameters array * @return $this */ - public function setUrl($url) + public function setParameters($parameters) { - $this->container['url'] = $url; + $this->container['parameters'] = $parameters; return $this; } /** - * Gets parameters - * @return string[] + * Gets url + * @return string */ - public function getParameters() + public function getUrl() { - return $this->container['parameters']; + return $this->container['url']; } /** - * Sets parameters - * @param string[] $parameters parameters array + * Sets url + * @param string $url url * @return $this */ - public function setParameters($parameters) + public function setUrl($url) { - $this->container['parameters'] = $parameters; + $this->container['url'] = $url; return $this; } diff --git a/lib/Model/ConversionStep.php b/lib/Model/ConversionStep.php index 0a99575..b5cef6c 100644 --- a/lib/Model/ConversionStep.php +++ b/lib/Model/ConversionStep.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -58,11 +58,25 @@ class ConversionStep implements ArrayAccess 'value' => 'double' ]; + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'operation' => null, + 'value' => 'double' + ]; + public static function swaggerTypes() { return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] @@ -107,8 +121,8 @@ public static function getters() return self::$getters; } - const OPERATION_MULTIPLY = 'MULTIPLY'; const OPERATION_ADD = 'ADD'; + const OPERATION_MULTIPLY = 'MULTIPLY'; @@ -119,8 +133,8 @@ public static function getters() public function getOperationAllowableValues() { return [ - self::OPERATION_MULTIPLY, self::OPERATION_ADD, + self::OPERATION_MULTIPLY, ]; } @@ -153,9 +167,12 @@ public function listInvalidProperties() if ($this->container['operation'] === null) { $invalid_properties[] = "'operation' can't be null"; } - $allowed_values = ["MULTIPLY", "ADD"]; + $allowed_values = $this->getOperationAllowableValues(); if (!in_array($this->container['operation'], $allowed_values)) { - $invalid_properties[] = "invalid value for 'operation', must be one of 'MULTIPLY', 'ADD'."; + $invalid_properties[] = sprintf( + "invalid value for 'operation', must be one of '%s'", + implode("', '", $allowed_values) + ); } if ($this->container['value'] === null) { @@ -176,7 +193,7 @@ public function valid() if ($this->container['operation'] === null) { return false; } - $allowed_values = ["MULTIPLY", "ADD"]; + $allowed_values = $this->getOperationAllowableValues(); if (!in_array($this->container['operation'], $allowed_values)) { return false; } @@ -203,9 +220,14 @@ public function getOperation() */ public function setOperation($operation) { - $allowed_values = array('MULTIPLY', 'ADD'); - if ((!in_array($operation, $allowed_values))) { - throw new \InvalidArgumentException("Invalid value for 'operation', must be one of 'MULTIPLY', 'ADD'"); + $allowed_values = $this->getOperationAllowableValues(); + if (!in_array($operation, $allowed_values)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'operation', must be one of '%s'", + implode("', '", $allowed_values) + ) + ); } $this->container['operation'] = $operation; diff --git a/lib/Model/Correlation.php b/lib/Model/Correlation.php index 0695f58..2ec39e8 100644 --- a/lib/Model/Correlation.php +++ b/lib/Model/Correlation.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,71 +54,357 @@ class Correlation implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'average_daily_low_cause' => 'float', - 'average_daily_high_cause' => 'float', - 'average_effect' => 'float', - 'average_effect_following_high_cause' => 'float', - 'average_effect_following_low_cause' => 'float', + 'average_daily_high_cause' => 'double', + 'average_daily_low_cause' => 'double', + 'average_effect' => 'double', + 'average_effect_following_high_cause' => 'double', 'average_effect_following_high_cause_explanation' => 'string', + 'average_effect_following_low_cause' => 'double', 'average_effect_following_low_cause_explanation' => 'string', - 'average_vote' => 'float', - 'causality_factor' => 'float', - 'cause' => 'string', - 'cause_variable_category_name' => 'string', + 'average_forward_pearson_correlation_over_onset_delays' => 'double', + 'average_reverse_pearson_correlation_over_onset_delays' => 'double', + 'average_vote' => 'string', 'cause_changes' => 'int', - 'cause_combination_operation' => 'string', + 'cause_data_source' => '\QuantiModo\Client\Model\DataSource', + 'cause_user_variable_share_user_measurements' => 'int', + 'cause_variable_category_id' => 'int', + 'cause_variable_category_name' => 'string', + 'cause_variable_combination_operation' => 'string', + 'cause_variable_unit_abbreviated_name' => 'string', + 'cause_variable_unit_id' => 'int', + 'cause_variable_unit_name' => 'string', + 'cause_variable_id' => 'int', 'cause_variable_image_url' => 'string', 'cause_variable_ion_icon' => 'string', - 'cause_unit' => 'string', - 'cause_unit_id' => 'int', - 'cause_variable_id' => 'int', + 'cause_variable_most_common_connector_id' => 'int', 'cause_variable_name' => 'string', - 'correlation_coefficient' => 'float', + 'confidence_interval' => 'double', + 'confidence_level' => 'string', + 'correlation_coefficient' => 'double', + 'correlation_is_contradictory_to_optimal_values' => 'bool', 'created_at' => '\DateTime', + 'critical_t_value' => 'double', 'data_analysis' => 'string', 'data_sources' => 'string', - 'duration_of_action' => 'float', - 'effect' => 'string', + 'data_sources_paragraph_for_cause' => 'string', + 'data_sources_paragraph_for_effect' => 'string', + 'direction' => 'string', + 'duration_of_action' => 'int', + 'duration_of_action_in_hours' => 'int', + 'effect_changes' => 'int', + 'effect_data_source' => '\QuantiModo\Client\Model\DataSource', + 'effect_size' => 'string', + 'effect_unit' => 'string', + 'effect_user_variable_share_user_measurements' => 'int', + 'effect_variable_category_id' => 'int', 'effect_variable_category_name' => 'string', + 'effect_variable_combination_operation' => 'string', + 'effect_variable_common_alias' => 'string', + 'effect_variable_unit_abbreviated_name' => 'string', + 'effect_variable_unit_id' => 'int', + 'effect_variable_unit_name' => 'string', + 'effect_variable_id' => 'int', 'effect_variable_image_url' => 'string', 'effect_variable_ion_icon' => 'string', - 'effect_size' => 'string', - 'effect_variable_id' => 'string', + 'effect_variable_most_common_connector_id' => 'int', 'effect_variable_name' => 'string', + 'experiment_end_time' => '\DateTime', + 'experiment_start_time' => '\DateTime', + 'forward_spearman_correlation_coefficient' => 'double', 'gauge_image' => 'string', + 'gauge_image_square' => 'string', 'image_url' => 'string', - 'number_of_pairs' => 'float', - 'original_effect' => 'string', - 'onset_delay' => 'double', - 'optimal_pearson_product' => 'float', - 'original_cause' => 'string', - 'outcome_data_sources' => 'string', + 'instructions_for_cause' => 'string', + 'instructions_for_effect' => 'string', + 'number_of_pairs' => 'int', + 'onset_delay' => 'int', + 'onset_delay_in_hours' => 'int', + 'onset_delay_with_strongest_pearson_correlation' => 'int', + 'onset_delay_with_strongest_pearson_correlation_in_hours' => 'int', + 'optimal_pearson_product' => 'double', + 'outcome_filling_value' => 'int', + 'outcome_maximum_allowed_value' => 'double', + 'outcome_minimum_allowed_value' => 'double', + 'pearson_correlation_with_no_onset_delay' => 'double', + 'predictive_pearson_correlation' => 'double', + 'predictive_pearson_correlation_coefficient' => 'double', + 'predictor_data_sources' => 'string', 'predictor_explanation' => 'string', - 'principal_investigator' => 'string', - 'qm_score' => 'float', - 'reverse_correlation' => 'float', + 'predictor_filling_value' => 'int', + 'predictor_maximum_allowed_value' => 'double', + 'predictor_minimum_allowed_value' => 'double', + 'predicts_high_effect_change' => 'int', + 'predicts_high_effect_change_sentence_fragment' => 'string', + 'predicts_low_effect_change' => 'int', + 'predicts_low_effect_change_sentence_fragment' => 'string', + 'p_value' => 'double', + 'qm_score' => 'double', + 'reverse_pearson_correlation_coefficient' => 'double', + 'share_user_measurements' => 'bool', 'significance_explanation' => 'string', - 'statistical_significance' => 'string', + 'significant_difference' => 'bool', + 'statistical_significance' => 'double', 'strength_level' => 'string', + 'strongest_pearson_correlation_coefficient' => 'double', 'study_abstract' => 'string', - 'study_background' => 'string', 'study_design' => 'string', 'study_limitations' => 'string', 'study_link_dynamic' => 'string', + 'study_link_email' => 'string', 'study_link_facebook' => 'string', 'study_link_google' => 'string', - 'study_link_twitter' => 'string', 'study_link_static' => 'string', + 'study_link_twitter' => 'string', 'study_objective' => 'string', 'study_results' => 'string', 'study_title' => 'string', - 'timestamp' => 'float', + 'timestamp' => 'int', + 't_value' => 'double', 'updated_at' => '\DateTime', - 'user_vote' => 'float', - 'value_predicting_high_outcome' => 'float', + 'user_id' => 'int', + 'user_vote' => 'int', + 'value_predicting_high_outcome' => 'double', 'value_predicting_high_outcome_explanation' => 'string', - 'value_predicting_low_outcome' => 'float', - 'value_predicting_low_outcome_explanation' => 'string' + 'value_predicting_low_outcome' => 'double', + 'value_predicting_low_outcome_explanation' => 'string', + 'causality_factor' => 'float', + 'outcome_data_sources' => 'string', + 'principal_investigator' => 'string', + 'reverse_correlation' => 'float', + 'study_background' => 'string', + 'study_invitation' => 'string', + 'study_question' => 'string', + 'all_pairs_significance' => 'double', + 'average_pearson_correlation_coefficient_over_onset_delays' => 'string', + 'calculation_start_time' => '\DateTime', + 'cause_changes_statistical_significance' => 'double', + 'cause_number_of_processed_daily_measurements' => 'int', + 'cause_number_of_raw_measurements' => 'int', + 'cause_value_spread' => 'double', + 'correlations_over_durations_of_action' => 'string', + 'correlations_over_durations_of_action_chart_config' => 'string', + 'correlations_over_onset_delays_chart_config' => 'string', + 'data_points' => 'string', + 'degrees_of_freedom' => 'int', + 'distance_from_middle_to_be_hight_low_effect' => 'int', + 'effect_number_of_processed_daily_measurements' => 'int', + 'effect_number_of_raw_measurements' => 'int', + 'effect_value_spread' => 'double', + 'error' => 'string', + 'maximum_cause_value' => 'double', + 'maximum_effect_value' => 'double', + 'median_of_lower_half_of_effect_measurements' => 'string', + 'median_of_upper_half_of_effect_measurements' => 'string', + 'minimum_cause_value' => 'double', + 'minimum_effect_value' => 'double', + 'minimum_probability' => 'double', + 'number_of_cause_changes_for_optimal_values' => 'int', + 'number_of_days' => 'int', + 'number_of_days_significance' => 'double', + 'number_of_effect_changes_for_optimal_values' => 'int', + 'number_of_high_effect_pairs' => 'int', + 'number_of_low_effect_pairs' => 'int', + 'number_of_samples' => 'int', + 'number_of_unique_cause_values_for_optimal_values' => 'int', + 'number_of_unique_effect_values_for_optimal_values' => 'int', + 'number_of_users' => 'string', + 'optimal_change_spread' => 'double', + 'optimal_change_spread_significance' => 'double', + 'pairs_over_time_chart_config' => '\DateTime', + 'per_day_sentence_fragment' => 'string', + 'raw_cause_measurement_significance' => 'double', + 'raw_effect_measurement_significance' => 'double', + 'reverse_pairs_count' => 'string', + 'vote_statistical_significance' => 'int', + 'aggregate_qm_score' => 'double', + 'cause_unit' => 'string', + 'cause_variable_common_alias' => 'string', + 'cause_variable_informational_url' => 'string', + 'cause_variable_product_url' => 'string', + 'effect_variable_informational_url' => 'string', + 'effect_variable_product_url' => 'string', + 'forward_pearson_correlation_coefficient' => 'double', + 'number_of_correlations' => 'int', + 'vote' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'average_daily_high_cause' => 'double', + 'average_daily_low_cause' => 'double', + 'average_effect' => 'double', + 'average_effect_following_high_cause' => 'double', + 'average_effect_following_high_cause_explanation' => null, + 'average_effect_following_low_cause' => 'double', + 'average_effect_following_low_cause_explanation' => null, + 'average_forward_pearson_correlation_over_onset_delays' => 'double', + 'average_reverse_pearson_correlation_over_onset_delays' => 'double', + 'average_vote' => null, + 'cause_changes' => null, + 'cause_data_source' => null, + 'cause_user_variable_share_user_measurements' => null, + 'cause_variable_category_id' => null, + 'cause_variable_category_name' => null, + 'cause_variable_combination_operation' => null, + 'cause_variable_unit_abbreviated_name' => null, + 'cause_variable_unit_id' => null, + 'cause_variable_unit_name' => null, + 'cause_variable_id' => null, + 'cause_variable_image_url' => null, + 'cause_variable_ion_icon' => null, + 'cause_variable_most_common_connector_id' => null, + 'cause_variable_name' => null, + 'confidence_interval' => 'double', + 'confidence_level' => null, + 'correlation_coefficient' => 'double', + 'correlation_is_contradictory_to_optimal_values' => null, + 'created_at' => 'date-time', + 'critical_t_value' => 'double', + 'data_analysis' => null, + 'data_sources' => null, + 'data_sources_paragraph_for_cause' => null, + 'data_sources_paragraph_for_effect' => null, + 'direction' => null, + 'duration_of_action' => null, + 'duration_of_action_in_hours' => null, + 'effect_changes' => null, + 'effect_data_source' => null, + 'effect_size' => null, + 'effect_unit' => null, + 'effect_user_variable_share_user_measurements' => null, + 'effect_variable_category_id' => null, + 'effect_variable_category_name' => null, + 'effect_variable_combination_operation' => null, + 'effect_variable_common_alias' => null, + 'effect_variable_unit_abbreviated_name' => null, + 'effect_variable_unit_id' => null, + 'effect_variable_unit_name' => null, + 'effect_variable_id' => null, + 'effect_variable_image_url' => null, + 'effect_variable_ion_icon' => null, + 'effect_variable_most_common_connector_id' => null, + 'effect_variable_name' => null, + 'experiment_end_time' => 'date-time', + 'experiment_start_time' => 'date-time', + 'forward_spearman_correlation_coefficient' => 'double', + 'gauge_image' => null, + 'gauge_image_square' => null, + 'image_url' => null, + 'instructions_for_cause' => null, + 'instructions_for_effect' => null, + 'number_of_pairs' => null, + 'onset_delay' => null, + 'onset_delay_in_hours' => null, + 'onset_delay_with_strongest_pearson_correlation' => null, + 'onset_delay_with_strongest_pearson_correlation_in_hours' => null, + 'optimal_pearson_product' => 'double', + 'outcome_filling_value' => null, + 'outcome_maximum_allowed_value' => 'double', + 'outcome_minimum_allowed_value' => 'double', + 'pearson_correlation_with_no_onset_delay' => 'double', + 'predictive_pearson_correlation' => 'double', + 'predictive_pearson_correlation_coefficient' => 'double', + 'predictor_data_sources' => null, + 'predictor_explanation' => null, + 'predictor_filling_value' => null, + 'predictor_maximum_allowed_value' => 'double', + 'predictor_minimum_allowed_value' => 'double', + 'predicts_high_effect_change' => null, + 'predicts_high_effect_change_sentence_fragment' => null, + 'predicts_low_effect_change' => null, + 'predicts_low_effect_change_sentence_fragment' => null, + 'p_value' => 'double', + 'qm_score' => 'double', + 'reverse_pearson_correlation_coefficient' => 'double', + 'share_user_measurements' => null, + 'significance_explanation' => null, + 'significant_difference' => null, + 'statistical_significance' => 'double', + 'strength_level' => null, + 'strongest_pearson_correlation_coefficient' => 'double', + 'study_abstract' => null, + 'study_design' => null, + 'study_limitations' => null, + 'study_link_dynamic' => null, + 'study_link_email' => null, + 'study_link_facebook' => null, + 'study_link_google' => null, + 'study_link_static' => null, + 'study_link_twitter' => null, + 'study_objective' => null, + 'study_results' => null, + 'study_title' => null, + 'timestamp' => null, + 't_value' => 'double', + 'updated_at' => 'date-time', + 'user_id' => null, + 'user_vote' => null, + 'value_predicting_high_outcome' => 'double', + 'value_predicting_high_outcome_explanation' => null, + 'value_predicting_low_outcome' => 'double', + 'value_predicting_low_outcome_explanation' => null, + 'causality_factor' => null, + 'outcome_data_sources' => null, + 'principal_investigator' => null, + 'reverse_correlation' => null, + 'study_background' => null, + 'study_invitation' => null, + 'study_question' => null, + 'all_pairs_significance' => 'double', + 'average_pearson_correlation_coefficient_over_onset_delays' => null, + 'calculation_start_time' => 'date-time', + 'cause_changes_statistical_significance' => 'double', + 'cause_number_of_processed_daily_measurements' => null, + 'cause_number_of_raw_measurements' => null, + 'cause_value_spread' => 'double', + 'correlations_over_durations_of_action' => null, + 'correlations_over_durations_of_action_chart_config' => null, + 'correlations_over_onset_delays_chart_config' => null, + 'data_points' => null, + 'degrees_of_freedom' => null, + 'distance_from_middle_to_be_hight_low_effect' => null, + 'effect_number_of_processed_daily_measurements' => null, + 'effect_number_of_raw_measurements' => null, + 'effect_value_spread' => 'double', + 'error' => null, + 'maximum_cause_value' => 'double', + 'maximum_effect_value' => 'double', + 'median_of_lower_half_of_effect_measurements' => null, + 'median_of_upper_half_of_effect_measurements' => null, + 'minimum_cause_value' => 'double', + 'minimum_effect_value' => 'double', + 'minimum_probability' => 'double', + 'number_of_cause_changes_for_optimal_values' => null, + 'number_of_days' => null, + 'number_of_days_significance' => 'double', + 'number_of_effect_changes_for_optimal_values' => null, + 'number_of_high_effect_pairs' => null, + 'number_of_low_effect_pairs' => null, + 'number_of_samples' => null, + 'number_of_unique_cause_values_for_optimal_values' => null, + 'number_of_unique_effect_values_for_optimal_values' => null, + 'number_of_users' => null, + 'optimal_change_spread' => 'double', + 'optimal_change_spread_significance' => 'double', + 'pairs_over_time_chart_config' => 'date-time', + 'per_day_sentence_fragment' => null, + 'raw_cause_measurement_significance' => 'double', + 'raw_effect_measurement_significance' => 'double', + 'reverse_pairs_count' => null, + 'vote_statistical_significance' => null, + 'aggregate_qm_score' => 'double', + 'cause_unit' => null, + 'cause_variable_common_alias' => null, + 'cause_variable_informational_url' => null, + 'cause_variable_product_url' => null, + 'effect_variable_informational_url' => null, + 'effect_variable_product_url' => null, + 'forward_pearson_correlation_coefficient' => 'double', + 'number_of_correlations' => null, + 'vote' => null ]; public static function swaggerTypes() @@ -126,76 +412,188 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'average_daily_low_cause' => 'averageDailyLowCause', 'average_daily_high_cause' => 'averageDailyHighCause', + 'average_daily_low_cause' => 'averageDailyLowCause', 'average_effect' => 'averageEffect', 'average_effect_following_high_cause' => 'averageEffectFollowingHighCause', - 'average_effect_following_low_cause' => 'averageEffectFollowingLowCause', 'average_effect_following_high_cause_explanation' => 'averageEffectFollowingHighCauseExplanation', + 'average_effect_following_low_cause' => 'averageEffectFollowingLowCause', 'average_effect_following_low_cause_explanation' => 'averageEffectFollowingLowCauseExplanation', + 'average_forward_pearson_correlation_over_onset_delays' => 'averageForwardPearsonCorrelationOverOnsetDelays', + 'average_reverse_pearson_correlation_over_onset_delays' => 'averageReversePearsonCorrelationOverOnsetDelays', 'average_vote' => 'averageVote', - 'causality_factor' => 'causalityFactor', - 'cause' => 'cause', - 'cause_variable_category_name' => 'causeVariableCategoryName', 'cause_changes' => 'causeChanges', - 'cause_combination_operation' => 'causeCombinationOperation', + 'cause_data_source' => 'causeDataSource', + 'cause_user_variable_share_user_measurements' => 'causeUserVariableShareUserMeasurements', + 'cause_variable_category_id' => 'causeVariableCategoryId', + 'cause_variable_category_name' => 'causeVariableCategoryName', + 'cause_variable_combination_operation' => 'causeVariableCombinationOperation', + 'cause_variable_unit_abbreviated_name' => 'causeVariableUnitAbbreviatedName', + 'cause_variable_unit_id' => 'causeVariableUnitId', + 'cause_variable_unit_name' => 'causeVariableUnitName', + 'cause_variable_id' => 'causeVariableId', 'cause_variable_image_url' => 'causeVariableImageUrl', 'cause_variable_ion_icon' => 'causeVariableIonIcon', - 'cause_unit' => 'causeUnit', - 'cause_unit_id' => 'causeUnitId', - 'cause_variable_id' => 'causeVariableId', + 'cause_variable_most_common_connector_id' => 'causeVariableMostCommonConnectorId', 'cause_variable_name' => 'causeVariableName', + 'confidence_interval' => 'confidenceInterval', + 'confidence_level' => 'confidenceLevel', 'correlation_coefficient' => 'correlationCoefficient', + 'correlation_is_contradictory_to_optimal_values' => 'correlationIsContradictoryToOptimalValues', 'created_at' => 'createdAt', + 'critical_t_value' => 'criticalTValue', 'data_analysis' => 'dataAnalysis', 'data_sources' => 'dataSources', + 'data_sources_paragraph_for_cause' => 'dataSourcesParagraphForCause', + 'data_sources_paragraph_for_effect' => 'dataSourcesParagraphForEffect', + 'direction' => 'direction', 'duration_of_action' => 'durationOfAction', - 'effect' => 'effect', + 'duration_of_action_in_hours' => 'durationOfActionInHours', + 'effect_changes' => 'effectChanges', + 'effect_data_source' => 'effectDataSource', + 'effect_size' => 'effectSize', + 'effect_unit' => 'effectUnit', + 'effect_user_variable_share_user_measurements' => 'effectUserVariableShareUserMeasurements', + 'effect_variable_category_id' => 'effectVariableCategoryId', 'effect_variable_category_name' => 'effectVariableCategoryName', + 'effect_variable_combination_operation' => 'effectVariableCombinationOperation', + 'effect_variable_common_alias' => 'effectVariableCommonAlias', + 'effect_variable_unit_abbreviated_name' => 'effectVariableUnitAbbreviatedName', + 'effect_variable_unit_id' => 'effectVariableUnitId', + 'effect_variable_unit_name' => 'effectVariableUnitName', + 'effect_variable_id' => 'effectVariableId', 'effect_variable_image_url' => 'effectVariableImageUrl', 'effect_variable_ion_icon' => 'effectVariableIonIcon', - 'effect_size' => 'effectSize', - 'effect_variable_id' => 'effectVariableId', + 'effect_variable_most_common_connector_id' => 'effectVariableMostCommonConnectorId', 'effect_variable_name' => 'effectVariableName', + 'experiment_end_time' => 'experimentEndTime', + 'experiment_start_time' => 'experimentStartTime', + 'forward_spearman_correlation_coefficient' => 'forwardSpearmanCorrelationCoefficient', 'gauge_image' => 'gaugeImage', + 'gauge_image_square' => 'gaugeImageSquare', 'image_url' => 'imageUrl', + 'instructions_for_cause' => 'instructionsForCause', + 'instructions_for_effect' => 'instructionsForEffect', 'number_of_pairs' => 'numberOfPairs', - 'original_effect' => 'originalEffect', 'onset_delay' => 'onsetDelay', + 'onset_delay_in_hours' => 'onsetDelayInHours', + 'onset_delay_with_strongest_pearson_correlation' => 'onsetDelayWithStrongestPearsonCorrelation', + 'onset_delay_with_strongest_pearson_correlation_in_hours' => 'onsetDelayWithStrongestPearsonCorrelationInHours', 'optimal_pearson_product' => 'optimalPearsonProduct', - 'original_cause' => 'originalCause', - 'outcome_data_sources' => 'outcomeDataSources', + 'outcome_filling_value' => 'outcomeFillingValue', + 'outcome_maximum_allowed_value' => 'outcomeMaximumAllowedValue', + 'outcome_minimum_allowed_value' => 'outcomeMinimumAllowedValue', + 'pearson_correlation_with_no_onset_delay' => 'pearsonCorrelationWithNoOnsetDelay', + 'predictive_pearson_correlation' => 'predictivePearsonCorrelation', + 'predictive_pearson_correlation_coefficient' => 'predictivePearsonCorrelationCoefficient', + 'predictor_data_sources' => 'predictorDataSources', 'predictor_explanation' => 'predictorExplanation', - 'principal_investigator' => 'principalInvestigator', + 'predictor_filling_value' => 'predictorFillingValue', + 'predictor_maximum_allowed_value' => 'predictorMaximumAllowedValue', + 'predictor_minimum_allowed_value' => 'predictorMinimumAllowedValue', + 'predicts_high_effect_change' => 'predictsHighEffectChange', + 'predicts_high_effect_change_sentence_fragment' => 'predictsHighEffectChangeSentenceFragment', + 'predicts_low_effect_change' => 'predictsLowEffectChange', + 'predicts_low_effect_change_sentence_fragment' => 'predictsLowEffectChangeSentenceFragment', + 'p_value' => 'pValue', 'qm_score' => 'qmScore', - 'reverse_correlation' => 'reverseCorrelation', + 'reverse_pearson_correlation_coefficient' => 'reversePearsonCorrelationCoefficient', + 'share_user_measurements' => 'shareUserMeasurements', 'significance_explanation' => 'significanceExplanation', + 'significant_difference' => 'significantDifference', 'statistical_significance' => 'statisticalSignificance', 'strength_level' => 'strengthLevel', + 'strongest_pearson_correlation_coefficient' => 'strongestPearsonCorrelationCoefficient', 'study_abstract' => 'studyAbstract', - 'study_background' => 'studyBackground', 'study_design' => 'studyDesign', 'study_limitations' => 'studyLimitations', 'study_link_dynamic' => 'studyLinkDynamic', + 'study_link_email' => 'studyLinkEmail', 'study_link_facebook' => 'studyLinkFacebook', 'study_link_google' => 'studyLinkGoogle', - 'study_link_twitter' => 'studyLinkTwitter', 'study_link_static' => 'studyLinkStatic', + 'study_link_twitter' => 'studyLinkTwitter', 'study_objective' => 'studyObjective', 'study_results' => 'studyResults', 'study_title' => 'studyTitle', 'timestamp' => 'timestamp', + 't_value' => 'tValue', 'updated_at' => 'updatedAt', + 'user_id' => 'userId', 'user_vote' => 'userVote', 'value_predicting_high_outcome' => 'valuePredictingHighOutcome', 'value_predicting_high_outcome_explanation' => 'valuePredictingHighOutcomeExplanation', 'value_predicting_low_outcome' => 'valuePredictingLowOutcome', - 'value_predicting_low_outcome_explanation' => 'valuePredictingLowOutcomeExplanation' + 'value_predicting_low_outcome_explanation' => 'valuePredictingLowOutcomeExplanation', + 'causality_factor' => 'causalityFactor', + 'outcome_data_sources' => 'outcomeDataSources', + 'principal_investigator' => 'principalInvestigator', + 'reverse_correlation' => 'reverseCorrelation', + 'study_background' => 'studyBackground', + 'study_invitation' => 'studyInvitation', + 'study_question' => 'studyQuestion', + 'all_pairs_significance' => 'allPairsSignificance', + 'average_pearson_correlation_coefficient_over_onset_delays' => 'averagePearsonCorrelationCoefficientOverOnsetDelays', + 'calculation_start_time' => 'calculationStartTime', + 'cause_changes_statistical_significance' => 'causeChangesStatisticalSignificance', + 'cause_number_of_processed_daily_measurements' => 'causeNumberOfProcessedDailyMeasurements', + 'cause_number_of_raw_measurements' => 'causeNumberOfRawMeasurements', + 'cause_value_spread' => 'causeValueSpread', + 'correlations_over_durations_of_action' => 'correlationsOverDurationsOfAction', + 'correlations_over_durations_of_action_chart_config' => 'correlationsOverDurationsOfActionChartConfig', + 'correlations_over_onset_delays_chart_config' => 'correlationsOverOnsetDelaysChartConfig', + 'data_points' => 'dataPoints', + 'degrees_of_freedom' => 'degreesOfFreedom', + 'distance_from_middle_to_be_hight_low_effect' => 'distanceFromMiddleToBeHightLowEffect', + 'effect_number_of_processed_daily_measurements' => 'effectNumberOfProcessedDailyMeasurements', + 'effect_number_of_raw_measurements' => 'effectNumberOfRawMeasurements', + 'effect_value_spread' => 'effectValueSpread', + 'error' => 'error', + 'maximum_cause_value' => 'maximumCauseValue', + 'maximum_effect_value' => 'maximumEffectValue', + 'median_of_lower_half_of_effect_measurements' => 'medianOfLowerHalfOfEffectMeasurements', + 'median_of_upper_half_of_effect_measurements' => 'medianOfUpperHalfOfEffectMeasurements', + 'minimum_cause_value' => 'minimumCauseValue', + 'minimum_effect_value' => 'minimumEffectValue', + 'minimum_probability' => 'minimumProbability', + 'number_of_cause_changes_for_optimal_values' => 'numberOfCauseChangesForOptimalValues', + 'number_of_days' => 'numberOfDays', + 'number_of_days_significance' => 'numberOfDaysSignificance', + 'number_of_effect_changes_for_optimal_values' => 'numberOfEffectChangesForOptimalValues', + 'number_of_high_effect_pairs' => 'numberOfHighEffectPairs', + 'number_of_low_effect_pairs' => 'numberOfLowEffectPairs', + 'number_of_samples' => 'numberOfSamples', + 'number_of_unique_cause_values_for_optimal_values' => 'numberOfUniqueCauseValuesForOptimalValues', + 'number_of_unique_effect_values_for_optimal_values' => 'numberOfUniqueEffectValuesForOptimalValues', + 'number_of_users' => 'numberOfUsers', + 'optimal_change_spread' => 'optimalChangeSpread', + 'optimal_change_spread_significance' => 'optimalChangeSpreadSignificance', + 'pairs_over_time_chart_config' => 'pairsOverTimeChartConfig', + 'per_day_sentence_fragment' => 'perDaySentenceFragment', + 'raw_cause_measurement_significance' => 'rawCauseMeasurementSignificance', + 'raw_effect_measurement_significance' => 'rawEffectMeasurementSignificance', + 'reverse_pairs_count' => 'reversePairsCount', + 'vote_statistical_significance' => 'voteStatisticalSignificance', + 'aggregate_qm_score' => 'aggregateQMScore', + 'cause_unit' => 'causeUnit', + 'cause_variable_common_alias' => 'causeVariableCommonAlias', + 'cause_variable_informational_url' => 'causeVariableInformationalUrl', + 'cause_variable_product_url' => 'causeVariableProductUrl', + 'effect_variable_informational_url' => 'effectVariableInformationalUrl', + 'effect_variable_product_url' => 'effectVariableProductUrl', + 'forward_pearson_correlation_coefficient' => 'forwardPearsonCorrelationCoefficient', + 'number_of_correlations' => 'numberOfCorrelations', + 'vote' => 'vote' ]; @@ -204,71 +602,178 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'average_daily_low_cause' => 'setAverageDailyLowCause', 'average_daily_high_cause' => 'setAverageDailyHighCause', + 'average_daily_low_cause' => 'setAverageDailyLowCause', 'average_effect' => 'setAverageEffect', 'average_effect_following_high_cause' => 'setAverageEffectFollowingHighCause', - 'average_effect_following_low_cause' => 'setAverageEffectFollowingLowCause', 'average_effect_following_high_cause_explanation' => 'setAverageEffectFollowingHighCauseExplanation', + 'average_effect_following_low_cause' => 'setAverageEffectFollowingLowCause', 'average_effect_following_low_cause_explanation' => 'setAverageEffectFollowingLowCauseExplanation', + 'average_forward_pearson_correlation_over_onset_delays' => 'setAverageForwardPearsonCorrelationOverOnsetDelays', + 'average_reverse_pearson_correlation_over_onset_delays' => 'setAverageReversePearsonCorrelationOverOnsetDelays', 'average_vote' => 'setAverageVote', - 'causality_factor' => 'setCausalityFactor', - 'cause' => 'setCause', - 'cause_variable_category_name' => 'setCauseVariableCategoryName', 'cause_changes' => 'setCauseChanges', - 'cause_combination_operation' => 'setCauseCombinationOperation', + 'cause_data_source' => 'setCauseDataSource', + 'cause_user_variable_share_user_measurements' => 'setCauseUserVariableShareUserMeasurements', + 'cause_variable_category_id' => 'setCauseVariableCategoryId', + 'cause_variable_category_name' => 'setCauseVariableCategoryName', + 'cause_variable_combination_operation' => 'setCauseVariableCombinationOperation', + 'cause_variable_unit_abbreviated_name' => 'setCauseVariableUnitAbbreviatedName', + 'cause_variable_unit_id' => 'setCauseVariableUnitId', + 'cause_variable_unit_name' => 'setCauseVariableUnitName', + 'cause_variable_id' => 'setCauseVariableId', 'cause_variable_image_url' => 'setCauseVariableImageUrl', 'cause_variable_ion_icon' => 'setCauseVariableIonIcon', - 'cause_unit' => 'setCauseUnit', - 'cause_unit_id' => 'setCauseUnitId', - 'cause_variable_id' => 'setCauseVariableId', + 'cause_variable_most_common_connector_id' => 'setCauseVariableMostCommonConnectorId', 'cause_variable_name' => 'setCauseVariableName', + 'confidence_interval' => 'setConfidenceInterval', + 'confidence_level' => 'setConfidenceLevel', 'correlation_coefficient' => 'setCorrelationCoefficient', + 'correlation_is_contradictory_to_optimal_values' => 'setCorrelationIsContradictoryToOptimalValues', 'created_at' => 'setCreatedAt', + 'critical_t_value' => 'setCriticalTValue', 'data_analysis' => 'setDataAnalysis', 'data_sources' => 'setDataSources', + 'data_sources_paragraph_for_cause' => 'setDataSourcesParagraphForCause', + 'data_sources_paragraph_for_effect' => 'setDataSourcesParagraphForEffect', + 'direction' => 'setDirection', 'duration_of_action' => 'setDurationOfAction', - 'effect' => 'setEffect', + 'duration_of_action_in_hours' => 'setDurationOfActionInHours', + 'effect_changes' => 'setEffectChanges', + 'effect_data_source' => 'setEffectDataSource', + 'effect_size' => 'setEffectSize', + 'effect_unit' => 'setEffectUnit', + 'effect_user_variable_share_user_measurements' => 'setEffectUserVariableShareUserMeasurements', + 'effect_variable_category_id' => 'setEffectVariableCategoryId', 'effect_variable_category_name' => 'setEffectVariableCategoryName', + 'effect_variable_combination_operation' => 'setEffectVariableCombinationOperation', + 'effect_variable_common_alias' => 'setEffectVariableCommonAlias', + 'effect_variable_unit_abbreviated_name' => 'setEffectVariableUnitAbbreviatedName', + 'effect_variable_unit_id' => 'setEffectVariableUnitId', + 'effect_variable_unit_name' => 'setEffectVariableUnitName', + 'effect_variable_id' => 'setEffectVariableId', 'effect_variable_image_url' => 'setEffectVariableImageUrl', 'effect_variable_ion_icon' => 'setEffectVariableIonIcon', - 'effect_size' => 'setEffectSize', - 'effect_variable_id' => 'setEffectVariableId', + 'effect_variable_most_common_connector_id' => 'setEffectVariableMostCommonConnectorId', 'effect_variable_name' => 'setEffectVariableName', + 'experiment_end_time' => 'setExperimentEndTime', + 'experiment_start_time' => 'setExperimentStartTime', + 'forward_spearman_correlation_coefficient' => 'setForwardSpearmanCorrelationCoefficient', 'gauge_image' => 'setGaugeImage', + 'gauge_image_square' => 'setGaugeImageSquare', 'image_url' => 'setImageUrl', + 'instructions_for_cause' => 'setInstructionsForCause', + 'instructions_for_effect' => 'setInstructionsForEffect', 'number_of_pairs' => 'setNumberOfPairs', - 'original_effect' => 'setOriginalEffect', 'onset_delay' => 'setOnsetDelay', + 'onset_delay_in_hours' => 'setOnsetDelayInHours', + 'onset_delay_with_strongest_pearson_correlation' => 'setOnsetDelayWithStrongestPearsonCorrelation', + 'onset_delay_with_strongest_pearson_correlation_in_hours' => 'setOnsetDelayWithStrongestPearsonCorrelationInHours', 'optimal_pearson_product' => 'setOptimalPearsonProduct', - 'original_cause' => 'setOriginalCause', - 'outcome_data_sources' => 'setOutcomeDataSources', + 'outcome_filling_value' => 'setOutcomeFillingValue', + 'outcome_maximum_allowed_value' => 'setOutcomeMaximumAllowedValue', + 'outcome_minimum_allowed_value' => 'setOutcomeMinimumAllowedValue', + 'pearson_correlation_with_no_onset_delay' => 'setPearsonCorrelationWithNoOnsetDelay', + 'predictive_pearson_correlation' => 'setPredictivePearsonCorrelation', + 'predictive_pearson_correlation_coefficient' => 'setPredictivePearsonCorrelationCoefficient', + 'predictor_data_sources' => 'setPredictorDataSources', 'predictor_explanation' => 'setPredictorExplanation', - 'principal_investigator' => 'setPrincipalInvestigator', + 'predictor_filling_value' => 'setPredictorFillingValue', + 'predictor_maximum_allowed_value' => 'setPredictorMaximumAllowedValue', + 'predictor_minimum_allowed_value' => 'setPredictorMinimumAllowedValue', + 'predicts_high_effect_change' => 'setPredictsHighEffectChange', + 'predicts_high_effect_change_sentence_fragment' => 'setPredictsHighEffectChangeSentenceFragment', + 'predicts_low_effect_change' => 'setPredictsLowEffectChange', + 'predicts_low_effect_change_sentence_fragment' => 'setPredictsLowEffectChangeSentenceFragment', + 'p_value' => 'setPValue', 'qm_score' => 'setQmScore', - 'reverse_correlation' => 'setReverseCorrelation', + 'reverse_pearson_correlation_coefficient' => 'setReversePearsonCorrelationCoefficient', + 'share_user_measurements' => 'setShareUserMeasurements', 'significance_explanation' => 'setSignificanceExplanation', + 'significant_difference' => 'setSignificantDifference', 'statistical_significance' => 'setStatisticalSignificance', 'strength_level' => 'setStrengthLevel', + 'strongest_pearson_correlation_coefficient' => 'setStrongestPearsonCorrelationCoefficient', 'study_abstract' => 'setStudyAbstract', - 'study_background' => 'setStudyBackground', 'study_design' => 'setStudyDesign', 'study_limitations' => 'setStudyLimitations', 'study_link_dynamic' => 'setStudyLinkDynamic', + 'study_link_email' => 'setStudyLinkEmail', 'study_link_facebook' => 'setStudyLinkFacebook', 'study_link_google' => 'setStudyLinkGoogle', - 'study_link_twitter' => 'setStudyLinkTwitter', 'study_link_static' => 'setStudyLinkStatic', + 'study_link_twitter' => 'setStudyLinkTwitter', 'study_objective' => 'setStudyObjective', 'study_results' => 'setStudyResults', 'study_title' => 'setStudyTitle', 'timestamp' => 'setTimestamp', + 't_value' => 'setTValue', 'updated_at' => 'setUpdatedAt', + 'user_id' => 'setUserId', 'user_vote' => 'setUserVote', 'value_predicting_high_outcome' => 'setValuePredictingHighOutcome', 'value_predicting_high_outcome_explanation' => 'setValuePredictingHighOutcomeExplanation', 'value_predicting_low_outcome' => 'setValuePredictingLowOutcome', - 'value_predicting_low_outcome_explanation' => 'setValuePredictingLowOutcomeExplanation' + 'value_predicting_low_outcome_explanation' => 'setValuePredictingLowOutcomeExplanation', + 'causality_factor' => 'setCausalityFactor', + 'outcome_data_sources' => 'setOutcomeDataSources', + 'principal_investigator' => 'setPrincipalInvestigator', + 'reverse_correlation' => 'setReverseCorrelation', + 'study_background' => 'setStudyBackground', + 'study_invitation' => 'setStudyInvitation', + 'study_question' => 'setStudyQuestion', + 'all_pairs_significance' => 'setAllPairsSignificance', + 'average_pearson_correlation_coefficient_over_onset_delays' => 'setAveragePearsonCorrelationCoefficientOverOnsetDelays', + 'calculation_start_time' => 'setCalculationStartTime', + 'cause_changes_statistical_significance' => 'setCauseChangesStatisticalSignificance', + 'cause_number_of_processed_daily_measurements' => 'setCauseNumberOfProcessedDailyMeasurements', + 'cause_number_of_raw_measurements' => 'setCauseNumberOfRawMeasurements', + 'cause_value_spread' => 'setCauseValueSpread', + 'correlations_over_durations_of_action' => 'setCorrelationsOverDurationsOfAction', + 'correlations_over_durations_of_action_chart_config' => 'setCorrelationsOverDurationsOfActionChartConfig', + 'correlations_over_onset_delays_chart_config' => 'setCorrelationsOverOnsetDelaysChartConfig', + 'data_points' => 'setDataPoints', + 'degrees_of_freedom' => 'setDegreesOfFreedom', + 'distance_from_middle_to_be_hight_low_effect' => 'setDistanceFromMiddleToBeHightLowEffect', + 'effect_number_of_processed_daily_measurements' => 'setEffectNumberOfProcessedDailyMeasurements', + 'effect_number_of_raw_measurements' => 'setEffectNumberOfRawMeasurements', + 'effect_value_spread' => 'setEffectValueSpread', + 'error' => 'setError', + 'maximum_cause_value' => 'setMaximumCauseValue', + 'maximum_effect_value' => 'setMaximumEffectValue', + 'median_of_lower_half_of_effect_measurements' => 'setMedianOfLowerHalfOfEffectMeasurements', + 'median_of_upper_half_of_effect_measurements' => 'setMedianOfUpperHalfOfEffectMeasurements', + 'minimum_cause_value' => 'setMinimumCauseValue', + 'minimum_effect_value' => 'setMinimumEffectValue', + 'minimum_probability' => 'setMinimumProbability', + 'number_of_cause_changes_for_optimal_values' => 'setNumberOfCauseChangesForOptimalValues', + 'number_of_days' => 'setNumberOfDays', + 'number_of_days_significance' => 'setNumberOfDaysSignificance', + 'number_of_effect_changes_for_optimal_values' => 'setNumberOfEffectChangesForOptimalValues', + 'number_of_high_effect_pairs' => 'setNumberOfHighEffectPairs', + 'number_of_low_effect_pairs' => 'setNumberOfLowEffectPairs', + 'number_of_samples' => 'setNumberOfSamples', + 'number_of_unique_cause_values_for_optimal_values' => 'setNumberOfUniqueCauseValuesForOptimalValues', + 'number_of_unique_effect_values_for_optimal_values' => 'setNumberOfUniqueEffectValuesForOptimalValues', + 'number_of_users' => 'setNumberOfUsers', + 'optimal_change_spread' => 'setOptimalChangeSpread', + 'optimal_change_spread_significance' => 'setOptimalChangeSpreadSignificance', + 'pairs_over_time_chart_config' => 'setPairsOverTimeChartConfig', + 'per_day_sentence_fragment' => 'setPerDaySentenceFragment', + 'raw_cause_measurement_significance' => 'setRawCauseMeasurementSignificance', + 'raw_effect_measurement_significance' => 'setRawEffectMeasurementSignificance', + 'reverse_pairs_count' => 'setReversePairsCount', + 'vote_statistical_significance' => 'setVoteStatisticalSignificance', + 'aggregate_qm_score' => 'setAggregateQmScore', + 'cause_unit' => 'setCauseUnit', + 'cause_variable_common_alias' => 'setCauseVariableCommonAlias', + 'cause_variable_informational_url' => 'setCauseVariableInformationalUrl', + 'cause_variable_product_url' => 'setCauseVariableProductUrl', + 'effect_variable_informational_url' => 'setEffectVariableInformationalUrl', + 'effect_variable_product_url' => 'setEffectVariableProductUrl', + 'forward_pearson_correlation_coefficient' => 'setForwardPearsonCorrelationCoefficient', + 'number_of_correlations' => 'setNumberOfCorrelations', + 'vote' => 'setVote' ]; @@ -277,71 +782,178 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'average_daily_low_cause' => 'getAverageDailyLowCause', 'average_daily_high_cause' => 'getAverageDailyHighCause', + 'average_daily_low_cause' => 'getAverageDailyLowCause', 'average_effect' => 'getAverageEffect', 'average_effect_following_high_cause' => 'getAverageEffectFollowingHighCause', - 'average_effect_following_low_cause' => 'getAverageEffectFollowingLowCause', 'average_effect_following_high_cause_explanation' => 'getAverageEffectFollowingHighCauseExplanation', + 'average_effect_following_low_cause' => 'getAverageEffectFollowingLowCause', 'average_effect_following_low_cause_explanation' => 'getAverageEffectFollowingLowCauseExplanation', + 'average_forward_pearson_correlation_over_onset_delays' => 'getAverageForwardPearsonCorrelationOverOnsetDelays', + 'average_reverse_pearson_correlation_over_onset_delays' => 'getAverageReversePearsonCorrelationOverOnsetDelays', 'average_vote' => 'getAverageVote', - 'causality_factor' => 'getCausalityFactor', - 'cause' => 'getCause', - 'cause_variable_category_name' => 'getCauseVariableCategoryName', 'cause_changes' => 'getCauseChanges', - 'cause_combination_operation' => 'getCauseCombinationOperation', + 'cause_data_source' => 'getCauseDataSource', + 'cause_user_variable_share_user_measurements' => 'getCauseUserVariableShareUserMeasurements', + 'cause_variable_category_id' => 'getCauseVariableCategoryId', + 'cause_variable_category_name' => 'getCauseVariableCategoryName', + 'cause_variable_combination_operation' => 'getCauseVariableCombinationOperation', + 'cause_variable_unit_abbreviated_name' => 'getCauseVariableUnitAbbreviatedName', + 'cause_variable_unit_id' => 'getCauseVariableUnitId', + 'cause_variable_unit_name' => 'getCauseVariableUnitName', + 'cause_variable_id' => 'getCauseVariableId', 'cause_variable_image_url' => 'getCauseVariableImageUrl', 'cause_variable_ion_icon' => 'getCauseVariableIonIcon', - 'cause_unit' => 'getCauseUnit', - 'cause_unit_id' => 'getCauseUnitId', - 'cause_variable_id' => 'getCauseVariableId', + 'cause_variable_most_common_connector_id' => 'getCauseVariableMostCommonConnectorId', 'cause_variable_name' => 'getCauseVariableName', + 'confidence_interval' => 'getConfidenceInterval', + 'confidence_level' => 'getConfidenceLevel', 'correlation_coefficient' => 'getCorrelationCoefficient', + 'correlation_is_contradictory_to_optimal_values' => 'getCorrelationIsContradictoryToOptimalValues', 'created_at' => 'getCreatedAt', + 'critical_t_value' => 'getCriticalTValue', 'data_analysis' => 'getDataAnalysis', 'data_sources' => 'getDataSources', + 'data_sources_paragraph_for_cause' => 'getDataSourcesParagraphForCause', + 'data_sources_paragraph_for_effect' => 'getDataSourcesParagraphForEffect', + 'direction' => 'getDirection', 'duration_of_action' => 'getDurationOfAction', - 'effect' => 'getEffect', + 'duration_of_action_in_hours' => 'getDurationOfActionInHours', + 'effect_changes' => 'getEffectChanges', + 'effect_data_source' => 'getEffectDataSource', + 'effect_size' => 'getEffectSize', + 'effect_unit' => 'getEffectUnit', + 'effect_user_variable_share_user_measurements' => 'getEffectUserVariableShareUserMeasurements', + 'effect_variable_category_id' => 'getEffectVariableCategoryId', 'effect_variable_category_name' => 'getEffectVariableCategoryName', + 'effect_variable_combination_operation' => 'getEffectVariableCombinationOperation', + 'effect_variable_common_alias' => 'getEffectVariableCommonAlias', + 'effect_variable_unit_abbreviated_name' => 'getEffectVariableUnitAbbreviatedName', + 'effect_variable_unit_id' => 'getEffectVariableUnitId', + 'effect_variable_unit_name' => 'getEffectVariableUnitName', + 'effect_variable_id' => 'getEffectVariableId', 'effect_variable_image_url' => 'getEffectVariableImageUrl', 'effect_variable_ion_icon' => 'getEffectVariableIonIcon', - 'effect_size' => 'getEffectSize', - 'effect_variable_id' => 'getEffectVariableId', + 'effect_variable_most_common_connector_id' => 'getEffectVariableMostCommonConnectorId', 'effect_variable_name' => 'getEffectVariableName', + 'experiment_end_time' => 'getExperimentEndTime', + 'experiment_start_time' => 'getExperimentStartTime', + 'forward_spearman_correlation_coefficient' => 'getForwardSpearmanCorrelationCoefficient', 'gauge_image' => 'getGaugeImage', + 'gauge_image_square' => 'getGaugeImageSquare', 'image_url' => 'getImageUrl', + 'instructions_for_cause' => 'getInstructionsForCause', + 'instructions_for_effect' => 'getInstructionsForEffect', 'number_of_pairs' => 'getNumberOfPairs', - 'original_effect' => 'getOriginalEffect', 'onset_delay' => 'getOnsetDelay', + 'onset_delay_in_hours' => 'getOnsetDelayInHours', + 'onset_delay_with_strongest_pearson_correlation' => 'getOnsetDelayWithStrongestPearsonCorrelation', + 'onset_delay_with_strongest_pearson_correlation_in_hours' => 'getOnsetDelayWithStrongestPearsonCorrelationInHours', 'optimal_pearson_product' => 'getOptimalPearsonProduct', - 'original_cause' => 'getOriginalCause', - 'outcome_data_sources' => 'getOutcomeDataSources', + 'outcome_filling_value' => 'getOutcomeFillingValue', + 'outcome_maximum_allowed_value' => 'getOutcomeMaximumAllowedValue', + 'outcome_minimum_allowed_value' => 'getOutcomeMinimumAllowedValue', + 'pearson_correlation_with_no_onset_delay' => 'getPearsonCorrelationWithNoOnsetDelay', + 'predictive_pearson_correlation' => 'getPredictivePearsonCorrelation', + 'predictive_pearson_correlation_coefficient' => 'getPredictivePearsonCorrelationCoefficient', + 'predictor_data_sources' => 'getPredictorDataSources', 'predictor_explanation' => 'getPredictorExplanation', - 'principal_investigator' => 'getPrincipalInvestigator', + 'predictor_filling_value' => 'getPredictorFillingValue', + 'predictor_maximum_allowed_value' => 'getPredictorMaximumAllowedValue', + 'predictor_minimum_allowed_value' => 'getPredictorMinimumAllowedValue', + 'predicts_high_effect_change' => 'getPredictsHighEffectChange', + 'predicts_high_effect_change_sentence_fragment' => 'getPredictsHighEffectChangeSentenceFragment', + 'predicts_low_effect_change' => 'getPredictsLowEffectChange', + 'predicts_low_effect_change_sentence_fragment' => 'getPredictsLowEffectChangeSentenceFragment', + 'p_value' => 'getPValue', 'qm_score' => 'getQmScore', - 'reverse_correlation' => 'getReverseCorrelation', + 'reverse_pearson_correlation_coefficient' => 'getReversePearsonCorrelationCoefficient', + 'share_user_measurements' => 'getShareUserMeasurements', 'significance_explanation' => 'getSignificanceExplanation', + 'significant_difference' => 'getSignificantDifference', 'statistical_significance' => 'getStatisticalSignificance', 'strength_level' => 'getStrengthLevel', + 'strongest_pearson_correlation_coefficient' => 'getStrongestPearsonCorrelationCoefficient', 'study_abstract' => 'getStudyAbstract', - 'study_background' => 'getStudyBackground', 'study_design' => 'getStudyDesign', 'study_limitations' => 'getStudyLimitations', 'study_link_dynamic' => 'getStudyLinkDynamic', + 'study_link_email' => 'getStudyLinkEmail', 'study_link_facebook' => 'getStudyLinkFacebook', 'study_link_google' => 'getStudyLinkGoogle', - 'study_link_twitter' => 'getStudyLinkTwitter', 'study_link_static' => 'getStudyLinkStatic', + 'study_link_twitter' => 'getStudyLinkTwitter', 'study_objective' => 'getStudyObjective', 'study_results' => 'getStudyResults', 'study_title' => 'getStudyTitle', 'timestamp' => 'getTimestamp', + 't_value' => 'getTValue', 'updated_at' => 'getUpdatedAt', + 'user_id' => 'getUserId', 'user_vote' => 'getUserVote', 'value_predicting_high_outcome' => 'getValuePredictingHighOutcome', 'value_predicting_high_outcome_explanation' => 'getValuePredictingHighOutcomeExplanation', 'value_predicting_low_outcome' => 'getValuePredictingLowOutcome', - 'value_predicting_low_outcome_explanation' => 'getValuePredictingLowOutcomeExplanation' + 'value_predicting_low_outcome_explanation' => 'getValuePredictingLowOutcomeExplanation', + 'causality_factor' => 'getCausalityFactor', + 'outcome_data_sources' => 'getOutcomeDataSources', + 'principal_investigator' => 'getPrincipalInvestigator', + 'reverse_correlation' => 'getReverseCorrelation', + 'study_background' => 'getStudyBackground', + 'study_invitation' => 'getStudyInvitation', + 'study_question' => 'getStudyQuestion', + 'all_pairs_significance' => 'getAllPairsSignificance', + 'average_pearson_correlation_coefficient_over_onset_delays' => 'getAveragePearsonCorrelationCoefficientOverOnsetDelays', + 'calculation_start_time' => 'getCalculationStartTime', + 'cause_changes_statistical_significance' => 'getCauseChangesStatisticalSignificance', + 'cause_number_of_processed_daily_measurements' => 'getCauseNumberOfProcessedDailyMeasurements', + 'cause_number_of_raw_measurements' => 'getCauseNumberOfRawMeasurements', + 'cause_value_spread' => 'getCauseValueSpread', + 'correlations_over_durations_of_action' => 'getCorrelationsOverDurationsOfAction', + 'correlations_over_durations_of_action_chart_config' => 'getCorrelationsOverDurationsOfActionChartConfig', + 'correlations_over_onset_delays_chart_config' => 'getCorrelationsOverOnsetDelaysChartConfig', + 'data_points' => 'getDataPoints', + 'degrees_of_freedom' => 'getDegreesOfFreedom', + 'distance_from_middle_to_be_hight_low_effect' => 'getDistanceFromMiddleToBeHightLowEffect', + 'effect_number_of_processed_daily_measurements' => 'getEffectNumberOfProcessedDailyMeasurements', + 'effect_number_of_raw_measurements' => 'getEffectNumberOfRawMeasurements', + 'effect_value_spread' => 'getEffectValueSpread', + 'error' => 'getError', + 'maximum_cause_value' => 'getMaximumCauseValue', + 'maximum_effect_value' => 'getMaximumEffectValue', + 'median_of_lower_half_of_effect_measurements' => 'getMedianOfLowerHalfOfEffectMeasurements', + 'median_of_upper_half_of_effect_measurements' => 'getMedianOfUpperHalfOfEffectMeasurements', + 'minimum_cause_value' => 'getMinimumCauseValue', + 'minimum_effect_value' => 'getMinimumEffectValue', + 'minimum_probability' => 'getMinimumProbability', + 'number_of_cause_changes_for_optimal_values' => 'getNumberOfCauseChangesForOptimalValues', + 'number_of_days' => 'getNumberOfDays', + 'number_of_days_significance' => 'getNumberOfDaysSignificance', + 'number_of_effect_changes_for_optimal_values' => 'getNumberOfEffectChangesForOptimalValues', + 'number_of_high_effect_pairs' => 'getNumberOfHighEffectPairs', + 'number_of_low_effect_pairs' => 'getNumberOfLowEffectPairs', + 'number_of_samples' => 'getNumberOfSamples', + 'number_of_unique_cause_values_for_optimal_values' => 'getNumberOfUniqueCauseValuesForOptimalValues', + 'number_of_unique_effect_values_for_optimal_values' => 'getNumberOfUniqueEffectValuesForOptimalValues', + 'number_of_users' => 'getNumberOfUsers', + 'optimal_change_spread' => 'getOptimalChangeSpread', + 'optimal_change_spread_significance' => 'getOptimalChangeSpreadSignificance', + 'pairs_over_time_chart_config' => 'getPairsOverTimeChartConfig', + 'per_day_sentence_fragment' => 'getPerDaySentenceFragment', + 'raw_cause_measurement_significance' => 'getRawCauseMeasurementSignificance', + 'raw_effect_measurement_significance' => 'getRawEffectMeasurementSignificance', + 'reverse_pairs_count' => 'getReversePairsCount', + 'vote_statistical_significance' => 'getVoteStatisticalSignificance', + 'aggregate_qm_score' => 'getAggregateQmScore', + 'cause_unit' => 'getCauseUnit', + 'cause_variable_common_alias' => 'getCauseVariableCommonAlias', + 'cause_variable_informational_url' => 'getCauseVariableInformationalUrl', + 'cause_variable_product_url' => 'getCauseVariableProductUrl', + 'effect_variable_informational_url' => 'getEffectVariableInformationalUrl', + 'effect_variable_product_url' => 'getEffectVariableProductUrl', + 'forward_pearson_correlation_coefficient' => 'getForwardPearsonCorrelationCoefficient', + 'number_of_correlations' => 'getNumberOfCorrelations', + 'vote' => 'getVote' ]; public static function attributeMap() @@ -375,71 +987,178 @@ public static function getters() */ public function __construct(array $data = null) { - $this->container['average_daily_low_cause'] = isset($data['average_daily_low_cause']) ? $data['average_daily_low_cause'] : null; $this->container['average_daily_high_cause'] = isset($data['average_daily_high_cause']) ? $data['average_daily_high_cause'] : null; + $this->container['average_daily_low_cause'] = isset($data['average_daily_low_cause']) ? $data['average_daily_low_cause'] : null; $this->container['average_effect'] = isset($data['average_effect']) ? $data['average_effect'] : null; $this->container['average_effect_following_high_cause'] = isset($data['average_effect_following_high_cause']) ? $data['average_effect_following_high_cause'] : null; - $this->container['average_effect_following_low_cause'] = isset($data['average_effect_following_low_cause']) ? $data['average_effect_following_low_cause'] : null; $this->container['average_effect_following_high_cause_explanation'] = isset($data['average_effect_following_high_cause_explanation']) ? $data['average_effect_following_high_cause_explanation'] : null; + $this->container['average_effect_following_low_cause'] = isset($data['average_effect_following_low_cause']) ? $data['average_effect_following_low_cause'] : null; $this->container['average_effect_following_low_cause_explanation'] = isset($data['average_effect_following_low_cause_explanation']) ? $data['average_effect_following_low_cause_explanation'] : null; + $this->container['average_forward_pearson_correlation_over_onset_delays'] = isset($data['average_forward_pearson_correlation_over_onset_delays']) ? $data['average_forward_pearson_correlation_over_onset_delays'] : null; + $this->container['average_reverse_pearson_correlation_over_onset_delays'] = isset($data['average_reverse_pearson_correlation_over_onset_delays']) ? $data['average_reverse_pearson_correlation_over_onset_delays'] : null; $this->container['average_vote'] = isset($data['average_vote']) ? $data['average_vote'] : null; - $this->container['causality_factor'] = isset($data['causality_factor']) ? $data['causality_factor'] : null; - $this->container['cause'] = isset($data['cause']) ? $data['cause'] : null; - $this->container['cause_variable_category_name'] = isset($data['cause_variable_category_name']) ? $data['cause_variable_category_name'] : null; $this->container['cause_changes'] = isset($data['cause_changes']) ? $data['cause_changes'] : null; - $this->container['cause_combination_operation'] = isset($data['cause_combination_operation']) ? $data['cause_combination_operation'] : null; + $this->container['cause_data_source'] = isset($data['cause_data_source']) ? $data['cause_data_source'] : null; + $this->container['cause_user_variable_share_user_measurements'] = isset($data['cause_user_variable_share_user_measurements']) ? $data['cause_user_variable_share_user_measurements'] : null; + $this->container['cause_variable_category_id'] = isset($data['cause_variable_category_id']) ? $data['cause_variable_category_id'] : null; + $this->container['cause_variable_category_name'] = isset($data['cause_variable_category_name']) ? $data['cause_variable_category_name'] : null; + $this->container['cause_variable_combination_operation'] = isset($data['cause_variable_combination_operation']) ? $data['cause_variable_combination_operation'] : null; + $this->container['cause_variable_unit_abbreviated_name'] = isset($data['cause_variable_unit_abbreviated_name']) ? $data['cause_variable_unit_abbreviated_name'] : null; + $this->container['cause_variable_unit_id'] = isset($data['cause_variable_unit_id']) ? $data['cause_variable_unit_id'] : null; + $this->container['cause_variable_unit_name'] = isset($data['cause_variable_unit_name']) ? $data['cause_variable_unit_name'] : null; + $this->container['cause_variable_id'] = isset($data['cause_variable_id']) ? $data['cause_variable_id'] : null; $this->container['cause_variable_image_url'] = isset($data['cause_variable_image_url']) ? $data['cause_variable_image_url'] : null; $this->container['cause_variable_ion_icon'] = isset($data['cause_variable_ion_icon']) ? $data['cause_variable_ion_icon'] : null; - $this->container['cause_unit'] = isset($data['cause_unit']) ? $data['cause_unit'] : null; - $this->container['cause_unit_id'] = isset($data['cause_unit_id']) ? $data['cause_unit_id'] : null; - $this->container['cause_variable_id'] = isset($data['cause_variable_id']) ? $data['cause_variable_id'] : null; + $this->container['cause_variable_most_common_connector_id'] = isset($data['cause_variable_most_common_connector_id']) ? $data['cause_variable_most_common_connector_id'] : null; $this->container['cause_variable_name'] = isset($data['cause_variable_name']) ? $data['cause_variable_name'] : null; + $this->container['confidence_interval'] = isset($data['confidence_interval']) ? $data['confidence_interval'] : null; + $this->container['confidence_level'] = isset($data['confidence_level']) ? $data['confidence_level'] : null; $this->container['correlation_coefficient'] = isset($data['correlation_coefficient']) ? $data['correlation_coefficient'] : null; + $this->container['correlation_is_contradictory_to_optimal_values'] = isset($data['correlation_is_contradictory_to_optimal_values']) ? $data['correlation_is_contradictory_to_optimal_values'] : null; $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['critical_t_value'] = isset($data['critical_t_value']) ? $data['critical_t_value'] : null; $this->container['data_analysis'] = isset($data['data_analysis']) ? $data['data_analysis'] : null; $this->container['data_sources'] = isset($data['data_sources']) ? $data['data_sources'] : null; + $this->container['data_sources_paragraph_for_cause'] = isset($data['data_sources_paragraph_for_cause']) ? $data['data_sources_paragraph_for_cause'] : null; + $this->container['data_sources_paragraph_for_effect'] = isset($data['data_sources_paragraph_for_effect']) ? $data['data_sources_paragraph_for_effect'] : null; + $this->container['direction'] = isset($data['direction']) ? $data['direction'] : null; $this->container['duration_of_action'] = isset($data['duration_of_action']) ? $data['duration_of_action'] : null; - $this->container['effect'] = isset($data['effect']) ? $data['effect'] : null; + $this->container['duration_of_action_in_hours'] = isset($data['duration_of_action_in_hours']) ? $data['duration_of_action_in_hours'] : null; + $this->container['effect_changes'] = isset($data['effect_changes']) ? $data['effect_changes'] : null; + $this->container['effect_data_source'] = isset($data['effect_data_source']) ? $data['effect_data_source'] : null; + $this->container['effect_size'] = isset($data['effect_size']) ? $data['effect_size'] : null; + $this->container['effect_unit'] = isset($data['effect_unit']) ? $data['effect_unit'] : null; + $this->container['effect_user_variable_share_user_measurements'] = isset($data['effect_user_variable_share_user_measurements']) ? $data['effect_user_variable_share_user_measurements'] : null; + $this->container['effect_variable_category_id'] = isset($data['effect_variable_category_id']) ? $data['effect_variable_category_id'] : null; $this->container['effect_variable_category_name'] = isset($data['effect_variable_category_name']) ? $data['effect_variable_category_name'] : null; + $this->container['effect_variable_combination_operation'] = isset($data['effect_variable_combination_operation']) ? $data['effect_variable_combination_operation'] : null; + $this->container['effect_variable_common_alias'] = isset($data['effect_variable_common_alias']) ? $data['effect_variable_common_alias'] : null; + $this->container['effect_variable_unit_abbreviated_name'] = isset($data['effect_variable_unit_abbreviated_name']) ? $data['effect_variable_unit_abbreviated_name'] : null; + $this->container['effect_variable_unit_id'] = isset($data['effect_variable_unit_id']) ? $data['effect_variable_unit_id'] : null; + $this->container['effect_variable_unit_name'] = isset($data['effect_variable_unit_name']) ? $data['effect_variable_unit_name'] : null; + $this->container['effect_variable_id'] = isset($data['effect_variable_id']) ? $data['effect_variable_id'] : null; $this->container['effect_variable_image_url'] = isset($data['effect_variable_image_url']) ? $data['effect_variable_image_url'] : null; $this->container['effect_variable_ion_icon'] = isset($data['effect_variable_ion_icon']) ? $data['effect_variable_ion_icon'] : null; - $this->container['effect_size'] = isset($data['effect_size']) ? $data['effect_size'] : null; - $this->container['effect_variable_id'] = isset($data['effect_variable_id']) ? $data['effect_variable_id'] : null; + $this->container['effect_variable_most_common_connector_id'] = isset($data['effect_variable_most_common_connector_id']) ? $data['effect_variable_most_common_connector_id'] : null; $this->container['effect_variable_name'] = isset($data['effect_variable_name']) ? $data['effect_variable_name'] : null; + $this->container['experiment_end_time'] = isset($data['experiment_end_time']) ? $data['experiment_end_time'] : null; + $this->container['experiment_start_time'] = isset($data['experiment_start_time']) ? $data['experiment_start_time'] : null; + $this->container['forward_spearman_correlation_coefficient'] = isset($data['forward_spearman_correlation_coefficient']) ? $data['forward_spearman_correlation_coefficient'] : null; $this->container['gauge_image'] = isset($data['gauge_image']) ? $data['gauge_image'] : null; + $this->container['gauge_image_square'] = isset($data['gauge_image_square']) ? $data['gauge_image_square'] : null; $this->container['image_url'] = isset($data['image_url']) ? $data['image_url'] : null; + $this->container['instructions_for_cause'] = isset($data['instructions_for_cause']) ? $data['instructions_for_cause'] : null; + $this->container['instructions_for_effect'] = isset($data['instructions_for_effect']) ? $data['instructions_for_effect'] : null; $this->container['number_of_pairs'] = isset($data['number_of_pairs']) ? $data['number_of_pairs'] : null; - $this->container['original_effect'] = isset($data['original_effect']) ? $data['original_effect'] : null; $this->container['onset_delay'] = isset($data['onset_delay']) ? $data['onset_delay'] : null; + $this->container['onset_delay_in_hours'] = isset($data['onset_delay_in_hours']) ? $data['onset_delay_in_hours'] : null; + $this->container['onset_delay_with_strongest_pearson_correlation'] = isset($data['onset_delay_with_strongest_pearson_correlation']) ? $data['onset_delay_with_strongest_pearson_correlation'] : null; + $this->container['onset_delay_with_strongest_pearson_correlation_in_hours'] = isset($data['onset_delay_with_strongest_pearson_correlation_in_hours']) ? $data['onset_delay_with_strongest_pearson_correlation_in_hours'] : null; $this->container['optimal_pearson_product'] = isset($data['optimal_pearson_product']) ? $data['optimal_pearson_product'] : null; - $this->container['original_cause'] = isset($data['original_cause']) ? $data['original_cause'] : null; - $this->container['outcome_data_sources'] = isset($data['outcome_data_sources']) ? $data['outcome_data_sources'] : null; + $this->container['outcome_filling_value'] = isset($data['outcome_filling_value']) ? $data['outcome_filling_value'] : null; + $this->container['outcome_maximum_allowed_value'] = isset($data['outcome_maximum_allowed_value']) ? $data['outcome_maximum_allowed_value'] : null; + $this->container['outcome_minimum_allowed_value'] = isset($data['outcome_minimum_allowed_value']) ? $data['outcome_minimum_allowed_value'] : null; + $this->container['pearson_correlation_with_no_onset_delay'] = isset($data['pearson_correlation_with_no_onset_delay']) ? $data['pearson_correlation_with_no_onset_delay'] : null; + $this->container['predictive_pearson_correlation'] = isset($data['predictive_pearson_correlation']) ? $data['predictive_pearson_correlation'] : null; + $this->container['predictive_pearson_correlation_coefficient'] = isset($data['predictive_pearson_correlation_coefficient']) ? $data['predictive_pearson_correlation_coefficient'] : null; + $this->container['predictor_data_sources'] = isset($data['predictor_data_sources']) ? $data['predictor_data_sources'] : null; $this->container['predictor_explanation'] = isset($data['predictor_explanation']) ? $data['predictor_explanation'] : null; - $this->container['principal_investigator'] = isset($data['principal_investigator']) ? $data['principal_investigator'] : null; + $this->container['predictor_filling_value'] = isset($data['predictor_filling_value']) ? $data['predictor_filling_value'] : null; + $this->container['predictor_maximum_allowed_value'] = isset($data['predictor_maximum_allowed_value']) ? $data['predictor_maximum_allowed_value'] : null; + $this->container['predictor_minimum_allowed_value'] = isset($data['predictor_minimum_allowed_value']) ? $data['predictor_minimum_allowed_value'] : null; + $this->container['predicts_high_effect_change'] = isset($data['predicts_high_effect_change']) ? $data['predicts_high_effect_change'] : null; + $this->container['predicts_high_effect_change_sentence_fragment'] = isset($data['predicts_high_effect_change_sentence_fragment']) ? $data['predicts_high_effect_change_sentence_fragment'] : null; + $this->container['predicts_low_effect_change'] = isset($data['predicts_low_effect_change']) ? $data['predicts_low_effect_change'] : null; + $this->container['predicts_low_effect_change_sentence_fragment'] = isset($data['predicts_low_effect_change_sentence_fragment']) ? $data['predicts_low_effect_change_sentence_fragment'] : null; + $this->container['p_value'] = isset($data['p_value']) ? $data['p_value'] : null; $this->container['qm_score'] = isset($data['qm_score']) ? $data['qm_score'] : null; - $this->container['reverse_correlation'] = isset($data['reverse_correlation']) ? $data['reverse_correlation'] : null; + $this->container['reverse_pearson_correlation_coefficient'] = isset($data['reverse_pearson_correlation_coefficient']) ? $data['reverse_pearson_correlation_coefficient'] : null; + $this->container['share_user_measurements'] = isset($data['share_user_measurements']) ? $data['share_user_measurements'] : null; $this->container['significance_explanation'] = isset($data['significance_explanation']) ? $data['significance_explanation'] : null; + $this->container['significant_difference'] = isset($data['significant_difference']) ? $data['significant_difference'] : null; $this->container['statistical_significance'] = isset($data['statistical_significance']) ? $data['statistical_significance'] : null; $this->container['strength_level'] = isset($data['strength_level']) ? $data['strength_level'] : null; + $this->container['strongest_pearson_correlation_coefficient'] = isset($data['strongest_pearson_correlation_coefficient']) ? $data['strongest_pearson_correlation_coefficient'] : null; $this->container['study_abstract'] = isset($data['study_abstract']) ? $data['study_abstract'] : null; - $this->container['study_background'] = isset($data['study_background']) ? $data['study_background'] : null; $this->container['study_design'] = isset($data['study_design']) ? $data['study_design'] : null; $this->container['study_limitations'] = isset($data['study_limitations']) ? $data['study_limitations'] : null; $this->container['study_link_dynamic'] = isset($data['study_link_dynamic']) ? $data['study_link_dynamic'] : null; + $this->container['study_link_email'] = isset($data['study_link_email']) ? $data['study_link_email'] : null; $this->container['study_link_facebook'] = isset($data['study_link_facebook']) ? $data['study_link_facebook'] : null; $this->container['study_link_google'] = isset($data['study_link_google']) ? $data['study_link_google'] : null; - $this->container['study_link_twitter'] = isset($data['study_link_twitter']) ? $data['study_link_twitter'] : null; $this->container['study_link_static'] = isset($data['study_link_static']) ? $data['study_link_static'] : null; + $this->container['study_link_twitter'] = isset($data['study_link_twitter']) ? $data['study_link_twitter'] : null; $this->container['study_objective'] = isset($data['study_objective']) ? $data['study_objective'] : null; $this->container['study_results'] = isset($data['study_results']) ? $data['study_results'] : null; $this->container['study_title'] = isset($data['study_title']) ? $data['study_title'] : null; $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['t_value'] = isset($data['t_value']) ? $data['t_value'] : null; $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; + $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; $this->container['user_vote'] = isset($data['user_vote']) ? $data['user_vote'] : null; $this->container['value_predicting_high_outcome'] = isset($data['value_predicting_high_outcome']) ? $data['value_predicting_high_outcome'] : null; $this->container['value_predicting_high_outcome_explanation'] = isset($data['value_predicting_high_outcome_explanation']) ? $data['value_predicting_high_outcome_explanation'] : null; $this->container['value_predicting_low_outcome'] = isset($data['value_predicting_low_outcome']) ? $data['value_predicting_low_outcome'] : null; $this->container['value_predicting_low_outcome_explanation'] = isset($data['value_predicting_low_outcome_explanation']) ? $data['value_predicting_low_outcome_explanation'] : null; + $this->container['causality_factor'] = isset($data['causality_factor']) ? $data['causality_factor'] : null; + $this->container['outcome_data_sources'] = isset($data['outcome_data_sources']) ? $data['outcome_data_sources'] : null; + $this->container['principal_investigator'] = isset($data['principal_investigator']) ? $data['principal_investigator'] : null; + $this->container['reverse_correlation'] = isset($data['reverse_correlation']) ? $data['reverse_correlation'] : null; + $this->container['study_background'] = isset($data['study_background']) ? $data['study_background'] : null; + $this->container['study_invitation'] = isset($data['study_invitation']) ? $data['study_invitation'] : null; + $this->container['study_question'] = isset($data['study_question']) ? $data['study_question'] : null; + $this->container['all_pairs_significance'] = isset($data['all_pairs_significance']) ? $data['all_pairs_significance'] : null; + $this->container['average_pearson_correlation_coefficient_over_onset_delays'] = isset($data['average_pearson_correlation_coefficient_over_onset_delays']) ? $data['average_pearson_correlation_coefficient_over_onset_delays'] : null; + $this->container['calculation_start_time'] = isset($data['calculation_start_time']) ? $data['calculation_start_time'] : null; + $this->container['cause_changes_statistical_significance'] = isset($data['cause_changes_statistical_significance']) ? $data['cause_changes_statistical_significance'] : null; + $this->container['cause_number_of_processed_daily_measurements'] = isset($data['cause_number_of_processed_daily_measurements']) ? $data['cause_number_of_processed_daily_measurements'] : null; + $this->container['cause_number_of_raw_measurements'] = isset($data['cause_number_of_raw_measurements']) ? $data['cause_number_of_raw_measurements'] : null; + $this->container['cause_value_spread'] = isset($data['cause_value_spread']) ? $data['cause_value_spread'] : null; + $this->container['correlations_over_durations_of_action'] = isset($data['correlations_over_durations_of_action']) ? $data['correlations_over_durations_of_action'] : null; + $this->container['correlations_over_durations_of_action_chart_config'] = isset($data['correlations_over_durations_of_action_chart_config']) ? $data['correlations_over_durations_of_action_chart_config'] : null; + $this->container['correlations_over_onset_delays_chart_config'] = isset($data['correlations_over_onset_delays_chart_config']) ? $data['correlations_over_onset_delays_chart_config'] : null; + $this->container['data_points'] = isset($data['data_points']) ? $data['data_points'] : null; + $this->container['degrees_of_freedom'] = isset($data['degrees_of_freedom']) ? $data['degrees_of_freedom'] : null; + $this->container['distance_from_middle_to_be_hight_low_effect'] = isset($data['distance_from_middle_to_be_hight_low_effect']) ? $data['distance_from_middle_to_be_hight_low_effect'] : null; + $this->container['effect_number_of_processed_daily_measurements'] = isset($data['effect_number_of_processed_daily_measurements']) ? $data['effect_number_of_processed_daily_measurements'] : null; + $this->container['effect_number_of_raw_measurements'] = isset($data['effect_number_of_raw_measurements']) ? $data['effect_number_of_raw_measurements'] : null; + $this->container['effect_value_spread'] = isset($data['effect_value_spread']) ? $data['effect_value_spread'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + $this->container['maximum_cause_value'] = isset($data['maximum_cause_value']) ? $data['maximum_cause_value'] : null; + $this->container['maximum_effect_value'] = isset($data['maximum_effect_value']) ? $data['maximum_effect_value'] : null; + $this->container['median_of_lower_half_of_effect_measurements'] = isset($data['median_of_lower_half_of_effect_measurements']) ? $data['median_of_lower_half_of_effect_measurements'] : null; + $this->container['median_of_upper_half_of_effect_measurements'] = isset($data['median_of_upper_half_of_effect_measurements']) ? $data['median_of_upper_half_of_effect_measurements'] : null; + $this->container['minimum_cause_value'] = isset($data['minimum_cause_value']) ? $data['minimum_cause_value'] : null; + $this->container['minimum_effect_value'] = isset($data['minimum_effect_value']) ? $data['minimum_effect_value'] : null; + $this->container['minimum_probability'] = isset($data['minimum_probability']) ? $data['minimum_probability'] : null; + $this->container['number_of_cause_changes_for_optimal_values'] = isset($data['number_of_cause_changes_for_optimal_values']) ? $data['number_of_cause_changes_for_optimal_values'] : null; + $this->container['number_of_days'] = isset($data['number_of_days']) ? $data['number_of_days'] : null; + $this->container['number_of_days_significance'] = isset($data['number_of_days_significance']) ? $data['number_of_days_significance'] : null; + $this->container['number_of_effect_changes_for_optimal_values'] = isset($data['number_of_effect_changes_for_optimal_values']) ? $data['number_of_effect_changes_for_optimal_values'] : null; + $this->container['number_of_high_effect_pairs'] = isset($data['number_of_high_effect_pairs']) ? $data['number_of_high_effect_pairs'] : null; + $this->container['number_of_low_effect_pairs'] = isset($data['number_of_low_effect_pairs']) ? $data['number_of_low_effect_pairs'] : null; + $this->container['number_of_samples'] = isset($data['number_of_samples']) ? $data['number_of_samples'] : null; + $this->container['number_of_unique_cause_values_for_optimal_values'] = isset($data['number_of_unique_cause_values_for_optimal_values']) ? $data['number_of_unique_cause_values_for_optimal_values'] : null; + $this->container['number_of_unique_effect_values_for_optimal_values'] = isset($data['number_of_unique_effect_values_for_optimal_values']) ? $data['number_of_unique_effect_values_for_optimal_values'] : null; + $this->container['number_of_users'] = isset($data['number_of_users']) ? $data['number_of_users'] : null; + $this->container['optimal_change_spread'] = isset($data['optimal_change_spread']) ? $data['optimal_change_spread'] : null; + $this->container['optimal_change_spread_significance'] = isset($data['optimal_change_spread_significance']) ? $data['optimal_change_spread_significance'] : null; + $this->container['pairs_over_time_chart_config'] = isset($data['pairs_over_time_chart_config']) ? $data['pairs_over_time_chart_config'] : null; + $this->container['per_day_sentence_fragment'] = isset($data['per_day_sentence_fragment']) ? $data['per_day_sentence_fragment'] : null; + $this->container['raw_cause_measurement_significance'] = isset($data['raw_cause_measurement_significance']) ? $data['raw_cause_measurement_significance'] : null; + $this->container['raw_effect_measurement_significance'] = isset($data['raw_effect_measurement_significance']) ? $data['raw_effect_measurement_significance'] : null; + $this->container['reverse_pairs_count'] = isset($data['reverse_pairs_count']) ? $data['reverse_pairs_count'] : null; + $this->container['vote_statistical_significance'] = isset($data['vote_statistical_significance']) ? $data['vote_statistical_significance'] : null; + $this->container['aggregate_qm_score'] = isset($data['aggregate_qm_score']) ? $data['aggregate_qm_score'] : null; + $this->container['cause_unit'] = isset($data['cause_unit']) ? $data['cause_unit'] : null; + $this->container['cause_variable_common_alias'] = isset($data['cause_variable_common_alias']) ? $data['cause_variable_common_alias'] : null; + $this->container['cause_variable_informational_url'] = isset($data['cause_variable_informational_url']) ? $data['cause_variable_informational_url'] : null; + $this->container['cause_variable_product_url'] = isset($data['cause_variable_product_url']) ? $data['cause_variable_product_url'] : null; + $this->container['effect_variable_informational_url'] = isset($data['effect_variable_informational_url']) ? $data['effect_variable_informational_url'] : null; + $this->container['effect_variable_product_url'] = isset($data['effect_variable_product_url']) ? $data['effect_variable_product_url'] : null; + $this->container['forward_pearson_correlation_coefficient'] = isset($data['forward_pearson_correlation_coefficient']) ? $data['forward_pearson_correlation_coefficient'] : null; + $this->container['number_of_correlations'] = isset($data['number_of_correlations']) ? $data['number_of_correlations'] : null; + $this->container['vote'] = isset($data['vote']) ? $data['vote'] : null; } /** @@ -451,17 +1170,182 @@ public function listInvalidProperties() { $invalid_properties = []; - if ($this->container['cause'] === null) { - $invalid_properties[] = "'cause' can't be null"; + if ($this->container['average_daily_high_cause'] === null) { + $invalid_properties[] = "'average_daily_high_cause' can't be null"; + } + if ($this->container['average_daily_low_cause'] === null) { + $invalid_properties[] = "'average_daily_low_cause' can't be null"; + } + if ($this->container['average_effect'] === null) { + $invalid_properties[] = "'average_effect' can't be null"; + } + if ($this->container['average_effect_following_high_cause'] === null) { + $invalid_properties[] = "'average_effect_following_high_cause' can't be null"; + } + if ($this->container['average_effect_following_high_cause_explanation'] === null) { + $invalid_properties[] = "'average_effect_following_high_cause_explanation' can't be null"; + } + if ($this->container['average_effect_following_low_cause'] === null) { + $invalid_properties[] = "'average_effect_following_low_cause' can't be null"; + } + if ($this->container['average_effect_following_low_cause_explanation'] === null) { + $invalid_properties[] = "'average_effect_following_low_cause_explanation' can't be null"; + } + if ($this->container['average_forward_pearson_correlation_over_onset_delays'] === null) { + $invalid_properties[] = "'average_forward_pearson_correlation_over_onset_delays' can't be null"; + } + if ($this->container['average_reverse_pearson_correlation_over_onset_delays'] === null) { + $invalid_properties[] = "'average_reverse_pearson_correlation_over_onset_delays' can't be null"; + } + if ($this->container['average_vote'] === null) { + $invalid_properties[] = "'average_vote' can't be null"; + } + if ($this->container['cause_changes'] === null) { + $invalid_properties[] = "'cause_changes' can't be null"; + } + if ($this->container['cause_user_variable_share_user_measurements'] === null) { + $invalid_properties[] = "'cause_user_variable_share_user_measurements' can't be null"; + } + if ($this->container['cause_variable_category_id'] === null) { + $invalid_properties[] = "'cause_variable_category_id' can't be null"; + } + if ($this->container['cause_variable_category_name'] === null) { + $invalid_properties[] = "'cause_variable_category_name' can't be null"; + } + if ($this->container['cause_variable_combination_operation'] === null) { + $invalid_properties[] = "'cause_variable_combination_operation' can't be null"; + } + if ($this->container['cause_variable_unit_abbreviated_name'] === null) { + $invalid_properties[] = "'cause_variable_unit_abbreviated_name' can't be null"; + } + if ($this->container['cause_variable_unit_id'] === null) { + $invalid_properties[] = "'cause_variable_unit_id' can't be null"; + } + if ($this->container['cause_variable_unit_name'] === null) { + $invalid_properties[] = "'cause_variable_unit_name' can't be null"; + } + if ($this->container['cause_variable_id'] === null) { + $invalid_properties[] = "'cause_variable_id' can't be null"; + } + if ($this->container['cause_variable_image_url'] === null) { + $invalid_properties[] = "'cause_variable_image_url' can't be null"; + } + if ($this->container['cause_variable_ion_icon'] === null) { + $invalid_properties[] = "'cause_variable_ion_icon' can't be null"; + } + if ($this->container['cause_variable_most_common_connector_id'] === null) { + $invalid_properties[] = "'cause_variable_most_common_connector_id' can't be null"; + } + if ($this->container['cause_variable_name'] === null) { + $invalid_properties[] = "'cause_variable_name' can't be null"; + } + if ($this->container['confidence_interval'] === null) { + $invalid_properties[] = "'confidence_interval' can't be null"; + } + if ($this->container['confidence_level'] === null) { + $invalid_properties[] = "'confidence_level' can't be null"; } if ($this->container['correlation_coefficient'] === null) { $invalid_properties[] = "'correlation_coefficient' can't be null"; } + if ($this->container['created_at'] === null) { + $invalid_properties[] = "'created_at' can't be null"; + } + if ($this->container['critical_t_value'] === null) { + $invalid_properties[] = "'critical_t_value' can't be null"; + } + if ($this->container['data_analysis'] === null) { + $invalid_properties[] = "'data_analysis' can't be null"; + } + if ($this->container['data_sources'] === null) { + $invalid_properties[] = "'data_sources' can't be null"; + } + if ($this->container['data_sources_paragraph_for_cause'] === null) { + $invalid_properties[] = "'data_sources_paragraph_for_cause' can't be null"; + } + if ($this->container['data_sources_paragraph_for_effect'] === null) { + $invalid_properties[] = "'data_sources_paragraph_for_effect' can't be null"; + } + if ($this->container['direction'] === null) { + $invalid_properties[] = "'direction' can't be null"; + } if ($this->container['duration_of_action'] === null) { $invalid_properties[] = "'duration_of_action' can't be null"; } - if ($this->container['effect'] === null) { - $invalid_properties[] = "'effect' can't be null"; + if ($this->container['duration_of_action_in_hours'] === null) { + $invalid_properties[] = "'duration_of_action_in_hours' can't be null"; + } + if ($this->container['effect_changes'] === null) { + $invalid_properties[] = "'effect_changes' can't be null"; + } + if ($this->container['effect_size'] === null) { + $invalid_properties[] = "'effect_size' can't be null"; + } + if ($this->container['effect_unit'] === null) { + $invalid_properties[] = "'effect_unit' can't be null"; + } + if ($this->container['effect_user_variable_share_user_measurements'] === null) { + $invalid_properties[] = "'effect_user_variable_share_user_measurements' can't be null"; + } + if ($this->container['effect_variable_category_id'] === null) { + $invalid_properties[] = "'effect_variable_category_id' can't be null"; + } + if ($this->container['effect_variable_category_name'] === null) { + $invalid_properties[] = "'effect_variable_category_name' can't be null"; + } + if ($this->container['effect_variable_combination_operation'] === null) { + $invalid_properties[] = "'effect_variable_combination_operation' can't be null"; + } + if ($this->container['effect_variable_common_alias'] === null) { + $invalid_properties[] = "'effect_variable_common_alias' can't be null"; + } + if ($this->container['effect_variable_unit_abbreviated_name'] === null) { + $invalid_properties[] = "'effect_variable_unit_abbreviated_name' can't be null"; + } + if ($this->container['effect_variable_unit_id'] === null) { + $invalid_properties[] = "'effect_variable_unit_id' can't be null"; + } + if ($this->container['effect_variable_unit_name'] === null) { + $invalid_properties[] = "'effect_variable_unit_name' can't be null"; + } + if ($this->container['effect_variable_id'] === null) { + $invalid_properties[] = "'effect_variable_id' can't be null"; + } + if ($this->container['effect_variable_image_url'] === null) { + $invalid_properties[] = "'effect_variable_image_url' can't be null"; + } + if ($this->container['effect_variable_ion_icon'] === null) { + $invalid_properties[] = "'effect_variable_ion_icon' can't be null"; + } + if ($this->container['effect_variable_most_common_connector_id'] === null) { + $invalid_properties[] = "'effect_variable_most_common_connector_id' can't be null"; + } + if ($this->container['effect_variable_name'] === null) { + $invalid_properties[] = "'effect_variable_name' can't be null"; + } + if ($this->container['experiment_end_time'] === null) { + $invalid_properties[] = "'experiment_end_time' can't be null"; + } + if ($this->container['experiment_start_time'] === null) { + $invalid_properties[] = "'experiment_start_time' can't be null"; + } + if ($this->container['forward_spearman_correlation_coefficient'] === null) { + $invalid_properties[] = "'forward_spearman_correlation_coefficient' can't be null"; + } + if ($this->container['gauge_image'] === null) { + $invalid_properties[] = "'gauge_image' can't be null"; + } + if ($this->container['gauge_image_square'] === null) { + $invalid_properties[] = "'gauge_image_square' can't be null"; + } + if ($this->container['image_url'] === null) { + $invalid_properties[] = "'image_url' can't be null"; + } + if ($this->container['instructions_for_cause'] === null) { + $invalid_properties[] = "'instructions_for_cause' can't be null"; + } + if ($this->container['instructions_for_effect'] === null) { + $invalid_properties[] = "'instructions_for_effect' can't be null"; } if ($this->container['number_of_pairs'] === null) { $invalid_properties[] = "'number_of_pairs' can't be null"; @@ -469,9 +1353,144 @@ public function listInvalidProperties() if ($this->container['onset_delay'] === null) { $invalid_properties[] = "'onset_delay' can't be null"; } + if ($this->container['onset_delay_in_hours'] === null) { + $invalid_properties[] = "'onset_delay_in_hours' can't be null"; + } + if ($this->container['onset_delay_with_strongest_pearson_correlation'] === null) { + $invalid_properties[] = "'onset_delay_with_strongest_pearson_correlation' can't be null"; + } + if ($this->container['onset_delay_with_strongest_pearson_correlation_in_hours'] === null) { + $invalid_properties[] = "'onset_delay_with_strongest_pearson_correlation_in_hours' can't be null"; + } + if ($this->container['optimal_pearson_product'] === null) { + $invalid_properties[] = "'optimal_pearson_product' can't be null"; + } + if ($this->container['outcome_filling_value'] === null) { + $invalid_properties[] = "'outcome_filling_value' can't be null"; + } + if ($this->container['pearson_correlation_with_no_onset_delay'] === null) { + $invalid_properties[] = "'pearson_correlation_with_no_onset_delay' can't be null"; + } + if ($this->container['predictive_pearson_correlation'] === null) { + $invalid_properties[] = "'predictive_pearson_correlation' can't be null"; + } + if ($this->container['predictive_pearson_correlation_coefficient'] === null) { + $invalid_properties[] = "'predictive_pearson_correlation_coefficient' can't be null"; + } + if ($this->container['predictor_data_sources'] === null) { + $invalid_properties[] = "'predictor_data_sources' can't be null"; + } + if ($this->container['predictor_explanation'] === null) { + $invalid_properties[] = "'predictor_explanation' can't be null"; + } + if ($this->container['predictor_filling_value'] === null) { + $invalid_properties[] = "'predictor_filling_value' can't be null"; + } + if ($this->container['predictor_maximum_allowed_value'] === null) { + $invalid_properties[] = "'predictor_maximum_allowed_value' can't be null"; + } + if ($this->container['predictor_minimum_allowed_value'] === null) { + $invalid_properties[] = "'predictor_minimum_allowed_value' can't be null"; + } + if ($this->container['predicts_high_effect_change'] === null) { + $invalid_properties[] = "'predicts_high_effect_change' can't be null"; + } + if ($this->container['predicts_high_effect_change_sentence_fragment'] === null) { + $invalid_properties[] = "'predicts_high_effect_change_sentence_fragment' can't be null"; + } + if ($this->container['predicts_low_effect_change'] === null) { + $invalid_properties[] = "'predicts_low_effect_change' can't be null"; + } + if ($this->container['predicts_low_effect_change_sentence_fragment'] === null) { + $invalid_properties[] = "'predicts_low_effect_change_sentence_fragment' can't be null"; + } + if ($this->container['qm_score'] === null) { + $invalid_properties[] = "'qm_score' can't be null"; + } + if ($this->container['reverse_pearson_correlation_coefficient'] === null) { + $invalid_properties[] = "'reverse_pearson_correlation_coefficient' can't be null"; + } + if ($this->container['share_user_measurements'] === null) { + $invalid_properties[] = "'share_user_measurements' can't be null"; + } + if ($this->container['significance_explanation'] === null) { + $invalid_properties[] = "'significance_explanation' can't be null"; + } + if ($this->container['significant_difference'] === null) { + $invalid_properties[] = "'significant_difference' can't be null"; + } + if ($this->container['statistical_significance'] === null) { + $invalid_properties[] = "'statistical_significance' can't be null"; + } + if ($this->container['strength_level'] === null) { + $invalid_properties[] = "'strength_level' can't be null"; + } + if ($this->container['strongest_pearson_correlation_coefficient'] === null) { + $invalid_properties[] = "'strongest_pearson_correlation_coefficient' can't be null"; + } + if ($this->container['study_abstract'] === null) { + $invalid_properties[] = "'study_abstract' can't be null"; + } + if ($this->container['study_design'] === null) { + $invalid_properties[] = "'study_design' can't be null"; + } + if ($this->container['study_limitations'] === null) { + $invalid_properties[] = "'study_limitations' can't be null"; + } + if ($this->container['study_link_dynamic'] === null) { + $invalid_properties[] = "'study_link_dynamic' can't be null"; + } + if ($this->container['study_link_email'] === null) { + $invalid_properties[] = "'study_link_email' can't be null"; + } + if ($this->container['study_link_facebook'] === null) { + $invalid_properties[] = "'study_link_facebook' can't be null"; + } + if ($this->container['study_link_google'] === null) { + $invalid_properties[] = "'study_link_google' can't be null"; + } + if ($this->container['study_link_static'] === null) { + $invalid_properties[] = "'study_link_static' can't be null"; + } + if ($this->container['study_link_twitter'] === null) { + $invalid_properties[] = "'study_link_twitter' can't be null"; + } + if ($this->container['study_objective'] === null) { + $invalid_properties[] = "'study_objective' can't be null"; + } + if ($this->container['study_results'] === null) { + $invalid_properties[] = "'study_results' can't be null"; + } + if ($this->container['study_title'] === null) { + $invalid_properties[] = "'study_title' can't be null"; + } if ($this->container['timestamp'] === null) { $invalid_properties[] = "'timestamp' can't be null"; } + if ($this->container['t_value'] === null) { + $invalid_properties[] = "'t_value' can't be null"; + } + if ($this->container['updated_at'] === null) { + $invalid_properties[] = "'updated_at' can't be null"; + } + if ($this->container['user_id'] === null) { + $invalid_properties[] = "'user_id' can't be null"; + } + if ($this->container['user_vote'] === null) { + $invalid_properties[] = "'user_vote' can't be null"; + } + if ($this->container['value_predicting_high_outcome'] === null) { + $invalid_properties[] = "'value_predicting_high_outcome' can't be null"; + } + if ($this->container['value_predicting_high_outcome_explanation'] === null) { + $invalid_properties[] = "'value_predicting_high_outcome_explanation' can't be null"; + } + if ($this->container['value_predicting_low_outcome'] === null) { + $invalid_properties[] = "'value_predicting_low_outcome' can't be null"; + } + if ($this->container['value_predicting_low_outcome_explanation'] === null) { + $invalid_properties[] = "'value_predicting_low_outcome_explanation' can't be null"; + } return $invalid_properties; } @@ -484,55 +1503,334 @@ public function listInvalidProperties() public function valid() { - if ($this->container['cause'] === null) { + if ($this->container['average_daily_high_cause'] === null) { return false; } - if ($this->container['correlation_coefficient'] === null) { + if ($this->container['average_daily_low_cause'] === null) { return false; } - if ($this->container['duration_of_action'] === null) { + if ($this->container['average_effect'] === null) { return false; } - if ($this->container['effect'] === null) { + if ($this->container['average_effect_following_high_cause'] === null) { return false; } - if ($this->container['number_of_pairs'] === null) { + if ($this->container['average_effect_following_high_cause_explanation'] === null) { return false; } - if ($this->container['onset_delay'] === null) { + if ($this->container['average_effect_following_low_cause'] === null) { return false; } - if ($this->container['timestamp'] === null) { + if ($this->container['average_effect_following_low_cause_explanation'] === null) { return false; } - return true; - } - - - /** - * Gets average_daily_low_cause - * @return float - */ - public function getAverageDailyLowCause() - { - return $this->container['average_daily_low_cause']; - } - - /** - * Sets average_daily_low_cause - * @param float $average_daily_low_cause - * @return $this - */ - public function setAverageDailyLowCause($average_daily_low_cause) - { - $this->container['average_daily_low_cause'] = $average_daily_low_cause; - - return $this; + if ($this->container['average_forward_pearson_correlation_over_onset_delays'] === null) { + return false; + } + if ($this->container['average_reverse_pearson_correlation_over_onset_delays'] === null) { + return false; + } + if ($this->container['average_vote'] === null) { + return false; + } + if ($this->container['cause_changes'] === null) { + return false; + } + if ($this->container['cause_user_variable_share_user_measurements'] === null) { + return false; + } + if ($this->container['cause_variable_category_id'] === null) { + return false; + } + if ($this->container['cause_variable_category_name'] === null) { + return false; + } + if ($this->container['cause_variable_combination_operation'] === null) { + return false; + } + if ($this->container['cause_variable_unit_abbreviated_name'] === null) { + return false; + } + if ($this->container['cause_variable_unit_id'] === null) { + return false; + } + if ($this->container['cause_variable_unit_name'] === null) { + return false; + } + if ($this->container['cause_variable_id'] === null) { + return false; + } + if ($this->container['cause_variable_image_url'] === null) { + return false; + } + if ($this->container['cause_variable_ion_icon'] === null) { + return false; + } + if ($this->container['cause_variable_most_common_connector_id'] === null) { + return false; + } + if ($this->container['cause_variable_name'] === null) { + return false; + } + if ($this->container['confidence_interval'] === null) { + return false; + } + if ($this->container['confidence_level'] === null) { + return false; + } + if ($this->container['correlation_coefficient'] === null) { + return false; + } + if ($this->container['created_at'] === null) { + return false; + } + if ($this->container['critical_t_value'] === null) { + return false; + } + if ($this->container['data_analysis'] === null) { + return false; + } + if ($this->container['data_sources'] === null) { + return false; + } + if ($this->container['data_sources_paragraph_for_cause'] === null) { + return false; + } + if ($this->container['data_sources_paragraph_for_effect'] === null) { + return false; + } + if ($this->container['direction'] === null) { + return false; + } + if ($this->container['duration_of_action'] === null) { + return false; + } + if ($this->container['duration_of_action_in_hours'] === null) { + return false; + } + if ($this->container['effect_changes'] === null) { + return false; + } + if ($this->container['effect_size'] === null) { + return false; + } + if ($this->container['effect_unit'] === null) { + return false; + } + if ($this->container['effect_user_variable_share_user_measurements'] === null) { + return false; + } + if ($this->container['effect_variable_category_id'] === null) { + return false; + } + if ($this->container['effect_variable_category_name'] === null) { + return false; + } + if ($this->container['effect_variable_combination_operation'] === null) { + return false; + } + if ($this->container['effect_variable_common_alias'] === null) { + return false; + } + if ($this->container['effect_variable_unit_abbreviated_name'] === null) { + return false; + } + if ($this->container['effect_variable_unit_id'] === null) { + return false; + } + if ($this->container['effect_variable_unit_name'] === null) { + return false; + } + if ($this->container['effect_variable_id'] === null) { + return false; + } + if ($this->container['effect_variable_image_url'] === null) { + return false; + } + if ($this->container['effect_variable_ion_icon'] === null) { + return false; + } + if ($this->container['effect_variable_most_common_connector_id'] === null) { + return false; + } + if ($this->container['effect_variable_name'] === null) { + return false; + } + if ($this->container['experiment_end_time'] === null) { + return false; + } + if ($this->container['experiment_start_time'] === null) { + return false; + } + if ($this->container['forward_spearman_correlation_coefficient'] === null) { + return false; + } + if ($this->container['gauge_image'] === null) { + return false; + } + if ($this->container['gauge_image_square'] === null) { + return false; + } + if ($this->container['image_url'] === null) { + return false; + } + if ($this->container['instructions_for_cause'] === null) { + return false; + } + if ($this->container['instructions_for_effect'] === null) { + return false; + } + if ($this->container['number_of_pairs'] === null) { + return false; + } + if ($this->container['onset_delay'] === null) { + return false; + } + if ($this->container['onset_delay_in_hours'] === null) { + return false; + } + if ($this->container['onset_delay_with_strongest_pearson_correlation'] === null) { + return false; + } + if ($this->container['onset_delay_with_strongest_pearson_correlation_in_hours'] === null) { + return false; + } + if ($this->container['optimal_pearson_product'] === null) { + return false; + } + if ($this->container['outcome_filling_value'] === null) { + return false; + } + if ($this->container['pearson_correlation_with_no_onset_delay'] === null) { + return false; + } + if ($this->container['predictive_pearson_correlation'] === null) { + return false; + } + if ($this->container['predictive_pearson_correlation_coefficient'] === null) { + return false; + } + if ($this->container['predictor_data_sources'] === null) { + return false; + } + if ($this->container['predictor_explanation'] === null) { + return false; + } + if ($this->container['predictor_filling_value'] === null) { + return false; + } + if ($this->container['predictor_maximum_allowed_value'] === null) { + return false; + } + if ($this->container['predictor_minimum_allowed_value'] === null) { + return false; + } + if ($this->container['predicts_high_effect_change'] === null) { + return false; + } + if ($this->container['predicts_high_effect_change_sentence_fragment'] === null) { + return false; + } + if ($this->container['predicts_low_effect_change'] === null) { + return false; + } + if ($this->container['predicts_low_effect_change_sentence_fragment'] === null) { + return false; + } + if ($this->container['qm_score'] === null) { + return false; + } + if ($this->container['reverse_pearson_correlation_coefficient'] === null) { + return false; + } + if ($this->container['share_user_measurements'] === null) { + return false; + } + if ($this->container['significance_explanation'] === null) { + return false; + } + if ($this->container['significant_difference'] === null) { + return false; + } + if ($this->container['statistical_significance'] === null) { + return false; + } + if ($this->container['strength_level'] === null) { + return false; + } + if ($this->container['strongest_pearson_correlation_coefficient'] === null) { + return false; + } + if ($this->container['study_abstract'] === null) { + return false; + } + if ($this->container['study_design'] === null) { + return false; + } + if ($this->container['study_limitations'] === null) { + return false; + } + if ($this->container['study_link_dynamic'] === null) { + return false; + } + if ($this->container['study_link_email'] === null) { + return false; + } + if ($this->container['study_link_facebook'] === null) { + return false; + } + if ($this->container['study_link_google'] === null) { + return false; + } + if ($this->container['study_link_static'] === null) { + return false; + } + if ($this->container['study_link_twitter'] === null) { + return false; + } + if ($this->container['study_objective'] === null) { + return false; + } + if ($this->container['study_results'] === null) { + return false; + } + if ($this->container['study_title'] === null) { + return false; + } + if ($this->container['timestamp'] === null) { + return false; + } + if ($this->container['t_value'] === null) { + return false; + } + if ($this->container['updated_at'] === null) { + return false; + } + if ($this->container['user_id'] === null) { + return false; + } + if ($this->container['user_vote'] === null) { + return false; + } + if ($this->container['value_predicting_high_outcome'] === null) { + return false; + } + if ($this->container['value_predicting_high_outcome_explanation'] === null) { + return false; + } + if ($this->container['value_predicting_low_outcome'] === null) { + return false; + } + if ($this->container['value_predicting_low_outcome_explanation'] === null) { + return false; + } + return true; } + /** * Gets average_daily_high_cause - * @return float + * @return double */ public function getAverageDailyHighCause() { @@ -541,1335 +1839,3603 @@ public function getAverageDailyHighCause() /** * Sets average_daily_high_cause - * @param float $average_daily_high_cause + * @param double $average_daily_high_cause Example: 4.19 + * @return $this + */ + public function setAverageDailyHighCause($average_daily_high_cause) + { + $this->container['average_daily_high_cause'] = $average_daily_high_cause; + + return $this; + } + + /** + * Gets average_daily_low_cause + * @return double + */ + public function getAverageDailyLowCause() + { + return $this->container['average_daily_low_cause']; + } + + /** + * Sets average_daily_low_cause + * @param double $average_daily_low_cause Example: 1.97 + * @return $this + */ + public function setAverageDailyLowCause($average_daily_low_cause) + { + $this->container['average_daily_low_cause'] = $average_daily_low_cause; + + return $this; + } + + /** + * Gets average_effect + * @return double + */ + public function getAverageEffect() + { + return $this->container['average_effect']; + } + + /** + * Sets average_effect + * @param double $average_effect Example: 3.0791054117396 + * @return $this + */ + public function setAverageEffect($average_effect) + { + $this->container['average_effect'] = $average_effect; + + return $this; + } + + /** + * Gets average_effect_following_high_cause + * @return double + */ + public function getAverageEffectFollowingHighCause() + { + return $this->container['average_effect_following_high_cause']; + } + + /** + * Sets average_effect_following_high_cause + * @param double $average_effect_following_high_cause Example: 3.55 + * @return $this + */ + public function setAverageEffectFollowingHighCause($average_effect_following_high_cause) + { + $this->container['average_effect_following_high_cause'] = $average_effect_following_high_cause; + + return $this; + } + + /** + * Gets average_effect_following_high_cause_explanation + * @return string + */ + public function getAverageEffectFollowingHighCauseExplanation() + { + return $this->container['average_effect_following_high_cause_explanation']; + } + + /** + * Sets average_effect_following_high_cause_explanation + * @param string $average_effect_following_high_cause_explanation Example: Overall Mood is 3.55/5 (15% higher) on average after days with around 4.19/5 Sleep Quality + * @return $this + */ + public function setAverageEffectFollowingHighCauseExplanation($average_effect_following_high_cause_explanation) + { + $this->container['average_effect_following_high_cause_explanation'] = $average_effect_following_high_cause_explanation; + + return $this; + } + + /** + * Gets average_effect_following_low_cause + * @return double + */ + public function getAverageEffectFollowingLowCause() + { + return $this->container['average_effect_following_low_cause']; + } + + /** + * Sets average_effect_following_low_cause + * @param double $average_effect_following_low_cause Example: 2.65 + * @return $this + */ + public function setAverageEffectFollowingLowCause($average_effect_following_low_cause) + { + $this->container['average_effect_following_low_cause'] = $average_effect_following_low_cause; + + return $this; + } + + /** + * Gets average_effect_following_low_cause_explanation + * @return string + */ + public function getAverageEffectFollowingLowCauseExplanation() + { + return $this->container['average_effect_following_low_cause_explanation']; + } + + /** + * Sets average_effect_following_low_cause_explanation + * @param string $average_effect_following_low_cause_explanation Example: Overall Mood is 2.65/5 (14% lower) on average after days with around 1.97/5 Sleep Quality + * @return $this + */ + public function setAverageEffectFollowingLowCauseExplanation($average_effect_following_low_cause_explanation) + { + $this->container['average_effect_following_low_cause_explanation'] = $average_effect_following_low_cause_explanation; + + return $this; + } + + /** + * Gets average_forward_pearson_correlation_over_onset_delays + * @return double + */ + public function getAverageForwardPearsonCorrelationOverOnsetDelays() + { + return $this->container['average_forward_pearson_correlation_over_onset_delays']; + } + + /** + * Sets average_forward_pearson_correlation_over_onset_delays + * @param double $average_forward_pearson_correlation_over_onset_delays Example: 0.396 + * @return $this + */ + public function setAverageForwardPearsonCorrelationOverOnsetDelays($average_forward_pearson_correlation_over_onset_delays) + { + $this->container['average_forward_pearson_correlation_over_onset_delays'] = $average_forward_pearson_correlation_over_onset_delays; + + return $this; + } + + /** + * Gets average_reverse_pearson_correlation_over_onset_delays + * @return double + */ + public function getAverageReversePearsonCorrelationOverOnsetDelays() + { + return $this->container['average_reverse_pearson_correlation_over_onset_delays']; + } + + /** + * Sets average_reverse_pearson_correlation_over_onset_delays + * @param double $average_reverse_pearson_correlation_over_onset_delays Example: 0.453667 + * @return $this + */ + public function setAverageReversePearsonCorrelationOverOnsetDelays($average_reverse_pearson_correlation_over_onset_delays) + { + $this->container['average_reverse_pearson_correlation_over_onset_delays'] = $average_reverse_pearson_correlation_over_onset_delays; + + return $this; + } + + /** + * Gets average_vote + * @return string + */ + public function getAverageVote() + { + return $this->container['average_vote']; + } + + /** + * Sets average_vote + * @param string $average_vote Example: 0.9855 + * @return $this + */ + public function setAverageVote($average_vote) + { + $this->container['average_vote'] = $average_vote; + + return $this; + } + + /** + * Gets cause_changes + * @return int + */ + public function getCauseChanges() + { + return $this->container['cause_changes']; + } + + /** + * Sets cause_changes + * @param int $cause_changes Example: 164 + * @return $this + */ + public function setCauseChanges($cause_changes) + { + $this->container['cause_changes'] = $cause_changes; + + return $this; + } + + /** + * Gets cause_data_source + * @return \QuantiModo\Client\Model\DataSource + */ + public function getCauseDataSource() + { + return $this->container['cause_data_source']; + } + + /** + * Sets cause_data_source + * @param \QuantiModo\Client\Model\DataSource $cause_data_source + * @return $this + */ + public function setCauseDataSource($cause_data_source) + { + $this->container['cause_data_source'] = $cause_data_source; + + return $this; + } + + /** + * Gets cause_user_variable_share_user_measurements + * @return int + */ + public function getCauseUserVariableShareUserMeasurements() + { + return $this->container['cause_user_variable_share_user_measurements']; + } + + /** + * Sets cause_user_variable_share_user_measurements + * @param int $cause_user_variable_share_user_measurements Example: 1 + * @return $this + */ + public function setCauseUserVariableShareUserMeasurements($cause_user_variable_share_user_measurements) + { + $this->container['cause_user_variable_share_user_measurements'] = $cause_user_variable_share_user_measurements; + + return $this; + } + + /** + * Gets cause_variable_category_id + * @return int + */ + public function getCauseVariableCategoryId() + { + return $this->container['cause_variable_category_id']; + } + + /** + * Sets cause_variable_category_id + * @param int $cause_variable_category_id Example: 6 + * @return $this + */ + public function setCauseVariableCategoryId($cause_variable_category_id) + { + $this->container['cause_variable_category_id'] = $cause_variable_category_id; + + return $this; + } + + /** + * Gets cause_variable_category_name + * @return string + */ + public function getCauseVariableCategoryName() + { + return $this->container['cause_variable_category_name']; + } + + /** + * Sets cause_variable_category_name + * @param string $cause_variable_category_name Example: Sleep + * @return $this + */ + public function setCauseVariableCategoryName($cause_variable_category_name) + { + $this->container['cause_variable_category_name'] = $cause_variable_category_name; + + return $this; + } + + /** + * Gets cause_variable_combination_operation + * @return string + */ + public function getCauseVariableCombinationOperation() + { + return $this->container['cause_variable_combination_operation']; + } + + /** + * Sets cause_variable_combination_operation + * @param string $cause_variable_combination_operation Example: MEAN + * @return $this + */ + public function setCauseVariableCombinationOperation($cause_variable_combination_operation) + { + $this->container['cause_variable_combination_operation'] = $cause_variable_combination_operation; + + return $this; + } + + /** + * Gets cause_variable_unit_abbreviated_name + * @return string + */ + public function getCauseVariableUnitAbbreviatedName() + { + return $this->container['cause_variable_unit_abbreviated_name']; + } + + /** + * Sets cause_variable_unit_abbreviated_name + * @param string $cause_variable_unit_abbreviated_name Example: /5 + * @return $this + */ + public function setCauseVariableUnitAbbreviatedName($cause_variable_unit_abbreviated_name) + { + $this->container['cause_variable_unit_abbreviated_name'] = $cause_variable_unit_abbreviated_name; + + return $this; + } + + /** + * Gets cause_variable_unit_id + * @return int + */ + public function getCauseVariableUnitId() + { + return $this->container['cause_variable_unit_id']; + } + + /** + * Sets cause_variable_unit_id + * @param int $cause_variable_unit_id Example: 10 + * @return $this + */ + public function setCauseVariableUnitId($cause_variable_unit_id) + { + $this->container['cause_variable_unit_id'] = $cause_variable_unit_id; + + return $this; + } + + /** + * Gets cause_variable_unit_name + * @return string + */ + public function getCauseVariableUnitName() + { + return $this->container['cause_variable_unit_name']; + } + + /** + * Sets cause_variable_unit_name + * @param string $cause_variable_unit_name Example: 1 to 5 Rating + * @return $this + */ + public function setCauseVariableUnitName($cause_variable_unit_name) + { + $this->container['cause_variable_unit_name'] = $cause_variable_unit_name; + + return $this; + } + + /** + * Gets cause_variable_id + * @return int + */ + public function getCauseVariableId() + { + return $this->container['cause_variable_id']; + } + + /** + * Sets cause_variable_id + * @param int $cause_variable_id Example: 1448 + * @return $this + */ + public function setCauseVariableId($cause_variable_id) + { + $this->container['cause_variable_id'] = $cause_variable_id; + + return $this; + } + + /** + * Gets cause_variable_image_url + * @return string + */ + public function getCauseVariableImageUrl() + { + return $this->container['cause_variable_image_url']; + } + + /** + * Sets cause_variable_image_url + * @param string $cause_variable_image_url Example: https://maxcdn.icons8.com/Color/PNG/96/Household/sleeping_in_bed-96.png + * @return $this + */ + public function setCauseVariableImageUrl($cause_variable_image_url) + { + $this->container['cause_variable_image_url'] = $cause_variable_image_url; + + return $this; + } + + /** + * Gets cause_variable_ion_icon + * @return string + */ + public function getCauseVariableIonIcon() + { + return $this->container['cause_variable_ion_icon']; + } + + /** + * Sets cause_variable_ion_icon + * @param string $cause_variable_ion_icon Example: ion-ios-cloudy-night-outline + * @return $this + */ + public function setCauseVariableIonIcon($cause_variable_ion_icon) + { + $this->container['cause_variable_ion_icon'] = $cause_variable_ion_icon; + + return $this; + } + + /** + * Gets cause_variable_most_common_connector_id + * @return int + */ + public function getCauseVariableMostCommonConnectorId() + { + return $this->container['cause_variable_most_common_connector_id']; + } + + /** + * Sets cause_variable_most_common_connector_id + * @param int $cause_variable_most_common_connector_id Example: 6 + * @return $this + */ + public function setCauseVariableMostCommonConnectorId($cause_variable_most_common_connector_id) + { + $this->container['cause_variable_most_common_connector_id'] = $cause_variable_most_common_connector_id; + + return $this; + } + + /** + * Gets cause_variable_name + * @return string + */ + public function getCauseVariableName() + { + return $this->container['cause_variable_name']; + } + + /** + * Sets cause_variable_name + * @param string $cause_variable_name Example: Sleep Quality + * @return $this + */ + public function setCauseVariableName($cause_variable_name) + { + $this->container['cause_variable_name'] = $cause_variable_name; + + return $this; + } + + /** + * Gets confidence_interval + * @return double + */ + public function getConfidenceInterval() + { + return $this->container['confidence_interval']; + } + + /** + * Sets confidence_interval + * @param double $confidence_interval Example: 0.14344467795996 + * @return $this + */ + public function setConfidenceInterval($confidence_interval) + { + $this->container['confidence_interval'] = $confidence_interval; + + return $this; + } + + /** + * Gets confidence_level + * @return string + */ + public function getConfidenceLevel() + { + return $this->container['confidence_level']; + } + + /** + * Sets confidence_level + * @param string $confidence_level Example: high + * @return $this + */ + public function setConfidenceLevel($confidence_level) + { + $this->container['confidence_level'] = $confidence_level; + + return $this; + } + + /** + * Gets correlation_coefficient + * @return double + */ + public function getCorrelationCoefficient() + { + return $this->container['correlation_coefficient']; + } + + /** + * Sets correlation_coefficient + * @param double $correlation_coefficient Example: 0.538 + * @return $this + */ + public function setCorrelationCoefficient($correlation_coefficient) + { + $this->container['correlation_coefficient'] = $correlation_coefficient; + + return $this; + } + + /** + * Gets correlation_is_contradictory_to_optimal_values + * @return bool + */ + public function getCorrelationIsContradictoryToOptimalValues() + { + return $this->container['correlation_is_contradictory_to_optimal_values']; + } + + /** + * Sets correlation_is_contradictory_to_optimal_values + * @param bool $correlation_is_contradictory_to_optimal_values Example: false + * @return $this + */ + public function setCorrelationIsContradictoryToOptimalValues($correlation_is_contradictory_to_optimal_values) + { + $this->container['correlation_is_contradictory_to_optimal_values'] = $correlation_is_contradictory_to_optimal_values; + + return $this; + } + + /** + * Gets created_at + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * @param \DateTime $created_at Example: 2016-12-28 20:47:30 + * @return $this + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets critical_t_value + * @return double + */ + public function getCriticalTValue() + { + return $this->container['critical_t_value']; + } + + /** + * Sets critical_t_value + * @param double $critical_t_value Example: 1.646 + * @return $this + */ + public function setCriticalTValue($critical_t_value) + { + $this->container['critical_t_value'] = $critical_t_value; + + return $this; + } + + /** + * Gets data_analysis + * @return string + */ + public function getDataAnalysis() + { + return $this->container['data_analysis']; + } + + /** + * Sets data_analysis + * @param string $data_analysis Example: It was assumed that 0 hours would pass before a change in Sleep Quality would produce an observable change in Overall Mood. It was assumed that Sleep Quality could produce an observable change in Overall Mood for as much as 7 days after the stimulus event. + * @return $this + */ + public function setDataAnalysis($data_analysis) + { + $this->container['data_analysis'] = $data_analysis; + + return $this; + } + + /** + * Gets data_sources + * @return string + */ + public function getDataSources() + { + return $this->container['data_sources']; + } + + /** + * Sets data_sources + * @param string $data_sources Example: Sleep Quality data was primarily collected using Up by Jawbone. UP by Jawbone is a wristband and app that tracks how you sleep, move and eat and then helps you use that information to feel your best.
Overall Mood data was primarily collected using QuantiModo. QuantiModo is a Chrome extension, Android app, iOS app, and web app that allows you to easily track mood, symptoms, or any outcome you want to optimize in a fraction of a second. You can also import your data from over 30 other apps and devices like Fitbit, Rescuetime, Jawbone Up, Withings, Facebook, Github, Google Calendar, Runkeeper, MoodPanda, Slice, Google Fit, and more. QuantiModo then analyzes your data to identify which hidden factors are most likely to be influencing your mood or symptoms and their optimal daily values. + * @return $this + */ + public function setDataSources($data_sources) + { + $this->container['data_sources'] = $data_sources; + + return $this; + } + + /** + * Gets data_sources_paragraph_for_cause + * @return string + */ + public function getDataSourcesParagraphForCause() + { + return $this->container['data_sources_paragraph_for_cause']; + } + + /** + * Sets data_sources_paragraph_for_cause + * @param string $data_sources_paragraph_for_cause Example: Sleep Quality data was primarily collected using Up by Jawbone. UP by Jawbone is a wristband and app that tracks how you sleep, move and eat and then helps you use that information to feel your best. + * @return $this + */ + public function setDataSourcesParagraphForCause($data_sources_paragraph_for_cause) + { + $this->container['data_sources_paragraph_for_cause'] = $data_sources_paragraph_for_cause; + + return $this; + } + + /** + * Gets data_sources_paragraph_for_effect + * @return string + */ + public function getDataSourcesParagraphForEffect() + { + return $this->container['data_sources_paragraph_for_effect']; + } + + /** + * Sets data_sources_paragraph_for_effect + * @param string $data_sources_paragraph_for_effect Example: Overall Mood data was primarily collected using QuantiModo. QuantiModo is a Chrome extension, Android app, iOS app, and web app that allows you to easily track mood, symptoms, or any outcome you want to optimize in a fraction of a second. You can also import your data from over 30 other apps and devices like Fitbit, Rescuetime, Jawbone Up, Withings, Facebook, Github, Google Calendar, Runkeeper, MoodPanda, Slice, Google Fit, and more. QuantiModo then analyzes your data to identify which hidden factors are most likely to be influencing your mood or symptoms and their optimal daily values. + * @return $this + */ + public function setDataSourcesParagraphForEffect($data_sources_paragraph_for_effect) + { + $this->container['data_sources_paragraph_for_effect'] = $data_sources_paragraph_for_effect; + + return $this; + } + + /** + * Gets direction + * @return string + */ + public function getDirection() + { + return $this->container['direction']; + } + + /** + * Sets direction + * @param string $direction Example: higher + * @return $this + */ + public function setDirection($direction) + { + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets duration_of_action + * @return int + */ + public function getDurationOfAction() + { + return $this->container['duration_of_action']; + } + + /** + * Sets duration_of_action + * @param int $duration_of_action Example: 604800 + * @return $this + */ + public function setDurationOfAction($duration_of_action) + { + $this->container['duration_of_action'] = $duration_of_action; + + return $this; + } + + /** + * Gets duration_of_action_in_hours + * @return int + */ + public function getDurationOfActionInHours() + { + return $this->container['duration_of_action_in_hours']; + } + + /** + * Sets duration_of_action_in_hours + * @param int $duration_of_action_in_hours Example: 168 + * @return $this + */ + public function setDurationOfActionInHours($duration_of_action_in_hours) + { + $this->container['duration_of_action_in_hours'] = $duration_of_action_in_hours; + + return $this; + } + + /** + * Gets effect_changes + * @return int + */ + public function getEffectChanges() + { + return $this->container['effect_changes']; + } + + /** + * Sets effect_changes + * @param int $effect_changes Example: 193 + * @return $this + */ + public function setEffectChanges($effect_changes) + { + $this->container['effect_changes'] = $effect_changes; + + return $this; + } + + /** + * Gets effect_data_source + * @return \QuantiModo\Client\Model\DataSource + */ + public function getEffectDataSource() + { + return $this->container['effect_data_source']; + } + + /** + * Sets effect_data_source + * @param \QuantiModo\Client\Model\DataSource $effect_data_source + * @return $this + */ + public function setEffectDataSource($effect_data_source) + { + $this->container['effect_data_source'] = $effect_data_source; + + return $this; + } + + /** + * Gets effect_size + * @return string + */ + public function getEffectSize() + { + return $this->container['effect_size']; + } + + /** + * Sets effect_size + * @param string $effect_size Example: moderately positive + * @return $this + */ + public function setEffectSize($effect_size) + { + $this->container['effect_size'] = $effect_size; + + return $this; + } + + /** + * Gets effect_unit + * @return string + */ + public function getEffectUnit() + { + return $this->container['effect_unit']; + } + + /** + * Sets effect_unit + * @param string $effect_unit Example: /5 + * @return $this + */ + public function setEffectUnit($effect_unit) + { + $this->container['effect_unit'] = $effect_unit; + + return $this; + } + + /** + * Gets effect_user_variable_share_user_measurements + * @return int + */ + public function getEffectUserVariableShareUserMeasurements() + { + return $this->container['effect_user_variable_share_user_measurements']; + } + + /** + * Sets effect_user_variable_share_user_measurements + * @param int $effect_user_variable_share_user_measurements Example: 1 + * @return $this + */ + public function setEffectUserVariableShareUserMeasurements($effect_user_variable_share_user_measurements) + { + $this->container['effect_user_variable_share_user_measurements'] = $effect_user_variable_share_user_measurements; + + return $this; + } + + /** + * Gets effect_variable_category_id + * @return int + */ + public function getEffectVariableCategoryId() + { + return $this->container['effect_variable_category_id']; + } + + /** + * Sets effect_variable_category_id + * @param int $effect_variable_category_id Example: 1 + * @return $this + */ + public function setEffectVariableCategoryId($effect_variable_category_id) + { + $this->container['effect_variable_category_id'] = $effect_variable_category_id; + + return $this; + } + + /** + * Gets effect_variable_category_name + * @return string + */ + public function getEffectVariableCategoryName() + { + return $this->container['effect_variable_category_name']; + } + + /** + * Sets effect_variable_category_name + * @param string $effect_variable_category_name Example: Emotions + * @return $this + */ + public function setEffectVariableCategoryName($effect_variable_category_name) + { + $this->container['effect_variable_category_name'] = $effect_variable_category_name; + + return $this; + } + + /** + * Gets effect_variable_combination_operation + * @return string + */ + public function getEffectVariableCombinationOperation() + { + return $this->container['effect_variable_combination_operation']; + } + + /** + * Sets effect_variable_combination_operation + * @param string $effect_variable_combination_operation Example: MEAN + * @return $this + */ + public function setEffectVariableCombinationOperation($effect_variable_combination_operation) + { + $this->container['effect_variable_combination_operation'] = $effect_variable_combination_operation; + + return $this; + } + + /** + * Gets effect_variable_common_alias + * @return string + */ + public function getEffectVariableCommonAlias() + { + return $this->container['effect_variable_common_alias']; + } + + /** + * Sets effect_variable_common_alias + * @param string $effect_variable_common_alias Example: Mood_(psychology) + * @return $this + */ + public function setEffectVariableCommonAlias($effect_variable_common_alias) + { + $this->container['effect_variable_common_alias'] = $effect_variable_common_alias; + + return $this; + } + + /** + * Gets effect_variable_unit_abbreviated_name + * @return string + */ + public function getEffectVariableUnitAbbreviatedName() + { + return $this->container['effect_variable_unit_abbreviated_name']; + } + + /** + * Sets effect_variable_unit_abbreviated_name + * @param string $effect_variable_unit_abbreviated_name Example: /5 + * @return $this + */ + public function setEffectVariableUnitAbbreviatedName($effect_variable_unit_abbreviated_name) + { + $this->container['effect_variable_unit_abbreviated_name'] = $effect_variable_unit_abbreviated_name; + + return $this; + } + + /** + * Gets effect_variable_unit_id + * @return int + */ + public function getEffectVariableUnitId() + { + return $this->container['effect_variable_unit_id']; + } + + /** + * Sets effect_variable_unit_id + * @param int $effect_variable_unit_id Example: 10 + * @return $this + */ + public function setEffectVariableUnitId($effect_variable_unit_id) + { + $this->container['effect_variable_unit_id'] = $effect_variable_unit_id; + + return $this; + } + + /** + * Gets effect_variable_unit_name + * @return string + */ + public function getEffectVariableUnitName() + { + return $this->container['effect_variable_unit_name']; + } + + /** + * Sets effect_variable_unit_name + * @param string $effect_variable_unit_name Example: 1 to 5 Rating + * @return $this + */ + public function setEffectVariableUnitName($effect_variable_unit_name) + { + $this->container['effect_variable_unit_name'] = $effect_variable_unit_name; + + return $this; + } + + /** + * Gets effect_variable_id + * @return int + */ + public function getEffectVariableId() + { + return $this->container['effect_variable_id']; + } + + /** + * Sets effect_variable_id + * @param int $effect_variable_id Example: 1398 + * @return $this + */ + public function setEffectVariableId($effect_variable_id) + { + $this->container['effect_variable_id'] = $effect_variable_id; + + return $this; + } + + /** + * Gets effect_variable_image_url + * @return string + */ + public function getEffectVariableImageUrl() + { + return $this->container['effect_variable_image_url']; + } + + /** + * Sets effect_variable_image_url + * @param string $effect_variable_image_url Example: https://maxcdn.icons8.com/Color/PNG/96/Cinema/theatre_mask-96.png + * @return $this + */ + public function setEffectVariableImageUrl($effect_variable_image_url) + { + $this->container['effect_variable_image_url'] = $effect_variable_image_url; + + return $this; + } + + /** + * Gets effect_variable_ion_icon + * @return string + */ + public function getEffectVariableIonIcon() + { + return $this->container['effect_variable_ion_icon']; + } + + /** + * Sets effect_variable_ion_icon + * @param string $effect_variable_ion_icon Example: ion-happy-outline + * @return $this + */ + public function setEffectVariableIonIcon($effect_variable_ion_icon) + { + $this->container['effect_variable_ion_icon'] = $effect_variable_ion_icon; + + return $this; + } + + /** + * Gets effect_variable_most_common_connector_id + * @return int + */ + public function getEffectVariableMostCommonConnectorId() + { + return $this->container['effect_variable_most_common_connector_id']; + } + + /** + * Sets effect_variable_most_common_connector_id + * @param int $effect_variable_most_common_connector_id Example: 10 + * @return $this + */ + public function setEffectVariableMostCommonConnectorId($effect_variable_most_common_connector_id) + { + $this->container['effect_variable_most_common_connector_id'] = $effect_variable_most_common_connector_id; + + return $this; + } + + /** + * Gets effect_variable_name + * @return string + */ + public function getEffectVariableName() + { + return $this->container['effect_variable_name']; + } + + /** + * Sets effect_variable_name + * @param string $effect_variable_name Example: Overall Mood + * @return $this + */ + public function setEffectVariableName($effect_variable_name) + { + $this->container['effect_variable_name'] = $effect_variable_name; + + return $this; + } + + /** + * Gets experiment_end_time + * @return \DateTime + */ + public function getExperimentEndTime() + { + return $this->container['experiment_end_time']; + } + + /** + * Sets experiment_end_time + * @param \DateTime $experiment_end_time Example: 2014-07-30 12:50:00 + * @return $this + */ + public function setExperimentEndTime($experiment_end_time) + { + $this->container['experiment_end_time'] = $experiment_end_time; + + return $this; + } + + /** + * Gets experiment_start_time + * @return \DateTime + */ + public function getExperimentStartTime() + { + return $this->container['experiment_start_time']; + } + + /** + * Sets experiment_start_time + * @param \DateTime $experiment_start_time Example: 2012-05-06 21:15:00 + * @return $this + */ + public function setExperimentStartTime($experiment_start_time) + { + $this->container['experiment_start_time'] = $experiment_start_time; + + return $this; + } + + /** + * Gets forward_spearman_correlation_coefficient + * @return double + */ + public function getForwardSpearmanCorrelationCoefficient() + { + return $this->container['forward_spearman_correlation_coefficient']; + } + + /** + * Sets forward_spearman_correlation_coefficient + * @param double $forward_spearman_correlation_coefficient Example: 0.528359 + * @return $this + */ + public function setForwardSpearmanCorrelationCoefficient($forward_spearman_correlation_coefficient) + { + $this->container['forward_spearman_correlation_coefficient'] = $forward_spearman_correlation_coefficient; + + return $this; + } + + /** + * Gets gauge_image + * @return string + */ + public function getGaugeImage() + { + return $this->container['gauge_image']; + } + + /** + * Sets gauge_image + * @param string $gauge_image Example: https://s3.amazonaws.com/quantimodo-docs/images/gauge-moderately-positive-relationship.png + * @return $this + */ + public function setGaugeImage($gauge_image) + { + $this->container['gauge_image'] = $gauge_image; + + return $this; + } + + /** + * Gets gauge_image_square + * @return string + */ + public function getGaugeImageSquare() + { + return $this->container['gauge_image_square']; + } + + /** + * Sets gauge_image_square + * @param string $gauge_image_square Example: https://s3.amazonaws.com/quantimodo-docs/images/gauge-moderately-positive-relationship-200-200.png + * @return $this + */ + public function setGaugeImageSquare($gauge_image_square) + { + $this->container['gauge_image_square'] = $gauge_image_square; + + return $this; + } + + /** + * Gets image_url + * @return string + */ + public function getImageUrl() + { + return $this->container['image_url']; + } + + /** + * Sets image_url + * @param string $image_url Example: https://s3-us-west-1.amazonaws.com/qmimages/variable_categories_gauges_logo_background/gauge-moderately-positive-relationship_sleep_emotions_logo_background.png + * @return $this + */ + public function setImageUrl($image_url) + { + $this->container['image_url'] = $image_url; + + return $this; + } + + /** + * Gets instructions_for_cause + * @return string + */ + public function getInstructionsForCause() + { + return $this->container['instructions_for_cause']; + } + + /** + * Sets instructions_for_cause + * @param string $instructions_for_cause Example: Obtain Up by Jawbone and use it to record your Sleep Quality. Once you have a Up by Jawbone account, connect your Up by Jawbone account at QuantiModo to automatically import and analyze your data. + * @return $this + */ + public function setInstructionsForCause($instructions_for_cause) + { + $this->container['instructions_for_cause'] = $instructions_for_cause; + + return $this; + } + + /** + * Gets instructions_for_effect + * @return string + */ + public function getInstructionsForEffect() + { + return $this->container['instructions_for_effect']; + } + + /** + * Sets instructions_for_effect + * @param string $instructions_for_effect Example: Obtain QuantiModo and use it to record your Overall Mood. Once you have a QuantiModo account, connect your QuantiModo account at QuantiModo to automatically import and analyze your data. + * @return $this + */ + public function setInstructionsForEffect($instructions_for_effect) + { + $this->container['instructions_for_effect'] = $instructions_for_effect; + + return $this; + } + + /** + * Gets number_of_pairs + * @return int + */ + public function getNumberOfPairs() + { + return $this->container['number_of_pairs']; + } + + /** + * Sets number_of_pairs + * @param int $number_of_pairs Example: 298 + * @return $this + */ + public function setNumberOfPairs($number_of_pairs) + { + $this->container['number_of_pairs'] = $number_of_pairs; + + return $this; + } + + /** + * Gets onset_delay + * @return int + */ + public function getOnsetDelay() + { + return $this->container['onset_delay']; + } + + /** + * Sets onset_delay + * @param int $onset_delay Example: 0 + * @return $this + */ + public function setOnsetDelay($onset_delay) + { + $this->container['onset_delay'] = $onset_delay; + + return $this; + } + + /** + * Gets onset_delay_in_hours + * @return int + */ + public function getOnsetDelayInHours() + { + return $this->container['onset_delay_in_hours']; + } + + /** + * Sets onset_delay_in_hours + * @param int $onset_delay_in_hours Example: 0 + * @return $this + */ + public function setOnsetDelayInHours($onset_delay_in_hours) + { + $this->container['onset_delay_in_hours'] = $onset_delay_in_hours; + + return $this; + } + + /** + * Gets onset_delay_with_strongest_pearson_correlation + * @return int + */ + public function getOnsetDelayWithStrongestPearsonCorrelation() + { + return $this->container['onset_delay_with_strongest_pearson_correlation']; + } + + /** + * Sets onset_delay_with_strongest_pearson_correlation + * @param int $onset_delay_with_strongest_pearson_correlation Example: -86400 + * @return $this + */ + public function setOnsetDelayWithStrongestPearsonCorrelation($onset_delay_with_strongest_pearson_correlation) + { + $this->container['onset_delay_with_strongest_pearson_correlation'] = $onset_delay_with_strongest_pearson_correlation; + + return $this; + } + + /** + * Gets onset_delay_with_strongest_pearson_correlation_in_hours + * @return int + */ + public function getOnsetDelayWithStrongestPearsonCorrelationInHours() + { + return $this->container['onset_delay_with_strongest_pearson_correlation_in_hours']; + } + + /** + * Sets onset_delay_with_strongest_pearson_correlation_in_hours + * @param int $onset_delay_with_strongest_pearson_correlation_in_hours Example: -24 + * @return $this + */ + public function setOnsetDelayWithStrongestPearsonCorrelationInHours($onset_delay_with_strongest_pearson_correlation_in_hours) + { + $this->container['onset_delay_with_strongest_pearson_correlation_in_hours'] = $onset_delay_with_strongest_pearson_correlation_in_hours; + + return $this; + } + + /** + * Gets optimal_pearson_product + * @return double + */ + public function getOptimalPearsonProduct() + { + return $this->container['optimal_pearson_product']; + } + + /** + * Sets optimal_pearson_product + * @param double $optimal_pearson_product Example: 0.68582816186982 + * @return $this + */ + public function setOptimalPearsonProduct($optimal_pearson_product) + { + $this->container['optimal_pearson_product'] = $optimal_pearson_product; + + return $this; + } + + /** + * Gets outcome_filling_value + * @return int + */ + public function getOutcomeFillingValue() + { + return $this->container['outcome_filling_value']; + } + + /** + * Sets outcome_filling_value + * @param int $outcome_filling_value Example: -1 + * @return $this + */ + public function setOutcomeFillingValue($outcome_filling_value) + { + $this->container['outcome_filling_value'] = $outcome_filling_value; + + return $this; + } + + /** + * Gets outcome_maximum_allowed_value + * @return double + */ + public function getOutcomeMaximumAllowedValue() + { + return $this->container['outcome_maximum_allowed_value']; + } + + /** + * Sets outcome_maximum_allowed_value + * @param double $outcome_maximum_allowed_value Example: 23 + * @return $this + */ + public function setOutcomeMaximumAllowedValue($outcome_maximum_allowed_value) + { + $this->container['outcome_maximum_allowed_value'] = $outcome_maximum_allowed_value; + + return $this; + } + + /** + * Gets outcome_minimum_allowed_value + * @return double + */ + public function getOutcomeMinimumAllowedValue() + { + return $this->container['outcome_minimum_allowed_value']; + } + + /** + * Sets outcome_minimum_allowed_value + * @param double $outcome_minimum_allowed_value Example: 0.1 + * @return $this + */ + public function setOutcomeMinimumAllowedValue($outcome_minimum_allowed_value) + { + $this->container['outcome_minimum_allowed_value'] = $outcome_minimum_allowed_value; + + return $this; + } + + /** + * Gets pearson_correlation_with_no_onset_delay + * @return double + */ + public function getPearsonCorrelationWithNoOnsetDelay() + { + return $this->container['pearson_correlation_with_no_onset_delay']; + } + + /** + * Sets pearson_correlation_with_no_onset_delay + * @param double $pearson_correlation_with_no_onset_delay Example: 0.477 + * @return $this + */ + public function setPearsonCorrelationWithNoOnsetDelay($pearson_correlation_with_no_onset_delay) + { + $this->container['pearson_correlation_with_no_onset_delay'] = $pearson_correlation_with_no_onset_delay; + + return $this; + } + + /** + * Gets predictive_pearson_correlation + * @return double + */ + public function getPredictivePearsonCorrelation() + { + return $this->container['predictive_pearson_correlation']; + } + + /** + * Sets predictive_pearson_correlation + * @param double $predictive_pearson_correlation Example: 0.538 + * @return $this + */ + public function setPredictivePearsonCorrelation($predictive_pearson_correlation) + { + $this->container['predictive_pearson_correlation'] = $predictive_pearson_correlation; + + return $this; + } + + /** + * Gets predictive_pearson_correlation_coefficient + * @return double + */ + public function getPredictivePearsonCorrelationCoefficient() + { + return $this->container['predictive_pearson_correlation_coefficient']; + } + + /** + * Sets predictive_pearson_correlation_coefficient + * @param double $predictive_pearson_correlation_coefficient Example: 0.538 + * @return $this + */ + public function setPredictivePearsonCorrelationCoefficient($predictive_pearson_correlation_coefficient) + { + $this->container['predictive_pearson_correlation_coefficient'] = $predictive_pearson_correlation_coefficient; + + return $this; + } + + /** + * Gets predictor_data_sources + * @return string + */ + public function getPredictorDataSources() + { + return $this->container['predictor_data_sources']; + } + + /** + * Sets predictor_data_sources + * @param string $predictor_data_sources Example: RescueTime + * @return $this + */ + public function setPredictorDataSources($predictor_data_sources) + { + $this->container['predictor_data_sources'] = $predictor_data_sources; + + return $this; + } + + /** + * Gets predictor_explanation + * @return string + */ + public function getPredictorExplanation() + { + return $this->container['predictor_explanation']; + } + + /** + * Sets predictor_explanation + * @param string $predictor_explanation Example: Sleep Quality Predicts Higher Overall Mood + * @return $this + */ + public function setPredictorExplanation($predictor_explanation) + { + $this->container['predictor_explanation'] = $predictor_explanation; + + return $this; + } + + /** + * Gets predictor_filling_value + * @return int + */ + public function getPredictorFillingValue() + { + return $this->container['predictor_filling_value']; + } + + /** + * Sets predictor_filling_value + * @param int $predictor_filling_value Example: -1 + * @return $this + */ + public function setPredictorFillingValue($predictor_filling_value) + { + $this->container['predictor_filling_value'] = $predictor_filling_value; + + return $this; + } + + /** + * Gets predictor_maximum_allowed_value + * @return double + */ + public function getPredictorMaximumAllowedValue() + { + return $this->container['predictor_maximum_allowed_value']; + } + + /** + * Sets predictor_maximum_allowed_value + * @param double $predictor_maximum_allowed_value Example: 200 + * @return $this + */ + public function setPredictorMaximumAllowedValue($predictor_maximum_allowed_value) + { + $this->container['predictor_maximum_allowed_value'] = $predictor_maximum_allowed_value; + + return $this; + } + + /** + * Gets predictor_minimum_allowed_value + * @return double + */ + public function getPredictorMinimumAllowedValue() + { + return $this->container['predictor_minimum_allowed_value']; + } + + /** + * Sets predictor_minimum_allowed_value + * @param double $predictor_minimum_allowed_value Example: 30 + * @return $this + */ + public function setPredictorMinimumAllowedValue($predictor_minimum_allowed_value) + { + $this->container['predictor_minimum_allowed_value'] = $predictor_minimum_allowed_value; + + return $this; + } + + /** + * Gets predicts_high_effect_change + * @return int + */ + public function getPredictsHighEffectChange() + { + return $this->container['predicts_high_effect_change']; + } + + /** + * Sets predicts_high_effect_change + * @param int $predicts_high_effect_change Example: 17 + * @return $this + */ + public function setPredictsHighEffectChange($predicts_high_effect_change) + { + $this->container['predicts_high_effect_change'] = $predicts_high_effect_change; + + return $this; + } + + /** + * Gets predicts_high_effect_change_sentence_fragment + * @return string + */ + public function getPredictsHighEffectChangeSentenceFragment() + { + return $this->container['predicts_high_effect_change_sentence_fragment']; + } + + /** + * Sets predicts_high_effect_change_sentence_fragment + * @param string $predicts_high_effect_change_sentence_fragment Example: , on average, 17% + * @return $this + */ + public function setPredictsHighEffectChangeSentenceFragment($predicts_high_effect_change_sentence_fragment) + { + $this->container['predicts_high_effect_change_sentence_fragment'] = $predicts_high_effect_change_sentence_fragment; + + return $this; + } + + /** + * Gets predicts_low_effect_change + * @return int + */ + public function getPredictsLowEffectChange() + { + return $this->container['predicts_low_effect_change']; + } + + /** + * Sets predicts_low_effect_change + * @param int $predicts_low_effect_change Example: -11 + * @return $this + */ + public function setPredictsLowEffectChange($predicts_low_effect_change) + { + $this->container['predicts_low_effect_change'] = $predicts_low_effect_change; + + return $this; + } + + /** + * Gets predicts_low_effect_change_sentence_fragment + * @return string + */ + public function getPredictsLowEffectChangeSentenceFragment() + { + return $this->container['predicts_low_effect_change_sentence_fragment']; + } + + /** + * Sets predicts_low_effect_change_sentence_fragment + * @param string $predicts_low_effect_change_sentence_fragment Example: , on average, 11% + * @return $this + */ + public function setPredictsLowEffectChangeSentenceFragment($predicts_low_effect_change_sentence_fragment) + { + $this->container['predicts_low_effect_change_sentence_fragment'] = $predicts_low_effect_change_sentence_fragment; + + return $this; + } + + /** + * Gets p_value + * @return double + */ + public function getPValue() + { + return $this->container['p_value']; + } + + /** + * Sets p_value + * @param double $p_value Example: 0.39628900511586 + * @return $this + */ + public function setPValue($p_value) + { + $this->container['p_value'] = $p_value; + + return $this; + } + + /** + * Gets qm_score + * @return double + */ + public function getQmScore() + { + return $this->container['qm_score']; + } + + /** + * Sets qm_score + * @param double $qm_score Example: 0.528 + * @return $this + */ + public function setQmScore($qm_score) + { + $this->container['qm_score'] = $qm_score; + + return $this; + } + + /** + * Gets reverse_pearson_correlation_coefficient + * @return double + */ + public function getReversePearsonCorrelationCoefficient() + { + return $this->container['reverse_pearson_correlation_coefficient']; + } + + /** + * Sets reverse_pearson_correlation_coefficient + * @param double $reverse_pearson_correlation_coefficient Example: 0.01377184270977 + * @return $this + */ + public function setReversePearsonCorrelationCoefficient($reverse_pearson_correlation_coefficient) + { + $this->container['reverse_pearson_correlation_coefficient'] = $reverse_pearson_correlation_coefficient; + + return $this; + } + + /** + * Gets share_user_measurements + * @return bool + */ + public function getShareUserMeasurements() + { + return $this->container['share_user_measurements']; + } + + /** + * Sets share_user_measurements + * @param bool $share_user_measurements Example: 1 + * @return $this + */ + public function setShareUserMeasurements($share_user_measurements) + { + $this->container['share_user_measurements'] = $share_user_measurements; + + return $this; + } + + /** + * Gets significance_explanation + * @return string + */ + public function getSignificanceExplanation() + { + return $this->container['significance_explanation']; + } + + /** + * Sets significance_explanation + * @param string $significance_explanation Example: Using a two-tailed t-test with alpha = 0.05, it was determined that the change in Overall Mood is statistically significant at 95% confidence interval. + * @return $this + */ + public function setSignificanceExplanation($significance_explanation) + { + $this->container['significance_explanation'] = $significance_explanation; + + return $this; + } + + /** + * Gets significant_difference + * @return bool + */ + public function getSignificantDifference() + { + return $this->container['significant_difference']; + } + + /** + * Sets significant_difference + * @param bool $significant_difference Example: 1 + * @return $this + */ + public function setSignificantDifference($significant_difference) + { + $this->container['significant_difference'] = $significant_difference; + + return $this; + } + + /** + * Gets statistical_significance + * @return double + */ + public function getStatisticalSignificance() + { + return $this->container['statistical_significance']; + } + + /** + * Sets statistical_significance + * @param double $statistical_significance Example: 0.9813 + * @return $this + */ + public function setStatisticalSignificance($statistical_significance) + { + $this->container['statistical_significance'] = $statistical_significance; + + return $this; + } + + /** + * Gets strength_level + * @return string + */ + public function getStrengthLevel() + { + return $this->container['strength_level']; + } + + /** + * Sets strength_level + * @param string $strength_level Example: moderate + * @return $this + */ + public function setStrengthLevel($strength_level) + { + $this->container['strength_level'] = $strength_level; + + return $this; + } + + /** + * Gets strongest_pearson_correlation_coefficient + * @return double + */ + public function getStrongestPearsonCorrelationCoefficient() + { + return $this->container['strongest_pearson_correlation_coefficient']; + } + + /** + * Sets strongest_pearson_correlation_coefficient + * @param double $strongest_pearson_correlation_coefficient Example: 0.613 + * @return $this + */ + public function setStrongestPearsonCorrelationCoefficient($strongest_pearson_correlation_coefficient) + { + $this->container['strongest_pearson_correlation_coefficient'] = $strongest_pearson_correlation_coefficient; + + return $this; + } + + /** + * Gets study_abstract + * @return string + */ + public function getStudyAbstract() + { + return $this->container['study_abstract']; + } + + /** + * Sets study_abstract + * @param string $study_abstract Example: Your data suggests with a high degree of confidence (p=0) that Sleep Quality (Sleep) has a moderately positive predictive relationship (R=0.538) with Overall Mood (Emotions). The highest quartile of Overall Mood measurements were observed following an average 4.14/5 Sleep Quality. The lowest quartile of Overall Mood measurements were observed following an average 3.03/5 Sleep Quality. + * @return $this + */ + public function setStudyAbstract($study_abstract) + { + $this->container['study_abstract'] = $study_abstract; + + return $this; + } + + /** + * Gets study_design + * @return string + */ + public function getStudyDesign() + { + return $this->container['study_design']; + } + + /** + * Sets study_design + * @param string $study_design Example: This study is based on data donated by one QuantiModo user. Thus, the study design is consistent with an n=1 observational natural experiment. + * @return $this + */ + public function setStudyDesign($study_design) + { + $this->container['study_design'] = $study_design; + + return $this; + } + + /** + * Gets study_limitations + * @return string + */ + public function getStudyLimitations() + { + return $this->container['study_limitations']; + } + + /** + * Sets study_limitations + * @param string $study_limitations Example: As with any human experiment, it was impossible to control for all potentially confounding variables. Correlation does not necessarily imply correlation. We can never know for sure if one factor is definitely the cause of an outcome. However, lack of correlation definitely implies the lack of a causal relationship. Hence, we can with great confidence rule out non-existent relationships. For instance, if we discover no relationship between mood and an antidepressant this information is just as or even more valuable than the discovery that there is a relationship.

We can also take advantage of several characteristics of time series data from many subjects to infer the likelihood of a causal relationship if we do find a correlational relationship. The criteria for causation are a group of minimal conditions necessary to provide adequate evidence of a causal relationship between an incidence and a possible consequence. The list of the criteria is as follows:
1. Strength (effect size): A small association does not mean that there is not a causal effect, though the larger the association, the more likely that it is causal.
2. Consistency (reproducibility): Consistent findings observed by different persons in different places with different samples strengthens the likelihood of an effect.
3. Specificity: Causation is likely if a very specific population at a specific site and disease with no other likely explanation. The more specific an association between a factor and an effect is, the bigger the probability of a causal relationship.
4. Temporality: The effect has to occur after the cause (and if there is an expected delay between the cause and expected effect, then the effect must occur after that delay).
5. Biological gradient: Greater exposure should generally lead to greater incidence of the effect. However, in some cases, the mere presence of the factor can trigger the effect. In other cases, an inverse proportion is observed: greater exposure leads to lower incidence.
6. Plausibility: A plausible mechanism between cause and effect is helpful.
7. Coherence: Coherence between epidemiological and laboratory findings increases the likelihood of an effect.
8. Experiment: \"Occasionally it is possible to appeal to experimental evidence\".
9. Analogy: The effect of similar factors may be considered.

The confidence in a causal relationship is bolstered by the fact that time-precedence was taken into account in all calculations. Furthermore, in accordance with the law of large numbers (LLN), the predictive power and accuracy of these results will continually grow over time. 298 paired data points were used in this analysis. Assuming that the relationship is merely coincidental, as the participant independently modifies their Sleep Quality values, the observed strength of the relationship will decline until it is below the threshold of significance. To it another way, in the case that we do find a spurious correlation, suggesting that banana intake improves mood for instance, one will likely increase their banana intake. Due to the fact that this correlation is spurious, it is unlikely that you will see a continued and persistent corresponding increase in mood. So over time, the spurious correlation will naturally dissipate.Furthermore, it will be very enlightening to aggregate this data with the data from other participants with similar genetic, diseasomic, environmentomic, and demographic profiles. + * @return $this + */ + public function setStudyLimitations($study_limitations) + { + $this->container['study_limitations'] = $study_limitations; + + return $this; + } + + /** + * Gets study_link_dynamic + * @return string + */ + public function getStudyLinkDynamic() + { + return $this->container['study_link_dynamic']; + } + + /** + * Sets study_link_dynamic + * @param string $study_link_dynamic Example: https://local.quantimo.do/ionic/Modo/www/index.html#/app/study?causeVariableName=Sleep%20Quality&effectVariableName=Overall%20Mood&userId=230 + * @return $this + */ + public function setStudyLinkDynamic($study_link_dynamic) + { + $this->container['study_link_dynamic'] = $study_link_dynamic; + + return $this; + } + + /** + * Gets study_link_email + * @return string + */ + public function getStudyLinkEmail() + { + return $this->container['study_link_email']; + } + + /** + * Sets study_link_email + * @param string $study_link_email Example: mailto:?subject=N1%20Study%3A%20Sleep%20Quality%20Predicts%20Higher%20Overall%20Mood&body=Check%20out%20my%20study%20at%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230%0A%0AHave%20a%20great%20day! + * @return $this + */ + public function setStudyLinkEmail($study_link_email) + { + $this->container['study_link_email'] = $study_link_email; + + return $this; + } + + /** + * Gets study_link_facebook + * @return string + */ + public function getStudyLinkFacebook() + { + return $this->container['study_link_facebook']; + } + + /** + * Sets study_link_facebook + * @param string $study_link_facebook Example: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230 + * @return $this + */ + public function setStudyLinkFacebook($study_link_facebook) + { + $this->container['study_link_facebook'] = $study_link_facebook; + + return $this; + } + + /** + * Gets study_link_google + * @return string + */ + public function getStudyLinkGoogle() + { + return $this->container['study_link_google']; + } + + /** + * Sets study_link_google + * @param string $study_link_google Example: https://plus.google.com/share?url=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230 + * @return $this + */ + public function setStudyLinkGoogle($study_link_google) + { + $this->container['study_link_google'] = $study_link_google; + + return $this; + } + + /** + * Gets study_link_static + * @return string + */ + public function getStudyLinkStatic() + { + return $this->container['study_link_static']; + } + + /** + * Sets study_link_static + * @param string $study_link_static Example: https://local.quantimo.do/api/v2/study?causeVariableName=Sleep%20Quality&effectVariableName=Overall%20Mood&userId=230 + * @return $this + */ + public function setStudyLinkStatic($study_link_static) + { + $this->container['study_link_static'] = $study_link_static; + + return $this; + } + + /** + * Gets study_link_twitter + * @return string + */ + public function getStudyLinkTwitter() + { + return $this->container['study_link_twitter']; + } + + /** + * Sets study_link_twitter + * @param string $study_link_twitter Example: https://twitter.com/home?status=Sleep%20Quality%20Predicts%20Higher%20Overall%20Mood%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230%20%40quantimodo + * @return $this + */ + public function setStudyLinkTwitter($study_link_twitter) + { + $this->container['study_link_twitter'] = $study_link_twitter; + + return $this; + } + + /** + * Gets study_objective + * @return string + */ + public function getStudyObjective() + { + return $this->container['study_objective']; + } + + /** + * Sets study_objective + * @param string $study_objective Example: The objective of this study is to determine the nature of the relationship (if any) between the Sleep Quality and the Overall Mood. Additionally, we attempt to determine the Sleep Quality values most likely to produce optimal Overall Mood values. + * @return $this + */ + public function setStudyObjective($study_objective) + { + $this->container['study_objective'] = $study_objective; + + return $this; + } + + /** + * Gets study_results + * @return string + */ + public function getStudyResults() + { + return $this->container['study_results']; + } + + /** + * Sets study_results + * @param string $study_results Example: This analysis suggests that higher Sleep Quality (Sleep) generally predicts higher Overall Mood (p = 0). Overall Mood is, on average, 17% higher after around 4.14 Sleep Quality. After an onset delay of 168 hours, Overall Mood is, on average, 11% lower than its average over the 168 hours following around 3.03 Sleep Quality. 298 data points were used in this analysis. The value for Sleep Quality changed 164 times, effectively running 82 separate natural experiments. The top quartile outcome values are preceded by an average 4.14 /5 of Sleep Quality. The bottom quartile outcome values are preceded by an average 3.03 /5 of Sleep Quality. Forward Pearson Correlation Coefficient was 0.538 (p=0, 95% CI 0.395 to 0.681 onset delay = 0 hours, duration of action = 168 hours) . The Reverse Pearson Correlation Coefficient was 0 (P=0, 95% CI -0.143 to 0.143, onset delay = -0 hours, duration of action = -168 hours). When the Sleep Quality value is closer to 4.14 /5 than 3.03 /5, the Overall Mood value which follows is, on average, 17% percent higher than its typical value. When the Sleep Quality value is closer to 3.03 /5 than 4.14 /5, the Overall Mood value which follows is 0% lower than its typical value. Overall Mood is 3.55/5 (15% higher) on average after days with around 4.19/5 Sleep Quality Overall Mood is 2.65/5 (14% lower) on average after days with around 1.97/5 Sleep Quality + * @return $this + */ + public function setStudyResults($study_results) + { + $this->container['study_results'] = $study_results; + + return $this; + } + + /** + * Gets study_title + * @return string + */ + public function getStudyTitle() + { + return $this->container['study_title']; + } + + /** + * Sets study_title + * @param string $study_title Example: N1 Study: Sleep Quality Predicts Higher Overall Mood + * @return $this + */ + public function setStudyTitle($study_title) + { + $this->container['study_title'] = $study_title; + + return $this; + } + + /** + * Gets timestamp + * @return int + */ + public function getTimestamp() + { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * @param int $timestamp Example: 1494085127 + * @return $this + */ + public function setTimestamp($timestamp) + { + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets t_value + * @return double + */ + public function getTValue() + { + return $this->container['t_value']; + } + + /** + * Sets t_value + * @param double $t_value Example: 9.6986079652717 + * @return $this + */ + public function setTValue($t_value) + { + $this->container['t_value'] = $t_value; + + return $this; + } + + /** + * Gets updated_at + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * @param \DateTime $updated_at Example: 2017-05-06 15:40:38 + * @return $this + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets user_id + * @return int + */ + public function getUserId() + { + return $this->container['user_id']; + } + + /** + * Sets user_id + * @param int $user_id Example: 230 + * @return $this + */ + public function setUserId($user_id) + { + $this->container['user_id'] = $user_id; + + return $this; + } + + /** + * Gets user_vote + * @return int + */ + public function getUserVote() + { + return $this->container['user_vote']; + } + + /** + * Sets user_vote + * @param int $user_vote Example: 1 * @return $this */ - public function setAverageDailyHighCause($average_daily_high_cause) + public function setUserVote($user_vote) { - $this->container['average_daily_high_cause'] = $average_daily_high_cause; + $this->container['user_vote'] = $user_vote; return $this; } /** - * Gets average_effect - * @return float + * Gets value_predicting_high_outcome + * @return double */ - public function getAverageEffect() + public function getValuePredictingHighOutcome() { - return $this->container['average_effect']; + return $this->container['value_predicting_high_outcome']; } /** - * Sets average_effect - * @param float $average_effect + * Sets value_predicting_high_outcome + * @param double $value_predicting_high_outcome Example: 4.14 * @return $this */ - public function setAverageEffect($average_effect) + public function setValuePredictingHighOutcome($value_predicting_high_outcome) { - $this->container['average_effect'] = $average_effect; + $this->container['value_predicting_high_outcome'] = $value_predicting_high_outcome; return $this; } /** - * Gets average_effect_following_high_cause - * @return float + * Gets value_predicting_high_outcome_explanation + * @return string */ - public function getAverageEffectFollowingHighCause() + public function getValuePredictingHighOutcomeExplanation() { - return $this->container['average_effect_following_high_cause']; + return $this->container['value_predicting_high_outcome_explanation']; } /** - * Sets average_effect_following_high_cause - * @param float $average_effect_following_high_cause + * Sets value_predicting_high_outcome_explanation + * @param string $value_predicting_high_outcome_explanation Example: Overall Mood, on average, 17% higher after around 4.14/5 Sleep Quality * @return $this */ - public function setAverageEffectFollowingHighCause($average_effect_following_high_cause) + public function setValuePredictingHighOutcomeExplanation($value_predicting_high_outcome_explanation) { - $this->container['average_effect_following_high_cause'] = $average_effect_following_high_cause; + $this->container['value_predicting_high_outcome_explanation'] = $value_predicting_high_outcome_explanation; return $this; } /** - * Gets average_effect_following_low_cause - * @return float + * Gets value_predicting_low_outcome + * @return double */ - public function getAverageEffectFollowingLowCause() + public function getValuePredictingLowOutcome() { - return $this->container['average_effect_following_low_cause']; + return $this->container['value_predicting_low_outcome']; } /** - * Sets average_effect_following_low_cause - * @param float $average_effect_following_low_cause + * Sets value_predicting_low_outcome + * @param double $value_predicting_low_outcome Example: 3.03 * @return $this */ - public function setAverageEffectFollowingLowCause($average_effect_following_low_cause) + public function setValuePredictingLowOutcome($value_predicting_low_outcome) { - $this->container['average_effect_following_low_cause'] = $average_effect_following_low_cause; + $this->container['value_predicting_low_outcome'] = $value_predicting_low_outcome; return $this; } /** - * Gets average_effect_following_high_cause_explanation + * Gets value_predicting_low_outcome_explanation * @return string */ - public function getAverageEffectFollowingHighCauseExplanation() + public function getValuePredictingLowOutcomeExplanation() { - return $this->container['average_effect_following_high_cause_explanation']; + return $this->container['value_predicting_low_outcome_explanation']; } /** - * Sets average_effect_following_high_cause_explanation - * @param string $average_effect_following_high_cause_explanation + * Sets value_predicting_low_outcome_explanation + * @param string $value_predicting_low_outcome_explanation Example: Overall Mood, on average, 11% lower after around 3.03/5 Sleep Quality * @return $this */ - public function setAverageEffectFollowingHighCauseExplanation($average_effect_following_high_cause_explanation) + public function setValuePredictingLowOutcomeExplanation($value_predicting_low_outcome_explanation) { - $this->container['average_effect_following_high_cause_explanation'] = $average_effect_following_high_cause_explanation; + $this->container['value_predicting_low_outcome_explanation'] = $value_predicting_low_outcome_explanation; return $this; } /** - * Gets average_effect_following_low_cause_explanation - * @return string + * Gets causality_factor + * @return float */ - public function getAverageEffectFollowingLowCauseExplanation() + public function getCausalityFactor() { - return $this->container['average_effect_following_low_cause_explanation']; + return $this->container['causality_factor']; } /** - * Sets average_effect_following_low_cause_explanation - * @param string $average_effect_following_low_cause_explanation + * Sets causality_factor + * @param float $causality_factor * @return $this */ - public function setAverageEffectFollowingLowCauseExplanation($average_effect_following_low_cause_explanation) + public function setCausalityFactor($causality_factor) { - $this->container['average_effect_following_low_cause_explanation'] = $average_effect_following_low_cause_explanation; + $this->container['causality_factor'] = $causality_factor; return $this; } /** - * Gets average_vote - * @return float + * Gets outcome_data_sources + * @return string */ - public function getAverageVote() + public function getOutcomeDataSources() { - return $this->container['average_vote']; + return $this->container['outcome_data_sources']; } /** - * Sets average_vote - * @param float $average_vote Average Vote + * Sets outcome_data_sources + * @param string $outcome_data_sources original name of the cause. * @return $this */ - public function setAverageVote($average_vote) + public function setOutcomeDataSources($outcome_data_sources) { - $this->container['average_vote'] = $average_vote; + $this->container['outcome_data_sources'] = $outcome_data_sources; return $this; } /** - * Gets causality_factor - * @return float + * Gets principal_investigator + * @return string */ - public function getCausalityFactor() + public function getPrincipalInvestigator() { - return $this->container['causality_factor']; + return $this->container['principal_investigator']; } /** - * Sets causality_factor - * @param float $causality_factor + * Sets principal_investigator + * @param string $principal_investigator Mike Sinn * @return $this */ - public function setCausalityFactor($causality_factor) + public function setPrincipalInvestigator($principal_investigator) { - $this->container['causality_factor'] = $causality_factor; + $this->container['principal_investigator'] = $principal_investigator; return $this; } /** - * Gets cause - * @return string + * Gets reverse_correlation + * @return float */ - public function getCause() + public function getReverseCorrelation() { - return $this->container['cause']; + return $this->container['reverse_correlation']; } /** - * Sets cause - * @param string $cause ORIGINAL variable name of the cause variable for which the user desires correlations. + * Sets reverse_correlation + * @param float $reverse_correlation Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation. * @return $this */ - public function setCause($cause) + public function setReverseCorrelation($reverse_correlation) { - $this->container['cause'] = $cause; + $this->container['reverse_correlation'] = $reverse_correlation; return $this; } /** - * Gets cause_variable_category_name + * Gets study_background * @return string */ - public function getCauseVariableCategoryName() + public function getStudyBackground() { - return $this->container['cause_variable_category_name']; + return $this->container['study_background']; } /** - * Sets cause_variable_category_name - * @param string $cause_variable_category_name Variable category of the cause variable. + * Sets study_background + * @param string $study_background In order to reduce suffering through the advancement of human knowledge... * @return $this */ - public function setCauseVariableCategoryName($cause_variable_category_name) + public function setStudyBackground($study_background) { - $this->container['cause_variable_category_name'] = $cause_variable_category_name; + $this->container['study_background'] = $study_background; return $this; } /** - * Gets cause_changes - * @return int + * Gets study_invitation + * @return string */ - public function getCauseChanges() + public function getStudyInvitation() { - return $this->container['cause_changes']; + return $this->container['study_invitation']; } /** - * Sets cause_changes - * @param int $cause_changes Number of changes in the predictor variable (a.k.a the number of experiments) + * Sets study_invitation + * @param string $study_invitation Help us determine if Remeron affects Overall Mood! * @return $this */ - public function setCauseChanges($cause_changes) + public function setStudyInvitation($study_invitation) { - $this->container['cause_changes'] = $cause_changes; + $this->container['study_invitation'] = $study_invitation; return $this; } /** - * Gets cause_combination_operation + * Gets study_question * @return string */ - public function getCauseCombinationOperation() + public function getStudyQuestion() { - return $this->container['cause_combination_operation']; + return $this->container['study_question']; } /** - * Sets cause_combination_operation - * @param string $cause_combination_operation The way cause measurements are aggregated + * Sets study_question + * @param string $study_question Does Remeron affect Overall Mood? * @return $this */ - public function setCauseCombinationOperation($cause_combination_operation) + public function setStudyQuestion($study_question) { - $this->container['cause_combination_operation'] = $cause_combination_operation; + $this->container['study_question'] = $study_question; return $this; } /** - * Gets cause_variable_image_url - * @return string + * Gets all_pairs_significance + * @return double */ - public function getCauseVariableImageUrl() + public function getAllPairsSignificance() { - return $this->container['cause_variable_image_url']; + return $this->container['all_pairs_significance']; } /** - * Sets cause_variable_image_url - * @param string $cause_variable_image_url + * Sets all_pairs_significance + * @param double $all_pairs_significance Example: 0.99994982531794 * @return $this */ - public function setCauseVariableImageUrl($cause_variable_image_url) + public function setAllPairsSignificance($all_pairs_significance) { - $this->container['cause_variable_image_url'] = $cause_variable_image_url; + $this->container['all_pairs_significance'] = $all_pairs_significance; return $this; } /** - * Gets cause_variable_ion_icon + * Gets average_pearson_correlation_coefficient_over_onset_delays * @return string */ - public function getCauseVariableIonIcon() + public function getAveragePearsonCorrelationCoefficientOverOnsetDelays() { - return $this->container['cause_variable_ion_icon']; + return $this->container['average_pearson_correlation_coefficient_over_onset_delays']; } /** - * Sets cause_variable_ion_icon - * @param string $cause_variable_ion_icon For use in Ionic apps + * Sets average_pearson_correlation_coefficient_over_onset_delays + * @param string $average_pearson_correlation_coefficient_over_onset_delays Example: * @return $this */ - public function setCauseVariableIonIcon($cause_variable_ion_icon) + public function setAveragePearsonCorrelationCoefficientOverOnsetDelays($average_pearson_correlation_coefficient_over_onset_delays) { - $this->container['cause_variable_ion_icon'] = $cause_variable_ion_icon; + $this->container['average_pearson_correlation_coefficient_over_onset_delays'] = $average_pearson_correlation_coefficient_over_onset_delays; return $this; } /** - * Gets cause_unit - * @return string + * Gets calculation_start_time + * @return \DateTime */ - public function getCauseUnit() + public function getCalculationStartTime() { - return $this->container['cause_unit']; + return $this->container['calculation_start_time']; } /** - * Sets cause_unit - * @param string $cause_unit Unit of the predictor variable + * Sets calculation_start_time + * @param \DateTime $calculation_start_time Example: * @return $this */ - public function setCauseUnit($cause_unit) + public function setCalculationStartTime($calculation_start_time) { - $this->container['cause_unit'] = $cause_unit; + $this->container['calculation_start_time'] = $calculation_start_time; return $this; } /** - * Gets cause_unit_id - * @return int + * Gets cause_changes_statistical_significance + * @return double */ - public function getCauseUnitId() + public function getCauseChangesStatisticalSignificance() { - return $this->container['cause_unit_id']; + return $this->container['cause_changes_statistical_significance']; } /** - * Sets cause_unit_id - * @param int $cause_unit_id Unit Id of the predictor variable + * Sets cause_changes_statistical_significance + * @param double $cause_changes_statistical_significance Example: 0.9999299755903 * @return $this */ - public function setCauseUnitId($cause_unit_id) + public function setCauseChangesStatisticalSignificance($cause_changes_statistical_significance) { - $this->container['cause_unit_id'] = $cause_unit_id; + $this->container['cause_changes_statistical_significance'] = $cause_changes_statistical_significance; return $this; } /** - * Gets cause_variable_id + * Gets cause_number_of_processed_daily_measurements * @return int */ - public function getCauseVariableId() + public function getCauseNumberOfProcessedDailyMeasurements() { - return $this->container['cause_variable_id']; + return $this->container['cause_number_of_processed_daily_measurements']; } /** - * Sets cause_variable_id - * @param int $cause_variable_id + * Sets cause_number_of_processed_daily_measurements + * @param int $cause_number_of_processed_daily_measurements Example: 1364 * @return $this */ - public function setCauseVariableId($cause_variable_id) + public function setCauseNumberOfProcessedDailyMeasurements($cause_number_of_processed_daily_measurements) { - $this->container['cause_variable_id'] = $cause_variable_id; + $this->container['cause_number_of_processed_daily_measurements'] = $cause_number_of_processed_daily_measurements; return $this; } /** - * Gets cause_variable_name - * @return string + * Gets cause_number_of_raw_measurements + * @return int */ - public function getCauseVariableName() + public function getCauseNumberOfRawMeasurements() { - return $this->container['cause_variable_name']; + return $this->container['cause_number_of_raw_measurements']; } /** - * Sets cause_variable_name - * @param string $cause_variable_name ORIGINAL variable name of the cause variable for which the user desires correlations. + * Sets cause_number_of_raw_measurements + * @param int $cause_number_of_raw_measurements Example: 14764 * @return $this */ - public function setCauseVariableName($cause_variable_name) + public function setCauseNumberOfRawMeasurements($cause_number_of_raw_measurements) { - $this->container['cause_variable_name'] = $cause_variable_name; + $this->container['cause_number_of_raw_measurements'] = $cause_number_of_raw_measurements; return $this; } /** - * Gets correlation_coefficient - * @return float + * Gets cause_value_spread + * @return double */ - public function getCorrelationCoefficient() + public function getCauseValueSpread() { - return $this->container['correlation_coefficient']; + return $this->container['cause_value_spread']; } /** - * Sets correlation_coefficient - * @param float $correlation_coefficient Pearson correlation coefficient between cause and effect measurements + * Sets cause_value_spread + * @param double $cause_value_spread Example: 99032.44787234 * @return $this */ - public function setCorrelationCoefficient($correlation_coefficient) + public function setCauseValueSpread($cause_value_spread) { - $this->container['correlation_coefficient'] = $correlation_coefficient; + $this->container['cause_value_spread'] = $cause_value_spread; return $this; } /** - * Gets created_at - * @return \DateTime + * Gets correlations_over_durations_of_action + * @return string */ - public function getCreatedAt() + public function getCorrelationsOverDurationsOfAction() { - return $this->container['created_at']; + return $this->container['correlations_over_durations_of_action']; } /** - * Sets created_at - * @param \DateTime $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format + * Sets correlations_over_durations_of_action + * @param string $correlations_over_durations_of_action Example: * @return $this */ - public function setCreatedAt($created_at) + public function setCorrelationsOverDurationsOfAction($correlations_over_durations_of_action) { - $this->container['created_at'] = $created_at; + $this->container['correlations_over_durations_of_action'] = $correlations_over_durations_of_action; return $this; } /** - * Gets data_analysis + * Gets correlations_over_durations_of_action_chart_config * @return string */ - public function getDataAnalysis() + public function getCorrelationsOverDurationsOfActionChartConfig() { - return $this->container['data_analysis']; + return $this->container['correlations_over_durations_of_action_chart_config']; } /** - * Sets data_analysis - * @param string $data_analysis How the data was analyzed + * Sets correlations_over_durations_of_action_chart_config + * @param string $correlations_over_durations_of_action_chart_config Example: * @return $this */ - public function setDataAnalysis($data_analysis) + public function setCorrelationsOverDurationsOfActionChartConfig($correlations_over_durations_of_action_chart_config) { - $this->container['data_analysis'] = $data_analysis; + $this->container['correlations_over_durations_of_action_chart_config'] = $correlations_over_durations_of_action_chart_config; return $this; } /** - * Gets data_sources + * Gets correlations_over_onset_delays_chart_config * @return string */ - public function getDataSources() + public function getCorrelationsOverOnsetDelaysChartConfig() { - return $this->container['data_sources']; + return $this->container['correlations_over_onset_delays_chart_config']; } /** - * Sets data_sources - * @param string $data_sources How the data was obtained + * Sets correlations_over_onset_delays_chart_config + * @param string $correlations_over_onset_delays_chart_config Example: * @return $this */ - public function setDataSources($data_sources) + public function setCorrelationsOverOnsetDelaysChartConfig($correlations_over_onset_delays_chart_config) { - $this->container['data_sources'] = $data_sources; + $this->container['correlations_over_onset_delays_chart_config'] = $correlations_over_onset_delays_chart_config; return $this; } /** - * Gets duration_of_action - * @return float + * Gets data_points + * @return string */ - public function getDurationOfAction() + public function getDataPoints() { - return $this->container['duration_of_action']; + return $this->container['data_points']; } /** - * Sets duration_of_action - * @param float $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. + * Sets data_points + * @param string $data_points Example: * @return $this */ - public function setDurationOfAction($duration_of_action) + public function setDataPoints($data_points) { - $this->container['duration_of_action'] = $duration_of_action; + $this->container['data_points'] = $data_points; return $this; } /** - * Gets effect - * @return string + * Gets degrees_of_freedom + * @return int */ - public function getEffect() + public function getDegreesOfFreedom() { - return $this->container['effect']; + return $this->container['degrees_of_freedom']; } /** - * Sets effect - * @param string $effect ORIGINAL variable name of the effect variable for which the user desires correlations. + * Sets degrees_of_freedom + * @param int $degrees_of_freedom Example: 200 * @return $this */ - public function setEffect($effect) + public function setDegreesOfFreedom($degrees_of_freedom) { - $this->container['effect'] = $effect; + $this->container['degrees_of_freedom'] = $degrees_of_freedom; return $this; } /** - * Gets effect_variable_category_name - * @return string + * Gets distance_from_middle_to_be_hight_low_effect + * @return int */ - public function getEffectVariableCategoryName() + public function getDistanceFromMiddleToBeHightLowEffect() { - return $this->container['effect_variable_category_name']; + return $this->container['distance_from_middle_to_be_hight_low_effect']; } /** - * Sets effect_variable_category_name - * @param string $effect_variable_category_name Variable category of the effect variable. + * Sets distance_from_middle_to_be_hight_low_effect + * @param int $distance_from_middle_to_be_hight_low_effect Example: 25 * @return $this */ - public function setEffectVariableCategoryName($effect_variable_category_name) + public function setDistanceFromMiddleToBeHightLowEffect($distance_from_middle_to_be_hight_low_effect) { - $this->container['effect_variable_category_name'] = $effect_variable_category_name; + $this->container['distance_from_middle_to_be_hight_low_effect'] = $distance_from_middle_to_be_hight_low_effect; return $this; } /** - * Gets effect_variable_image_url - * @return string + * Gets effect_number_of_processed_daily_measurements + * @return int */ - public function getEffectVariableImageUrl() + public function getEffectNumberOfProcessedDailyMeasurements() { - return $this->container['effect_variable_image_url']; + return $this->container['effect_number_of_processed_daily_measurements']; } /** - * Sets effect_variable_image_url - * @param string $effect_variable_image_url + * Sets effect_number_of_processed_daily_measurements + * @param int $effect_number_of_processed_daily_measurements Example: 145 * @return $this */ - public function setEffectVariableImageUrl($effect_variable_image_url) + public function setEffectNumberOfProcessedDailyMeasurements($effect_number_of_processed_daily_measurements) { - $this->container['effect_variable_image_url'] = $effect_variable_image_url; + $this->container['effect_number_of_processed_daily_measurements'] = $effect_number_of_processed_daily_measurements; return $this; } /** - * Gets effect_variable_ion_icon - * @return string + * Gets effect_number_of_raw_measurements + * @return int */ - public function getEffectVariableIonIcon() + public function getEffectNumberOfRawMeasurements() { - return $this->container['effect_variable_ion_icon']; + return $this->container['effect_number_of_raw_measurements']; } /** - * Sets effect_variable_ion_icon - * @param string $effect_variable_ion_icon For use in Ionic apps + * Sets effect_number_of_raw_measurements + * @param int $effect_number_of_raw_measurements Example: 4045 * @return $this */ - public function setEffectVariableIonIcon($effect_variable_ion_icon) + public function setEffectNumberOfRawMeasurements($effect_number_of_raw_measurements) { - $this->container['effect_variable_ion_icon'] = $effect_variable_ion_icon; + $this->container['effect_number_of_raw_measurements'] = $effect_number_of_raw_measurements; return $this; } /** - * Gets effect_size - * @return string + * Gets effect_value_spread + * @return double */ - public function getEffectSize() + public function getEffectValueSpread() { - return $this->container['effect_size']; + return $this->container['effect_value_spread']; } /** - * Sets effect_size - * @param string $effect_size Magnitude of the effects of a cause indicating whether it's practically meaningful. + * Sets effect_value_spread + * @param double $effect_value_spread Example: 20.2 * @return $this */ - public function setEffectSize($effect_size) + public function setEffectValueSpread($effect_value_spread) { - $this->container['effect_size'] = $effect_size; + $this->container['effect_value_spread'] = $effect_value_spread; return $this; } /** - * Gets effect_variable_id + * Gets error * @return string */ - public function getEffectVariableId() + public function getError() { - return $this->container['effect_variable_id']; + return $this->container['error']; } /** - * Sets effect_variable_id - * @param string $effect_variable_id Magnitude of the effects of a cause indicating whether it's practically meaningful. + * Sets error + * @param string $error Example: optimalPearsonProduct is not defined * @return $this */ - public function setEffectVariableId($effect_variable_id) + public function setError($error) { - $this->container['effect_variable_id'] = $effect_variable_id; + $this->container['error'] = $error; return $this; } /** - * Gets effect_variable_name - * @return string + * Gets maximum_cause_value + * @return double */ - public function getEffectVariableName() + public function getMaximumCauseValue() { - return $this->container['effect_variable_name']; + return $this->container['maximum_cause_value']; } /** - * Sets effect_variable_name - * @param string $effect_variable_name ORIGINAL variable name of the effect variable for which the user desires correlations. + * Sets maximum_cause_value + * @param double $maximum_cause_value Example: 104300 * @return $this */ - public function setEffectVariableName($effect_variable_name) + public function setMaximumCauseValue($maximum_cause_value) { - $this->container['effect_variable_name'] = $effect_variable_name; + $this->container['maximum_cause_value'] = $maximum_cause_value; return $this; } /** - * Gets gauge_image - * @return string + * Gets maximum_effect_value + * @return double */ - public function getGaugeImage() + public function getMaximumEffectValue() { - return $this->container['gauge_image']; + return $this->container['maximum_effect_value']; } /** - * Sets gauge_image - * @param string $gauge_image Illustrates the strength of the relationship + * Sets maximum_effect_value + * @param double $maximum_effect_value Example: 20.38 * @return $this */ - public function setGaugeImage($gauge_image) + public function setMaximumEffectValue($maximum_effect_value) { - $this->container['gauge_image'] = $gauge_image; + $this->container['maximum_effect_value'] = $maximum_effect_value; return $this; } /** - * Gets image_url + * Gets median_of_lower_half_of_effect_measurements * @return string */ - public function getImageUrl() + public function getMedianOfLowerHalfOfEffectMeasurements() { - return $this->container['image_url']; + return $this->container['median_of_lower_half_of_effect_measurements']; } /** - * Sets image_url - * @param string $image_url Large image for Facebook + * Sets median_of_lower_half_of_effect_measurements + * @param string $median_of_lower_half_of_effect_measurements Example: * @return $this */ - public function setImageUrl($image_url) + public function setMedianOfLowerHalfOfEffectMeasurements($median_of_lower_half_of_effect_measurements) { - $this->container['image_url'] = $image_url; + $this->container['median_of_lower_half_of_effect_measurements'] = $median_of_lower_half_of_effect_measurements; return $this; } /** - * Gets number_of_pairs - * @return float + * Gets median_of_upper_half_of_effect_measurements + * @return string */ - public function getNumberOfPairs() + public function getMedianOfUpperHalfOfEffectMeasurements() { - return $this->container['number_of_pairs']; + return $this->container['median_of_upper_half_of_effect_measurements']; } /** - * Sets number_of_pairs - * @param float $number_of_pairs Number of points that went into the correlation calculation + * Sets median_of_upper_half_of_effect_measurements + * @param string $median_of_upper_half_of_effect_measurements Example: * @return $this */ - public function setNumberOfPairs($number_of_pairs) + public function setMedianOfUpperHalfOfEffectMeasurements($median_of_upper_half_of_effect_measurements) { - $this->container['number_of_pairs'] = $number_of_pairs; + $this->container['median_of_upper_half_of_effect_measurements'] = $median_of_upper_half_of_effect_measurements; return $this; } /** - * Gets original_effect - * @return string + * Gets minimum_cause_value + * @return double */ - public function getOriginalEffect() + public function getMinimumCauseValue() { - return $this->container['original_effect']; + return $this->container['minimum_cause_value']; } /** - * Sets original_effect - * @param string $original_effect effect variable original name. + * Sets minimum_cause_value + * @param double $minimum_cause_value Example: 5267.5521276596 * @return $this */ - public function setOriginalEffect($original_effect) + public function setMinimumCauseValue($minimum_cause_value) { - $this->container['original_effect'] = $original_effect; + $this->container['minimum_cause_value'] = $minimum_cause_value; return $this; } /** - * Gets onset_delay + * Gets minimum_effect_value * @return double */ - public function getOnsetDelay() + public function getMinimumEffectValue() { - return $this->container['onset_delay']; + return $this->container['minimum_effect_value']; } /** - * Sets onset_delay - * @param double $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. + * Sets minimum_effect_value + * @param double $minimum_effect_value Example: 0.18 * @return $this */ - public function setOnsetDelay($onset_delay) + public function setMinimumEffectValue($minimum_effect_value) { - $this->container['onset_delay'] = $onset_delay; + $this->container['minimum_effect_value'] = $minimum_effect_value; return $this; } /** - * Gets optimal_pearson_product - * @return float + * Gets minimum_probability + * @return double */ - public function getOptimalPearsonProduct() + public function getMinimumProbability() { - return $this->container['optimal_pearson_product']; + return $this->container['minimum_probability']; } /** - * Sets optimal_pearson_product - * @param float $optimal_pearson_product Optimal Pearson Product + * Sets minimum_probability + * @param double $minimum_probability Example: 0.05 * @return $this */ - public function setOptimalPearsonProduct($optimal_pearson_product) + public function setMinimumProbability($minimum_probability) { - $this->container['optimal_pearson_product'] = $optimal_pearson_product; + $this->container['minimum_probability'] = $minimum_probability; return $this; } /** - * Gets original_cause - * @return string + * Gets number_of_cause_changes_for_optimal_values + * @return int */ - public function getOriginalCause() + public function getNumberOfCauseChangesForOptimalValues() { - return $this->container['original_cause']; + return $this->container['number_of_cause_changes_for_optimal_values']; } /** - * Sets original_cause - * @param string $original_cause original name of the cause. + * Sets number_of_cause_changes_for_optimal_values + * @param int $number_of_cause_changes_for_optimal_values Example: 287 * @return $this */ - public function setOriginalCause($original_cause) + public function setNumberOfCauseChangesForOptimalValues($number_of_cause_changes_for_optimal_values) { - $this->container['original_cause'] = $original_cause; + $this->container['number_of_cause_changes_for_optimal_values'] = $number_of_cause_changes_for_optimal_values; return $this; } /** - * Gets outcome_data_sources - * @return string + * Gets number_of_days + * @return int */ - public function getOutcomeDataSources() + public function getNumberOfDays() { - return $this->container['outcome_data_sources']; + return $this->container['number_of_days']; } /** - * Sets outcome_data_sources - * @param string $outcome_data_sources original name of the cause. + * Sets number_of_days + * @param int $number_of_days Example: 425 * @return $this */ - public function setOutcomeDataSources($outcome_data_sources) + public function setNumberOfDays($number_of_days) { - $this->container['outcome_data_sources'] = $outcome_data_sources; + $this->container['number_of_days'] = $number_of_days; return $this; } /** - * Gets predictor_explanation - * @return string + * Gets number_of_days_significance + * @return double */ - public function getPredictorExplanation() + public function getNumberOfDaysSignificance() { - return $this->container['predictor_explanation']; + return $this->container['number_of_days_significance']; } /** - * Sets predictor_explanation - * @param string $predictor_explanation HIGHER Remeron predicts HIGHER Overall Mood + * Sets number_of_days_significance + * @param double $number_of_days_significance Example: 0.99999929612614 * @return $this */ - public function setPredictorExplanation($predictor_explanation) + public function setNumberOfDaysSignificance($number_of_days_significance) { - $this->container['predictor_explanation'] = $predictor_explanation; + $this->container['number_of_days_significance'] = $number_of_days_significance; return $this; } /** - * Gets principal_investigator - * @return string + * Gets number_of_effect_changes_for_optimal_values + * @return int */ - public function getPrincipalInvestigator() + public function getNumberOfEffectChangesForOptimalValues() { - return $this->container['principal_investigator']; + return $this->container['number_of_effect_changes_for_optimal_values']; } /** - * Sets principal_investigator - * @param string $principal_investigator Mike Sinn + * Sets number_of_effect_changes_for_optimal_values + * @param int $number_of_effect_changes_for_optimal_values Example: 295 * @return $this */ - public function setPrincipalInvestigator($principal_investigator) + public function setNumberOfEffectChangesForOptimalValues($number_of_effect_changes_for_optimal_values) { - $this->container['principal_investigator'] = $principal_investigator; + $this->container['number_of_effect_changes_for_optimal_values'] = $number_of_effect_changes_for_optimal_values; return $this; } /** - * Gets qm_score - * @return float + * Gets number_of_high_effect_pairs + * @return int */ - public function getQmScore() + public function getNumberOfHighEffectPairs() { - return $this->container['qm_score']; + return $this->container['number_of_high_effect_pairs']; } /** - * Sets qm_score - * @param float $qm_score Value representing the significance of the relationship as a function of crowdsourced insights, predictive strength, data quantity, and data quality + * Sets number_of_high_effect_pairs + * @param int $number_of_high_effect_pairs Example: 27 * @return $this */ - public function setQmScore($qm_score) + public function setNumberOfHighEffectPairs($number_of_high_effect_pairs) { - $this->container['qm_score'] = $qm_score; + $this->container['number_of_high_effect_pairs'] = $number_of_high_effect_pairs; return $this; } /** - * Gets reverse_correlation - * @return float + * Gets number_of_low_effect_pairs + * @return int */ - public function getReverseCorrelation() + public function getNumberOfLowEffectPairs() { - return $this->container['reverse_correlation']; + return $this->container['number_of_low_effect_pairs']; } /** - * Sets reverse_correlation - * @param float $reverse_correlation Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation. + * Sets number_of_low_effect_pairs + * @param int $number_of_low_effect_pairs Example: 57 * @return $this */ - public function setReverseCorrelation($reverse_correlation) + public function setNumberOfLowEffectPairs($number_of_low_effect_pairs) { - $this->container['reverse_correlation'] = $reverse_correlation; + $this->container['number_of_low_effect_pairs'] = $number_of_low_effect_pairs; return $this; } /** - * Gets significance_explanation - * @return string + * Gets number_of_samples + * @return int */ - public function getSignificanceExplanation() + public function getNumberOfSamples() { - return $this->container['significance_explanation']; + return $this->container['number_of_samples']; } /** - * Sets significance_explanation - * @param string $significance_explanation Using a two-tailed t-test with alpha = 0.05, it was determined that the change... + * Sets number_of_samples + * @param int $number_of_samples Example: 297 * @return $this */ - public function setSignificanceExplanation($significance_explanation) + public function setNumberOfSamples($number_of_samples) { - $this->container['significance_explanation'] = $significance_explanation; + $this->container['number_of_samples'] = $number_of_samples; return $this; } /** - * Gets statistical_significance - * @return string + * Gets number_of_unique_cause_values_for_optimal_values + * @return int */ - public function getStatisticalSignificance() + public function getNumberOfUniqueCauseValuesForOptimalValues() { - return $this->container['statistical_significance']; + return $this->container['number_of_unique_cause_values_for_optimal_values']; } /** - * Sets statistical_significance - * @param string $statistical_significance A function of the effect size and sample size + * Sets number_of_unique_cause_values_for_optimal_values + * @param int $number_of_unique_cause_values_for_optimal_values Example: 201 * @return $this */ - public function setStatisticalSignificance($statistical_significance) + public function setNumberOfUniqueCauseValuesForOptimalValues($number_of_unique_cause_values_for_optimal_values) { - $this->container['statistical_significance'] = $statistical_significance; + $this->container['number_of_unique_cause_values_for_optimal_values'] = $number_of_unique_cause_values_for_optimal_values; return $this; } /** - * Gets strength_level - * @return string + * Gets number_of_unique_effect_values_for_optimal_values + * @return int */ - public function getStrengthLevel() + public function getNumberOfUniqueEffectValuesForOptimalValues() { - return $this->container['strength_level']; + return $this->container['number_of_unique_effect_values_for_optimal_values']; } /** - * Sets strength_level - * @param string $strength_level weak, moderate, strong + * Sets number_of_unique_effect_values_for_optimal_values + * @param int $number_of_unique_effect_values_for_optimal_values Example: 264 * @return $this */ - public function setStrengthLevel($strength_level) + public function setNumberOfUniqueEffectValuesForOptimalValues($number_of_unique_effect_values_for_optimal_values) { - $this->container['strength_level'] = $strength_level; + $this->container['number_of_unique_effect_values_for_optimal_values'] = $number_of_unique_effect_values_for_optimal_values; return $this; } /** - * Gets study_abstract + * Gets number_of_users * @return string */ - public function getStudyAbstract() + public function getNumberOfUsers() { - return $this->container['study_abstract']; + return $this->container['number_of_users']; } /** - * Sets study_abstract - * @param string $study_abstract These data suggest with a high degree of confidence... + * Sets number_of_users + * @param string $number_of_users Example: * @return $this */ - public function setStudyAbstract($study_abstract) + public function setNumberOfUsers($number_of_users) { - $this->container['study_abstract'] = $study_abstract; + $this->container['number_of_users'] = $number_of_users; return $this; } /** - * Gets study_background - * @return string + * Gets optimal_change_spread + * @return double */ - public function getStudyBackground() + public function getOptimalChangeSpread() { - return $this->container['study_background']; + return $this->container['optimal_change_spread']; } /** - * Sets study_background - * @param string $study_background In order to reduce suffering through the advancement of human knowledge... + * Sets optimal_change_spread + * @param double $optimal_change_spread Example: 83.44 * @return $this */ - public function setStudyBackground($study_background) + public function setOptimalChangeSpread($optimal_change_spread) { - $this->container['study_background'] = $study_background; + $this->container['optimal_change_spread'] = $optimal_change_spread; return $this; } /** - * Gets study_design - * @return string + * Gets optimal_change_spread_significance + * @return double */ - public function getStudyDesign() + public function getOptimalChangeSpreadSignificance() { - return $this->container['study_design']; + return $this->container['optimal_change_spread_significance']; } /** - * Sets study_design - * @param string $study_design This study is based on data donated by one QuantiModo user... + * Sets optimal_change_spread_significance + * @param double $optimal_change_spread_significance Example: 0.99999999999917 * @return $this */ - public function setStudyDesign($study_design) + public function setOptimalChangeSpreadSignificance($optimal_change_spread_significance) { - $this->container['study_design'] = $study_design; + $this->container['optimal_change_spread_significance'] = $optimal_change_spread_significance; return $this; } /** - * Gets study_limitations - * @return string + * Gets pairs_over_time_chart_config + * @return \DateTime */ - public function getStudyLimitations() + public function getPairsOverTimeChartConfig() { - return $this->container['study_limitations']; + return $this->container['pairs_over_time_chart_config']; } /** - * Sets study_limitations - * @param string $study_limitations As with any human experiment, it was impossible to control for all potentially confounding variables... + * Sets pairs_over_time_chart_config + * @param \DateTime $pairs_over_time_chart_config Example: * @return $this */ - public function setStudyLimitations($study_limitations) + public function setPairsOverTimeChartConfig($pairs_over_time_chart_config) { - $this->container['study_limitations'] = $study_limitations; + $this->container['pairs_over_time_chart_config'] = $pairs_over_time_chart_config; return $this; } /** - * Gets study_link_dynamic + * Gets per_day_sentence_fragment * @return string */ - public function getStudyLinkDynamic() + public function getPerDaySentenceFragment() { - return $this->container['study_link_dynamic']; + return $this->container['per_day_sentence_fragment']; } /** - * Sets study_link_dynamic - * @param string $study_link_dynamic Url for the interactive study within the web app + * Sets per_day_sentence_fragment + * @param string $per_day_sentence_fragment Example: * @return $this */ - public function setStudyLinkDynamic($study_link_dynamic) + public function setPerDaySentenceFragment($per_day_sentence_fragment) { - $this->container['study_link_dynamic'] = $study_link_dynamic; + $this->container['per_day_sentence_fragment'] = $per_day_sentence_fragment; return $this; } /** - * Gets study_link_facebook - * @return string + * Gets raw_cause_measurement_significance + * @return double */ - public function getStudyLinkFacebook() + public function getRawCauseMeasurementSignificance() { - return $this->container['study_link_facebook']; + return $this->container['raw_cause_measurement_significance']; } /** - * Sets study_link_facebook - * @param string $study_link_facebook Url for sharing the study on Facebook + * Sets raw_cause_measurement_significance + * @param double $raw_cause_measurement_significance Example: 1 * @return $this */ - public function setStudyLinkFacebook($study_link_facebook) + public function setRawCauseMeasurementSignificance($raw_cause_measurement_significance) { - $this->container['study_link_facebook'] = $study_link_facebook; + $this->container['raw_cause_measurement_significance'] = $raw_cause_measurement_significance; return $this; } /** - * Gets study_link_google - * @return string + * Gets raw_effect_measurement_significance + * @return double */ - public function getStudyLinkGoogle() + public function getRawEffectMeasurementSignificance() { - return $this->container['study_link_google']; + return $this->container['raw_effect_measurement_significance']; } /** - * Sets study_link_google - * @param string $study_link_google Url for sharing the study on Google+ + * Sets raw_effect_measurement_significance + * @param double $raw_effect_measurement_significance Example: 1 * @return $this */ - public function setStudyLinkGoogle($study_link_google) + public function setRawEffectMeasurementSignificance($raw_effect_measurement_significance) { - $this->container['study_link_google'] = $study_link_google; + $this->container['raw_effect_measurement_significance'] = $raw_effect_measurement_significance; return $this; } /** - * Gets study_link_twitter + * Gets reverse_pairs_count * @return string */ - public function getStudyLinkTwitter() + public function getReversePairsCount() { - return $this->container['study_link_twitter']; + return $this->container['reverse_pairs_count']; } /** - * Sets study_link_twitter - * @param string $study_link_twitter Url for sharing the study on Twitter + * Sets reverse_pairs_count + * @param string $reverse_pairs_count Example: * @return $this */ - public function setStudyLinkTwitter($study_link_twitter) + public function setReversePairsCount($reverse_pairs_count) { - $this->container['study_link_twitter'] = $study_link_twitter; + $this->container['reverse_pairs_count'] = $reverse_pairs_count; return $this; } /** - * Gets study_link_static - * @return string + * Gets vote_statistical_significance + * @return int */ - public function getStudyLinkStatic() + public function getVoteStatisticalSignificance() { - return $this->container['study_link_static']; + return $this->container['vote_statistical_significance']; } /** - * Sets study_link_static - * @param string $study_link_static Url for sharing the statically rendered study on social media + * Sets vote_statistical_significance + * @param int $vote_statistical_significance Example: 1 * @return $this */ - public function setStudyLinkStatic($study_link_static) + public function setVoteStatisticalSignificance($vote_statistical_significance) { - $this->container['study_link_static'] = $study_link_static; + $this->container['vote_statistical_significance'] = $vote_statistical_significance; return $this; } /** - * Gets study_objective - * @return string + * Gets aggregate_qm_score + * @return double */ - public function getStudyObjective() + public function getAggregateQmScore() { - return $this->container['study_objective']; + return $this->container['aggregate_qm_score']; } /** - * Sets study_objective - * @param string $study_objective The objective of this study is to determine... + * Sets aggregate_qm_score + * @param double $aggregate_qm_score Example: 0.011598441286655 * @return $this */ - public function setStudyObjective($study_objective) + public function setAggregateQmScore($aggregate_qm_score) { - $this->container['study_objective'] = $study_objective; + $this->container['aggregate_qm_score'] = $aggregate_qm_score; return $this; } /** - * Gets study_results + * Gets cause_unit * @return string */ - public function getStudyResults() + public function getCauseUnit() { - return $this->container['study_results']; + return $this->container['cause_unit']; } /** - * Sets study_results - * @param string $study_results This analysis suggests that... + * Sets cause_unit + * @param string $cause_unit Unit of the predictor variable * @return $this */ - public function setStudyResults($study_results) + public function setCauseUnit($cause_unit) { - $this->container['study_results'] = $study_results; + $this->container['cause_unit'] = $cause_unit; return $this; } /** - * Gets study_title + * Gets cause_variable_common_alias * @return string */ - public function getStudyTitle() + public function getCauseVariableCommonAlias() { - return $this->container['study_title']; + return $this->container['cause_variable_common_alias']; } /** - * Sets study_title - * @param string $study_title N1 Study HIGHER Remeron predicts HIGHER Overall Mood + * Sets cause_variable_common_alias + * @param string $cause_variable_common_alias Example: * @return $this */ - public function setStudyTitle($study_title) + public function setCauseVariableCommonAlias($cause_variable_common_alias) { - $this->container['study_title'] = $study_title; + $this->container['cause_variable_common_alias'] = $cause_variable_common_alias; return $this; } /** - * Gets timestamp - * @return float + * Gets cause_variable_informational_url + * @return string */ - public function getTimestamp() + public function getCauseVariableInformationalUrl() { - return $this->container['timestamp']; + return $this->container['cause_variable_informational_url']; } /** - * Sets timestamp - * @param float $timestamp Time at which correlation was calculated + * Sets cause_variable_informational_url + * @param string $cause_variable_informational_url Example: * @return $this */ - public function setTimestamp($timestamp) + public function setCauseVariableInformationalUrl($cause_variable_informational_url) { - $this->container['timestamp'] = $timestamp; + $this->container['cause_variable_informational_url'] = $cause_variable_informational_url; return $this; } /** - * Gets updated_at - * @return \DateTime + * Gets cause_variable_product_url + * @return string */ - public function getUpdatedAt() + public function getCauseVariableProductUrl() { - return $this->container['updated_at']; + return $this->container['cause_variable_product_url']; } /** - * Sets updated_at - * @param \DateTime $updated_at When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. + * Sets cause_variable_product_url + * @param string $cause_variable_product_url Example: * @return $this */ - public function setUpdatedAt($updated_at) + public function setCauseVariableProductUrl($cause_variable_product_url) { - $this->container['updated_at'] = $updated_at; + $this->container['cause_variable_product_url'] = $cause_variable_product_url; return $this; } /** - * Gets user_vote - * @return float + * Gets effect_variable_informational_url + * @return string */ - public function getUserVote() + public function getEffectVariableInformationalUrl() { - return $this->container['user_vote']; + return $this->container['effect_variable_informational_url']; } /** - * Sets user_vote - * @param float $user_vote User Vote + * Sets effect_variable_informational_url + * @param string $effect_variable_informational_url Example: * @return $this */ - public function setUserVote($user_vote) + public function setEffectVariableInformationalUrl($effect_variable_informational_url) { - $this->container['user_vote'] = $user_vote; + $this->container['effect_variable_informational_url'] = $effect_variable_informational_url; return $this; } /** - * Gets value_predicting_high_outcome - * @return float + * Gets effect_variable_product_url + * @return string */ - public function getValuePredictingHighOutcome() + public function getEffectVariableProductUrl() { - return $this->container['value_predicting_high_outcome']; + return $this->container['effect_variable_product_url']; } /** - * Sets value_predicting_high_outcome - * @param float $value_predicting_high_outcome cause value that predicts an above average effect value (in default unit for cause variable) + * Sets effect_variable_product_url + * @param string $effect_variable_product_url Example: * @return $this */ - public function setValuePredictingHighOutcome($value_predicting_high_outcome) + public function setEffectVariableProductUrl($effect_variable_product_url) { - $this->container['value_predicting_high_outcome'] = $value_predicting_high_outcome; + $this->container['effect_variable_product_url'] = $effect_variable_product_url; return $this; } /** - * Gets value_predicting_high_outcome_explanation - * @return string + * Gets forward_pearson_correlation_coefficient + * @return double */ - public function getValuePredictingHighOutcomeExplanation() + public function getForwardPearsonCorrelationCoefficient() { - return $this->container['value_predicting_high_outcome_explanation']; + return $this->container['forward_pearson_correlation_coefficient']; } /** - * Sets value_predicting_high_outcome_explanation - * @param string $value_predicting_high_outcome_explanation Overall Mood, on average, 34% HIGHER after around 3.98mg Remeron + * Sets forward_pearson_correlation_coefficient + * @param double $forward_pearson_correlation_coefficient Example: 0.0333 * @return $this */ - public function setValuePredictingHighOutcomeExplanation($value_predicting_high_outcome_explanation) + public function setForwardPearsonCorrelationCoefficient($forward_pearson_correlation_coefficient) { - $this->container['value_predicting_high_outcome_explanation'] = $value_predicting_high_outcome_explanation; + $this->container['forward_pearson_correlation_coefficient'] = $forward_pearson_correlation_coefficient; return $this; } /** - * Gets value_predicting_low_outcome - * @return float + * Gets number_of_correlations + * @return int */ - public function getValuePredictingLowOutcome() + public function getNumberOfCorrelations() { - return $this->container['value_predicting_low_outcome']; + return $this->container['number_of_correlations']; } /** - * Sets value_predicting_low_outcome - * @param float $value_predicting_low_outcome cause value that predicts a below average effect value (in default unit for cause variable) + * Sets number_of_correlations + * @param int $number_of_correlations Example: 6 * @return $this */ - public function setValuePredictingLowOutcome($value_predicting_low_outcome) + public function setNumberOfCorrelations($number_of_correlations) { - $this->container['value_predicting_low_outcome'] = $value_predicting_low_outcome; + $this->container['number_of_correlations'] = $number_of_correlations; return $this; } /** - * Gets value_predicting_low_outcome_explanation + * Gets vote * @return string */ - public function getValuePredictingLowOutcomeExplanation() + public function getVote() { - return $this->container['value_predicting_low_outcome_explanation']; + return $this->container['vote']; } /** - * Sets value_predicting_low_outcome_explanation - * @param string $value_predicting_low_outcome_explanation Overall Mood, on average, 4% LOWER after around 0mg Remeron + * Sets vote + * @param string $vote Example: * @return $this */ - public function setValuePredictingLowOutcomeExplanation($value_predicting_low_outcome_explanation) + public function setVote($vote) { - $this->container['value_predicting_low_outcome_explanation'] = $value_predicting_low_outcome_explanation; + $this->container['vote'] = $vote; return $this; } diff --git a/lib/Model/CorrelationArray.php b/lib/Model/CorrelationArray.php new file mode 100644 index 0000000..dac2425 --- /dev/null +++ b/lib/Model/CorrelationArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Credential.php b/lib/Model/Credential.php deleted file mode 100644 index 81467bc..0000000 --- a/lib/Model/Credential.php +++ /dev/null @@ -1,359 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * Credential Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class Credential implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'Credential'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'user_id' => 'int', - 'connector_id' => 'int', - 'attr_key' => 'string', - 'attr_value' => 'string', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'user_id' => 'userId', - 'connector_id' => 'connectorId', - 'attr_key' => 'attrKey', - 'attr_value' => 'attrValue', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'user_id' => 'setUserId', - 'connector_id' => 'setConnectorId', - 'attr_key' => 'setAttrKey', - 'attr_value' => 'setAttrValue', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'user_id' => 'getUserId', - 'connector_id' => 'getConnectorId', - 'attr_key' => 'getAttrKey', - 'attr_value' => 'getAttrValue', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; - $this->container['connector_id'] = isset($data['connector_id']) ? $data['connector_id'] : null; - $this->container['attr_key'] = isset($data['attr_key']) ? $data['attr_key'] : null; - $this->container['attr_value'] = isset($data['attr_value']) ? $data['attr_value'] : null; - $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; - $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets user_id - * @return int - */ - public function getUserId() - { - return $this->container['user_id']; - } - - /** - * Sets user_id - * @param int $user_id ID of user that owns this credential - * @return $this - */ - public function setUserId($user_id) - { - $this->container['user_id'] = $user_id; - - return $this; - } - - /** - * Gets connector_id - * @return int - */ - public function getConnectorId() - { - return $this->container['connector_id']; - } - - /** - * Sets connector_id - * @param int $connector_id The id for the connector data source from which the credential was obtained - * @return $this - */ - public function setConnectorId($connector_id) - { - $this->container['connector_id'] = $connector_id; - - return $this; - } - - /** - * Gets attr_key - * @return string - */ - public function getAttrKey() - { - return $this->container['attr_key']; - } - - /** - * Sets attr_key - * @param string $attr_key Attribute name such as token, userid, username, or password - * @return $this - */ - public function setAttrKey($attr_key) - { - $this->container['attr_key'] = $attr_key; - - return $this; - } - - /** - * Gets attr_value - * @return string - */ - public function getAttrValue() - { - return $this->container['attr_value']; - } - - /** - * Sets attr_value - * @param string $attr_value Encrypted value for the attribute specified - * @return $this - */ - public function setAttrValue($attr_value) - { - $this->container['attr_value'] = $attr_value; - - return $this; - } - - /** - * Gets created_at - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * @param \DateTime $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format - * @return $this - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * @return \DateTime - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * @param \DateTime $updated_at When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format - * @return $this - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/Credit.php b/lib/Model/Credit.php new file mode 100644 index 0000000..01de581 --- /dev/null +++ b/lib/Model/Credit.php @@ -0,0 +1,248 @@ + 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'enabled' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['enabled'] === null) { + $invalid_properties[] = "'enabled' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['enabled'] === null) { + return false; + } + return true; + } + + + /** + * Gets enabled + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * @param bool $enabled Example: false + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DataSource.php b/lib/Model/DataSource.php new file mode 100644 index 0000000..b43b967 --- /dev/null +++ b/lib/Model/DataSource.php @@ -0,0 +1,644 @@ + 'bool', + 'connector_client_id' => 'string', + 'default_variable_category_name' => 'string', + 'display_name' => 'string', + 'enabled' => 'int', + 'get_it_url' => 'string', + 'id' => 'int', + 'image' => 'string', + 'image_html' => 'string', + 'linked_display_name_html' => 'string', + 'long_description' => 'string', + 'name' => 'string', + 'short_description' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'affiliate' => null, + 'connector_client_id' => null, + 'default_variable_category_name' => null, + 'display_name' => null, + 'enabled' => null, + 'get_it_url' => null, + 'id' => null, + 'image' => null, + 'image_html' => null, + 'linked_display_name_html' => null, + 'long_description' => null, + 'name' => null, + 'short_description' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'affiliate' => 'affiliate', + 'connector_client_id' => 'connectorClientId', + 'default_variable_category_name' => 'defaultVariableCategoryName', + 'display_name' => 'displayName', + 'enabled' => 'enabled', + 'get_it_url' => 'getItUrl', + 'id' => 'id', + 'image' => 'image', + 'image_html' => 'imageHtml', + 'linked_display_name_html' => 'linkedDisplayNameHtml', + 'long_description' => 'longDescription', + 'name' => 'name', + 'short_description' => 'shortDescription' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'affiliate' => 'setAffiliate', + 'connector_client_id' => 'setConnectorClientId', + 'default_variable_category_name' => 'setDefaultVariableCategoryName', + 'display_name' => 'setDisplayName', + 'enabled' => 'setEnabled', + 'get_it_url' => 'setGetItUrl', + 'id' => 'setId', + 'image' => 'setImage', + 'image_html' => 'setImageHtml', + 'linked_display_name_html' => 'setLinkedDisplayNameHtml', + 'long_description' => 'setLongDescription', + 'name' => 'setName', + 'short_description' => 'setShortDescription' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'affiliate' => 'getAffiliate', + 'connector_client_id' => 'getConnectorClientId', + 'default_variable_category_name' => 'getDefaultVariableCategoryName', + 'display_name' => 'getDisplayName', + 'enabled' => 'getEnabled', + 'get_it_url' => 'getGetItUrl', + 'id' => 'getId', + 'image' => 'getImage', + 'image_html' => 'getImageHtml', + 'linked_display_name_html' => 'getLinkedDisplayNameHtml', + 'long_description' => 'getLongDescription', + 'name' => 'getName', + 'short_description' => 'getShortDescription' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['affiliate'] = isset($data['affiliate']) ? $data['affiliate'] : null; + $this->container['connector_client_id'] = isset($data['connector_client_id']) ? $data['connector_client_id'] : null; + $this->container['default_variable_category_name'] = isset($data['default_variable_category_name']) ? $data['default_variable_category_name'] : null; + $this->container['display_name'] = isset($data['display_name']) ? $data['display_name'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['get_it_url'] = isset($data['get_it_url']) ? $data['get_it_url'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['image'] = isset($data['image']) ? $data['image'] : null; + $this->container['image_html'] = isset($data['image_html']) ? $data['image_html'] : null; + $this->container['linked_display_name_html'] = isset($data['linked_display_name_html']) ? $data['linked_display_name_html'] : null; + $this->container['long_description'] = isset($data['long_description']) ? $data['long_description'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['short_description'] = isset($data['short_description']) ? $data['short_description'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['affiliate'] === null) { + $invalid_properties[] = "'affiliate' can't be null"; + } + if ($this->container['connector_client_id'] === null) { + $invalid_properties[] = "'connector_client_id' can't be null"; + } + if ($this->container['default_variable_category_name'] === null) { + $invalid_properties[] = "'default_variable_category_name' can't be null"; + } + if ($this->container['display_name'] === null) { + $invalid_properties[] = "'display_name' can't be null"; + } + if ($this->container['enabled'] === null) { + $invalid_properties[] = "'enabled' can't be null"; + } + if ($this->container['get_it_url'] === null) { + $invalid_properties[] = "'get_it_url' can't be null"; + } + if ($this->container['id'] === null) { + $invalid_properties[] = "'id' can't be null"; + } + if ($this->container['image'] === null) { + $invalid_properties[] = "'image' can't be null"; + } + if ($this->container['image_html'] === null) { + $invalid_properties[] = "'image_html' can't be null"; + } + if ($this->container['linked_display_name_html'] === null) { + $invalid_properties[] = "'linked_display_name_html' can't be null"; + } + if ($this->container['long_description'] === null) { + $invalid_properties[] = "'long_description' can't be null"; + } + if ($this->container['name'] === null) { + $invalid_properties[] = "'name' can't be null"; + } + if ($this->container['short_description'] === null) { + $invalid_properties[] = "'short_description' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['affiliate'] === null) { + return false; + } + if ($this->container['connector_client_id'] === null) { + return false; + } + if ($this->container['default_variable_category_name'] === null) { + return false; + } + if ($this->container['display_name'] === null) { + return false; + } + if ($this->container['enabled'] === null) { + return false; + } + if ($this->container['get_it_url'] === null) { + return false; + } + if ($this->container['id'] === null) { + return false; + } + if ($this->container['image'] === null) { + return false; + } + if ($this->container['image_html'] === null) { + return false; + } + if ($this->container['linked_display_name_html'] === null) { + return false; + } + if ($this->container['long_description'] === null) { + return false; + } + if ($this->container['name'] === null) { + return false; + } + if ($this->container['short_description'] === null) { + return false; + } + return true; + } + + + /** + * Gets affiliate + * @return bool + */ + public function getAffiliate() + { + return $this->container['affiliate']; + } + + /** + * Sets affiliate + * @param bool $affiliate Example: true + * @return $this + */ + public function setAffiliate($affiliate) + { + $this->container['affiliate'] = $affiliate; + + return $this; + } + + /** + * Gets connector_client_id + * @return string + */ + public function getConnectorClientId() + { + return $this->container['connector_client_id']; + } + + /** + * Sets connector_client_id + * @param string $connector_client_id Example: ba7d0c12432650e23b3ce924ae2d21e2ff59e7e4e28650759633700af7ed0a30 + * @return $this + */ + public function setConnectorClientId($connector_client_id) + { + $this->container['connector_client_id'] = $connector_client_id; + + return $this; + } + + /** + * Gets default_variable_category_name + * @return string + */ + public function getDefaultVariableCategoryName() + { + return $this->container['default_variable_category_name']; + } + + /** + * Sets default_variable_category_name + * @param string $default_variable_category_name Example: Foods + * @return $this + */ + public function setDefaultVariableCategoryName($default_variable_category_name) + { + $this->container['default_variable_category_name'] = $default_variable_category_name; + + return $this; + } + + /** + * Gets display_name + * @return string + */ + public function getDisplayName() + { + return $this->container['display_name']; + } + + /** + * Sets display_name + * @param string $display_name Example: QuantiModo + * @return $this + */ + public function setDisplayName($display_name) + { + $this->container['display_name'] = $display_name; + + return $this; + } + + /** + * Gets enabled + * @return int + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * @param int $enabled Example: 0 + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets get_it_url + * @return string + */ + public function getGetItUrl() + { + return $this->container['get_it_url']; + } + + /** + * Sets get_it_url + * @param string $get_it_url Example: https://quantimo.do + * @return $this + */ + public function setGetItUrl($get_it_url) + { + $this->container['get_it_url'] = $get_it_url; + + return $this; + } + + /** + * Gets id + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param int $id Example: 72 + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets image + * @return string + */ + public function getImage() + { + return $this->container['image']; + } + + /** + * Sets image + * @param string $image Example: https://app.quantimo.do/ionic/Modo/www/img/logos/quantimodo-logo-qm-rainbow-200-200.png + * @return $this + */ + public function setImage($image) + { + $this->container['image'] = $image; + + return $this; + } + + /** + * Gets image_html + * @return string + */ + public function getImageHtml() + { + return $this->container['image_html']; + } + + /** + * Sets image_html + * @param string $image_html Example: \"QuantiModo\" + * @return $this + */ + public function setImageHtml($image_html) + { + $this->container['image_html'] = $image_html; + + return $this; + } + + /** + * Gets linked_display_name_html + * @return string + */ + public function getLinkedDisplayNameHtml() + { + return $this->container['linked_display_name_html']; + } + + /** + * Sets linked_display_name_html + * @param string $linked_display_name_html Example: QuantiModo + * @return $this + */ + public function setLinkedDisplayNameHtml($linked_display_name_html) + { + $this->container['linked_display_name_html'] = $linked_display_name_html; + + return $this; + } + + /** + * Gets long_description + * @return string + */ + public function getLongDescription() + { + return $this->container['long_description']; + } + + /** + * Sets long_description + * @param string $long_description Example: QuantiModo is a Chrome extension, Android app, iOS app, and web app that allows you to easily track mood, symptoms, or any outcome you want to optimize in a fraction of a second. You can also import your data from over 30 other apps and devices like Fitbit, Rescuetime, Jawbone Up, Withings, Facebook, Github, Google Calendar, Runkeeper, MoodPanda, Slice, Google Fit, and more. QuantiModo then analyzes your data to identify which hidden factors are most likely to be influencing your mood or symptoms and their optimal daily values. + * @return $this + */ + public function setLongDescription($long_description) + { + $this->container['long_description'] = $long_description; + + return $this; + } + + /** + * Gets name + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * @param string $name Example: quantimodo + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets short_description + * @return string + */ + public function getShortDescription() + { + return $this->container['short_description']; + } + + /** + * Sets short_description + * @param string $short_description Example: Tracks anything + * @return $this + */ + public function setShortDescription($short_description) + { + $this->container['short_description'] = $short_description; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Explanation.php b/lib/Model/Explanation.php new file mode 100644 index 0000000..2709a82 --- /dev/null +++ b/lib/Model/Explanation.php @@ -0,0 +1,380 @@ + 'string', + 'image' => '\QuantiModo\Client\Model\Image', + 'ion_icon' => 'string', + 'start_tracking' => '\QuantiModo\Client\Model\ExplanationStartTracking', + 'title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'description' => null, + 'image' => null, + 'ion_icon' => null, + 'start_tracking' => null, + 'title' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'description' => 'description', + 'image' => 'image', + 'ion_icon' => 'ionIcon', + 'start_tracking' => 'startTracking', + 'title' => 'title' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription', + 'image' => 'setImage', + 'ion_icon' => 'setIonIcon', + 'start_tracking' => 'setStartTracking', + 'title' => 'setTitle' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription', + 'image' => 'getImage', + 'ion_icon' => 'getIonIcon', + 'start_tracking' => 'getStartTracking', + 'title' => 'getTitle' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['image'] = isset($data['image']) ? $data['image'] : null; + $this->container['ion_icon'] = isset($data['ion_icon']) ? $data['ion_icon'] : null; + $this->container['start_tracking'] = isset($data['start_tracking']) ? $data['start_tracking'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['description'] === null) { + $invalid_properties[] = "'description' can't be null"; + } + if ($this->container['image'] === null) { + $invalid_properties[] = "'image' can't be null"; + } + if ($this->container['ion_icon'] === null) { + $invalid_properties[] = "'ion_icon' can't be null"; + } + if ($this->container['start_tracking'] === null) { + $invalid_properties[] = "'start_tracking' can't be null"; + } + if ($this->container['title'] === null) { + $invalid_properties[] = "'title' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['description'] === null) { + return false; + } + if ($this->container['image'] === null) { + return false; + } + if ($this->container['ion_icon'] === null) { + return false; + } + if ($this->container['start_tracking'] === null) { + return false; + } + if ($this->container['title'] === null) { + return false; + } + return true; + } + + + /** + * Gets description + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * @param string $description Example: These factors are most predictive of Overall Mood based on your own data. + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets image + * @return \QuantiModo\Client\Model\Image + */ + public function getImage() + { + return $this->container['image']; + } + + /** + * Sets image + * @param \QuantiModo\Client\Model\Image $image + * @return $this + */ + public function setImage($image) + { + $this->container['image'] = $image; + + return $this; + } + + /** + * Gets ion_icon + * @return string + */ + public function getIonIcon() + { + return $this->container['ion_icon']; + } + + /** + * Sets ion_icon + * @param string $ion_icon Example: ion-ios-person + * @return $this + */ + public function setIonIcon($ion_icon) + { + $this->container['ion_icon'] = $ion_icon; + + return $this; + } + + /** + * Gets start_tracking + * @return \QuantiModo\Client\Model\ExplanationStartTracking + */ + public function getStartTracking() + { + return $this->container['start_tracking']; + } + + /** + * Sets start_tracking + * @param \QuantiModo\Client\Model\ExplanationStartTracking $start_tracking + * @return $this + */ + public function setStartTracking($start_tracking) + { + $this->container['start_tracking'] = $start_tracking; + + return $this; + } + + /** + * Gets title + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * @param string $title Example: Top Predictors of Overall Mood + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ExplanationStartTracking.php b/lib/Model/ExplanationStartTracking.php new file mode 100644 index 0000000..651577d --- /dev/null +++ b/lib/Model/ExplanationStartTracking.php @@ -0,0 +1,314 @@ + '\QuantiModo\Client\Model\Button', + 'description' => 'string', + 'title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'button' => null, + 'description' => null, + 'title' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'button' => 'button', + 'description' => 'description', + 'title' => 'title' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'button' => 'setButton', + 'description' => 'setDescription', + 'title' => 'setTitle' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'button' => 'getButton', + 'description' => 'getDescription', + 'title' => 'getTitle' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['button'] = isset($data['button']) ? $data['button'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['button'] === null) { + $invalid_properties[] = "'button' can't be null"; + } + if ($this->container['description'] === null) { + $invalid_properties[] = "'description' can't be null"; + } + if ($this->container['title'] === null) { + $invalid_properties[] = "'title' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['button'] === null) { + return false; + } + if ($this->container['description'] === null) { + return false; + } + if ($this->container['title'] === null) { + return false; + } + return true; + } + + + /** + * Gets button + * @return \QuantiModo\Client\Model\Button + */ + public function getButton() + { + return $this->container['button']; + } + + /** + * Sets button + * @param \QuantiModo\Client\Model\Button $button + * @return $this + */ + public function setButton($button) + { + $this->container['button'] = $button; + + return $this; + } + + /** + * Gets description + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * @param string $description Example: The more data I have the more accurate your results will be so track regularly! + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets title + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * @param string $title Example: Improve Accuracy + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetConnectorsResponse.php b/lib/Model/GetConnectorsResponse.php new file mode 100644 index 0000000..61f9855 --- /dev/null +++ b/lib/Model/GetConnectorsResponse.php @@ -0,0 +1,335 @@ + '\QuantiModo\Client\Model\Connector[]', + 'message' => 'string', + 'status' => 'int', + 'success' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'connectors' => null, + 'message' => null, + 'status' => null, + 'success' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'connectors' => 'connectors', + 'message' => 'message', + 'status' => 'status', + 'success' => 'success' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'connectors' => 'setConnectors', + 'message' => 'setMessage', + 'status' => 'setStatus', + 'success' => 'setSuccess' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'connectors' => 'getConnectors', + 'message' => 'getMessage', + 'status' => 'getStatus', + 'success' => 'getSuccess' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['connectors'] = isset($data['connectors']) ? $data['connectors'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['status'] === null) { + $invalid_properties[] = "'status' can't be null"; + } + if ($this->container['success'] === null) { + $invalid_properties[] = "'success' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['status'] === null) { + return false; + } + if ($this->container['success'] === null) { + return false; + } + return true; + } + + + /** + * Gets connectors + * @return \QuantiModo\Client\Model\Connector[] + */ + public function getConnectors() + { + return $this->container['connectors']; + } + + /** + * Sets connectors + * @param \QuantiModo\Client\Model\Connector[] $connectors + * @return $this + */ + public function setConnectors($connectors) + { + $this->container['connectors'] = $connectors; + + return $this; + } + + /** + * Gets message + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * @param string $message Message + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets status + * @return int + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * @param int $status Status code + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets success + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * @param bool $success + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetCorrelationsDataResponse.php b/lib/Model/GetCorrelationsDataResponse.php new file mode 100644 index 0000000..3928e00 --- /dev/null +++ b/lib/Model/GetCorrelationsDataResponse.php @@ -0,0 +1,281 @@ + '\QuantiModo\Client\Model\Correlation[]', + 'explanation' => '\QuantiModo\Client\Model\Explanation' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'correlations' => null, + 'explanation' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'correlations' => 'correlations', + 'explanation' => 'explanation' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'correlations' => 'setCorrelations', + 'explanation' => 'setExplanation' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'correlations' => 'getCorrelations', + 'explanation' => 'getExplanation' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['correlations'] = isset($data['correlations']) ? $data['correlations'] : null; + $this->container['explanation'] = isset($data['explanation']) ? $data['explanation'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['correlations'] === null) { + $invalid_properties[] = "'correlations' can't be null"; + } + if ($this->container['explanation'] === null) { + $invalid_properties[] = "'explanation' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['correlations'] === null) { + return false; + } + if ($this->container['explanation'] === null) { + return false; + } + return true; + } + + + /** + * Gets correlations + * @return \QuantiModo\Client\Model\Correlation[] + */ + public function getCorrelations() + { + return $this->container['correlations']; + } + + /** + * Sets correlations + * @param \QuantiModo\Client\Model\Correlation[] $correlations + * @return $this + */ + public function setCorrelations($correlations) + { + $this->container['correlations'] = $correlations; + + return $this; + } + + /** + * Gets explanation + * @return \QuantiModo\Client\Model\Explanation + */ + public function getExplanation() + { + return $this->container['explanation']; + } + + /** + * Sets explanation + * @param \QuantiModo\Client\Model\Explanation $explanation + * @return $this + */ + public function setExplanation($explanation) + { + $this->container['explanation'] = $explanation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetCorrelationsResponse.php b/lib/Model/GetCorrelationsResponse.php new file mode 100644 index 0000000..071fb57 --- /dev/null +++ b/lib/Model/GetCorrelationsResponse.php @@ -0,0 +1,335 @@ + '\QuantiModo\Client\Model\GetCorrelationsDataResponse', + 'message' => 'string', + 'status' => 'int', + 'success' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'data' => null, + 'message' => null, + 'status' => null, + 'success' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'message' => 'message', + 'status' => 'status', + 'success' => 'success' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'message' => 'setMessage', + 'status' => 'setStatus', + 'success' => 'setSuccess' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'message' => 'getMessage', + 'status' => 'getStatus', + 'success' => 'getSuccess' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['status'] === null) { + $invalid_properties[] = "'status' can't be null"; + } + if ($this->container['success'] === null) { + $invalid_properties[] = "'success' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['status'] === null) { + return false; + } + if ($this->container['success'] === null) { + return false; + } + return true; + } + + + /** + * Gets data + * @return \QuantiModo\Client\Model\GetCorrelationsDataResponse + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * @param \QuantiModo\Client\Model\GetCorrelationsDataResponse $data + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets message + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * @param string $message Message + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets status + * @return int + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * @param int $status Status code + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets success + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * @param bool $success + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetMeasurementsResponse.php b/lib/Model/GetMeasurementsResponse.php new file mode 100644 index 0000000..0fcd008 --- /dev/null +++ b/lib/Model/GetMeasurementsResponse.php @@ -0,0 +1,1133 @@ + 'string', + 'created_at' => '\DateTime', + 'id' => 'int', + 'input_type' => 'string', + 'ion_icon' => 'string', + 'manual_tracking' => 'bool', + 'maximum_allowed_value' => 'int', + 'minimum_allowed_value' => 'int', + 'original_unit_abbreviated_name' => 'string', + 'original_unit_category_id' => 'int', + 'original_unit_category_name' => 'string', + 'original_unit_id' => 'int', + 'original_unit_name' => 'string', + 'original_value' => 'double', + 'png_path' => 'string', + 'png_url' => 'string', + 'source_name' => 'string', + 'start_time_epoch' => 'int', + 'start_time_string' => '\DateTime', + 'svg_url' => 'string', + 'unit_abbreviated_name' => 'string', + 'unit_category_id' => 'int', + 'unit_category_name' => 'string', + 'unit_id' => 'int', + 'unit_name' => 'string', + 'updated_at' => '\DateTime', + 'user_variable_variable_category_id' => 'int', + 'user_variable_variable_category_name' => 'string', + 'value' => 'double', + 'variable_category_id' => 'int', + 'variable_category_image_url' => 'string', + 'variable_category_name' => 'string', + 'variable_id' => 'int', + 'variable_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'client_id' => null, + 'created_at' => 'date-time', + 'id' => null, + 'input_type' => null, + 'ion_icon' => null, + 'manual_tracking' => null, + 'maximum_allowed_value' => null, + 'minimum_allowed_value' => null, + 'original_unit_abbreviated_name' => null, + 'original_unit_category_id' => null, + 'original_unit_category_name' => null, + 'original_unit_id' => null, + 'original_unit_name' => null, + 'original_value' => 'double', + 'png_path' => null, + 'png_url' => null, + 'source_name' => null, + 'start_time_epoch' => null, + 'start_time_string' => 'date-time', + 'svg_url' => null, + 'unit_abbreviated_name' => null, + 'unit_category_id' => null, + 'unit_category_name' => null, + 'unit_id' => null, + 'unit_name' => null, + 'updated_at' => 'date-time', + 'user_variable_variable_category_id' => null, + 'user_variable_variable_category_name' => null, + 'value' => 'double', + 'variable_category_id' => null, + 'variable_category_image_url' => null, + 'variable_category_name' => null, + 'variable_id' => null, + 'variable_name' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'client_id' => 'clientId', + 'created_at' => 'createdAt', + 'id' => 'id', + 'input_type' => 'inputType', + 'ion_icon' => 'ionIcon', + 'manual_tracking' => 'manualTracking', + 'maximum_allowed_value' => 'maximumAllowedValue', + 'minimum_allowed_value' => 'minimumAllowedValue', + 'original_unit_abbreviated_name' => 'originalUnitAbbreviatedName', + 'original_unit_category_id' => 'originalUnitCategoryId', + 'original_unit_category_name' => 'originalUnitCategoryName', + 'original_unit_id' => 'originalUnitId', + 'original_unit_name' => 'originalUnitName', + 'original_value' => 'originalValue', + 'png_path' => 'pngPath', + 'png_url' => 'pngUrl', + 'source_name' => 'sourceName', + 'start_time_epoch' => 'startTimeEpoch', + 'start_time_string' => 'startTimeString', + 'svg_url' => 'svgUrl', + 'unit_abbreviated_name' => 'unitAbbreviatedName', + 'unit_category_id' => 'unitCategoryId', + 'unit_category_name' => 'unitCategoryName', + 'unit_id' => 'unitId', + 'unit_name' => 'unitName', + 'updated_at' => 'updatedAt', + 'user_variable_variable_category_id' => 'userVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'userVariableVariableCategoryName', + 'value' => 'value', + 'variable_category_id' => 'variableCategoryId', + 'variable_category_image_url' => 'variableCategoryImageUrl', + 'variable_category_name' => 'variableCategoryName', + 'variable_id' => 'variableId', + 'variable_name' => 'variableName' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'client_id' => 'setClientId', + 'created_at' => 'setCreatedAt', + 'id' => 'setId', + 'input_type' => 'setInputType', + 'ion_icon' => 'setIonIcon', + 'manual_tracking' => 'setManualTracking', + 'maximum_allowed_value' => 'setMaximumAllowedValue', + 'minimum_allowed_value' => 'setMinimumAllowedValue', + 'original_unit_abbreviated_name' => 'setOriginalUnitAbbreviatedName', + 'original_unit_category_id' => 'setOriginalUnitCategoryId', + 'original_unit_category_name' => 'setOriginalUnitCategoryName', + 'original_unit_id' => 'setOriginalUnitId', + 'original_unit_name' => 'setOriginalUnitName', + 'original_value' => 'setOriginalValue', + 'png_path' => 'setPngPath', + 'png_url' => 'setPngUrl', + 'source_name' => 'setSourceName', + 'start_time_epoch' => 'setStartTimeEpoch', + 'start_time_string' => 'setStartTimeString', + 'svg_url' => 'setSvgUrl', + 'unit_abbreviated_name' => 'setUnitAbbreviatedName', + 'unit_category_id' => 'setUnitCategoryId', + 'unit_category_name' => 'setUnitCategoryName', + 'unit_id' => 'setUnitId', + 'unit_name' => 'setUnitName', + 'updated_at' => 'setUpdatedAt', + 'user_variable_variable_category_id' => 'setUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'setUserVariableVariableCategoryName', + 'value' => 'setValue', + 'variable_category_id' => 'setVariableCategoryId', + 'variable_category_image_url' => 'setVariableCategoryImageUrl', + 'variable_category_name' => 'setVariableCategoryName', + 'variable_id' => 'setVariableId', + 'variable_name' => 'setVariableName' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'client_id' => 'getClientId', + 'created_at' => 'getCreatedAt', + 'id' => 'getId', + 'input_type' => 'getInputType', + 'ion_icon' => 'getIonIcon', + 'manual_tracking' => 'getManualTracking', + 'maximum_allowed_value' => 'getMaximumAllowedValue', + 'minimum_allowed_value' => 'getMinimumAllowedValue', + 'original_unit_abbreviated_name' => 'getOriginalUnitAbbreviatedName', + 'original_unit_category_id' => 'getOriginalUnitCategoryId', + 'original_unit_category_name' => 'getOriginalUnitCategoryName', + 'original_unit_id' => 'getOriginalUnitId', + 'original_unit_name' => 'getOriginalUnitName', + 'original_value' => 'getOriginalValue', + 'png_path' => 'getPngPath', + 'png_url' => 'getPngUrl', + 'source_name' => 'getSourceName', + 'start_time_epoch' => 'getStartTimeEpoch', + 'start_time_string' => 'getStartTimeString', + 'svg_url' => 'getSvgUrl', + 'unit_abbreviated_name' => 'getUnitAbbreviatedName', + 'unit_category_id' => 'getUnitCategoryId', + 'unit_category_name' => 'getUnitCategoryName', + 'unit_id' => 'getUnitId', + 'unit_name' => 'getUnitName', + 'updated_at' => 'getUpdatedAt', + 'user_variable_variable_category_id' => 'getUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'getUserVariableVariableCategoryName', + 'value' => 'getValue', + 'variable_category_id' => 'getVariableCategoryId', + 'variable_category_image_url' => 'getVariableCategoryImageUrl', + 'variable_category_name' => 'getVariableCategoryName', + 'variable_id' => 'getVariableId', + 'variable_name' => 'getVariableName' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['client_id'] = isset($data['client_id']) ? $data['client_id'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['input_type'] = isset($data['input_type']) ? $data['input_type'] : null; + $this->container['ion_icon'] = isset($data['ion_icon']) ? $data['ion_icon'] : null; + $this->container['manual_tracking'] = isset($data['manual_tracking']) ? $data['manual_tracking'] : null; + $this->container['maximum_allowed_value'] = isset($data['maximum_allowed_value']) ? $data['maximum_allowed_value'] : null; + $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; + $this->container['original_unit_abbreviated_name'] = isset($data['original_unit_abbreviated_name']) ? $data['original_unit_abbreviated_name'] : null; + $this->container['original_unit_category_id'] = isset($data['original_unit_category_id']) ? $data['original_unit_category_id'] : null; + $this->container['original_unit_category_name'] = isset($data['original_unit_category_name']) ? $data['original_unit_category_name'] : null; + $this->container['original_unit_id'] = isset($data['original_unit_id']) ? $data['original_unit_id'] : null; + $this->container['original_unit_name'] = isset($data['original_unit_name']) ? $data['original_unit_name'] : null; + $this->container['original_value'] = isset($data['original_value']) ? $data['original_value'] : null; + $this->container['png_path'] = isset($data['png_path']) ? $data['png_path'] : null; + $this->container['png_url'] = isset($data['png_url']) ? $data['png_url'] : null; + $this->container['source_name'] = isset($data['source_name']) ? $data['source_name'] : null; + $this->container['start_time_epoch'] = isset($data['start_time_epoch']) ? $data['start_time_epoch'] : null; + $this->container['start_time_string'] = isset($data['start_time_string']) ? $data['start_time_string'] : null; + $this->container['svg_url'] = isset($data['svg_url']) ? $data['svg_url'] : null; + $this->container['unit_abbreviated_name'] = isset($data['unit_abbreviated_name']) ? $data['unit_abbreviated_name'] : null; + $this->container['unit_category_id'] = isset($data['unit_category_id']) ? $data['unit_category_id'] : null; + $this->container['unit_category_name'] = isset($data['unit_category_name']) ? $data['unit_category_name'] : null; + $this->container['unit_id'] = isset($data['unit_id']) ? $data['unit_id'] : null; + $this->container['unit_name'] = isset($data['unit_name']) ? $data['unit_name'] : null; + $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; + $this->container['user_variable_variable_category_id'] = isset($data['user_variable_variable_category_id']) ? $data['user_variable_variable_category_id'] : null; + $this->container['user_variable_variable_category_name'] = isset($data['user_variable_variable_category_name']) ? $data['user_variable_variable_category_name'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['variable_category_id'] = isset($data['variable_category_id']) ? $data['variable_category_id'] : null; + $this->container['variable_category_image_url'] = isset($data['variable_category_image_url']) ? $data['variable_category_image_url'] : null; + $this->container['variable_category_name'] = isset($data['variable_category_name']) ? $data['variable_category_name'] : null; + $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; + $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets client_id + * @return string + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * @param string $client_id Example: pImUNsI6T5Ysd81k + * @return $this + */ + public function setClientId($client_id) + { + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets created_at + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * @param \DateTime $created_at Example: 2017-08-09 19:19:05 + * @return $this + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets id + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param int $id Example: 1060761015 + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets input_type + * @return string + */ + public function getInputType() + { + return $this->container['input_type']; + } + + /** + * Sets input_type + * @param string $input_type Example: oneToFiveNumbers + * @return $this + */ + public function setInputType($input_type) + { + $this->container['input_type'] = $input_type; + + return $this; + } + + /** + * Gets ion_icon + * @return string + */ + public function getIonIcon() + { + return $this->container['ion_icon']; + } + + /** + * Sets ion_icon + * @param string $ion_icon Example: ion-happy-outline + * @return $this + */ + public function setIonIcon($ion_icon) + { + $this->container['ion_icon'] = $ion_icon; + + return $this; + } + + /** + * Gets manual_tracking + * @return bool + */ + public function getManualTracking() + { + return $this->container['manual_tracking']; + } + + /** + * Sets manual_tracking + * @param bool $manual_tracking Example: true + * @return $this + */ + public function setManualTracking($manual_tracking) + { + $this->container['manual_tracking'] = $manual_tracking; + + return $this; + } + + /** + * Gets maximum_allowed_value + * @return int + */ + public function getMaximumAllowedValue() + { + return $this->container['maximum_allowed_value']; + } + + /** + * Sets maximum_allowed_value + * @param int $maximum_allowed_value Example: 5 + * @return $this + */ + public function setMaximumAllowedValue($maximum_allowed_value) + { + $this->container['maximum_allowed_value'] = $maximum_allowed_value; + + return $this; + } + + /** + * Gets minimum_allowed_value + * @return int + */ + public function getMinimumAllowedValue() + { + return $this->container['minimum_allowed_value']; + } + + /** + * Sets minimum_allowed_value + * @param int $minimum_allowed_value Example: 1 + * @return $this + */ + public function setMinimumAllowedValue($minimum_allowed_value) + { + $this->container['minimum_allowed_value'] = $minimum_allowed_value; + + return $this; + } + + /** + * Gets original_unit_abbreviated_name + * @return string + */ + public function getOriginalUnitAbbreviatedName() + { + return $this->container['original_unit_abbreviated_name']; + } + + /** + * Sets original_unit_abbreviated_name + * @param string $original_unit_abbreviated_name Example: /5 + * @return $this + */ + public function setOriginalUnitAbbreviatedName($original_unit_abbreviated_name) + { + $this->container['original_unit_abbreviated_name'] = $original_unit_abbreviated_name; + + return $this; + } + + /** + * Gets original_unit_category_id + * @return int + */ + public function getOriginalUnitCategoryId() + { + return $this->container['original_unit_category_id']; + } + + /** + * Sets original_unit_category_id + * @param int $original_unit_category_id Example: 5 + * @return $this + */ + public function setOriginalUnitCategoryId($original_unit_category_id) + { + $this->container['original_unit_category_id'] = $original_unit_category_id; + + return $this; + } + + /** + * Gets original_unit_category_name + * @return string + */ + public function getOriginalUnitCategoryName() + { + return $this->container['original_unit_category_name']; + } + + /** + * Sets original_unit_category_name + * @param string $original_unit_category_name Example: Rating + * @return $this + */ + public function setOriginalUnitCategoryName($original_unit_category_name) + { + $this->container['original_unit_category_name'] = $original_unit_category_name; + + return $this; + } + + /** + * Gets original_unit_id + * @return int + */ + public function getOriginalUnitId() + { + return $this->container['original_unit_id']; + } + + /** + * Sets original_unit_id + * @param int $original_unit_id Example: 10 + * @return $this + */ + public function setOriginalUnitId($original_unit_id) + { + $this->container['original_unit_id'] = $original_unit_id; + + return $this; + } + + /** + * Gets original_unit_name + * @return string + */ + public function getOriginalUnitName() + { + return $this->container['original_unit_name']; + } + + /** + * Sets original_unit_name + * @param string $original_unit_name Example: 1 to 5 Rating + * @return $this + */ + public function setOriginalUnitName($original_unit_name) + { + $this->container['original_unit_name'] = $original_unit_name; + + return $this; + } + + /** + * Gets original_value + * @return double + */ + public function getOriginalValue() + { + return $this->container['original_value']; + } + + /** + * Sets original_value + * @param double $original_value Example: 1 + * @return $this + */ + public function setOriginalValue($original_value) + { + $this->container['original_value'] = $original_value; + + return $this; + } + + /** + * Gets png_path + * @return string + */ + public function getPngPath() + { + return $this->container['png_path']; + } + + /** + * Sets png_path + * @param string $png_path Example: img/rating/100/numeric_rating_button_100_1.png + * @return $this + */ + public function setPngPath($png_path) + { + $this->container['png_path'] = $png_path; + + return $this; + } + + /** + * Gets png_url + * @return string + */ + public function getPngUrl() + { + return $this->container['png_url']; + } + + /** + * Sets png_url + * @param string $png_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.png + * @return $this + */ + public function setPngUrl($png_url) + { + $this->container['png_url'] = $png_url; + + return $this; + } + + /** + * Gets source_name + * @return string + */ + public function getSourceName() + { + return $this->container['source_name']; + } + + /** + * Sets source_name + * @param string $source_name Example: pImUNsI6T5Ysd81k + * @return $this + */ + public function setSourceName($source_name) + { + $this->container['source_name'] = $source_name; + + return $this; + } + + /** + * Gets start_time_epoch + * @return int + */ + public function getStartTimeEpoch() + { + return $this->container['start_time_epoch']; + } + + /** + * Sets start_time_epoch + * @param int $start_time_epoch Example: 1502306315 + * @return $this + */ + public function setStartTimeEpoch($start_time_epoch) + { + $this->container['start_time_epoch'] = $start_time_epoch; + + return $this; + } + + /** + * Gets start_time_string + * @return \DateTime + */ + public function getStartTimeString() + { + return $this->container['start_time_string']; + } + + /** + * Sets start_time_string + * @param \DateTime $start_time_string Example: 2017-08-09T19:18:35+00:00 + * @return $this + */ + public function setStartTimeString($start_time_string) + { + $this->container['start_time_string'] = $start_time_string; + + return $this; + } + + /** + * Gets svg_url + * @return string + */ + public function getSvgUrl() + { + return $this->container['svg_url']; + } + + /** + * Sets svg_url + * @param string $svg_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.svg + * @return $this + */ + public function setSvgUrl($svg_url) + { + $this->container['svg_url'] = $svg_url; + + return $this; + } + + /** + * Gets unit_abbreviated_name + * @return string + */ + public function getUnitAbbreviatedName() + { + return $this->container['unit_abbreviated_name']; + } + + /** + * Sets unit_abbreviated_name + * @param string $unit_abbreviated_name Example: /5 + * @return $this + */ + public function setUnitAbbreviatedName($unit_abbreviated_name) + { + $this->container['unit_abbreviated_name'] = $unit_abbreviated_name; + + return $this; + } + + /** + * Gets unit_category_id + * @return int + */ + public function getUnitCategoryId() + { + return $this->container['unit_category_id']; + } + + /** + * Sets unit_category_id + * @param int $unit_category_id Example: 5 + * @return $this + */ + public function setUnitCategoryId($unit_category_id) + { + $this->container['unit_category_id'] = $unit_category_id; + + return $this; + } + + /** + * Gets unit_category_name + * @return string + */ + public function getUnitCategoryName() + { + return $this->container['unit_category_name']; + } + + /** + * Sets unit_category_name + * @param string $unit_category_name Example: Rating + * @return $this + */ + public function setUnitCategoryName($unit_category_name) + { + $this->container['unit_category_name'] = $unit_category_name; + + return $this; + } + + /** + * Gets unit_id + * @return int + */ + public function getUnitId() + { + return $this->container['unit_id']; + } + + /** + * Sets unit_id + * @param int $unit_id Example: 10 + * @return $this + */ + public function setUnitId($unit_id) + { + $this->container['unit_id'] = $unit_id; + + return $this; + } + + /** + * Gets unit_name + * @return string + */ + public function getUnitName() + { + return $this->container['unit_name']; + } + + /** + * Sets unit_name + * @param string $unit_name Example: 1 to 5 Rating + * @return $this + */ + public function setUnitName($unit_name) + { + $this->container['unit_name'] = $unit_name; + + return $this; + } + + /** + * Gets updated_at + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * @param \DateTime $updated_at Example: 2017-08-09 19:19:05 + * @return $this + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets user_variable_variable_category_id + * @return int + */ + public function getUserVariableVariableCategoryId() + { + return $this->container['user_variable_variable_category_id']; + } + + /** + * Sets user_variable_variable_category_id + * @param int $user_variable_variable_category_id Example: 1 + * @return $this + */ + public function setUserVariableVariableCategoryId($user_variable_variable_category_id) + { + $this->container['user_variable_variable_category_id'] = $user_variable_variable_category_id; + + return $this; + } + + /** + * Gets user_variable_variable_category_name + * @return string + */ + public function getUserVariableVariableCategoryName() + { + return $this->container['user_variable_variable_category_name']; + } + + /** + * Sets user_variable_variable_category_name + * @param string $user_variable_variable_category_name Example: Emotions + * @return $this + */ + public function setUserVariableVariableCategoryName($user_variable_variable_category_name) + { + $this->container['user_variable_variable_category_name'] = $user_variable_variable_category_name; + + return $this; + } + + /** + * Gets value + * @return double + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * @param double $value Example: 1 + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets variable_category_id + * @return int + */ + public function getVariableCategoryId() + { + return $this->container['variable_category_id']; + } + + /** + * Sets variable_category_id + * @param int $variable_category_id Example: 1 + * @return $this + */ + public function setVariableCategoryId($variable_category_id) + { + $this->container['variable_category_id'] = $variable_category_id; + + return $this; + } + + /** + * Gets variable_category_image_url + * @return string + */ + public function getVariableCategoryImageUrl() + { + return $this->container['variable_category_image_url']; + } + + /** + * Sets variable_category_image_url + * @param string $variable_category_image_url Example: https://maxcdn.icons8.com/Color/PNG/96/Cinema/theatre_mask-96.png + * @return $this + */ + public function setVariableCategoryImageUrl($variable_category_image_url) + { + $this->container['variable_category_image_url'] = $variable_category_image_url; + + return $this; + } + + /** + * Gets variable_category_name + * @return string + */ + public function getVariableCategoryName() + { + return $this->container['variable_category_name']; + } + + /** + * Sets variable_category_name + * @param string $variable_category_name Example: Emotions + * @return $this + */ + public function setVariableCategoryName($variable_category_name) + { + $this->container['variable_category_name'] = $variable_category_name; + + return $this; + } + + /** + * Gets variable_id + * @return int + */ + public function getVariableId() + { + return $this->container['variable_id']; + } + + /** + * Sets variable_id + * @param int $variable_id Example: 5970988 + * @return $this + */ + public function setVariableId($variable_id) + { + $this->container['variable_id'] = $variable_id; + + return $this; + } + + /** + * Gets variable_name + * @return string + */ + public function getVariableName() + { + return $this->container['variable_name']; + } + + /** + * Sets variable_name + * @param string $variable_name Example: Unique Test Variable 1502306315 + * @return $this + */ + public function setVariableName($variable_name) + { + $this->container['variable_name'] = $variable_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetMeasurementsResponseArray.php b/lib/Model/GetMeasurementsResponseArray.php new file mode 100644 index 0000000..a43f61f --- /dev/null +++ b/lib/Model/GetMeasurementsResponseArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetPairsResponse.php b/lib/Model/GetPairsResponse.php new file mode 100644 index 0000000..0cd7fc1 --- /dev/null +++ b/lib/Model/GetPairsResponse.php @@ -0,0 +1,377 @@ + 'double', + 'cause_measurement_value' => 'double', + 'effect_measurement' => 'double', + 'effect_measurement_value' => 'double', + 'start_time_string' => '\DateTime', + 'timestamp' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'cause_measurement' => 'double', + 'cause_measurement_value' => 'double', + 'effect_measurement' => 'double', + 'effect_measurement_value' => 'double', + 'start_time_string' => 'date-time', + 'timestamp' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'cause_measurement' => 'causeMeasurement', + 'cause_measurement_value' => 'causeMeasurementValue', + 'effect_measurement' => 'effectMeasurement', + 'effect_measurement_value' => 'effectMeasurementValue', + 'start_time_string' => 'startTimeString', + 'timestamp' => 'timestamp' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'cause_measurement' => 'setCauseMeasurement', + 'cause_measurement_value' => 'setCauseMeasurementValue', + 'effect_measurement' => 'setEffectMeasurement', + 'effect_measurement_value' => 'setEffectMeasurementValue', + 'start_time_string' => 'setStartTimeString', + 'timestamp' => 'setTimestamp' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'cause_measurement' => 'getCauseMeasurement', + 'cause_measurement_value' => 'getCauseMeasurementValue', + 'effect_measurement' => 'getEffectMeasurement', + 'effect_measurement_value' => 'getEffectMeasurementValue', + 'start_time_string' => 'getStartTimeString', + 'timestamp' => 'getTimestamp' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['cause_measurement'] = isset($data['cause_measurement']) ? $data['cause_measurement'] : null; + $this->container['cause_measurement_value'] = isset($data['cause_measurement_value']) ? $data['cause_measurement_value'] : null; + $this->container['effect_measurement'] = isset($data['effect_measurement']) ? $data['effect_measurement'] : null; + $this->container['effect_measurement_value'] = isset($data['effect_measurement_value']) ? $data['effect_measurement_value'] : null; + $this->container['start_time_string'] = isset($data['start_time_string']) ? $data['start_time_string'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets cause_measurement + * @return double + */ + public function getCauseMeasurement() + { + return $this->container['cause_measurement']; + } + + /** + * Sets cause_measurement + * @param double $cause_measurement Example: 2.0166666666667 + * @return $this + */ + public function setCauseMeasurement($cause_measurement) + { + $this->container['cause_measurement'] = $cause_measurement; + + return $this; + } + + /** + * Gets cause_measurement_value + * @return double + */ + public function getCauseMeasurementValue() + { + return $this->container['cause_measurement_value']; + } + + /** + * Sets cause_measurement_value + * @param double $cause_measurement_value Example: 2.0166666666667 + * @return $this + */ + public function setCauseMeasurementValue($cause_measurement_value) + { + $this->container['cause_measurement_value'] = $cause_measurement_value; + + return $this; + } + + /** + * Gets effect_measurement + * @return double + */ + public function getEffectMeasurement() + { + return $this->container['effect_measurement']; + } + + /** + * Sets effect_measurement + * @param double $effect_measurement Example: 4 + * @return $this + */ + public function setEffectMeasurement($effect_measurement) + { + $this->container['effect_measurement'] = $effect_measurement; + + return $this; + } + + /** + * Gets effect_measurement_value + * @return double + */ + public function getEffectMeasurementValue() + { + return $this->container['effect_measurement_value']; + } + + /** + * Sets effect_measurement_value + * @param double $effect_measurement_value Example: 4 + * @return $this + */ + public function setEffectMeasurementValue($effect_measurement_value) + { + $this->container['effect_measurement_value'] = $effect_measurement_value; + + return $this; + } + + /** + * Gets start_time_string + * @return \DateTime + */ + public function getStartTimeString() + { + return $this->container['start_time_string']; + } + + /** + * Sets start_time_string + * @param \DateTime $start_time_string Example: 2015-08-06 15:49:02 + * @return $this + */ + public function setStartTimeString($start_time_string) + { + $this->container['start_time_string'] = $start_time_string; + + return $this; + } + + /** + * Gets timestamp + * @return int + */ + public function getTimestamp() + { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * @param int $timestamp Example: 1438876142 + * @return $this + */ + public function setTimestamp($timestamp) + { + $this->container['timestamp'] = $timestamp; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetPairsResponseArray.php b/lib/Model/GetPairsResponseArray.php new file mode 100644 index 0000000..436303a --- /dev/null +++ b/lib/Model/GetPairsResponseArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetPublicVariablesResponse.php b/lib/Model/GetPublicVariablesResponse.php new file mode 100644 index 0000000..8105f3f --- /dev/null +++ b/lib/Model/GetPublicVariablesResponse.php @@ -0,0 +1,1808 @@ + '\QuantiModo\Client\Model\Unit[]', + 'category' => 'string', + 'cause_only' => 'bool', + 'combination_operation' => 'string', + 'common_alias' => 'string', + 'created_at' => '\DateTime', + 'unit_abbreviated_name' => 'string', + 'unit_category_id' => 'int', + 'unit_category_name' => 'string', + 'unit_id' => 'int', + 'unit_name' => 'string', + 'description' => 'string', + 'duration_of_action' => 'int', + 'duration_of_action_in_hours' => 'int', + 'id' => 'int', + 'input_type' => 'string', + 'ion_icon' => 'string', + 'kurtosis' => 'double', + 'manual_tracking' => 'bool', + 'maximum_allowed_value' => 'int', + 'mean' => 'double', + 'median' => 'double', + 'minimum_allowed_value' => 'int', + 'most_common_connector_id' => 'int', + 'most_common_original_unit_id' => 'int', + 'most_common_value' => 'double', + 'name' => 'string', + 'number_of_aggregate_correlations_as_cause' => 'int', + 'number_of_aggregate_correlations_as_effect' => 'int', + 'number_of_measurements' => 'int', + 'number_of_raw_measurements' => 'int', + 'number_of_tracking_reminders' => 'int', + 'number_of_unique_values' => 'int', + 'number_of_user_variables' => 'int', + 'onset_delay' => 'int', + 'onset_delay_in_hours' => 'int', + 'outcome' => 'bool', + 'png_path' => 'string', + 'png_url' => 'string', + 'public' => 'bool', + 'second_most_common_value' => 'double', + 'skewness' => 'double', + 'standard_deviation' => 'double', + 'svg_url' => 'string', + 'third_most_common_value' => 'double', + 'updated_at' => '\DateTime', + 'user_variable_unit_abbreviated_name' => 'string', + 'user_variable_unit_category_id' => 'int', + 'user_variable_unit_category_name' => 'string', + 'user_variable_unit_id' => 'int', + 'user_variable_unit_name' => 'string', + 'user_variable_variable_category_id' => 'int', + 'user_variable_variable_category_name' => 'string', + 'valence' => 'string', + 'variable_category_id' => 'int', + 'variable_category_image_url' => 'string', + 'variable_category_name' => 'string', + 'variable_name' => 'string', + 'variance' => 'double' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'available_units' => null, + 'category' => null, + 'cause_only' => null, + 'combination_operation' => null, + 'common_alias' => null, + 'created_at' => 'date-time', + 'unit_abbreviated_name' => null, + 'unit_category_id' => null, + 'unit_category_name' => null, + 'unit_id' => null, + 'unit_name' => null, + 'description' => null, + 'duration_of_action' => null, + 'duration_of_action_in_hours' => null, + 'id' => null, + 'input_type' => null, + 'ion_icon' => null, + 'kurtosis' => 'double', + 'manual_tracking' => null, + 'maximum_allowed_value' => null, + 'mean' => 'double', + 'median' => 'double', + 'minimum_allowed_value' => null, + 'most_common_connector_id' => null, + 'most_common_original_unit_id' => null, + 'most_common_value' => 'double', + 'name' => null, + 'number_of_aggregate_correlations_as_cause' => null, + 'number_of_aggregate_correlations_as_effect' => null, + 'number_of_measurements' => null, + 'number_of_raw_measurements' => null, + 'number_of_tracking_reminders' => null, + 'number_of_unique_values' => null, + 'number_of_user_variables' => null, + 'onset_delay' => null, + 'onset_delay_in_hours' => null, + 'outcome' => null, + 'png_path' => null, + 'png_url' => null, + 'public' => null, + 'second_most_common_value' => 'double', + 'skewness' => 'double', + 'standard_deviation' => 'double', + 'svg_url' => null, + 'third_most_common_value' => 'double', + 'updated_at' => 'date-time', + 'user_variable_unit_abbreviated_name' => null, + 'user_variable_unit_category_id' => null, + 'user_variable_unit_category_name' => null, + 'user_variable_unit_id' => null, + 'user_variable_unit_name' => null, + 'user_variable_variable_category_id' => null, + 'user_variable_variable_category_name' => null, + 'valence' => null, + 'variable_category_id' => null, + 'variable_category_image_url' => null, + 'variable_category_name' => null, + 'variable_name' => null, + 'variance' => 'double' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'available_units' => 'availableUnits', + 'category' => 'category', + 'cause_only' => 'causeOnly', + 'combination_operation' => 'combinationOperation', + 'common_alias' => 'commonAlias', + 'created_at' => 'createdAt', + 'unit_abbreviated_name' => 'unitAbbreviatedName', + 'unit_category_id' => 'unitCategoryId', + 'unit_category_name' => 'unitCategoryName', + 'unit_id' => 'unitId', + 'unit_name' => 'unitName', + 'description' => 'description', + 'duration_of_action' => 'durationOfAction', + 'duration_of_action_in_hours' => 'durationOfActionInHours', + 'id' => 'id', + 'input_type' => 'inputType', + 'ion_icon' => 'ionIcon', + 'kurtosis' => 'kurtosis', + 'manual_tracking' => 'manualTracking', + 'maximum_allowed_value' => 'maximumAllowedValue', + 'mean' => 'mean', + 'median' => 'median', + 'minimum_allowed_value' => 'minimumAllowedValue', + 'most_common_connector_id' => 'mostCommonConnectorId', + 'most_common_original_unit_id' => 'mostCommonOriginalUnitId', + 'most_common_value' => 'mostCommonValue', + 'name' => 'name', + 'number_of_aggregate_correlations_as_cause' => 'numberOfAggregateCorrelationsAsCause', + 'number_of_aggregate_correlations_as_effect' => 'numberOfAggregateCorrelationsAsEffect', + 'number_of_measurements' => 'numberOfMeasurements', + 'number_of_raw_measurements' => 'numberOfRawMeasurements', + 'number_of_tracking_reminders' => 'numberOfTrackingReminders', + 'number_of_unique_values' => 'numberOfUniqueValues', + 'number_of_user_variables' => 'numberOfUserVariables', + 'onset_delay' => 'onsetDelay', + 'onset_delay_in_hours' => 'onsetDelayInHours', + 'outcome' => 'outcome', + 'png_path' => 'pngPath', + 'png_url' => 'pngUrl', + 'public' => 'public', + 'second_most_common_value' => 'secondMostCommonValue', + 'skewness' => 'skewness', + 'standard_deviation' => 'standardDeviation', + 'svg_url' => 'svgUrl', + 'third_most_common_value' => 'thirdMostCommonValue', + 'updated_at' => 'updatedAt', + 'user_variable_unit_abbreviated_name' => 'userVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'userVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'userVariableUnitCategoryName', + 'user_variable_unit_id' => 'userVariableUnitId', + 'user_variable_unit_name' => 'userVariableUnitName', + 'user_variable_variable_category_id' => 'userVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'userVariableVariableCategoryName', + 'valence' => 'valence', + 'variable_category_id' => 'variableCategoryId', + 'variable_category_image_url' => 'variableCategoryImageUrl', + 'variable_category_name' => 'variableCategoryName', + 'variable_name' => 'variableName', + 'variance' => 'variance' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'available_units' => 'setAvailableUnits', + 'category' => 'setCategory', + 'cause_only' => 'setCauseOnly', + 'combination_operation' => 'setCombinationOperation', + 'common_alias' => 'setCommonAlias', + 'created_at' => 'setCreatedAt', + 'unit_abbreviated_name' => 'setUnitAbbreviatedName', + 'unit_category_id' => 'setUnitCategoryId', + 'unit_category_name' => 'setUnitCategoryName', + 'unit_id' => 'setUnitId', + 'unit_name' => 'setUnitName', + 'description' => 'setDescription', + 'duration_of_action' => 'setDurationOfAction', + 'duration_of_action_in_hours' => 'setDurationOfActionInHours', + 'id' => 'setId', + 'input_type' => 'setInputType', + 'ion_icon' => 'setIonIcon', + 'kurtosis' => 'setKurtosis', + 'manual_tracking' => 'setManualTracking', + 'maximum_allowed_value' => 'setMaximumAllowedValue', + 'mean' => 'setMean', + 'median' => 'setMedian', + 'minimum_allowed_value' => 'setMinimumAllowedValue', + 'most_common_connector_id' => 'setMostCommonConnectorId', + 'most_common_original_unit_id' => 'setMostCommonOriginalUnitId', + 'most_common_value' => 'setMostCommonValue', + 'name' => 'setName', + 'number_of_aggregate_correlations_as_cause' => 'setNumberOfAggregateCorrelationsAsCause', + 'number_of_aggregate_correlations_as_effect' => 'setNumberOfAggregateCorrelationsAsEffect', + 'number_of_measurements' => 'setNumberOfMeasurements', + 'number_of_raw_measurements' => 'setNumberOfRawMeasurements', + 'number_of_tracking_reminders' => 'setNumberOfTrackingReminders', + 'number_of_unique_values' => 'setNumberOfUniqueValues', + 'number_of_user_variables' => 'setNumberOfUserVariables', + 'onset_delay' => 'setOnsetDelay', + 'onset_delay_in_hours' => 'setOnsetDelayInHours', + 'outcome' => 'setOutcome', + 'png_path' => 'setPngPath', + 'png_url' => 'setPngUrl', + 'public' => 'setPublic', + 'second_most_common_value' => 'setSecondMostCommonValue', + 'skewness' => 'setSkewness', + 'standard_deviation' => 'setStandardDeviation', + 'svg_url' => 'setSvgUrl', + 'third_most_common_value' => 'setThirdMostCommonValue', + 'updated_at' => 'setUpdatedAt', + 'user_variable_unit_abbreviated_name' => 'setUserVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'setUserVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'setUserVariableUnitCategoryName', + 'user_variable_unit_id' => 'setUserVariableUnitId', + 'user_variable_unit_name' => 'setUserVariableUnitName', + 'user_variable_variable_category_id' => 'setUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'setUserVariableVariableCategoryName', + 'valence' => 'setValence', + 'variable_category_id' => 'setVariableCategoryId', + 'variable_category_image_url' => 'setVariableCategoryImageUrl', + 'variable_category_name' => 'setVariableCategoryName', + 'variable_name' => 'setVariableName', + 'variance' => 'setVariance' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'available_units' => 'getAvailableUnits', + 'category' => 'getCategory', + 'cause_only' => 'getCauseOnly', + 'combination_operation' => 'getCombinationOperation', + 'common_alias' => 'getCommonAlias', + 'created_at' => 'getCreatedAt', + 'unit_abbreviated_name' => 'getUnitAbbreviatedName', + 'unit_category_id' => 'getUnitCategoryId', + 'unit_category_name' => 'getUnitCategoryName', + 'unit_id' => 'getUnitId', + 'unit_name' => 'getUnitName', + 'description' => 'getDescription', + 'duration_of_action' => 'getDurationOfAction', + 'duration_of_action_in_hours' => 'getDurationOfActionInHours', + 'id' => 'getId', + 'input_type' => 'getInputType', + 'ion_icon' => 'getIonIcon', + 'kurtosis' => 'getKurtosis', + 'manual_tracking' => 'getManualTracking', + 'maximum_allowed_value' => 'getMaximumAllowedValue', + 'mean' => 'getMean', + 'median' => 'getMedian', + 'minimum_allowed_value' => 'getMinimumAllowedValue', + 'most_common_connector_id' => 'getMostCommonConnectorId', + 'most_common_original_unit_id' => 'getMostCommonOriginalUnitId', + 'most_common_value' => 'getMostCommonValue', + 'name' => 'getName', + 'number_of_aggregate_correlations_as_cause' => 'getNumberOfAggregateCorrelationsAsCause', + 'number_of_aggregate_correlations_as_effect' => 'getNumberOfAggregateCorrelationsAsEffect', + 'number_of_measurements' => 'getNumberOfMeasurements', + 'number_of_raw_measurements' => 'getNumberOfRawMeasurements', + 'number_of_tracking_reminders' => 'getNumberOfTrackingReminders', + 'number_of_unique_values' => 'getNumberOfUniqueValues', + 'number_of_user_variables' => 'getNumberOfUserVariables', + 'onset_delay' => 'getOnsetDelay', + 'onset_delay_in_hours' => 'getOnsetDelayInHours', + 'outcome' => 'getOutcome', + 'png_path' => 'getPngPath', + 'png_url' => 'getPngUrl', + 'public' => 'getPublic', + 'second_most_common_value' => 'getSecondMostCommonValue', + 'skewness' => 'getSkewness', + 'standard_deviation' => 'getStandardDeviation', + 'svg_url' => 'getSvgUrl', + 'third_most_common_value' => 'getThirdMostCommonValue', + 'updated_at' => 'getUpdatedAt', + 'user_variable_unit_abbreviated_name' => 'getUserVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'getUserVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'getUserVariableUnitCategoryName', + 'user_variable_unit_id' => 'getUserVariableUnitId', + 'user_variable_unit_name' => 'getUserVariableUnitName', + 'user_variable_variable_category_id' => 'getUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'getUserVariableVariableCategoryName', + 'valence' => 'getValence', + 'variable_category_id' => 'getVariableCategoryId', + 'variable_category_image_url' => 'getVariableCategoryImageUrl', + 'variable_category_name' => 'getVariableCategoryName', + 'variable_name' => 'getVariableName', + 'variance' => 'getVariance' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['available_units'] = isset($data['available_units']) ? $data['available_units'] : null; + $this->container['category'] = isset($data['category']) ? $data['category'] : null; + $this->container['cause_only'] = isset($data['cause_only']) ? $data['cause_only'] : null; + $this->container['combination_operation'] = isset($data['combination_operation']) ? $data['combination_operation'] : null; + $this->container['common_alias'] = isset($data['common_alias']) ? $data['common_alias'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['unit_abbreviated_name'] = isset($data['unit_abbreviated_name']) ? $data['unit_abbreviated_name'] : null; + $this->container['unit_category_id'] = isset($data['unit_category_id']) ? $data['unit_category_id'] : null; + $this->container['unit_category_name'] = isset($data['unit_category_name']) ? $data['unit_category_name'] : null; + $this->container['unit_id'] = isset($data['unit_id']) ? $data['unit_id'] : null; + $this->container['unit_name'] = isset($data['unit_name']) ? $data['unit_name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['duration_of_action'] = isset($data['duration_of_action']) ? $data['duration_of_action'] : null; + $this->container['duration_of_action_in_hours'] = isset($data['duration_of_action_in_hours']) ? $data['duration_of_action_in_hours'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['input_type'] = isset($data['input_type']) ? $data['input_type'] : null; + $this->container['ion_icon'] = isset($data['ion_icon']) ? $data['ion_icon'] : null; + $this->container['kurtosis'] = isset($data['kurtosis']) ? $data['kurtosis'] : null; + $this->container['manual_tracking'] = isset($data['manual_tracking']) ? $data['manual_tracking'] : null; + $this->container['maximum_allowed_value'] = isset($data['maximum_allowed_value']) ? $data['maximum_allowed_value'] : null; + $this->container['mean'] = isset($data['mean']) ? $data['mean'] : null; + $this->container['median'] = isset($data['median']) ? $data['median'] : null; + $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; + $this->container['most_common_connector_id'] = isset($data['most_common_connector_id']) ? $data['most_common_connector_id'] : null; + $this->container['most_common_original_unit_id'] = isset($data['most_common_original_unit_id']) ? $data['most_common_original_unit_id'] : null; + $this->container['most_common_value'] = isset($data['most_common_value']) ? $data['most_common_value'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['number_of_aggregate_correlations_as_cause'] = isset($data['number_of_aggregate_correlations_as_cause']) ? $data['number_of_aggregate_correlations_as_cause'] : null; + $this->container['number_of_aggregate_correlations_as_effect'] = isset($data['number_of_aggregate_correlations_as_effect']) ? $data['number_of_aggregate_correlations_as_effect'] : null; + $this->container['number_of_measurements'] = isset($data['number_of_measurements']) ? $data['number_of_measurements'] : null; + $this->container['number_of_raw_measurements'] = isset($data['number_of_raw_measurements']) ? $data['number_of_raw_measurements'] : null; + $this->container['number_of_tracking_reminders'] = isset($data['number_of_tracking_reminders']) ? $data['number_of_tracking_reminders'] : null; + $this->container['number_of_unique_values'] = isset($data['number_of_unique_values']) ? $data['number_of_unique_values'] : null; + $this->container['number_of_user_variables'] = isset($data['number_of_user_variables']) ? $data['number_of_user_variables'] : null; + $this->container['onset_delay'] = isset($data['onset_delay']) ? $data['onset_delay'] : null; + $this->container['onset_delay_in_hours'] = isset($data['onset_delay_in_hours']) ? $data['onset_delay_in_hours'] : null; + $this->container['outcome'] = isset($data['outcome']) ? $data['outcome'] : null; + $this->container['png_path'] = isset($data['png_path']) ? $data['png_path'] : null; + $this->container['png_url'] = isset($data['png_url']) ? $data['png_url'] : null; + $this->container['public'] = isset($data['public']) ? $data['public'] : null; + $this->container['second_most_common_value'] = isset($data['second_most_common_value']) ? $data['second_most_common_value'] : null; + $this->container['skewness'] = isset($data['skewness']) ? $data['skewness'] : null; + $this->container['standard_deviation'] = isset($data['standard_deviation']) ? $data['standard_deviation'] : null; + $this->container['svg_url'] = isset($data['svg_url']) ? $data['svg_url'] : null; + $this->container['third_most_common_value'] = isset($data['third_most_common_value']) ? $data['third_most_common_value'] : null; + $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; + $this->container['user_variable_unit_abbreviated_name'] = isset($data['user_variable_unit_abbreviated_name']) ? $data['user_variable_unit_abbreviated_name'] : null; + $this->container['user_variable_unit_category_id'] = isset($data['user_variable_unit_category_id']) ? $data['user_variable_unit_category_id'] : null; + $this->container['user_variable_unit_category_name'] = isset($data['user_variable_unit_category_name']) ? $data['user_variable_unit_category_name'] : null; + $this->container['user_variable_unit_id'] = isset($data['user_variable_unit_id']) ? $data['user_variable_unit_id'] : null; + $this->container['user_variable_unit_name'] = isset($data['user_variable_unit_name']) ? $data['user_variable_unit_name'] : null; + $this->container['user_variable_variable_category_id'] = isset($data['user_variable_variable_category_id']) ? $data['user_variable_variable_category_id'] : null; + $this->container['user_variable_variable_category_name'] = isset($data['user_variable_variable_category_name']) ? $data['user_variable_variable_category_name'] : null; + $this->container['valence'] = isset($data['valence']) ? $data['valence'] : null; + $this->container['variable_category_id'] = isset($data['variable_category_id']) ? $data['variable_category_id'] : null; + $this->container['variable_category_image_url'] = isset($data['variable_category_image_url']) ? $data['variable_category_image_url'] : null; + $this->container['variable_category_name'] = isset($data['variable_category_name']) ? $data['variable_category_name'] : null; + $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; + $this->container['variance'] = isset($data['variance']) ? $data['variance'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets available_units + * @return \QuantiModo\Client\Model\Unit[] + */ + public function getAvailableUnits() + { + return $this->container['available_units']; + } + + /** + * Sets available_units + * @param \QuantiModo\Client\Model\Unit[] $available_units + * @return $this + */ + public function setAvailableUnits($available_units) + { + $this->container['available_units'] = $available_units; + + return $this; + } + + /** + * Gets category + * @return string + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * @param string $category Example: Emotions + * @return $this + */ + public function setCategory($category) + { + $this->container['category'] = $category; + + return $this; + } + + /** + * Gets cause_only + * @return bool + */ + public function getCauseOnly() + { + return $this->container['cause_only']; + } + + /** + * Sets cause_only + * @param bool $cause_only Example: false + * @return $this + */ + public function setCauseOnly($cause_only) + { + $this->container['cause_only'] = $cause_only; + + return $this; + } + + /** + * Gets combination_operation + * @return string + */ + public function getCombinationOperation() + { + return $this->container['combination_operation']; + } + + /** + * Sets combination_operation + * @param string $combination_operation Example: MEAN + * @return $this + */ + public function setCombinationOperation($combination_operation) + { + $this->container['combination_operation'] = $combination_operation; + + return $this; + } + + /** + * Gets common_alias + * @return string + */ + public function getCommonAlias() + { + return $this->container['common_alias']; + } + + /** + * Sets common_alias + * @param string $common_alias Example: Mood_(psychology) + * @return $this + */ + public function setCommonAlias($common_alias) + { + $this->container['common_alias'] = $common_alias; + + return $this; + } + + /** + * Gets created_at + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * @param \DateTime $created_at Example: 2015-03-05 05:01:48 + * @return $this + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets unit_abbreviated_name + * @return string + */ + public function getUnitAbbreviatedName() + { + return $this->container['unit_abbreviated_name']; + } + + /** + * Sets unit_abbreviated_name + * @param string $unit_abbreviated_name Example: /5 + * @return $this + */ + public function setUnitAbbreviatedName($unit_abbreviated_name) + { + $this->container['unit_abbreviated_name'] = $unit_abbreviated_name; + + return $this; + } + + /** + * Gets unit_category_id + * @return int + */ + public function getUnitCategoryId() + { + return $this->container['unit_category_id']; + } + + /** + * Sets unit_category_id + * @param int $unit_category_id Example: 5 + * @return $this + */ + public function setUnitCategoryId($unit_category_id) + { + $this->container['unit_category_id'] = $unit_category_id; + + return $this; + } + + /** + * Gets unit_category_name + * @return string + */ + public function getUnitCategoryName() + { + return $this->container['unit_category_name']; + } + + /** + * Sets unit_category_name + * @param string $unit_category_name Example: Rating + * @return $this + */ + public function setUnitCategoryName($unit_category_name) + { + $this->container['unit_category_name'] = $unit_category_name; + + return $this; + } + + /** + * Gets unit_id + * @return int + */ + public function getUnitId() + { + return $this->container['unit_id']; + } + + /** + * Sets unit_id + * @param int $unit_id Example: 10 + * @return $this + */ + public function setUnitId($unit_id) + { + $this->container['unit_id'] = $unit_id; + + return $this; + } + + /** + * Gets unit_name + * @return string + */ + public function getUnitName() + { + return $this->container['unit_name']; + } + + /** + * Sets unit_name + * @param string $unit_name Example: 1 to 5 Rating + * @return $this + */ + public function setUnitName($unit_name) + { + $this->container['unit_name'] = $unit_name; + + return $this; + } + + /** + * Gets description + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * @param string $description Example: positive + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets duration_of_action + * @return int + */ + public function getDurationOfAction() + { + return $this->container['duration_of_action']; + } + + /** + * Sets duration_of_action + * @param int $duration_of_action Example: 86400 + * @return $this + */ + public function setDurationOfAction($duration_of_action) + { + $this->container['duration_of_action'] = $duration_of_action; + + return $this; + } + + /** + * Gets duration_of_action_in_hours + * @return int + */ + public function getDurationOfActionInHours() + { + return $this->container['duration_of_action_in_hours']; + } + + /** + * Sets duration_of_action_in_hours + * @param int $duration_of_action_in_hours Example: 24 + * @return $this + */ + public function setDurationOfActionInHours($duration_of_action_in_hours) + { + $this->container['duration_of_action_in_hours'] = $duration_of_action_in_hours; + + return $this; + } + + /** + * Gets id + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param int $id Example: 1398 + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets input_type + * @return string + */ + public function getInputType() + { + return $this->container['input_type']; + } + + /** + * Sets input_type + * @param string $input_type Example: happiestFaceIsFive + * @return $this + */ + public function setInputType($input_type) + { + $this->container['input_type'] = $input_type; + + return $this; + } + + /** + * Gets ion_icon + * @return string + */ + public function getIonIcon() + { + return $this->container['ion_icon']; + } + + /** + * Sets ion_icon + * @param string $ion_icon Example: ion-happy-outline + * @return $this + */ + public function setIonIcon($ion_icon) + { + $this->container['ion_icon'] = $ion_icon; + + return $this; + } + + /** + * Gets kurtosis + * @return double + */ + public function getKurtosis() + { + return $this->container['kurtosis']; + } + + /** + * Sets kurtosis + * @param double $kurtosis Example: 4.3527259032083 + * @return $this + */ + public function setKurtosis($kurtosis) + { + $this->container['kurtosis'] = $kurtosis; + + return $this; + } + + /** + * Gets manual_tracking + * @return bool + */ + public function getManualTracking() + { + return $this->container['manual_tracking']; + } + + /** + * Sets manual_tracking + * @param bool $manual_tracking Example: true + * @return $this + */ + public function setManualTracking($manual_tracking) + { + $this->container['manual_tracking'] = $manual_tracking; + + return $this; + } + + /** + * Gets maximum_allowed_value + * @return int + */ + public function getMaximumAllowedValue() + { + return $this->container['maximum_allowed_value']; + } + + /** + * Sets maximum_allowed_value + * @param int $maximum_allowed_value Example: 5 + * @return $this + */ + public function setMaximumAllowedValue($maximum_allowed_value) + { + $this->container['maximum_allowed_value'] = $maximum_allowed_value; + + return $this; + } + + /** + * Gets mean + * @return double + */ + public function getMean() + { + return $this->container['mean']; + } + + /** + * Sets mean + * @param double $mean Example: 3.1359987410015 + * @return $this + */ + public function setMean($mean) + { + $this->container['mean'] = $mean; + + return $this; + } + + /** + * Gets median + * @return double + */ + public function getMedian() + { + return $this->container['median']; + } + + /** + * Sets median + * @param double $median Example: 3.1295731659047 + * @return $this + */ + public function setMedian($median) + { + $this->container['median'] = $median; + + return $this; + } + + /** + * Gets minimum_allowed_value + * @return int + */ + public function getMinimumAllowedValue() + { + return $this->container['minimum_allowed_value']; + } + + /** + * Sets minimum_allowed_value + * @param int $minimum_allowed_value Example: 1 + * @return $this + */ + public function setMinimumAllowedValue($minimum_allowed_value) + { + $this->container['minimum_allowed_value'] = $minimum_allowed_value; + + return $this; + } + + /** + * Gets most_common_connector_id + * @return int + */ + public function getMostCommonConnectorId() + { + return $this->container['most_common_connector_id']; + } + + /** + * Sets most_common_connector_id + * @param int $most_common_connector_id Example: 10 + * @return $this + */ + public function setMostCommonConnectorId($most_common_connector_id) + { + $this->container['most_common_connector_id'] = $most_common_connector_id; + + return $this; + } + + /** + * Gets most_common_original_unit_id + * @return int + */ + public function getMostCommonOriginalUnitId() + { + return $this->container['most_common_original_unit_id']; + } + + /** + * Sets most_common_original_unit_id + * @param int $most_common_original_unit_id Example: 10 + * @return $this + */ + public function setMostCommonOriginalUnitId($most_common_original_unit_id) + { + $this->container['most_common_original_unit_id'] = $most_common_original_unit_id; + + return $this; + } + + /** + * Gets most_common_value + * @return double + */ + public function getMostCommonValue() + { + return $this->container['most_common_value']; + } + + /** + * Sets most_common_value + * @param double $most_common_value Example: 3 + * @return $this + */ + public function setMostCommonValue($most_common_value) + { + $this->container['most_common_value'] = $most_common_value; + + return $this; + } + + /** + * Gets name + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * @param string $name Example: Overall Mood + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets number_of_aggregate_correlations_as_cause + * @return int + */ + public function getNumberOfAggregateCorrelationsAsCause() + { + return $this->container['number_of_aggregate_correlations_as_cause']; + } + + /** + * Sets number_of_aggregate_correlations_as_cause + * @param int $number_of_aggregate_correlations_as_cause Example: 329 + * @return $this + */ + public function setNumberOfAggregateCorrelationsAsCause($number_of_aggregate_correlations_as_cause) + { + $this->container['number_of_aggregate_correlations_as_cause'] = $number_of_aggregate_correlations_as_cause; + + return $this; + } + + /** + * Gets number_of_aggregate_correlations_as_effect + * @return int + */ + public function getNumberOfAggregateCorrelationsAsEffect() + { + return $this->container['number_of_aggregate_correlations_as_effect']; + } + + /** + * Sets number_of_aggregate_correlations_as_effect + * @param int $number_of_aggregate_correlations_as_effect Example: 890 + * @return $this + */ + public function setNumberOfAggregateCorrelationsAsEffect($number_of_aggregate_correlations_as_effect) + { + $this->container['number_of_aggregate_correlations_as_effect'] = $number_of_aggregate_correlations_as_effect; + + return $this; + } + + /** + * Gets number_of_measurements + * @return int + */ + public function getNumberOfMeasurements() + { + return $this->container['number_of_measurements']; + } + + /** + * Sets number_of_measurements + * @param int $number_of_measurements Example: 544298 + * @return $this + */ + public function setNumberOfMeasurements($number_of_measurements) + { + $this->container['number_of_measurements'] = $number_of_measurements; + + return $this; + } + + /** + * Gets number_of_raw_measurements + * @return int + */ + public function getNumberOfRawMeasurements() + { + return $this->container['number_of_raw_measurements']; + } + + /** + * Sets number_of_raw_measurements + * @param int $number_of_raw_measurements Example: 544298 + * @return $this + */ + public function setNumberOfRawMeasurements($number_of_raw_measurements) + { + $this->container['number_of_raw_measurements'] = $number_of_raw_measurements; + + return $this; + } + + /** + * Gets number_of_tracking_reminders + * @return int + */ + public function getNumberOfTrackingReminders() + { + return $this->container['number_of_tracking_reminders']; + } + + /** + * Sets number_of_tracking_reminders + * @param int $number_of_tracking_reminders Example: 102 + * @return $this + */ + public function setNumberOfTrackingReminders($number_of_tracking_reminders) + { + $this->container['number_of_tracking_reminders'] = $number_of_tracking_reminders; + + return $this; + } + + /** + * Gets number_of_unique_values + * @return int + */ + public function getNumberOfUniqueValues() + { + return $this->container['number_of_unique_values']; + } + + /** + * Sets number_of_unique_values + * @param int $number_of_unique_values Example: 7 + * @return $this + */ + public function setNumberOfUniqueValues($number_of_unique_values) + { + $this->container['number_of_unique_values'] = $number_of_unique_values; + + return $this; + } + + /** + * Gets number_of_user_variables + * @return int + */ + public function getNumberOfUserVariables() + { + return $this->container['number_of_user_variables']; + } + + /** + * Sets number_of_user_variables + * @param int $number_of_user_variables Example: 4003 + * @return $this + */ + public function setNumberOfUserVariables($number_of_user_variables) + { + $this->container['number_of_user_variables'] = $number_of_user_variables; + + return $this; + } + + /** + * Gets onset_delay + * @return int + */ + public function getOnsetDelay() + { + return $this->container['onset_delay']; + } + + /** + * Sets onset_delay + * @param int $onset_delay Example: 0 + * @return $this + */ + public function setOnsetDelay($onset_delay) + { + $this->container['onset_delay'] = $onset_delay; + + return $this; + } + + /** + * Gets onset_delay_in_hours + * @return int + */ + public function getOnsetDelayInHours() + { + return $this->container['onset_delay_in_hours']; + } + + /** + * Sets onset_delay_in_hours + * @param int $onset_delay_in_hours Example: 0 + * @return $this + */ + public function setOnsetDelayInHours($onset_delay_in_hours) + { + $this->container['onset_delay_in_hours'] = $onset_delay_in_hours; + + return $this; + } + + /** + * Gets outcome + * @return bool + */ + public function getOutcome() + { + return $this->container['outcome']; + } + + /** + * Sets outcome + * @param bool $outcome Example: true + * @return $this + */ + public function setOutcome($outcome) + { + $this->container['outcome'] = $outcome; + + return $this; + } + + /** + * Gets png_path + * @return string + */ + public function getPngPath() + { + return $this->container['png_path']; + } + + /** + * Sets png_path + * @param string $png_path Example: img/variable_categories/emotions.png + * @return $this + */ + public function setPngPath($png_path) + { + $this->container['png_path'] = $png_path; + + return $this; + } + + /** + * Gets png_url + * @return string + */ + public function getPngUrl() + { + return $this->container['png_url']; + } + + /** + * Sets png_url + * @param string $png_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.png + * @return $this + */ + public function setPngUrl($png_url) + { + $this->container['png_url'] = $png_url; + + return $this; + } + + /** + * Gets public + * @return bool + */ + public function getPublic() + { + return $this->container['public']; + } + + /** + * Sets public + * @param bool $public Example: true + * @return $this + */ + public function setPublic($public) + { + $this->container['public'] = $public; + + return $this; + } + + /** + * Gets second_most_common_value + * @return double + */ + public function getSecondMostCommonValue() + { + return $this->container['second_most_common_value']; + } + + /** + * Sets second_most_common_value + * @param double $second_most_common_value Example: 4 + * @return $this + */ + public function setSecondMostCommonValue($second_most_common_value) + { + $this->container['second_most_common_value'] = $second_most_common_value; + + return $this; + } + + /** + * Gets skewness + * @return double + */ + public function getSkewness() + { + return $this->container['skewness']; + } + + /** + * Sets skewness + * @param double $skewness Example: -0.23360852317166 + * @return $this + */ + public function setSkewness($skewness) + { + $this->container['skewness'] = $skewness; + + return $this; + } + + /** + * Gets standard_deviation + * @return double + */ + public function getStandardDeviation() + { + return $this->container['standard_deviation']; + } + + /** + * Sets standard_deviation + * @param double $standard_deviation Example: 0.7214901744899 + * @return $this + */ + public function setStandardDeviation($standard_deviation) + { + $this->container['standard_deviation'] = $standard_deviation; + + return $this; + } + + /** + * Gets svg_url + * @return string + */ + public function getSvgUrl() + { + return $this->container['svg_url']; + } + + /** + * Sets svg_url + * @param string $svg_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.svg + * @return $this + */ + public function setSvgUrl($svg_url) + { + $this->container['svg_url'] = $svg_url; + + return $this; + } + + /** + * Gets third_most_common_value + * @return double + */ + public function getThirdMostCommonValue() + { + return $this->container['third_most_common_value']; + } + + /** + * Sets third_most_common_value + * @param double $third_most_common_value Example: 2 + * @return $this + */ + public function setThirdMostCommonValue($third_most_common_value) + { + $this->container['third_most_common_value'] = $third_most_common_value; + + return $this; + } + + /** + * Gets updated_at + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * @param \DateTime $updated_at Example: 2017-07-31 19:55:38 + * @return $this + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets user_variable_unit_abbreviated_name + * @return string + */ + public function getUserVariableUnitAbbreviatedName() + { + return $this->container['user_variable_unit_abbreviated_name']; + } + + /** + * Sets user_variable_unit_abbreviated_name + * @param string $user_variable_unit_abbreviated_name Example: /5 + * @return $this + */ + public function setUserVariableUnitAbbreviatedName($user_variable_unit_abbreviated_name) + { + $this->container['user_variable_unit_abbreviated_name'] = $user_variable_unit_abbreviated_name; + + return $this; + } + + /** + * Gets user_variable_unit_category_id + * @return int + */ + public function getUserVariableUnitCategoryId() + { + return $this->container['user_variable_unit_category_id']; + } + + /** + * Sets user_variable_unit_category_id + * @param int $user_variable_unit_category_id Example: 5 + * @return $this + */ + public function setUserVariableUnitCategoryId($user_variable_unit_category_id) + { + $this->container['user_variable_unit_category_id'] = $user_variable_unit_category_id; + + return $this; + } + + /** + * Gets user_variable_unit_category_name + * @return string + */ + public function getUserVariableUnitCategoryName() + { + return $this->container['user_variable_unit_category_name']; + } + + /** + * Sets user_variable_unit_category_name + * @param string $user_variable_unit_category_name Example: Rating + * @return $this + */ + public function setUserVariableUnitCategoryName($user_variable_unit_category_name) + { + $this->container['user_variable_unit_category_name'] = $user_variable_unit_category_name; + + return $this; + } + + /** + * Gets user_variable_unit_id + * @return int + */ + public function getUserVariableUnitId() + { + return $this->container['user_variable_unit_id']; + } + + /** + * Sets user_variable_unit_id + * @param int $user_variable_unit_id Example: 10 + * @return $this + */ + public function setUserVariableUnitId($user_variable_unit_id) + { + $this->container['user_variable_unit_id'] = $user_variable_unit_id; + + return $this; + } + + /** + * Gets user_variable_unit_name + * @return string + */ + public function getUserVariableUnitName() + { + return $this->container['user_variable_unit_name']; + } + + /** + * Sets user_variable_unit_name + * @param string $user_variable_unit_name Example: 1 to 5 Rating + * @return $this + */ + public function setUserVariableUnitName($user_variable_unit_name) + { + $this->container['user_variable_unit_name'] = $user_variable_unit_name; + + return $this; + } + + /** + * Gets user_variable_variable_category_id + * @return int + */ + public function getUserVariableVariableCategoryId() + { + return $this->container['user_variable_variable_category_id']; + } + + /** + * Sets user_variable_variable_category_id + * @param int $user_variable_variable_category_id Example: 1 + * @return $this + */ + public function setUserVariableVariableCategoryId($user_variable_variable_category_id) + { + $this->container['user_variable_variable_category_id'] = $user_variable_variable_category_id; + + return $this; + } + + /** + * Gets user_variable_variable_category_name + * @return string + */ + public function getUserVariableVariableCategoryName() + { + return $this->container['user_variable_variable_category_name']; + } + + /** + * Sets user_variable_variable_category_name + * @param string $user_variable_variable_category_name Example: Emotions + * @return $this + */ + public function setUserVariableVariableCategoryName($user_variable_variable_category_name) + { + $this->container['user_variable_variable_category_name'] = $user_variable_variable_category_name; + + return $this; + } + + /** + * Gets valence + * @return string + */ + public function getValence() + { + return $this->container['valence']; + } + + /** + * Sets valence + * @param string $valence Example: positive + * @return $this + */ + public function setValence($valence) + { + $this->container['valence'] = $valence; + + return $this; + } + + /** + * Gets variable_category_id + * @return int + */ + public function getVariableCategoryId() + { + return $this->container['variable_category_id']; + } + + /** + * Sets variable_category_id + * @param int $variable_category_id Example: 1 + * @return $this + */ + public function setVariableCategoryId($variable_category_id) + { + $this->container['variable_category_id'] = $variable_category_id; + + return $this; + } + + /** + * Gets variable_category_image_url + * @return string + */ + public function getVariableCategoryImageUrl() + { + return $this->container['variable_category_image_url']; + } + + /** + * Sets variable_category_image_url + * @param string $variable_category_image_url Example: https://maxcdn.icons8.com/Color/PNG/96/Cinema/theatre_mask-96.png + * @return $this + */ + public function setVariableCategoryImageUrl($variable_category_image_url) + { + $this->container['variable_category_image_url'] = $variable_category_image_url; + + return $this; + } + + /** + * Gets variable_category_name + * @return string + */ + public function getVariableCategoryName() + { + return $this->container['variable_category_name']; + } + + /** + * Sets variable_category_name + * @param string $variable_category_name Example: Emotions + * @return $this + */ + public function setVariableCategoryName($variable_category_name) + { + $this->container['variable_category_name'] = $variable_category_name; + + return $this; + } + + /** + * Gets variable_name + * @return string + */ + public function getVariableName() + { + return $this->container['variable_name']; + } + + /** + * Sets variable_name + * @param string $variable_name Example: Overall Mood + * @return $this + */ + public function setVariableName($variable_name) + { + $this->container['variable_name'] = $variable_name; + + return $this; + } + + /** + * Gets variance + * @return double + */ + public function getVariance() + { + return $this->container['variance']; + } + + /** + * Sets variance + * @param double $variance Example: 22.541085893948 + * @return $this + */ + public function setVariance($variance) + { + $this->container['variance'] = $variance; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetPublicVariablesResponseArray.php b/lib/Model/GetPublicVariablesResponseArray.php new file mode 100644 index 0000000..ff1499f --- /dev/null +++ b/lib/Model/GetPublicVariablesResponseArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetStudyDataResponse.php b/lib/Model/GetStudyDataResponse.php new file mode 100644 index 0000000..8f81ec9 --- /dev/null +++ b/lib/Model/GetStudyDataResponse.php @@ -0,0 +1,545 @@ + '\QuantiModo\Client\Model\ProcessedDailyMeasurement[]', + 'cause_variable' => '\QuantiModo\Client\Model\UserVariable', + 'charts' => '\QuantiModo\Client\Model\Chart[]', + 'effect_processed_daily_measurements' => '\QuantiModo\Client\Model\ProcessedDailyMeasurement[]', + 'effect_variable' => '\QuantiModo\Client\Model\UserVariable', + 'pairs' => '\QuantiModo\Client\Model\Pair[]', + 'statistics' => '\QuantiModo\Client\Model\Correlation', + 'text' => 'string', + 'user' => 'string', + 'user_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'cause_processed_daily_measurements' => null, + 'cause_variable' => null, + 'charts' => null, + 'effect_processed_daily_measurements' => null, + 'effect_variable' => null, + 'pairs' => null, + 'statistics' => null, + 'text' => null, + 'user' => null, + 'user_id' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'cause_processed_daily_measurements' => 'causeProcessedDailyMeasurements', + 'cause_variable' => 'causeVariable', + 'charts' => 'charts', + 'effect_processed_daily_measurements' => 'effectProcessedDailyMeasurements', + 'effect_variable' => 'effectVariable', + 'pairs' => 'pairs', + 'statistics' => 'statistics', + 'text' => 'text', + 'user' => 'user', + 'user_id' => 'userId' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'cause_processed_daily_measurements' => 'setCauseProcessedDailyMeasurements', + 'cause_variable' => 'setCauseVariable', + 'charts' => 'setCharts', + 'effect_processed_daily_measurements' => 'setEffectProcessedDailyMeasurements', + 'effect_variable' => 'setEffectVariable', + 'pairs' => 'setPairs', + 'statistics' => 'setStatistics', + 'text' => 'setText', + 'user' => 'setUser', + 'user_id' => 'setUserId' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'cause_processed_daily_measurements' => 'getCauseProcessedDailyMeasurements', + 'cause_variable' => 'getCauseVariable', + 'charts' => 'getCharts', + 'effect_processed_daily_measurements' => 'getEffectProcessedDailyMeasurements', + 'effect_variable' => 'getEffectVariable', + 'pairs' => 'getPairs', + 'statistics' => 'getStatistics', + 'text' => 'getText', + 'user' => 'getUser', + 'user_id' => 'getUserId' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['cause_processed_daily_measurements'] = isset($data['cause_processed_daily_measurements']) ? $data['cause_processed_daily_measurements'] : null; + $this->container['cause_variable'] = isset($data['cause_variable']) ? $data['cause_variable'] : null; + $this->container['charts'] = isset($data['charts']) ? $data['charts'] : null; + $this->container['effect_processed_daily_measurements'] = isset($data['effect_processed_daily_measurements']) ? $data['effect_processed_daily_measurements'] : null; + $this->container['effect_variable'] = isset($data['effect_variable']) ? $data['effect_variable'] : null; + $this->container['pairs'] = isset($data['pairs']) ? $data['pairs'] : null; + $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + $this->container['user'] = isset($data['user']) ? $data['user'] : null; + $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['cause_processed_daily_measurements'] === null) { + $invalid_properties[] = "'cause_processed_daily_measurements' can't be null"; + } + if ($this->container['cause_variable'] === null) { + $invalid_properties[] = "'cause_variable' can't be null"; + } + if ($this->container['charts'] === null) { + $invalid_properties[] = "'charts' can't be null"; + } + if ($this->container['effect_processed_daily_measurements'] === null) { + $invalid_properties[] = "'effect_processed_daily_measurements' can't be null"; + } + if ($this->container['effect_variable'] === null) { + $invalid_properties[] = "'effect_variable' can't be null"; + } + if ($this->container['pairs'] === null) { + $invalid_properties[] = "'pairs' can't be null"; + } + if ($this->container['statistics'] === null) { + $invalid_properties[] = "'statistics' can't be null"; + } + if ($this->container['text'] === null) { + $invalid_properties[] = "'text' can't be null"; + } + if ($this->container['user'] === null) { + $invalid_properties[] = "'user' can't be null"; + } + if ($this->container['user_id'] === null) { + $invalid_properties[] = "'user_id' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['cause_processed_daily_measurements'] === null) { + return false; + } + if ($this->container['cause_variable'] === null) { + return false; + } + if ($this->container['charts'] === null) { + return false; + } + if ($this->container['effect_processed_daily_measurements'] === null) { + return false; + } + if ($this->container['effect_variable'] === null) { + return false; + } + if ($this->container['pairs'] === null) { + return false; + } + if ($this->container['statistics'] === null) { + return false; + } + if ($this->container['text'] === null) { + return false; + } + if ($this->container['user'] === null) { + return false; + } + if ($this->container['user_id'] === null) { + return false; + } + return true; + } + + + /** + * Gets cause_processed_daily_measurements + * @return \QuantiModo\Client\Model\ProcessedDailyMeasurement[] + */ + public function getCauseProcessedDailyMeasurements() + { + return $this->container['cause_processed_daily_measurements']; + } + + /** + * Sets cause_processed_daily_measurements + * @param \QuantiModo\Client\Model\ProcessedDailyMeasurement[] $cause_processed_daily_measurements + * @return $this + */ + public function setCauseProcessedDailyMeasurements($cause_processed_daily_measurements) + { + $this->container['cause_processed_daily_measurements'] = $cause_processed_daily_measurements; + + return $this; + } + + /** + * Gets cause_variable + * @return \QuantiModo\Client\Model\UserVariable + */ + public function getCauseVariable() + { + return $this->container['cause_variable']; + } + + /** + * Sets cause_variable + * @param \QuantiModo\Client\Model\UserVariable $cause_variable + * @return $this + */ + public function setCauseVariable($cause_variable) + { + $this->container['cause_variable'] = $cause_variable; + + return $this; + } + + /** + * Gets charts + * @return \QuantiModo\Client\Model\Chart[] + */ + public function getCharts() + { + return $this->container['charts']; + } + + /** + * Sets charts + * @param \QuantiModo\Client\Model\Chart[] $charts + * @return $this + */ + public function setCharts($charts) + { + $this->container['charts'] = $charts; + + return $this; + } + + /** + * Gets effect_processed_daily_measurements + * @return \QuantiModo\Client\Model\ProcessedDailyMeasurement[] + */ + public function getEffectProcessedDailyMeasurements() + { + return $this->container['effect_processed_daily_measurements']; + } + + /** + * Sets effect_processed_daily_measurements + * @param \QuantiModo\Client\Model\ProcessedDailyMeasurement[] $effect_processed_daily_measurements + * @return $this + */ + public function setEffectProcessedDailyMeasurements($effect_processed_daily_measurements) + { + $this->container['effect_processed_daily_measurements'] = $effect_processed_daily_measurements; + + return $this; + } + + /** + * Gets effect_variable + * @return \QuantiModo\Client\Model\UserVariable + */ + public function getEffectVariable() + { + return $this->container['effect_variable']; + } + + /** + * Sets effect_variable + * @param \QuantiModo\Client\Model\UserVariable $effect_variable + * @return $this + */ + public function setEffectVariable($effect_variable) + { + $this->container['effect_variable'] = $effect_variable; + + return $this; + } + + /** + * Gets pairs + * @return \QuantiModo\Client\Model\Pair[] + */ + public function getPairs() + { + return $this->container['pairs']; + } + + /** + * Sets pairs + * @param \QuantiModo\Client\Model\Pair[] $pairs + * @return $this + */ + public function setPairs($pairs) + { + $this->container['pairs'] = $pairs; + + return $this; + } + + /** + * Gets statistics + * @return \QuantiModo\Client\Model\Correlation + */ + public function getStatistics() + { + return $this->container['statistics']; + } + + /** + * Sets statistics + * @param \QuantiModo\Client\Model\Correlation $statistics + * @return $this + */ + public function setStatistics($statistics) + { + $this->container['statistics'] = $statistics; + + return $this; + } + + /** + * Gets text + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * @param string $text Example: + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets user + * @return string + */ + public function getUser() + { + return $this->container['user']; + } + + /** + * Sets user + * @param string $user Example: + * @return $this + */ + public function setUser($user) + { + $this->container['user'] = $user; + + return $this; + } + + /** + * Gets user_id + * @return int + */ + public function getUserId() + { + return $this->container['user_id']; + } + + /** + * Sets user_id + * @param int $user_id Example: 230 + * @return $this + */ + public function setUserId($user_id) + { + $this->container['user_id'] = $user_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetStudyResponse.php b/lib/Model/GetStudyResponse.php new file mode 100644 index 0000000..d5fab07 --- /dev/null +++ b/lib/Model/GetStudyResponse.php @@ -0,0 +1,740 @@ + '\QuantiModo\Client\Model\ProcessedDailyMeasurement[]', + 'cause_variable' => '\QuantiModo\Client\Model\UserVariable', + 'charts' => '\QuantiModo\Client\Model\Chart[]', + 'data' => '\QuantiModo\Client\Model\GetStudyDataResponse', + 'effect_processed_daily_measurements' => '\QuantiModo\Client\Model\ProcessedDailyMeasurement[]', + 'effect_variable' => '\QuantiModo\Client\Model\UserVariable', + 'highcharts' => '\QuantiModo\Client\Model\HighchartArray', + 'message' => 'string', + 'pairs' => '\QuantiModo\Client\Model\Pair[]', + 'pairs_of_averages_for_all_users' => '\QuantiModo\Client\Model\PairsOfAveragesForAllUser[]', + 'participant_instructions' => '\QuantiModo\Client\Model\ParticipantInstruction', + 'statistics' => '\QuantiModo\Client\Model\Correlation', + 'status' => 'int', + 'success' => 'bool', + 'text' => '\QuantiModo\Client\Model\Text', + 'type' => 'string', + 'user_correlations' => '\QuantiModo\Client\Model\Correlation[]', + 'user_id' => 'int', + 'user_study' => '\QuantiModo\Client\Model\UserStudy' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'cause_processed_daily_measurements' => null, + 'cause_variable' => null, + 'charts' => null, + 'data' => null, + 'effect_processed_daily_measurements' => null, + 'effect_variable' => null, + 'highcharts' => null, + 'message' => null, + 'pairs' => null, + 'pairs_of_averages_for_all_users' => null, + 'participant_instructions' => null, + 'statistics' => null, + 'status' => null, + 'success' => null, + 'text' => null, + 'type' => null, + 'user_correlations' => null, + 'user_id' => null, + 'user_study' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'cause_processed_daily_measurements' => 'causeProcessedDailyMeasurements', + 'cause_variable' => 'causeVariable', + 'charts' => 'charts', + 'data' => 'data', + 'effect_processed_daily_measurements' => 'effectProcessedDailyMeasurements', + 'effect_variable' => 'effectVariable', + 'highcharts' => 'highcharts', + 'message' => 'message', + 'pairs' => 'pairs', + 'pairs_of_averages_for_all_users' => 'pairsOfAveragesForAllUsers', + 'participant_instructions' => 'participantInstructions', + 'statistics' => 'statistics', + 'status' => 'status', + 'success' => 'success', + 'text' => 'text', + 'type' => 'type', + 'user_correlations' => 'userCorrelations', + 'user_id' => 'userId', + 'user_study' => 'userStudy' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'cause_processed_daily_measurements' => 'setCauseProcessedDailyMeasurements', + 'cause_variable' => 'setCauseVariable', + 'charts' => 'setCharts', + 'data' => 'setData', + 'effect_processed_daily_measurements' => 'setEffectProcessedDailyMeasurements', + 'effect_variable' => 'setEffectVariable', + 'highcharts' => 'setHighcharts', + 'message' => 'setMessage', + 'pairs' => 'setPairs', + 'pairs_of_averages_for_all_users' => 'setPairsOfAveragesForAllUsers', + 'participant_instructions' => 'setParticipantInstructions', + 'statistics' => 'setStatistics', + 'status' => 'setStatus', + 'success' => 'setSuccess', + 'text' => 'setText', + 'type' => 'setType', + 'user_correlations' => 'setUserCorrelations', + 'user_id' => 'setUserId', + 'user_study' => 'setUserStudy' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'cause_processed_daily_measurements' => 'getCauseProcessedDailyMeasurements', + 'cause_variable' => 'getCauseVariable', + 'charts' => 'getCharts', + 'data' => 'getData', + 'effect_processed_daily_measurements' => 'getEffectProcessedDailyMeasurements', + 'effect_variable' => 'getEffectVariable', + 'highcharts' => 'getHighcharts', + 'message' => 'getMessage', + 'pairs' => 'getPairs', + 'pairs_of_averages_for_all_users' => 'getPairsOfAveragesForAllUsers', + 'participant_instructions' => 'getParticipantInstructions', + 'statistics' => 'getStatistics', + 'status' => 'getStatus', + 'success' => 'getSuccess', + 'text' => 'getText', + 'type' => 'getType', + 'user_correlations' => 'getUserCorrelations', + 'user_id' => 'getUserId', + 'user_study' => 'getUserStudy' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['cause_processed_daily_measurements'] = isset($data['cause_processed_daily_measurements']) ? $data['cause_processed_daily_measurements'] : null; + $this->container['cause_variable'] = isset($data['cause_variable']) ? $data['cause_variable'] : null; + $this->container['charts'] = isset($data['charts']) ? $data['charts'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['effect_processed_daily_measurements'] = isset($data['effect_processed_daily_measurements']) ? $data['effect_processed_daily_measurements'] : null; + $this->container['effect_variable'] = isset($data['effect_variable']) ? $data['effect_variable'] : null; + $this->container['highcharts'] = isset($data['highcharts']) ? $data['highcharts'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['pairs'] = isset($data['pairs']) ? $data['pairs'] : null; + $this->container['pairs_of_averages_for_all_users'] = isset($data['pairs_of_averages_for_all_users']) ? $data['pairs_of_averages_for_all_users'] : null; + $this->container['participant_instructions'] = isset($data['participant_instructions']) ? $data['participant_instructions'] : null; + $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['user_correlations'] = isset($data['user_correlations']) ? $data['user_correlations'] : null; + $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; + $this->container['user_study'] = isset($data['user_study']) ? $data['user_study'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['status'] === null) { + $invalid_properties[] = "'status' can't be null"; + } + if ($this->container['success'] === null) { + $invalid_properties[] = "'success' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['status'] === null) { + return false; + } + if ($this->container['success'] === null) { + return false; + } + return true; + } + + + /** + * Gets cause_processed_daily_measurements + * @return \QuantiModo\Client\Model\ProcessedDailyMeasurement[] + */ + public function getCauseProcessedDailyMeasurements() + { + return $this->container['cause_processed_daily_measurements']; + } + + /** + * Sets cause_processed_daily_measurements + * @param \QuantiModo\Client\Model\ProcessedDailyMeasurement[] $cause_processed_daily_measurements + * @return $this + */ + public function setCauseProcessedDailyMeasurements($cause_processed_daily_measurements) + { + $this->container['cause_processed_daily_measurements'] = $cause_processed_daily_measurements; + + return $this; + } + + /** + * Gets cause_variable + * @return \QuantiModo\Client\Model\UserVariable + */ + public function getCauseVariable() + { + return $this->container['cause_variable']; + } + + /** + * Sets cause_variable + * @param \QuantiModo\Client\Model\UserVariable $cause_variable + * @return $this + */ + public function setCauseVariable($cause_variable) + { + $this->container['cause_variable'] = $cause_variable; + + return $this; + } + + /** + * Gets charts + * @return \QuantiModo\Client\Model\Chart[] + */ + public function getCharts() + { + return $this->container['charts']; + } + + /** + * Sets charts + * @param \QuantiModo\Client\Model\Chart[] $charts + * @return $this + */ + public function setCharts($charts) + { + $this->container['charts'] = $charts; + + return $this; + } + + /** + * Gets data + * @return \QuantiModo\Client\Model\GetStudyDataResponse + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * @param \QuantiModo\Client\Model\GetStudyDataResponse $data + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets effect_processed_daily_measurements + * @return \QuantiModo\Client\Model\ProcessedDailyMeasurement[] + */ + public function getEffectProcessedDailyMeasurements() + { + return $this->container['effect_processed_daily_measurements']; + } + + /** + * Sets effect_processed_daily_measurements + * @param \QuantiModo\Client\Model\ProcessedDailyMeasurement[] $effect_processed_daily_measurements + * @return $this + */ + public function setEffectProcessedDailyMeasurements($effect_processed_daily_measurements) + { + $this->container['effect_processed_daily_measurements'] = $effect_processed_daily_measurements; + + return $this; + } + + /** + * Gets effect_variable + * @return \QuantiModo\Client\Model\UserVariable + */ + public function getEffectVariable() + { + return $this->container['effect_variable']; + } + + /** + * Sets effect_variable + * @param \QuantiModo\Client\Model\UserVariable $effect_variable + * @return $this + */ + public function setEffectVariable($effect_variable) + { + $this->container['effect_variable'] = $effect_variable; + + return $this; + } + + /** + * Gets highcharts + * @return \QuantiModo\Client\Model\HighchartArray + */ + public function getHighcharts() + { + return $this->container['highcharts']; + } + + /** + * Sets highcharts + * @param \QuantiModo\Client\Model\HighchartArray $highcharts + * @return $this + */ + public function setHighcharts($highcharts) + { + $this->container['highcharts'] = $highcharts; + + return $this; + } + + /** + * Gets message + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * @param string $message Message + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets pairs + * @return \QuantiModo\Client\Model\Pair[] + */ + public function getPairs() + { + return $this->container['pairs']; + } + + /** + * Sets pairs + * @param \QuantiModo\Client\Model\Pair[] $pairs + * @return $this + */ + public function setPairs($pairs) + { + $this->container['pairs'] = $pairs; + + return $this; + } + + /** + * Gets pairs_of_averages_for_all_users + * @return \QuantiModo\Client\Model\PairsOfAveragesForAllUser[] + */ + public function getPairsOfAveragesForAllUsers() + { + return $this->container['pairs_of_averages_for_all_users']; + } + + /** + * Sets pairs_of_averages_for_all_users + * @param \QuantiModo\Client\Model\PairsOfAveragesForAllUser[] $pairs_of_averages_for_all_users + * @return $this + */ + public function setPairsOfAveragesForAllUsers($pairs_of_averages_for_all_users) + { + $this->container['pairs_of_averages_for_all_users'] = $pairs_of_averages_for_all_users; + + return $this; + } + + /** + * Gets participant_instructions + * @return \QuantiModo\Client\Model\ParticipantInstruction + */ + public function getParticipantInstructions() + { + return $this->container['participant_instructions']; + } + + /** + * Sets participant_instructions + * @param \QuantiModo\Client\Model\ParticipantInstruction $participant_instructions + * @return $this + */ + public function setParticipantInstructions($participant_instructions) + { + $this->container['participant_instructions'] = $participant_instructions; + + return $this; + } + + /** + * Gets statistics + * @return \QuantiModo\Client\Model\Correlation + */ + public function getStatistics() + { + return $this->container['statistics']; + } + + /** + * Sets statistics + * @param \QuantiModo\Client\Model\Correlation $statistics + * @return $this + */ + public function setStatistics($statistics) + { + $this->container['statistics'] = $statistics; + + return $this; + } + + /** + * Gets status + * @return int + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * @param int $status Status code + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets success + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * @param bool $success + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets text + * @return \QuantiModo\Client\Model\Text + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * @param \QuantiModo\Client\Model\Text $text + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets type + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * @param string $type Example: population + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets user_correlations + * @return \QuantiModo\Client\Model\Correlation[] + */ + public function getUserCorrelations() + { + return $this->container['user_correlations']; + } + + /** + * Sets user_correlations + * @param \QuantiModo\Client\Model\Correlation[] $user_correlations + * @return $this + */ + public function setUserCorrelations($user_correlations) + { + $this->container['user_correlations'] = $user_correlations; + + return $this; + } + + /** + * Gets user_id + * @return int + */ + public function getUserId() + { + return $this->container['user_id']; + } + + /** + * Sets user_id + * @param int $user_id Example: 230 + * @return $this + */ + public function setUserId($user_id) + { + $this->container['user_id'] = $user_id; + + return $this; + } + + /** + * Gets user_study + * @return \QuantiModo\Client\Model\UserStudy + */ + public function getUserStudy() + { + return $this->container['user_study']; + } + + /** + * Sets user_study + * @param \QuantiModo\Client\Model\UserStudy $user_study + * @return $this + */ + public function setUserStudy($user_study) + { + $this->container['user_study'] = $user_study; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetTrackingReminderNotificationsResponse.php b/lib/Model/GetTrackingReminderNotificationsResponse.php new file mode 100644 index 0000000..9555637 --- /dev/null +++ b/lib/Model/GetTrackingReminderNotificationsResponse.php @@ -0,0 +1,335 @@ + '\QuantiModo\Client\Model\TrackingReminderNotificationsArray', + 'message' => 'string', + 'status' => 'int', + 'success' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'data' => null, + 'message' => null, + 'status' => null, + 'success' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'message' => 'message', + 'status' => 'status', + 'success' => 'success' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'message' => 'setMessage', + 'status' => 'setStatus', + 'success' => 'setSuccess' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'message' => 'getMessage', + 'status' => 'getStatus', + 'success' => 'getSuccess' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['status'] === null) { + $invalid_properties[] = "'status' can't be null"; + } + if ($this->container['success'] === null) { + $invalid_properties[] = "'success' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['status'] === null) { + return false; + } + if ($this->container['success'] === null) { + return false; + } + return true; + } + + + /** + * Gets data + * @return \QuantiModo\Client\Model\TrackingReminderNotificationsArray + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * @param \QuantiModo\Client\Model\TrackingReminderNotificationsArray $data + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets message + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * @param string $message Message + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets status + * @return int + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * @param int $status Status code + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets success + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * @param bool $success + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetTrackingRemindersResponse.php b/lib/Model/GetTrackingRemindersResponse.php new file mode 100644 index 0000000..7e32d3f --- /dev/null +++ b/lib/Model/GetTrackingRemindersResponse.php @@ -0,0 +1,1874 @@ + '\QuantiModo\Client\Model\Unit[]', + 'client_id' => 'string', + 'combination_operation' => 'string', + 'created_at' => '\DateTime', + 'data' => '\QuantiModo\Client\Model\TrackingRemindersArray', + 'unit_abbreviated_name' => 'string', + 'unit_category_id' => 'int', + 'unit_category_name' => 'string', + 'unit_id' => 'int', + 'unit_name' => 'string', + 'default_value' => 'double', + 'filling_value' => 'int', + 'first_daily_reminder_time' => '\DateTime', + 'frequency_text_description' => 'string', + 'frequency_text_description_with_time' => '\DateTime', + 'id' => 'int', + 'image_url' => 'string', + 'input_type' => 'string', + 'ion_icon' => 'string', + 'last_value' => 'double', + 'local_daily_reminder_notification_times' => 'string[]', + 'local_daily_reminder_notification_times_for_all_reminders' => 'string[]', + 'manual_tracking' => 'bool', + 'message' => 'string', + 'minimum_allowed_value' => 'int', + 'next_reminder_time_epoch_seconds' => 'int', + 'number_of_raw_measurements' => 'int', + 'png_path' => 'string', + 'png_url' => 'string', + 'reminder_frequency' => 'int', + 'reminder_start_epoch_seconds' => 'int', + 'reminder_start_time' => '\DateTime', + 'reminder_start_time_local' => '\DateTime', + 'reminder_start_time_local_human_formatted' => '\DateTime', + 'repeating' => 'bool', + 'second_daily_reminder_time' => '\DateTime', + 'second_to_last_value' => 'double', + 'start_tracking_date' => 'string', + 'status' => 'int', + 'stop_tracking_date' => 'string', + 'success' => 'bool', + 'svg_url' => 'string', + 'third_to_last_value' => 'double', + 'tracking_reminder_id' => 'int', + 'tracking_reminder_image_url' => 'string', + 'updated_at' => '\DateTime', + 'user_id' => 'int', + 'user_variable_unit_abbreviated_name' => 'string', + 'user_variable_unit_category_id' => 'int', + 'user_variable_unit_category_name' => 'string', + 'user_variable_unit_id' => 'int', + 'user_variable_unit_name' => 'string', + 'user_variable_variable_category_id' => 'int', + 'user_variable_variable_category_name' => 'string', + 'value_and_frequency_text_description' => 'string', + 'value_and_frequency_text_description_with_time' => '\DateTime', + 'variable_category_id' => 'int', + 'variable_category_image_url' => 'string', + 'variable_category_name' => 'string', + 'variable_id' => 'int', + 'variable_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'available_units' => null, + 'client_id' => null, + 'combination_operation' => null, + 'created_at' => 'date-time', + 'data' => null, + 'unit_abbreviated_name' => null, + 'unit_category_id' => null, + 'unit_category_name' => null, + 'unit_id' => null, + 'unit_name' => null, + 'default_value' => 'double', + 'filling_value' => null, + 'first_daily_reminder_time' => 'date-time', + 'frequency_text_description' => null, + 'frequency_text_description_with_time' => 'date-time', + 'id' => null, + 'image_url' => null, + 'input_type' => null, + 'ion_icon' => null, + 'last_value' => 'double', + 'local_daily_reminder_notification_times' => null, + 'local_daily_reminder_notification_times_for_all_reminders' => null, + 'manual_tracking' => null, + 'message' => null, + 'minimum_allowed_value' => null, + 'next_reminder_time_epoch_seconds' => null, + 'number_of_raw_measurements' => null, + 'png_path' => null, + 'png_url' => null, + 'reminder_frequency' => null, + 'reminder_start_epoch_seconds' => null, + 'reminder_start_time' => 'date-time', + 'reminder_start_time_local' => 'date-time', + 'reminder_start_time_local_human_formatted' => 'date-time', + 'repeating' => null, + 'second_daily_reminder_time' => 'date-time', + 'second_to_last_value' => 'double', + 'start_tracking_date' => null, + 'status' => null, + 'stop_tracking_date' => null, + 'success' => null, + 'svg_url' => null, + 'third_to_last_value' => 'double', + 'tracking_reminder_id' => null, + 'tracking_reminder_image_url' => null, + 'updated_at' => 'date-time', + 'user_id' => null, + 'user_variable_unit_abbreviated_name' => null, + 'user_variable_unit_category_id' => null, + 'user_variable_unit_category_name' => null, + 'user_variable_unit_id' => null, + 'user_variable_unit_name' => null, + 'user_variable_variable_category_id' => null, + 'user_variable_variable_category_name' => null, + 'value_and_frequency_text_description' => null, + 'value_and_frequency_text_description_with_time' => 'date-time', + 'variable_category_id' => null, + 'variable_category_image_url' => null, + 'variable_category_name' => null, + 'variable_id' => null, + 'variable_name' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'available_units' => 'availableUnits', + 'client_id' => 'clientId', + 'combination_operation' => 'combinationOperation', + 'created_at' => 'createdAt', + 'data' => 'data', + 'unit_abbreviated_name' => 'unitAbbreviatedName', + 'unit_category_id' => 'unitCategoryId', + 'unit_category_name' => 'unitCategoryName', + 'unit_id' => 'unitId', + 'unit_name' => 'unitName', + 'default_value' => 'defaultValue', + 'filling_value' => 'fillingValue', + 'first_daily_reminder_time' => 'firstDailyReminderTime', + 'frequency_text_description' => 'frequencyTextDescription', + 'frequency_text_description_with_time' => 'frequencyTextDescriptionWithTime', + 'id' => 'id', + 'image_url' => 'imageUrl', + 'input_type' => 'inputType', + 'ion_icon' => 'ionIcon', + 'last_value' => 'lastValue', + 'local_daily_reminder_notification_times' => 'localDailyReminderNotificationTimes', + 'local_daily_reminder_notification_times_for_all_reminders' => 'localDailyReminderNotificationTimesForAllReminders', + 'manual_tracking' => 'manualTracking', + 'message' => 'message', + 'minimum_allowed_value' => 'minimumAllowedValue', + 'next_reminder_time_epoch_seconds' => 'nextReminderTimeEpochSeconds', + 'number_of_raw_measurements' => 'numberOfRawMeasurements', + 'png_path' => 'pngPath', + 'png_url' => 'pngUrl', + 'reminder_frequency' => 'reminderFrequency', + 'reminder_start_epoch_seconds' => 'reminderStartEpochSeconds', + 'reminder_start_time' => 'reminderStartTime', + 'reminder_start_time_local' => 'reminderStartTimeLocal', + 'reminder_start_time_local_human_formatted' => 'reminderStartTimeLocalHumanFormatted', + 'repeating' => 'repeating', + 'second_daily_reminder_time' => 'secondDailyReminderTime', + 'second_to_last_value' => 'secondToLastValue', + 'start_tracking_date' => 'startTrackingDate', + 'status' => 'status', + 'stop_tracking_date' => 'stopTrackingDate', + 'success' => 'success', + 'svg_url' => 'svgUrl', + 'third_to_last_value' => 'thirdToLastValue', + 'tracking_reminder_id' => 'trackingReminderId', + 'tracking_reminder_image_url' => 'trackingReminderImageUrl', + 'updated_at' => 'updatedAt', + 'user_id' => 'userId', + 'user_variable_unit_abbreviated_name' => 'userVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'userVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'userVariableUnitCategoryName', + 'user_variable_unit_id' => 'userVariableUnitId', + 'user_variable_unit_name' => 'userVariableUnitName', + 'user_variable_variable_category_id' => 'userVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'userVariableVariableCategoryName', + 'value_and_frequency_text_description' => 'valueAndFrequencyTextDescription', + 'value_and_frequency_text_description_with_time' => 'valueAndFrequencyTextDescriptionWithTime', + 'variable_category_id' => 'variableCategoryId', + 'variable_category_image_url' => 'variableCategoryImageUrl', + 'variable_category_name' => 'variableCategoryName', + 'variable_id' => 'variableId', + 'variable_name' => 'variableName' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'available_units' => 'setAvailableUnits', + 'client_id' => 'setClientId', + 'combination_operation' => 'setCombinationOperation', + 'created_at' => 'setCreatedAt', + 'data' => 'setData', + 'unit_abbreviated_name' => 'setUnitAbbreviatedName', + 'unit_category_id' => 'setUnitCategoryId', + 'unit_category_name' => 'setUnitCategoryName', + 'unit_id' => 'setUnitId', + 'unit_name' => 'setUnitName', + 'default_value' => 'setDefaultValue', + 'filling_value' => 'setFillingValue', + 'first_daily_reminder_time' => 'setFirstDailyReminderTime', + 'frequency_text_description' => 'setFrequencyTextDescription', + 'frequency_text_description_with_time' => 'setFrequencyTextDescriptionWithTime', + 'id' => 'setId', + 'image_url' => 'setImageUrl', + 'input_type' => 'setInputType', + 'ion_icon' => 'setIonIcon', + 'last_value' => 'setLastValue', + 'local_daily_reminder_notification_times' => 'setLocalDailyReminderNotificationTimes', + 'local_daily_reminder_notification_times_for_all_reminders' => 'setLocalDailyReminderNotificationTimesForAllReminders', + 'manual_tracking' => 'setManualTracking', + 'message' => 'setMessage', + 'minimum_allowed_value' => 'setMinimumAllowedValue', + 'next_reminder_time_epoch_seconds' => 'setNextReminderTimeEpochSeconds', + 'number_of_raw_measurements' => 'setNumberOfRawMeasurements', + 'png_path' => 'setPngPath', + 'png_url' => 'setPngUrl', + 'reminder_frequency' => 'setReminderFrequency', + 'reminder_start_epoch_seconds' => 'setReminderStartEpochSeconds', + 'reminder_start_time' => 'setReminderStartTime', + 'reminder_start_time_local' => 'setReminderStartTimeLocal', + 'reminder_start_time_local_human_formatted' => 'setReminderStartTimeLocalHumanFormatted', + 'repeating' => 'setRepeating', + 'second_daily_reminder_time' => 'setSecondDailyReminderTime', + 'second_to_last_value' => 'setSecondToLastValue', + 'start_tracking_date' => 'setStartTrackingDate', + 'status' => 'setStatus', + 'stop_tracking_date' => 'setStopTrackingDate', + 'success' => 'setSuccess', + 'svg_url' => 'setSvgUrl', + 'third_to_last_value' => 'setThirdToLastValue', + 'tracking_reminder_id' => 'setTrackingReminderId', + 'tracking_reminder_image_url' => 'setTrackingReminderImageUrl', + 'updated_at' => 'setUpdatedAt', + 'user_id' => 'setUserId', + 'user_variable_unit_abbreviated_name' => 'setUserVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'setUserVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'setUserVariableUnitCategoryName', + 'user_variable_unit_id' => 'setUserVariableUnitId', + 'user_variable_unit_name' => 'setUserVariableUnitName', + 'user_variable_variable_category_id' => 'setUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'setUserVariableVariableCategoryName', + 'value_and_frequency_text_description' => 'setValueAndFrequencyTextDescription', + 'value_and_frequency_text_description_with_time' => 'setValueAndFrequencyTextDescriptionWithTime', + 'variable_category_id' => 'setVariableCategoryId', + 'variable_category_image_url' => 'setVariableCategoryImageUrl', + 'variable_category_name' => 'setVariableCategoryName', + 'variable_id' => 'setVariableId', + 'variable_name' => 'setVariableName' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'available_units' => 'getAvailableUnits', + 'client_id' => 'getClientId', + 'combination_operation' => 'getCombinationOperation', + 'created_at' => 'getCreatedAt', + 'data' => 'getData', + 'unit_abbreviated_name' => 'getUnitAbbreviatedName', + 'unit_category_id' => 'getUnitCategoryId', + 'unit_category_name' => 'getUnitCategoryName', + 'unit_id' => 'getUnitId', + 'unit_name' => 'getUnitName', + 'default_value' => 'getDefaultValue', + 'filling_value' => 'getFillingValue', + 'first_daily_reminder_time' => 'getFirstDailyReminderTime', + 'frequency_text_description' => 'getFrequencyTextDescription', + 'frequency_text_description_with_time' => 'getFrequencyTextDescriptionWithTime', + 'id' => 'getId', + 'image_url' => 'getImageUrl', + 'input_type' => 'getInputType', + 'ion_icon' => 'getIonIcon', + 'last_value' => 'getLastValue', + 'local_daily_reminder_notification_times' => 'getLocalDailyReminderNotificationTimes', + 'local_daily_reminder_notification_times_for_all_reminders' => 'getLocalDailyReminderNotificationTimesForAllReminders', + 'manual_tracking' => 'getManualTracking', + 'message' => 'getMessage', + 'minimum_allowed_value' => 'getMinimumAllowedValue', + 'next_reminder_time_epoch_seconds' => 'getNextReminderTimeEpochSeconds', + 'number_of_raw_measurements' => 'getNumberOfRawMeasurements', + 'png_path' => 'getPngPath', + 'png_url' => 'getPngUrl', + 'reminder_frequency' => 'getReminderFrequency', + 'reminder_start_epoch_seconds' => 'getReminderStartEpochSeconds', + 'reminder_start_time' => 'getReminderStartTime', + 'reminder_start_time_local' => 'getReminderStartTimeLocal', + 'reminder_start_time_local_human_formatted' => 'getReminderStartTimeLocalHumanFormatted', + 'repeating' => 'getRepeating', + 'second_daily_reminder_time' => 'getSecondDailyReminderTime', + 'second_to_last_value' => 'getSecondToLastValue', + 'start_tracking_date' => 'getStartTrackingDate', + 'status' => 'getStatus', + 'stop_tracking_date' => 'getStopTrackingDate', + 'success' => 'getSuccess', + 'svg_url' => 'getSvgUrl', + 'third_to_last_value' => 'getThirdToLastValue', + 'tracking_reminder_id' => 'getTrackingReminderId', + 'tracking_reminder_image_url' => 'getTrackingReminderImageUrl', + 'updated_at' => 'getUpdatedAt', + 'user_id' => 'getUserId', + 'user_variable_unit_abbreviated_name' => 'getUserVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'getUserVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'getUserVariableUnitCategoryName', + 'user_variable_unit_id' => 'getUserVariableUnitId', + 'user_variable_unit_name' => 'getUserVariableUnitName', + 'user_variable_variable_category_id' => 'getUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'getUserVariableVariableCategoryName', + 'value_and_frequency_text_description' => 'getValueAndFrequencyTextDescription', + 'value_and_frequency_text_description_with_time' => 'getValueAndFrequencyTextDescriptionWithTime', + 'variable_category_id' => 'getVariableCategoryId', + 'variable_category_image_url' => 'getVariableCategoryImageUrl', + 'variable_category_name' => 'getVariableCategoryName', + 'variable_id' => 'getVariableId', + 'variable_name' => 'getVariableName' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['available_units'] = isset($data['available_units']) ? $data['available_units'] : null; + $this->container['client_id'] = isset($data['client_id']) ? $data['client_id'] : null; + $this->container['combination_operation'] = isset($data['combination_operation']) ? $data['combination_operation'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['unit_abbreviated_name'] = isset($data['unit_abbreviated_name']) ? $data['unit_abbreviated_name'] : null; + $this->container['unit_category_id'] = isset($data['unit_category_id']) ? $data['unit_category_id'] : null; + $this->container['unit_category_name'] = isset($data['unit_category_name']) ? $data['unit_category_name'] : null; + $this->container['unit_id'] = isset($data['unit_id']) ? $data['unit_id'] : null; + $this->container['unit_name'] = isset($data['unit_name']) ? $data['unit_name'] : null; + $this->container['default_value'] = isset($data['default_value']) ? $data['default_value'] : null; + $this->container['filling_value'] = isset($data['filling_value']) ? $data['filling_value'] : null; + $this->container['first_daily_reminder_time'] = isset($data['first_daily_reminder_time']) ? $data['first_daily_reminder_time'] : null; + $this->container['frequency_text_description'] = isset($data['frequency_text_description']) ? $data['frequency_text_description'] : null; + $this->container['frequency_text_description_with_time'] = isset($data['frequency_text_description_with_time']) ? $data['frequency_text_description_with_time'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['image_url'] = isset($data['image_url']) ? $data['image_url'] : null; + $this->container['input_type'] = isset($data['input_type']) ? $data['input_type'] : null; + $this->container['ion_icon'] = isset($data['ion_icon']) ? $data['ion_icon'] : null; + $this->container['last_value'] = isset($data['last_value']) ? $data['last_value'] : null; + $this->container['local_daily_reminder_notification_times'] = isset($data['local_daily_reminder_notification_times']) ? $data['local_daily_reminder_notification_times'] : null; + $this->container['local_daily_reminder_notification_times_for_all_reminders'] = isset($data['local_daily_reminder_notification_times_for_all_reminders']) ? $data['local_daily_reminder_notification_times_for_all_reminders'] : null; + $this->container['manual_tracking'] = isset($data['manual_tracking']) ? $data['manual_tracking'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; + $this->container['next_reminder_time_epoch_seconds'] = isset($data['next_reminder_time_epoch_seconds']) ? $data['next_reminder_time_epoch_seconds'] : null; + $this->container['number_of_raw_measurements'] = isset($data['number_of_raw_measurements']) ? $data['number_of_raw_measurements'] : null; + $this->container['png_path'] = isset($data['png_path']) ? $data['png_path'] : null; + $this->container['png_url'] = isset($data['png_url']) ? $data['png_url'] : null; + $this->container['reminder_frequency'] = isset($data['reminder_frequency']) ? $data['reminder_frequency'] : null; + $this->container['reminder_start_epoch_seconds'] = isset($data['reminder_start_epoch_seconds']) ? $data['reminder_start_epoch_seconds'] : null; + $this->container['reminder_start_time'] = isset($data['reminder_start_time']) ? $data['reminder_start_time'] : null; + $this->container['reminder_start_time_local'] = isset($data['reminder_start_time_local']) ? $data['reminder_start_time_local'] : null; + $this->container['reminder_start_time_local_human_formatted'] = isset($data['reminder_start_time_local_human_formatted']) ? $data['reminder_start_time_local_human_formatted'] : null; + $this->container['repeating'] = isset($data['repeating']) ? $data['repeating'] : null; + $this->container['second_daily_reminder_time'] = isset($data['second_daily_reminder_time']) ? $data['second_daily_reminder_time'] : null; + $this->container['second_to_last_value'] = isset($data['second_to_last_value']) ? $data['second_to_last_value'] : null; + $this->container['start_tracking_date'] = isset($data['start_tracking_date']) ? $data['start_tracking_date'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['stop_tracking_date'] = isset($data['stop_tracking_date']) ? $data['stop_tracking_date'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + $this->container['svg_url'] = isset($data['svg_url']) ? $data['svg_url'] : null; + $this->container['third_to_last_value'] = isset($data['third_to_last_value']) ? $data['third_to_last_value'] : null; + $this->container['tracking_reminder_id'] = isset($data['tracking_reminder_id']) ? $data['tracking_reminder_id'] : null; + $this->container['tracking_reminder_image_url'] = isset($data['tracking_reminder_image_url']) ? $data['tracking_reminder_image_url'] : null; + $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; + $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; + $this->container['user_variable_unit_abbreviated_name'] = isset($data['user_variable_unit_abbreviated_name']) ? $data['user_variable_unit_abbreviated_name'] : null; + $this->container['user_variable_unit_category_id'] = isset($data['user_variable_unit_category_id']) ? $data['user_variable_unit_category_id'] : null; + $this->container['user_variable_unit_category_name'] = isset($data['user_variable_unit_category_name']) ? $data['user_variable_unit_category_name'] : null; + $this->container['user_variable_unit_id'] = isset($data['user_variable_unit_id']) ? $data['user_variable_unit_id'] : null; + $this->container['user_variable_unit_name'] = isset($data['user_variable_unit_name']) ? $data['user_variable_unit_name'] : null; + $this->container['user_variable_variable_category_id'] = isset($data['user_variable_variable_category_id']) ? $data['user_variable_variable_category_id'] : null; + $this->container['user_variable_variable_category_name'] = isset($data['user_variable_variable_category_name']) ? $data['user_variable_variable_category_name'] : null; + $this->container['value_and_frequency_text_description'] = isset($data['value_and_frequency_text_description']) ? $data['value_and_frequency_text_description'] : null; + $this->container['value_and_frequency_text_description_with_time'] = isset($data['value_and_frequency_text_description_with_time']) ? $data['value_and_frequency_text_description_with_time'] : null; + $this->container['variable_category_id'] = isset($data['variable_category_id']) ? $data['variable_category_id'] : null; + $this->container['variable_category_image_url'] = isset($data['variable_category_image_url']) ? $data['variable_category_image_url'] : null; + $this->container['variable_category_name'] = isset($data['variable_category_name']) ? $data['variable_category_name'] : null; + $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; + $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['status'] === null) { + $invalid_properties[] = "'status' can't be null"; + } + if ($this->container['success'] === null) { + $invalid_properties[] = "'success' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['status'] === null) { + return false; + } + if ($this->container['success'] === null) { + return false; + } + return true; + } + + + /** + * Gets available_units + * @return \QuantiModo\Client\Model\Unit[] + */ + public function getAvailableUnits() + { + return $this->container['available_units']; + } + + /** + * Sets available_units + * @param \QuantiModo\Client\Model\Unit[] $available_units + * @return $this + */ + public function setAvailableUnits($available_units) + { + $this->container['available_units'] = $available_units; + + return $this; + } + + /** + * Gets client_id + * @return string + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * @param string $client_id Example: ionic + * @return $this + */ + public function setClientId($client_id) + { + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets combination_operation + * @return string + */ + public function getCombinationOperation() + { + return $this->container['combination_operation']; + } + + /** + * Sets combination_operation + * @param string $combination_operation Example: MEAN + * @return $this + */ + public function setCombinationOperation($combination_operation) + { + $this->container['combination_operation'] = $combination_operation; + + return $this; + } + + /** + * Gets created_at + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * @param \DateTime $created_at Example: 2016-12-25 10:28:42 + * @return $this + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets data + * @return \QuantiModo\Client\Model\TrackingRemindersArray + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * @param \QuantiModo\Client\Model\TrackingRemindersArray $data + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets unit_abbreviated_name + * @return string + */ + public function getUnitAbbreviatedName() + { + return $this->container['unit_abbreviated_name']; + } + + /** + * Sets unit_abbreviated_name + * @param string $unit_abbreviated_name Example: mg + * @return $this + */ + public function setUnitAbbreviatedName($unit_abbreviated_name) + { + $this->container['unit_abbreviated_name'] = $unit_abbreviated_name; + + return $this; + } + + /** + * Gets unit_category_id + * @return int + */ + public function getUnitCategoryId() + { + return $this->container['unit_category_id']; + } + + /** + * Sets unit_category_id + * @param int $unit_category_id Example: 3 + * @return $this + */ + public function setUnitCategoryId($unit_category_id) + { + $this->container['unit_category_id'] = $unit_category_id; + + return $this; + } + + /** + * Gets unit_category_name + * @return string + */ + public function getUnitCategoryName() + { + return $this->container['unit_category_name']; + } + + /** + * Sets unit_category_name + * @param string $unit_category_name Example: Weight + * @return $this + */ + public function setUnitCategoryName($unit_category_name) + { + $this->container['unit_category_name'] = $unit_category_name; + + return $this; + } + + /** + * Gets unit_id + * @return int + */ + public function getUnitId() + { + return $this->container['unit_id']; + } + + /** + * Sets unit_id + * @param int $unit_id Example: 7 + * @return $this + */ + public function setUnitId($unit_id) + { + $this->container['unit_id'] = $unit_id; + + return $this; + } + + /** + * Gets unit_name + * @return string + */ + public function getUnitName() + { + return $this->container['unit_name']; + } + + /** + * Sets unit_name + * @param string $unit_name Example: Milligrams + * @return $this + */ + public function setUnitName($unit_name) + { + $this->container['unit_name'] = $unit_name; + + return $this; + } + + /** + * Gets default_value + * @return double + */ + public function getDefaultValue() + { + return $this->container['default_value']; + } + + /** + * Sets default_value + * @param double $default_value Example: 500 + * @return $this + */ + public function setDefaultValue($default_value) + { + $this->container['default_value'] = $default_value; + + return $this; + } + + /** + * Gets filling_value + * @return int + */ + public function getFillingValue() + { + return $this->container['filling_value']; + } + + /** + * Sets filling_value + * @param int $filling_value Example: 0 + * @return $this + */ + public function setFillingValue($filling_value) + { + $this->container['filling_value'] = $filling_value; + + return $this; + } + + /** + * Gets first_daily_reminder_time + * @return \DateTime + */ + public function getFirstDailyReminderTime() + { + return $this->container['first_daily_reminder_time']; + } + + /** + * Sets first_daily_reminder_time + * @param \DateTime $first_daily_reminder_time Example: 12:00:00 + * @return $this + */ + public function setFirstDailyReminderTime($first_daily_reminder_time) + { + $this->container['first_daily_reminder_time'] = $first_daily_reminder_time; + + return $this; + } + + /** + * Gets frequency_text_description + * @return string + */ + public function getFrequencyTextDescription() + { + return $this->container['frequency_text_description']; + } + + /** + * Sets frequency_text_description + * @param string $frequency_text_description Example: Daily (ended 2017-02-02) + * @return $this + */ + public function setFrequencyTextDescription($frequency_text_description) + { + $this->container['frequency_text_description'] = $frequency_text_description; + + return $this; + } + + /** + * Gets frequency_text_description_with_time + * @return \DateTime + */ + public function getFrequencyTextDescriptionWithTime() + { + return $this->container['frequency_text_description_with_time']; + } + + /** + * Sets frequency_text_description_with_time + * @param \DateTime $frequency_text_description_with_time Example: Daily at 09:00 AM (ended 2017-02-02) + * @return $this + */ + public function setFrequencyTextDescriptionWithTime($frequency_text_description_with_time) + { + $this->container['frequency_text_description_with_time'] = $frequency_text_description_with_time; + + return $this; + } + + /** + * Gets id + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param int $id Example: 30376 + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets image_url + * @return string + */ + public function getImageUrl() + { + return $this->container['image_url']; + } + + /** + * Sets image_url + * @param string $image_url Example: https://rximage.nlm.nih.gov/image/images/gallery/original/55111-0129-60_RXNAVIMAGE10_B051D81E.jpg + * @return $this + */ + public function setImageUrl($image_url) + { + $this->container['image_url'] = $image_url; + + return $this; + } + + /** + * Gets input_type + * @return string + */ + public function getInputType() + { + return $this->container['input_type']; + } + + /** + * Sets input_type + * @param string $input_type Example: value + * @return $this + */ + public function setInputType($input_type) + { + $this->container['input_type'] = $input_type; + + return $this; + } + + /** + * Gets ion_icon + * @return string + */ + public function getIonIcon() + { + return $this->container['ion_icon']; + } + + /** + * Sets ion_icon + * @param string $ion_icon Example: ion-ios-medkit-outline + * @return $this + */ + public function setIonIcon($ion_icon) + { + $this->container['ion_icon'] = $ion_icon; + + return $this; + } + + /** + * Gets last_value + * @return double + */ + public function getLastValue() + { + return $this->container['last_value']; + } + + /** + * Sets last_value + * @param double $last_value Example: 500 + * @return $this + */ + public function setLastValue($last_value) + { + $this->container['last_value'] = $last_value; + + return $this; + } + + /** + * Gets local_daily_reminder_notification_times + * @return string[] + */ + public function getLocalDailyReminderNotificationTimes() + { + return $this->container['local_daily_reminder_notification_times']; + } + + /** + * Sets local_daily_reminder_notification_times + * @param string[] $local_daily_reminder_notification_times + * @return $this + */ + public function setLocalDailyReminderNotificationTimes($local_daily_reminder_notification_times) + { + $this->container['local_daily_reminder_notification_times'] = $local_daily_reminder_notification_times; + + return $this; + } + + /** + * Gets local_daily_reminder_notification_times_for_all_reminders + * @return string[] + */ + public function getLocalDailyReminderNotificationTimesForAllReminders() + { + return $this->container['local_daily_reminder_notification_times_for_all_reminders']; + } + + /** + * Sets local_daily_reminder_notification_times_for_all_reminders + * @param string[] $local_daily_reminder_notification_times_for_all_reminders + * @return $this + */ + public function setLocalDailyReminderNotificationTimesForAllReminders($local_daily_reminder_notification_times_for_all_reminders) + { + $this->container['local_daily_reminder_notification_times_for_all_reminders'] = $local_daily_reminder_notification_times_for_all_reminders; + + return $this; + } + + /** + * Gets manual_tracking + * @return bool + */ + public function getManualTracking() + { + return $this->container['manual_tracking']; + } + + /** + * Sets manual_tracking + * @param bool $manual_tracking Example: true + * @return $this + */ + public function setManualTracking($manual_tracking) + { + $this->container['manual_tracking'] = $manual_tracking; + + return $this; + } + + /** + * Gets message + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * @param string $message Message + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets minimum_allowed_value + * @return int + */ + public function getMinimumAllowedValue() + { + return $this->container['minimum_allowed_value']; + } + + /** + * Sets minimum_allowed_value + * @param int $minimum_allowed_value Example: 0 + * @return $this + */ + public function setMinimumAllowedValue($minimum_allowed_value) + { + $this->container['minimum_allowed_value'] = $minimum_allowed_value; + + return $this; + } + + /** + * Gets next_reminder_time_epoch_seconds + * @return int + */ + public function getNextReminderTimeEpochSeconds() + { + return $this->container['next_reminder_time_epoch_seconds']; + } + + /** + * Sets next_reminder_time_epoch_seconds + * @param int $next_reminder_time_epoch_seconds Example: 1502373600 + * @return $this + */ + public function setNextReminderTimeEpochSeconds($next_reminder_time_epoch_seconds) + { + $this->container['next_reminder_time_epoch_seconds'] = $next_reminder_time_epoch_seconds; + + return $this; + } + + /** + * Gets number_of_raw_measurements + * @return int + */ + public function getNumberOfRawMeasurements() + { + return $this->container['number_of_raw_measurements']; + } + + /** + * Sets number_of_raw_measurements + * @param int $number_of_raw_measurements Example: 791 + * @return $this + */ + public function setNumberOfRawMeasurements($number_of_raw_measurements) + { + $this->container['number_of_raw_measurements'] = $number_of_raw_measurements; + + return $this; + } + + /** + * Gets png_path + * @return string + */ + public function getPngPath() + { + return $this->container['png_path']; + } + + /** + * Sets png_path + * @param string $png_path Example: img/variable_categories/treatments.png + * @return $this + */ + public function setPngPath($png_path) + { + $this->container['png_path'] = $png_path; + + return $this; + } + + /** + * Gets png_url + * @return string + */ + public function getPngUrl() + { + return $this->container['png_url']; + } + + /** + * Sets png_url + * @param string $png_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/treatments.png + * @return $this + */ + public function setPngUrl($png_url) + { + $this->container['png_url'] = $png_url; + + return $this; + } + + /** + * Gets reminder_frequency + * @return int + */ + public function getReminderFrequency() + { + return $this->container['reminder_frequency']; + } + + /** + * Sets reminder_frequency + * @param int $reminder_frequency Example: 86400 + * @return $this + */ + public function setReminderFrequency($reminder_frequency) + { + $this->container['reminder_frequency'] = $reminder_frequency; + + return $this; + } + + /** + * Gets reminder_start_epoch_seconds + * @return int + */ + public function getReminderStartEpochSeconds() + { + return $this->container['reminder_start_epoch_seconds']; + } + + /** + * Sets reminder_start_epoch_seconds + * @param int $reminder_start_epoch_seconds Example: 1481896800 + * @return $this + */ + public function setReminderStartEpochSeconds($reminder_start_epoch_seconds) + { + $this->container['reminder_start_epoch_seconds'] = $reminder_start_epoch_seconds; + + return $this; + } + + /** + * Gets reminder_start_time + * @return \DateTime + */ + public function getReminderStartTime() + { + return $this->container['reminder_start_time']; + } + + /** + * Sets reminder_start_time + * @param \DateTime $reminder_start_time Example: 14:00:00 + * @return $this + */ + public function setReminderStartTime($reminder_start_time) + { + $this->container['reminder_start_time'] = $reminder_start_time; + + return $this; + } + + /** + * Gets reminder_start_time_local + * @return \DateTime + */ + public function getReminderStartTimeLocal() + { + return $this->container['reminder_start_time_local']; + } + + /** + * Sets reminder_start_time_local + * @param \DateTime $reminder_start_time_local Example: 09:00:00 + * @return $this + */ + public function setReminderStartTimeLocal($reminder_start_time_local) + { + $this->container['reminder_start_time_local'] = $reminder_start_time_local; + + return $this; + } + + /** + * Gets reminder_start_time_local_human_formatted + * @return \DateTime + */ + public function getReminderStartTimeLocalHumanFormatted() + { + return $this->container['reminder_start_time_local_human_formatted']; + } + + /** + * Sets reminder_start_time_local_human_formatted + * @param \DateTime $reminder_start_time_local_human_formatted Example: 09:00 AM + * @return $this + */ + public function setReminderStartTimeLocalHumanFormatted($reminder_start_time_local_human_formatted) + { + $this->container['reminder_start_time_local_human_formatted'] = $reminder_start_time_local_human_formatted; + + return $this; + } + + /** + * Gets repeating + * @return bool + */ + public function getRepeating() + { + return $this->container['repeating']; + } + + /** + * Sets repeating + * @param bool $repeating Example: true + * @return $this + */ + public function setRepeating($repeating) + { + $this->container['repeating'] = $repeating; + + return $this; + } + + /** + * Gets second_daily_reminder_time + * @return \DateTime + */ + public function getSecondDailyReminderTime() + { + return $this->container['second_daily_reminder_time']; + } + + /** + * Sets second_daily_reminder_time + * @param \DateTime $second_daily_reminder_time Example: 14:00:00 + * @return $this + */ + public function setSecondDailyReminderTime($second_daily_reminder_time) + { + $this->container['second_daily_reminder_time'] = $second_daily_reminder_time; + + return $this; + } + + /** + * Gets second_to_last_value + * @return double + */ + public function getSecondToLastValue() + { + return $this->container['second_to_last_value']; + } + + /** + * Sets second_to_last_value + * @param double $second_to_last_value Example: 250 + * @return $this + */ + public function setSecondToLastValue($second_to_last_value) + { + $this->container['second_to_last_value'] = $second_to_last_value; + + return $this; + } + + /** + * Gets start_tracking_date + * @return string + */ + public function getStartTrackingDate() + { + return $this->container['start_tracking_date']; + } + + /** + * Sets start_tracking_date + * @param string $start_tracking_date Example: 2016-12-16 + * @return $this + */ + public function setStartTrackingDate($start_tracking_date) + { + $this->container['start_tracking_date'] = $start_tracking_date; + + return $this; + } + + /** + * Gets status + * @return int + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * @param int $status Status code + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets stop_tracking_date + * @return string + */ + public function getStopTrackingDate() + { + return $this->container['stop_tracking_date']; + } + + /** + * Sets stop_tracking_date + * @param string $stop_tracking_date Example: 2017-02-02 + * @return $this + */ + public function setStopTrackingDate($stop_tracking_date) + { + $this->container['stop_tracking_date'] = $stop_tracking_date; + + return $this; + } + + /** + * Gets success + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * @param bool $success + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets svg_url + * @return string + */ + public function getSvgUrl() + { + return $this->container['svg_url']; + } + + /** + * Sets svg_url + * @param string $svg_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/treatments.svg + * @return $this + */ + public function setSvgUrl($svg_url) + { + $this->container['svg_url'] = $svg_url; + + return $this; + } + + /** + * Gets third_to_last_value + * @return double + */ + public function getThirdToLastValue() + { + return $this->container['third_to_last_value']; + } + + /** + * Sets third_to_last_value + * @param double $third_to_last_value Example: 250 + * @return $this + */ + public function setThirdToLastValue($third_to_last_value) + { + $this->container['third_to_last_value'] = $third_to_last_value; + + return $this; + } + + /** + * Gets tracking_reminder_id + * @return int + */ + public function getTrackingReminderId() + { + return $this->container['tracking_reminder_id']; + } + + /** + * Sets tracking_reminder_id + * @param int $tracking_reminder_id Example: 30376 + * @return $this + */ + public function setTrackingReminderId($tracking_reminder_id) + { + $this->container['tracking_reminder_id'] = $tracking_reminder_id; + + return $this; + } + + /** + * Gets tracking_reminder_image_url + * @return string + */ + public function getTrackingReminderImageUrl() + { + return $this->container['tracking_reminder_image_url']; + } + + /** + * Sets tracking_reminder_image_url + * @param string $tracking_reminder_image_url Example: https://rximage.nlm.nih.gov/image/images/gallery/original/55111-0129-60_RXNAVIMAGE10_B051D81E.jpg + * @return $this + */ + public function setTrackingReminderImageUrl($tracking_reminder_image_url) + { + $this->container['tracking_reminder_image_url'] = $tracking_reminder_image_url; + + return $this; + } + + /** + * Gets updated_at + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * @param \DateTime $updated_at Example: 2017-08-09 19:38:05 + * @return $this + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets user_id + * @return int + */ + public function getUserId() + { + return $this->container['user_id']; + } + + /** + * Sets user_id + * @param int $user_id Example: 230 + * @return $this + */ + public function setUserId($user_id) + { + $this->container['user_id'] = $user_id; + + return $this; + } + + /** + * Gets user_variable_unit_abbreviated_name + * @return string + */ + public function getUserVariableUnitAbbreviatedName() + { + return $this->container['user_variable_unit_abbreviated_name']; + } + + /** + * Sets user_variable_unit_abbreviated_name + * @param string $user_variable_unit_abbreviated_name Example: mg + * @return $this + */ + public function setUserVariableUnitAbbreviatedName($user_variable_unit_abbreviated_name) + { + $this->container['user_variable_unit_abbreviated_name'] = $user_variable_unit_abbreviated_name; + + return $this; + } + + /** + * Gets user_variable_unit_category_id + * @return int + */ + public function getUserVariableUnitCategoryId() + { + return $this->container['user_variable_unit_category_id']; + } + + /** + * Sets user_variable_unit_category_id + * @param int $user_variable_unit_category_id Example: 3 + * @return $this + */ + public function setUserVariableUnitCategoryId($user_variable_unit_category_id) + { + $this->container['user_variable_unit_category_id'] = $user_variable_unit_category_id; + + return $this; + } + + /** + * Gets user_variable_unit_category_name + * @return string + */ + public function getUserVariableUnitCategoryName() + { + return $this->container['user_variable_unit_category_name']; + } + + /** + * Sets user_variable_unit_category_name + * @param string $user_variable_unit_category_name Example: Weight + * @return $this + */ + public function setUserVariableUnitCategoryName($user_variable_unit_category_name) + { + $this->container['user_variable_unit_category_name'] = $user_variable_unit_category_name; + + return $this; + } + + /** + * Gets user_variable_unit_id + * @return int + */ + public function getUserVariableUnitId() + { + return $this->container['user_variable_unit_id']; + } + + /** + * Sets user_variable_unit_id + * @param int $user_variable_unit_id Example: 7 + * @return $this + */ + public function setUserVariableUnitId($user_variable_unit_id) + { + $this->container['user_variable_unit_id'] = $user_variable_unit_id; + + return $this; + } + + /** + * Gets user_variable_unit_name + * @return string + */ + public function getUserVariableUnitName() + { + return $this->container['user_variable_unit_name']; + } + + /** + * Sets user_variable_unit_name + * @param string $user_variable_unit_name Example: Milligrams + * @return $this + */ + public function setUserVariableUnitName($user_variable_unit_name) + { + $this->container['user_variable_unit_name'] = $user_variable_unit_name; + + return $this; + } + + /** + * Gets user_variable_variable_category_id + * @return int + */ + public function getUserVariableVariableCategoryId() + { + return $this->container['user_variable_variable_category_id']; + } + + /** + * Sets user_variable_variable_category_id + * @param int $user_variable_variable_category_id Example: 13 + * @return $this + */ + public function setUserVariableVariableCategoryId($user_variable_variable_category_id) + { + $this->container['user_variable_variable_category_id'] = $user_variable_variable_category_id; + + return $this; + } + + /** + * Gets user_variable_variable_category_name + * @return string + */ + public function getUserVariableVariableCategoryName() + { + return $this->container['user_variable_variable_category_name']; + } + + /** + * Sets user_variable_variable_category_name + * @param string $user_variable_variable_category_name Example: Treatments + * @return $this + */ + public function setUserVariableVariableCategoryName($user_variable_variable_category_name) + { + $this->container['user_variable_variable_category_name'] = $user_variable_variable_category_name; + + return $this; + } + + /** + * Gets value_and_frequency_text_description + * @return string + */ + public function getValueAndFrequencyTextDescription() + { + return $this->container['value_and_frequency_text_description']; + } + + /** + * Sets value_and_frequency_text_description + * @param string $value_and_frequency_text_description Example: 500 mg daily (ended 2017-02-02) + * @return $this + */ + public function setValueAndFrequencyTextDescription($value_and_frequency_text_description) + { + $this->container['value_and_frequency_text_description'] = $value_and_frequency_text_description; + + return $this; + } + + /** + * Gets value_and_frequency_text_description_with_time + * @return \DateTime + */ + public function getValueAndFrequencyTextDescriptionWithTime() + { + return $this->container['value_and_frequency_text_description_with_time']; + } + + /** + * Sets value_and_frequency_text_description_with_time + * @param \DateTime $value_and_frequency_text_description_with_time Example: 500 mg daily at 09:00 AM (ended 2017-02-02) + * @return $this + */ + public function setValueAndFrequencyTextDescriptionWithTime($value_and_frequency_text_description_with_time) + { + $this->container['value_and_frequency_text_description_with_time'] = $value_and_frequency_text_description_with_time; + + return $this; + } + + /** + * Gets variable_category_id + * @return int + */ + public function getVariableCategoryId() + { + return $this->container['variable_category_id']; + } + + /** + * Sets variable_category_id + * @param int $variable_category_id Example: 13 + * @return $this + */ + public function setVariableCategoryId($variable_category_id) + { + $this->container['variable_category_id'] = $variable_category_id; + + return $this; + } + + /** + * Gets variable_category_image_url + * @return string + */ + public function getVariableCategoryImageUrl() + { + return $this->container['variable_category_image_url']; + } + + /** + * Sets variable_category_image_url + * @param string $variable_category_image_url Example: https://maxcdn.icons8.com/Color/PNG/96/Healthcare/pill-96.png + * @return $this + */ + public function setVariableCategoryImageUrl($variable_category_image_url) + { + $this->container['variable_category_image_url'] = $variable_category_image_url; + + return $this; + } + + /** + * Gets variable_category_name + * @return string + */ + public function getVariableCategoryName() + { + return $this->container['variable_category_name']; + } + + /** + * Sets variable_category_name + * @param string $variable_category_name Example: Treatments + * @return $this + */ + public function setVariableCategoryName($variable_category_name) + { + $this->container['variable_category_name'] = $variable_category_name; + + return $this; + } + + /** + * Gets variable_id + * @return int + */ + public function getVariableId() + { + return $this->container['variable_id']; + } + + /** + * Sets variable_id + * @param int $variable_id Example: 5627291 + * @return $this + */ + public function setVariableId($variable_id) + { + $this->container['variable_id'] = $variable_id; + + return $this; + } + + /** + * Gets variable_name + * @return string + */ + public function getVariableName() + { + return $this->container['variable_name']; + } + + /** + * Sets variable_name + * @param string $variable_name Example: Acetyl L-Carnitine By MRM + * @return $this + */ + public function setVariableName($variable_name) + { + $this->container['variable_name'] = $variable_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetTrackingRemindersResponseArray.php b/lib/Model/GetTrackingRemindersResponseArray.php new file mode 100644 index 0000000..6d30ea1 --- /dev/null +++ b/lib/Model/GetTrackingRemindersResponseArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Highchart.php b/lib/Model/Highchart.php new file mode 100644 index 0000000..9fdb243 --- /dev/null +++ b/lib/Model/Highchart.php @@ -0,0 +1,323 @@ + '\QuantiModo\Client\Model\ChartConfig', + 'chart_id' => 'string', + 'chart_title' => 'string', + 'explanation' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'chart_config' => null, + 'chart_id' => null, + 'chart_title' => null, + 'explanation' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'chart_config' => 'chartConfig', + 'chart_id' => 'chartId', + 'chart_title' => 'chartTitle', + 'explanation' => 'explanation' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'chart_config' => 'setChartConfig', + 'chart_id' => 'setChartId', + 'chart_title' => 'setChartTitle', + 'explanation' => 'setExplanation' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'chart_config' => 'getChartConfig', + 'chart_id' => 'getChartId', + 'chart_title' => 'getChartTitle', + 'explanation' => 'getExplanation' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['chart_config'] = isset($data['chart_config']) ? $data['chart_config'] : null; + $this->container['chart_id'] = isset($data['chart_id']) ? $data['chart_id'] : null; + $this->container['chart_title'] = isset($data['chart_title']) ? $data['chart_title'] : null; + $this->container['explanation'] = isset($data['explanation']) ? $data['explanation'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets chart_config + * @return \QuantiModo\Client\Model\ChartConfig + */ + public function getChartConfig() + { + return $this->container['chart_config']; + } + + /** + * Sets chart_config + * @param \QuantiModo\Client\Model\ChartConfig $chart_config + * @return $this + */ + public function setChartConfig($chart_config) + { + $this->container['chart_config'] = $chart_config; + + return $this; + } + + /** + * Gets chart_id + * @return string + */ + public function getChartId() + { + return $this->container['chart_id']; + } + + /** + * Sets chart_id + * @param string $chart_id Example: correlationScatterPlot + * @return $this + */ + public function setChartId($chart_id) + { + $this->container['chart_id'] = $chart_id; + + return $this; + } + + /** + * Gets chart_title + * @return string + */ + public function getChartTitle() + { + return $this->container['chart_title']; + } + + /** + * Sets chart_title + * @param string $chart_title Example: Overall Mood following Sleep Duration (R = -0.173) + * @return $this + */ + public function setChartTitle($chart_title) + { + $this->container['chart_title'] = $chart_title; + + return $this; + } + + /** + * Gets explanation + * @return string + */ + public function getExplanation() + { + return $this->container['explanation']; + } + + /** + * Sets explanation + * @param string $explanation Example: The chart above indicates that an increase in Sleep Duration is usually followed by an decrease in Overall Mood. + * @return $this + */ + public function setExplanation($explanation) + { + $this->container['explanation'] = $explanation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/HighchartArray.php b/lib/Model/HighchartArray.php new file mode 100644 index 0000000..ca0d958 --- /dev/null +++ b/lib/Model/HighchartArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Hover.php b/lib/Model/Hover.php new file mode 100644 index 0000000..5fd1ae3 --- /dev/null +++ b/lib/Model/Hover.php @@ -0,0 +1,314 @@ + 'bool', + 'line_color' => 'string', + 'marker' => '\QuantiModo\Client\Model\Marker' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'enabled' => null, + 'line_color' => null, + 'marker' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled', + 'line_color' => 'lineColor', + 'marker' => 'marker' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled', + 'line_color' => 'setLineColor', + 'marker' => 'setMarker' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled', + 'line_color' => 'getLineColor', + 'marker' => 'getMarker' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['line_color'] = isset($data['line_color']) ? $data['line_color'] : null; + $this->container['marker'] = isset($data['marker']) ? $data['marker'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['enabled'] === null) { + $invalid_properties[] = "'enabled' can't be null"; + } + if ($this->container['line_color'] === null) { + $invalid_properties[] = "'line_color' can't be null"; + } + if ($this->container['marker'] === null) { + $invalid_properties[] = "'marker' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['enabled'] === null) { + return false; + } + if ($this->container['line_color'] === null) { + return false; + } + if ($this->container['marker'] === null) { + return false; + } + return true; + } + + + /** + * Gets enabled + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * @param bool $enabled Example: true + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets line_color + * @return string + */ + public function getLineColor() + { + return $this->container['line_color']; + } + + /** + * Sets line_color + * @param string $line_color Example: rgb(100,100,100) + * @return $this + */ + public function setLineColor($line_color) + { + $this->container['line_color'] = $line_color; + + return $this; + } + + /** + * Gets marker + * @return \QuantiModo\Client\Model\Marker + */ + public function getMarker() + { + return $this->container['marker']; + } + + /** + * Sets marker + * @param \QuantiModo\Client\Model\Marker $marker + * @return $this + */ + public function setMarker($marker) + { + $this->container['marker'] = $marker; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/HumanTime.php b/lib/Model/HumanTime.php deleted file mode 100644 index 1365a59..0000000 --- a/lib/Model/HumanTime.php +++ /dev/null @@ -1,281 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * HumanTime Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class HumanTime implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'HumanTime'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'date' => 'string', - 'timezone_type' => 'int', - 'timezone' => 'string' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'date' => 'date', - 'timezone_type' => 'timezone_type', - 'timezone' => 'timezone' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'date' => 'setDate', - 'timezone_type' => 'setTimezoneType', - 'timezone' => 'setTimezone' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'date' => 'getDate', - 'timezone_type' => 'getTimezoneType', - 'timezone' => 'getTimezone' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['date'] = isset($data['date']) ? $data['date'] : null; - $this->container['timezone_type'] = isset($data['timezone_type']) ? $data['timezone_type'] : null; - $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets date - * @return string - */ - public function getDate() - { - return $this->container['date']; - } - - /** - * Sets date - * @param string $date date time - * @return $this - */ - public function setDate($date) - { - $this->container['date'] = $date; - - return $this; - } - - /** - * Gets timezone_type - * @return int - */ - public function getTimezoneType() - { - return $this->container['timezone_type']; - } - - /** - * Sets timezone_type - * @param int $timezone_type - * @return $this - */ - public function setTimezoneType($timezone_type) - { - $this->container['timezone_type'] = $timezone_type; - - return $this; - } - - /** - * Gets timezone - * @return string - */ - public function getTimezone() - { - return $this->container['timezone']; - } - - /** - * Sets timezone - * @param string $timezone timezone of date time - * @return $this - */ - public function setTimezone($timezone) - { - $this->container['timezone'] = $timezone; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/Image.php b/lib/Model/Image.php new file mode 100644 index 0000000..74f5dd5 --- /dev/null +++ b/lib/Model/Image.php @@ -0,0 +1,314 @@ + 'string', + 'image_url' => 'string', + 'width' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'height' => null, + 'image_url' => null, + 'width' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'height' => 'height', + 'image_url' => 'imageUrl', + 'width' => 'width' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'height' => 'setHeight', + 'image_url' => 'setImageUrl', + 'width' => 'setWidth' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'height' => 'getHeight', + 'image_url' => 'getImageUrl', + 'width' => 'getWidth' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['height'] = isset($data['height']) ? $data['height'] : null; + $this->container['image_url'] = isset($data['image_url']) ? $data['image_url'] : null; + $this->container['width'] = isset($data['width']) ? $data['width'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['height'] === null) { + $invalid_properties[] = "'height' can't be null"; + } + if ($this->container['image_url'] === null) { + $invalid_properties[] = "'image_url' can't be null"; + } + if ($this->container['width'] === null) { + $invalid_properties[] = "'width' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['height'] === null) { + return false; + } + if ($this->container['image_url'] === null) { + return false; + } + if ($this->container['width'] === null) { + return false; + } + return true; + } + + + /** + * Gets height + * @return string + */ + public function getHeight() + { + return $this->container['height']; + } + + /** + * Sets height + * @param string $height Example: 240 + * @return $this + */ + public function setHeight($height) + { + $this->container['height'] = $height; + + return $this; + } + + /** + * Gets image_url + * @return string + */ + public function getImageUrl() + { + return $this->container['image_url']; + } + + /** + * Sets image_url + * @param string $image_url Example: https://www.filepicker.io/api/file/TjmeNWS5Q2SFmtJlUGLf + * @return $this + */ + public function setImageUrl($image_url) + { + $this->container['image_url'] = $image_url; + + return $this; + } + + /** + * Gets width + * @return string + */ + public function getWidth() + { + return $this->container['width']; + } + + /** + * Sets width + * @param string $width Example: 224 + * @return $this + */ + public function setWidth($width) + { + $this->container['width'] = $width; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InlineResponse200.php b/lib/Model/InlineResponse200.php deleted file mode 100644 index aaa507f..0000000 --- a/lib/Model/InlineResponse200.php +++ /dev/null @@ -1,255 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * InlineResponse200 Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse200 implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'inline_response_200'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'success' => 'bool', - 'data' => '\QuantiModo\Client\Model\Measurement' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'success' => 'success', - 'data' => 'data' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'success' => 'setSuccess', - 'data' => 'setData' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'success' => 'getSuccess', - 'data' => 'getData' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets data - * @return \QuantiModo\Client\Model\Measurement - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * @param \QuantiModo\Client\Model\Measurement $data - * @return $this - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse2001.php b/lib/Model/InlineResponse2001.php deleted file mode 100644 index db0ca4b..0000000 --- a/lib/Model/InlineResponse2001.php +++ /dev/null @@ -1,255 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * InlineResponse2001 Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2001 implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'inline_response_200_1'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'success' => 'bool', - 'data' => 'string' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'success' => 'success', - 'data' => 'data' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'success' => 'setSuccess', - 'data' => 'setData' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'success' => 'getSuccess', - 'data' => 'getData' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets data - * @return string - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * @param string $data - * @return $this - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse20010.php b/lib/Model/InlineResponse20010.php deleted file mode 100644 index 8bbbe51..0000000 --- a/lib/Model/InlineResponse20010.php +++ /dev/null @@ -1,255 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * InlineResponse20010 Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse20010 implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'inline_response_200_10'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'success' => 'bool', - 'data' => '\QuantiModo\Client\Model\Vote[]' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'success' => 'success', - 'data' => 'data' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'success' => 'setSuccess', - 'data' => 'setData' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'success' => 'getSuccess', - 'data' => 'getData' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets data - * @return \QuantiModo\Client\Model\Vote[] - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * @param \QuantiModo\Client\Model\Vote[] $data - * @return $this - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse20011.php b/lib/Model/InlineResponse20011.php deleted file mode 100644 index a0ed884..0000000 --- a/lib/Model/InlineResponse20011.php +++ /dev/null @@ -1,255 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * InlineResponse20011 Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse20011 implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'inline_response_200_11'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'success' => 'bool', - 'data' => '\QuantiModo\Client\Model\TrackingReminder' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'success' => 'success', - 'data' => 'data' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'success' => 'setSuccess', - 'data' => 'setData' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'success' => 'getSuccess', - 'data' => 'getData' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets data - * @return \QuantiModo\Client\Model\TrackingReminder - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * @param \QuantiModo\Client\Model\TrackingReminder $data - * @return $this - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse20012.php b/lib/Model/InlineResponse20012.php deleted file mode 100644 index 18340bb..0000000 --- a/lib/Model/InlineResponse20012.php +++ /dev/null @@ -1,255 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * InlineResponse20012 Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse20012 implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'inline_response_200_12'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'success' => 'bool', - 'data' => '\QuantiModo\Client\Model\TrackingReminderNotification[]' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'success' => 'success', - 'data' => 'data' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'success' => 'setSuccess', - 'data' => 'setData' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'success' => 'getSuccess', - 'data' => 'getData' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets data - * @return \QuantiModo\Client\Model\TrackingReminderNotification[] - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * @param \QuantiModo\Client\Model\TrackingReminderNotification[] $data - * @return $this - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse2002.php b/lib/Model/InlineResponse2002.php deleted file mode 100644 index b605f14..0000000 --- a/lib/Model/InlineResponse2002.php +++ /dev/null @@ -1,255 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * InlineResponse2002 Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2002 implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'inline_response_200_2'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'success' => 'bool', - 'data' => '\QuantiModo\Client\Model\Connection[]' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'success' => 'success', - 'data' => 'data' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'success' => 'setSuccess', - 'data' => 'setData' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'success' => 'getSuccess', - 'data' => 'getData' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets data - * @return \QuantiModo\Client\Model\Connection[] - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * @param \QuantiModo\Client\Model\Connection[] $data - * @return $this - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse2003.php b/lib/Model/InlineResponse2003.php deleted file mode 100644 index b8c0da2..0000000 --- a/lib/Model/InlineResponse2003.php +++ /dev/null @@ -1,255 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * InlineResponse2003 Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2003 implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'inline_response_200_3'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'data' => '\QuantiModo\Client\Model\Credential[]', - 'success' => 'bool' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'data' => 'data', - 'success' => 'success' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'data' => 'setData', - 'success' => 'setSuccess' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'data' => 'getData', - 'success' => 'getSuccess' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets data - * @return \QuantiModo\Client\Model\Credential[] - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * @param \QuantiModo\Client\Model\Credential[] $data - * @return $this - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse2004.php b/lib/Model/InlineResponse2004.php deleted file mode 100644 index 0330449..0000000 --- a/lib/Model/InlineResponse2004.php +++ /dev/null @@ -1,255 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * InlineResponse2004 Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2004 implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'inline_response_200_4'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'success' => 'bool', - 'data' => '\QuantiModo\Client\Model\Measurement[]' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'success' => 'success', - 'data' => 'data' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'success' => 'setSuccess', - 'data' => 'setData' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'success' => 'getSuccess', - 'data' => 'getData' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets data - * @return \QuantiModo\Client\Model\Measurement[] - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * @param \QuantiModo\Client\Model\Measurement[] $data - * @return $this - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse2005.php b/lib/Model/InlineResponse2005.php deleted file mode 100644 index ddeeafe..0000000 --- a/lib/Model/InlineResponse2005.php +++ /dev/null @@ -1,255 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * InlineResponse2005 Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2005 implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'inline_response_200_5'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'success' => 'bool', - 'data' => '\QuantiModo\Client\Model\TrackingReminder[]' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'success' => 'success', - 'data' => 'data' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'success' => 'setSuccess', - 'data' => 'setData' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'success' => 'getSuccess', - 'data' => 'getData' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets data - * @return \QuantiModo\Client\Model\TrackingReminder[] - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * @param \QuantiModo\Client\Model\TrackingReminder[] $data - * @return $this - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse2006.php b/lib/Model/InlineResponse2006.php deleted file mode 100644 index 4289947..0000000 --- a/lib/Model/InlineResponse2006.php +++ /dev/null @@ -1,255 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * InlineResponse2006 Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2006 implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'inline_response_200_6'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'success' => 'bool', - 'data' => '\QuantiModo\Client\Model\Update[]' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'success' => 'success', - 'data' => 'data' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'success' => 'setSuccess', - 'data' => 'setData' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'success' => 'getSuccess', - 'data' => 'getData' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets data - * @return \QuantiModo\Client\Model\Update[] - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * @param \QuantiModo\Client\Model\Update[] $data - * @return $this - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse2007.php b/lib/Model/InlineResponse2007.php deleted file mode 100644 index 9b3b648..0000000 --- a/lib/Model/InlineResponse2007.php +++ /dev/null @@ -1,255 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * InlineResponse2007 Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2007 implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'inline_response_200_7'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'success' => 'bool', - 'data' => '\QuantiModo\Client\Model\UserVariable[]' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'success' => 'success', - 'data' => 'data' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'success' => 'setSuccess', - 'data' => 'setData' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'success' => 'getSuccess', - 'data' => 'getData' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets data - * @return \QuantiModo\Client\Model\UserVariable[] - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * @param \QuantiModo\Client\Model\UserVariable[] $data - * @return $this - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse2008.php b/lib/Model/InlineResponse2008.php deleted file mode 100644 index 6905584..0000000 --- a/lib/Model/InlineResponse2008.php +++ /dev/null @@ -1,255 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * InlineResponse2008 Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2008 implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'inline_response_200_8'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'success' => 'bool', - 'data' => '\QuantiModo\Client\Model\UserVariableRelationship[]' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'success' => 'success', - 'data' => 'data' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'success' => 'setSuccess', - 'data' => 'setData' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'success' => 'getSuccess', - 'data' => 'getData' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets data - * @return \QuantiModo\Client\Model\UserVariableRelationship[] - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * @param \QuantiModo\Client\Model\UserVariableRelationship[] $data - * @return $this - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse2009.php b/lib/Model/InlineResponse2009.php deleted file mode 100644 index f571a47..0000000 --- a/lib/Model/InlineResponse2009.php +++ /dev/null @@ -1,255 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * InlineResponse2009 Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2009 implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'inline_response_200_9'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'success' => 'bool', - 'data' => '\QuantiModo\Client\Model\VariableUserSource[]' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'success' => 'success', - 'data' => 'data' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'success' => 'setSuccess', - 'data' => 'setData' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'success' => 'getSuccess', - 'data' => 'getData' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets data - * @return \QuantiModo\Client\Model\VariableUserSource[] - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * @param \QuantiModo\Client\Model\VariableUserSource[] $data - * @return $this - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/JsonErrorResponse.php b/lib/Model/JsonErrorResponse.php index 9a61ba4..4128c3f 100644 --- a/lib/Model/JsonErrorResponse.php +++ b/lib/Model/JsonErrorResponse.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,8 +54,17 @@ class JsonErrorResponse implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'status' => 'string', - 'message' => 'string' + 'message' => 'string', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'message' => null, + 'status' => null ]; public static function swaggerTypes() @@ -63,13 +72,18 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'message' => 'message' + 'message' => 'message', + 'status' => 'status' ]; @@ -78,8 +92,8 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'message' => 'setMessage' + 'message' => 'setMessage', + 'status' => 'setStatus' ]; @@ -88,8 +102,8 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'message' => 'getMessage' + 'message' => 'getMessage', + 'status' => 'getStatus' ]; public static function attributeMap() @@ -123,8 +137,8 @@ public static function getters() */ public function __construct(array $data = null) { - $this->container['status'] = isset($data['status']) ? $data['status'] : null; $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; } /** @@ -159,43 +173,43 @@ public function valid() /** - * Gets status + * Gets message * @return string */ - public function getStatus() + public function getMessage() { - return $this->container['status']; + return $this->container['message']; } /** - * Sets status - * @param string $status Status: \"ok\" or \"error\" + * Sets message + * @param string $message Error message * @return $this */ - public function setStatus($status) + public function setMessage($message) { - $this->container['status'] = $status; + $this->container['message'] = $message; return $this; } /** - * Gets message + * Gets status * @return string */ - public function getMessage() + public function getStatus() { - return $this->container['message']; + return $this->container['status']; } /** - * Sets message - * @param string $message Error message + * Sets status + * @param string $status Status: \"ok\" or \"error\" * @return $this */ - public function setMessage($message) + public function setStatus($status) { - $this->container['message'] = $message; + $this->container['status'] = $status; return $this; } diff --git a/lib/Model/Lang.php b/lib/Model/Lang.php new file mode 100644 index 0000000..d456e0a --- /dev/null +++ b/lib/Model/Lang.php @@ -0,0 +1,248 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'loading' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'loading' => 'loading' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'loading' => 'setLoading' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'loading' => 'getLoading' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['loading'] = isset($data['loading']) ? $data['loading'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['loading'] === null) { + $invalid_properties[] = "'loading' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['loading'] === null) { + return false; + } + return true; + } + + + /** + * Gets loading + * @return string + */ + public function getLoading() + { + return $this->container['loading']; + } + + /** + * Sets loading + * @param string $loading Example: + * @return $this + */ + public function setLoading($loading) + { + $this->container['loading'] = $loading; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Legend.php b/lib/Model/Legend.php new file mode 100644 index 0000000..4062597 --- /dev/null +++ b/lib/Model/Legend.php @@ -0,0 +1,248 @@ + 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'enabled' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['enabled'] === null) { + $invalid_properties[] = "'enabled' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['enabled'] === null) { + return false; + } + return true; + } + + + /** + * Gets enabled + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * @param bool $enabled Example: false + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Loading.php b/lib/Model/Loading.php new file mode 100644 index 0000000..fcb468d --- /dev/null +++ b/lib/Model/Loading.php @@ -0,0 +1,314 @@ + 'int', + 'show_duration' => 'int', + 'style' => '\QuantiModo\Client\Model\ChartStyle' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'hide_duration' => null, + 'show_duration' => null, + 'style' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'hide_duration' => 'hideDuration', + 'show_duration' => 'showDuration', + 'style' => 'style' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'hide_duration' => 'setHideDuration', + 'show_duration' => 'setShowDuration', + 'style' => 'setStyle' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'hide_duration' => 'getHideDuration', + 'show_duration' => 'getShowDuration', + 'style' => 'getStyle' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['hide_duration'] = isset($data['hide_duration']) ? $data['hide_duration'] : null; + $this->container['show_duration'] = isset($data['show_duration']) ? $data['show_duration'] : null; + $this->container['style'] = isset($data['style']) ? $data['style'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['hide_duration'] === null) { + $invalid_properties[] = "'hide_duration' can't be null"; + } + if ($this->container['show_duration'] === null) { + $invalid_properties[] = "'show_duration' can't be null"; + } + if ($this->container['style'] === null) { + $invalid_properties[] = "'style' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['hide_duration'] === null) { + return false; + } + if ($this->container['show_duration'] === null) { + return false; + } + if ($this->container['style'] === null) { + return false; + } + return true; + } + + + /** + * Gets hide_duration + * @return int + */ + public function getHideDuration() + { + return $this->container['hide_duration']; + } + + /** + * Sets hide_duration + * @param int $hide_duration Example: 10 + * @return $this + */ + public function setHideDuration($hide_duration) + { + $this->container['hide_duration'] = $hide_duration; + + return $this; + } + + /** + * Gets show_duration + * @return int + */ + public function getShowDuration() + { + return $this->container['show_duration']; + } + + /** + * Sets show_duration + * @param int $show_duration Example: 10 + * @return $this + */ + public function setShowDuration($show_duration) + { + $this->container['show_duration'] = $show_duration; + + return $this; + } + + /** + * Gets style + * @return \QuantiModo\Client\Model\ChartStyle + */ + public function getStyle() + { + return $this->container['style']; + } + + /** + * Sets style + * @param \QuantiModo\Client\Model\ChartStyle $style + * @return $this + */ + public function setStyle($style) + { + $this->container['style'] = $style; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LocalDailyReminderNotificationTime.php b/lib/Model/LocalDailyReminderNotificationTime.php new file mode 100644 index 0000000..00b4aab --- /dev/null +++ b/lib/Model/LocalDailyReminderNotificationTime.php @@ -0,0 +1,242 @@ + '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'local_daily_reminder_notification_time' => 'date-time' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'local_daily_reminder_notification_time' => 'LocalDailyReminderNotificationTime' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'local_daily_reminder_notification_time' => 'setLocalDailyReminderNotificationTime' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'local_daily_reminder_notification_time' => 'getLocalDailyReminderNotificationTime' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['local_daily_reminder_notification_time'] = isset($data['local_daily_reminder_notification_time']) ? $data['local_daily_reminder_notification_time'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets local_daily_reminder_notification_time + * @return \DateTime + */ + public function getLocalDailyReminderNotificationTime() + { + return $this->container['local_daily_reminder_notification_time']; + } + + /** + * Sets local_daily_reminder_notification_time + * @param \DateTime $local_daily_reminder_notification_time Example: 00:10:00 + * @return $this + */ + public function setLocalDailyReminderNotificationTime($local_daily_reminder_notification_time) + { + $this->container['local_daily_reminder_notification_time'] = $local_daily_reminder_notification_time; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LocalDailyReminderNotificationTimeArray.php b/lib/Model/LocalDailyReminderNotificationTimeArray.php new file mode 100644 index 0000000..f964d60 --- /dev/null +++ b/lib/Model/LocalDailyReminderNotificationTimeArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LocalDailyReminderNotificationTimesForAllReminder.php b/lib/Model/LocalDailyReminderNotificationTimesForAllReminder.php new file mode 100644 index 0000000..6c5924b --- /dev/null +++ b/lib/Model/LocalDailyReminderNotificationTimesForAllReminder.php @@ -0,0 +1,242 @@ + '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'local_daily_reminder_notification_times_for_all_reminder' => 'date-time' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'local_daily_reminder_notification_times_for_all_reminder' => 'LocalDailyReminderNotificationTimesForAllReminder' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'local_daily_reminder_notification_times_for_all_reminder' => 'setLocalDailyReminderNotificationTimesForAllReminder' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'local_daily_reminder_notification_times_for_all_reminder' => 'getLocalDailyReminderNotificationTimesForAllReminder' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['local_daily_reminder_notification_times_for_all_reminder'] = isset($data['local_daily_reminder_notification_times_for_all_reminder']) ? $data['local_daily_reminder_notification_times_for_all_reminder'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets local_daily_reminder_notification_times_for_all_reminder + * @return \DateTime + */ + public function getLocalDailyReminderNotificationTimesForAllReminder() + { + return $this->container['local_daily_reminder_notification_times_for_all_reminder']; + } + + /** + * Sets local_daily_reminder_notification_times_for_all_reminder + * @param \DateTime $local_daily_reminder_notification_times_for_all_reminder Example: 00:10:00 + * @return $this + */ + public function setLocalDailyReminderNotificationTimesForAllReminder($local_daily_reminder_notification_times_for_all_reminder) + { + $this->container['local_daily_reminder_notification_times_for_all_reminder'] = $local_daily_reminder_notification_times_for_all_reminder; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LocalDailyReminderNotificationTimesForAllReminderArray.php b/lib/Model/LocalDailyReminderNotificationTimesForAllReminderArray.php new file mode 100644 index 0000000..0cd3278 --- /dev/null +++ b/lib/Model/LocalDailyReminderNotificationTimesForAllReminderArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Marker.php b/lib/Model/Marker.php new file mode 100644 index 0000000..1fbb54c --- /dev/null +++ b/lib/Model/Marker.php @@ -0,0 +1,314 @@ + 'bool', + 'radius' => 'int', + 'states' => '\QuantiModo\Client\Model\State' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'enabled' => null, + 'radius' => null, + 'states' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled', + 'radius' => 'radius', + 'states' => 'states' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled', + 'radius' => 'setRadius', + 'states' => 'setStates' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled', + 'radius' => 'getRadius', + 'states' => 'getStates' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['radius'] = isset($data['radius']) ? $data['radius'] : null; + $this->container['states'] = isset($data['states']) ? $data['states'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['enabled'] === null) { + $invalid_properties[] = "'enabled' can't be null"; + } + if ($this->container['radius'] === null) { + $invalid_properties[] = "'radius' can't be null"; + } + if ($this->container['states'] === null) { + $invalid_properties[] = "'states' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['enabled'] === null) { + return false; + } + if ($this->container['radius'] === null) { + return false; + } + if ($this->container['states'] === null) { + return false; + } + return true; + } + + + /** + * Gets enabled + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * @param bool $enabled Example: false + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets radius + * @return int + */ + public function getRadius() + { + return $this->container['radius']; + } + + /** + * Sets radius + * @param int $radius Example: 5 + * @return $this + */ + public function setRadius($radius) + { + $this->container['radius'] = $radius; + + return $this; + } + + /** + * Gets states + * @return \QuantiModo\Client\Model\State + */ + public function getStates() + { + return $this->container['states']; + } + + /** + * Sets states + * @param \QuantiModo\Client\Model\State $states + * @return $this + */ + public function setStates($states) + { + $this->container['states'] = $states; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Measurement.php b/lib/Model/Measurement.php index 6e1f731..2b390c0 100644 --- a/lib/Model/Measurement.php +++ b/lib/Model/Measurement.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,16 +54,105 @@ class Measurement implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'variable_name' => 'string', + 'client_id' => 'string', + 'connector_id' => 'int', + 'created_at' => 'string', + 'icon_icon' => 'string', + 'id' => 'int', + 'input_type' => 'string', + 'ion_icon' => 'string', + 'manual_tracking' => 'bool', + 'maximum_allowed_value' => 'int', + 'minimum_allowed_value' => 'int', + 'note' => 'string', + 'originalunit_abbreviated_name' => 'string', + 'original_unit_abbreviated_name' => 'string', + 'original_unit_category_id' => 'int', + 'original_unit_category_name' => 'string', + 'original_unit_id' => 'int', + 'original_unit_name' => 'string', + 'original_value' => 'int', + 'png_path' => 'string', + 'png_url' => 'string', 'source_name' => 'string', - 'start_time_string' => 'string', + 'start_date' => 'string', 'start_time_epoch' => 'int', - 'human_time' => '\QuantiModo\Client\Model\HumanTime', + 'start_time_string' => 'string', + 'svg_url' => 'string', + 'unit_abbreviated_name' => 'string', + 'unit_category_id' => 'int', + 'unit_category_name' => 'string', + 'unit_id' => 'int', + 'unit_name' => 'string', + 'updated_at' => 'string', + 'user_variable_unit_abbreviated_name' => 'string', + 'user_variable_unit_category_id' => 'int', + 'user_variable_unit_category_name' => 'string', + 'user_variable_unit_id' => 'int', + 'user_variable_unit_name' => 'string', + 'user_variable_variable_category_id' => 'int', + 'user_variable_variable_category_name' => 'string', + 'valence' => 'string', 'value' => 'double', - 'original_value' => 'int', - 'original_abbreviated_unit_name' => 'string', - 'abbreviated_unit_name' => 'string', - 'note' => 'string' + 'variable_category_id' => 'int', + 'variable_category_image_url' => 'string', + 'variable_category_name' => 'string', + 'variable_description' => 'string', + 'variable_id' => 'int', + 'variable_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'client_id' => null, + 'connector_id' => null, + 'created_at' => null, + 'icon_icon' => null, + 'id' => null, + 'input_type' => null, + 'ion_icon' => null, + 'manual_tracking' => null, + 'maximum_allowed_value' => null, + 'minimum_allowed_value' => null, + 'note' => null, + 'originalunit_abbreviated_name' => null, + 'original_unit_abbreviated_name' => null, + 'original_unit_category_id' => null, + 'original_unit_category_name' => null, + 'original_unit_id' => null, + 'original_unit_name' => null, + 'original_value' => null, + 'png_path' => null, + 'png_url' => null, + 'source_name' => null, + 'start_date' => null, + 'start_time_epoch' => null, + 'start_time_string' => null, + 'svg_url' => null, + 'unit_abbreviated_name' => null, + 'unit_category_id' => null, + 'unit_category_name' => null, + 'unit_id' => null, + 'unit_name' => null, + 'updated_at' => null, + 'user_variable_unit_abbreviated_name' => null, + 'user_variable_unit_category_id' => null, + 'user_variable_unit_category_name' => null, + 'user_variable_unit_id' => null, + 'user_variable_unit_name' => null, + 'user_variable_variable_category_id' => null, + 'user_variable_variable_category_name' => null, + 'valence' => null, + 'value' => 'double', + 'variable_category_id' => null, + 'variable_category_image_url' => null, + 'variable_category_name' => null, + 'variable_description' => null, + 'variable_id' => null, + 'variable_name' => null ]; public static function swaggerTypes() @@ -71,21 +160,62 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'variable_name' => 'variableName', + 'client_id' => 'clientId', + 'connector_id' => 'connectorId', + 'created_at' => 'createdAt', + 'icon_icon' => 'iconIcon', + 'id' => 'id', + 'input_type' => 'inputType', + 'ion_icon' => 'ionIcon', + 'manual_tracking' => 'manualTracking', + 'maximum_allowed_value' => 'maximumAllowedValue', + 'minimum_allowed_value' => 'minimumAllowedValue', + 'note' => 'note', + 'originalunit_abbreviated_name' => 'originalunitAbbreviatedName', + 'original_unit_abbreviated_name' => 'originalUnitAbbreviatedName', + 'original_unit_category_id' => 'originalUnitCategoryId', + 'original_unit_category_name' => 'originalUnitCategoryName', + 'original_unit_id' => 'originalUnitId', + 'original_unit_name' => 'originalUnitName', + 'original_value' => 'originalValue', + 'png_path' => 'pngPath', + 'png_url' => 'pngUrl', 'source_name' => 'sourceName', - 'start_time_string' => 'startTimeString', + 'start_date' => 'startDate', 'start_time_epoch' => 'startTimeEpoch', - 'human_time' => 'humanTime', + 'start_time_string' => 'startTimeString', + 'svg_url' => 'svgUrl', + 'unit_abbreviated_name' => 'unitAbbreviatedName', + 'unit_category_id' => 'unitCategoryId', + 'unit_category_name' => 'unitCategoryName', + 'unit_id' => 'unitId', + 'unit_name' => 'unitName', + 'updated_at' => 'updatedAt', + 'user_variable_unit_abbreviated_name' => 'userVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'userVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'userVariableUnitCategoryName', + 'user_variable_unit_id' => 'userVariableUnitId', + 'user_variable_unit_name' => 'userVariableUnitName', + 'user_variable_variable_category_id' => 'userVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'userVariableVariableCategoryName', + 'valence' => 'valence', 'value' => 'value', - 'original_value' => 'originalValue', - 'original_abbreviated_unit_name' => 'originalAbbreviatedUnitName', - 'abbreviated_unit_name' => 'abbreviatedUnitName', - 'note' => 'note' + 'variable_category_id' => 'variableCategoryId', + 'variable_category_image_url' => 'variableCategoryImageUrl', + 'variable_category_name' => 'variableCategoryName', + 'variable_description' => 'variableDescription', + 'variable_id' => 'variableId', + 'variable_name' => 'variableName' ]; @@ -94,16 +224,52 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'variable_name' => 'setVariableName', + 'client_id' => 'setClientId', + 'connector_id' => 'setConnectorId', + 'created_at' => 'setCreatedAt', + 'icon_icon' => 'setIconIcon', + 'id' => 'setId', + 'input_type' => 'setInputType', + 'ion_icon' => 'setIonIcon', + 'manual_tracking' => 'setManualTracking', + 'maximum_allowed_value' => 'setMaximumAllowedValue', + 'minimum_allowed_value' => 'setMinimumAllowedValue', + 'note' => 'setNote', + 'originalunit_abbreviated_name' => 'setOriginalunitAbbreviatedName', + 'original_unit_abbreviated_name' => 'setOriginalUnitAbbreviatedName', + 'original_unit_category_id' => 'setOriginalUnitCategoryId', + 'original_unit_category_name' => 'setOriginalUnitCategoryName', + 'original_unit_id' => 'setOriginalUnitId', + 'original_unit_name' => 'setOriginalUnitName', + 'original_value' => 'setOriginalValue', + 'png_path' => 'setPngPath', + 'png_url' => 'setPngUrl', 'source_name' => 'setSourceName', - 'start_time_string' => 'setStartTimeString', + 'start_date' => 'setStartDate', 'start_time_epoch' => 'setStartTimeEpoch', - 'human_time' => 'setHumanTime', + 'start_time_string' => 'setStartTimeString', + 'svg_url' => 'setSvgUrl', + 'unit_abbreviated_name' => 'setUnitAbbreviatedName', + 'unit_category_id' => 'setUnitCategoryId', + 'unit_category_name' => 'setUnitCategoryName', + 'unit_id' => 'setUnitId', + 'unit_name' => 'setUnitName', + 'updated_at' => 'setUpdatedAt', + 'user_variable_unit_abbreviated_name' => 'setUserVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'setUserVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'setUserVariableUnitCategoryName', + 'user_variable_unit_id' => 'setUserVariableUnitId', + 'user_variable_unit_name' => 'setUserVariableUnitName', + 'user_variable_variable_category_id' => 'setUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'setUserVariableVariableCategoryName', + 'valence' => 'setValence', 'value' => 'setValue', - 'original_value' => 'setOriginalValue', - 'original_abbreviated_unit_name' => 'setOriginalAbbreviatedUnitName', - 'abbreviated_unit_name' => 'setAbbreviatedUnitName', - 'note' => 'setNote' + 'variable_category_id' => 'setVariableCategoryId', + 'variable_category_image_url' => 'setVariableCategoryImageUrl', + 'variable_category_name' => 'setVariableCategoryName', + 'variable_description' => 'setVariableDescription', + 'variable_id' => 'setVariableId', + 'variable_name' => 'setVariableName' ]; @@ -112,16 +278,52 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'variable_name' => 'getVariableName', + 'client_id' => 'getClientId', + 'connector_id' => 'getConnectorId', + 'created_at' => 'getCreatedAt', + 'icon_icon' => 'getIconIcon', + 'id' => 'getId', + 'input_type' => 'getInputType', + 'ion_icon' => 'getIonIcon', + 'manual_tracking' => 'getManualTracking', + 'maximum_allowed_value' => 'getMaximumAllowedValue', + 'minimum_allowed_value' => 'getMinimumAllowedValue', + 'note' => 'getNote', + 'originalunit_abbreviated_name' => 'getOriginalunitAbbreviatedName', + 'original_unit_abbreviated_name' => 'getOriginalUnitAbbreviatedName', + 'original_unit_category_id' => 'getOriginalUnitCategoryId', + 'original_unit_category_name' => 'getOriginalUnitCategoryName', + 'original_unit_id' => 'getOriginalUnitId', + 'original_unit_name' => 'getOriginalUnitName', + 'original_value' => 'getOriginalValue', + 'png_path' => 'getPngPath', + 'png_url' => 'getPngUrl', 'source_name' => 'getSourceName', - 'start_time_string' => 'getStartTimeString', + 'start_date' => 'getStartDate', 'start_time_epoch' => 'getStartTimeEpoch', - 'human_time' => 'getHumanTime', + 'start_time_string' => 'getStartTimeString', + 'svg_url' => 'getSvgUrl', + 'unit_abbreviated_name' => 'getUnitAbbreviatedName', + 'unit_category_id' => 'getUnitCategoryId', + 'unit_category_name' => 'getUnitCategoryName', + 'unit_id' => 'getUnitId', + 'unit_name' => 'getUnitName', + 'updated_at' => 'getUpdatedAt', + 'user_variable_unit_abbreviated_name' => 'getUserVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'getUserVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'getUserVariableUnitCategoryName', + 'user_variable_unit_id' => 'getUserVariableUnitId', + 'user_variable_unit_name' => 'getUserVariableUnitName', + 'user_variable_variable_category_id' => 'getUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'getUserVariableVariableCategoryName', + 'valence' => 'getValence', 'value' => 'getValue', - 'original_value' => 'getOriginalValue', - 'original_abbreviated_unit_name' => 'getOriginalAbbreviatedUnitName', - 'abbreviated_unit_name' => 'getAbbreviatedUnitName', - 'note' => 'getNote' + 'variable_category_id' => 'getVariableCategoryId', + 'variable_category_image_url' => 'getVariableCategoryImageUrl', + 'variable_category_name' => 'getVariableCategoryName', + 'variable_description' => 'getVariableDescription', + 'variable_id' => 'getVariableId', + 'variable_name' => 'getVariableName' ]; public static function attributeMap() @@ -155,16 +357,52 @@ public static function getters() */ public function __construct(array $data = null) { - $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; + $this->container['client_id'] = isset($data['client_id']) ? $data['client_id'] : null; + $this->container['connector_id'] = isset($data['connector_id']) ? $data['connector_id'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['icon_icon'] = isset($data['icon_icon']) ? $data['icon_icon'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['input_type'] = isset($data['input_type']) ? $data['input_type'] : null; + $this->container['ion_icon'] = isset($data['ion_icon']) ? $data['ion_icon'] : null; + $this->container['manual_tracking'] = isset($data['manual_tracking']) ? $data['manual_tracking'] : null; + $this->container['maximum_allowed_value'] = isset($data['maximum_allowed_value']) ? $data['maximum_allowed_value'] : null; + $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; + $this->container['note'] = isset($data['note']) ? $data['note'] : null; + $this->container['originalunit_abbreviated_name'] = isset($data['originalunit_abbreviated_name']) ? $data['originalunit_abbreviated_name'] : null; + $this->container['original_unit_abbreviated_name'] = isset($data['original_unit_abbreviated_name']) ? $data['original_unit_abbreviated_name'] : null; + $this->container['original_unit_category_id'] = isset($data['original_unit_category_id']) ? $data['original_unit_category_id'] : null; + $this->container['original_unit_category_name'] = isset($data['original_unit_category_name']) ? $data['original_unit_category_name'] : null; + $this->container['original_unit_id'] = isset($data['original_unit_id']) ? $data['original_unit_id'] : null; + $this->container['original_unit_name'] = isset($data['original_unit_name']) ? $data['original_unit_name'] : null; + $this->container['original_value'] = isset($data['original_value']) ? $data['original_value'] : null; + $this->container['png_path'] = isset($data['png_path']) ? $data['png_path'] : null; + $this->container['png_url'] = isset($data['png_url']) ? $data['png_url'] : null; $this->container['source_name'] = isset($data['source_name']) ? $data['source_name'] : null; - $this->container['start_time_string'] = isset($data['start_time_string']) ? $data['start_time_string'] : null; + $this->container['start_date'] = isset($data['start_date']) ? $data['start_date'] : null; $this->container['start_time_epoch'] = isset($data['start_time_epoch']) ? $data['start_time_epoch'] : null; - $this->container['human_time'] = isset($data['human_time']) ? $data['human_time'] : null; + $this->container['start_time_string'] = isset($data['start_time_string']) ? $data['start_time_string'] : null; + $this->container['svg_url'] = isset($data['svg_url']) ? $data['svg_url'] : null; + $this->container['unit_abbreviated_name'] = isset($data['unit_abbreviated_name']) ? $data['unit_abbreviated_name'] : null; + $this->container['unit_category_id'] = isset($data['unit_category_id']) ? $data['unit_category_id'] : null; + $this->container['unit_category_name'] = isset($data['unit_category_name']) ? $data['unit_category_name'] : null; + $this->container['unit_id'] = isset($data['unit_id']) ? $data['unit_id'] : null; + $this->container['unit_name'] = isset($data['unit_name']) ? $data['unit_name'] : null; + $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; + $this->container['user_variable_unit_abbreviated_name'] = isset($data['user_variable_unit_abbreviated_name']) ? $data['user_variable_unit_abbreviated_name'] : null; + $this->container['user_variable_unit_category_id'] = isset($data['user_variable_unit_category_id']) ? $data['user_variable_unit_category_id'] : null; + $this->container['user_variable_unit_category_name'] = isset($data['user_variable_unit_category_name']) ? $data['user_variable_unit_category_name'] : null; + $this->container['user_variable_unit_id'] = isset($data['user_variable_unit_id']) ? $data['user_variable_unit_id'] : null; + $this->container['user_variable_unit_name'] = isset($data['user_variable_unit_name']) ? $data['user_variable_unit_name'] : null; + $this->container['user_variable_variable_category_id'] = isset($data['user_variable_variable_category_id']) ? $data['user_variable_variable_category_id'] : null; + $this->container['user_variable_variable_category_name'] = isset($data['user_variable_variable_category_name']) ? $data['user_variable_variable_category_name'] : null; + $this->container['valence'] = isset($data['valence']) ? $data['valence'] : null; $this->container['value'] = isset($data['value']) ? $data['value'] : null; - $this->container['original_value'] = isset($data['original_value']) ? $data['original_value'] : null; - $this->container['original_abbreviated_unit_name'] = isset($data['original_abbreviated_unit_name']) ? $data['original_abbreviated_unit_name'] : null; - $this->container['abbreviated_unit_name'] = isset($data['abbreviated_unit_name']) ? $data['abbreviated_unit_name'] : null; - $this->container['note'] = isset($data['note']) ? $data['note'] : null; + $this->container['variable_category_id'] = isset($data['variable_category_id']) ? $data['variable_category_id'] : null; + $this->container['variable_category_image_url'] = isset($data['variable_category_image_url']) ? $data['variable_category_image_url'] : null; + $this->container['variable_category_name'] = isset($data['variable_category_name']) ? $data['variable_category_name'] : null; + $this->container['variable_description'] = isset($data['variable_description']) ? $data['variable_description'] : null; + $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; + $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; } /** @@ -176,17 +414,20 @@ public function listInvalidProperties() { $invalid_properties = []; - if ($this->container['variable_name'] === null) { - $invalid_properties[] = "'variable_name' can't be null"; - } if ($this->container['source_name'] === null) { $invalid_properties[] = "'source_name' can't be null"; } + if ($this->container['start_time_string'] === null) { + $invalid_properties[] = "'start_time_string' can't be null"; + } + if ($this->container['unit_abbreviated_name'] === null) { + $invalid_properties[] = "'unit_abbreviated_name' can't be null"; + } if ($this->container['value'] === null) { $invalid_properties[] = "'value' can't be null"; } - if ($this->container['abbreviated_unit_name'] === null) { - $invalid_properties[] = "'abbreviated_unit_name' can't be null"; + if ($this->container['variable_name'] === null) { + $invalid_properties[] = "'variable_name' can't be null"; } return $invalid_properties; } @@ -200,16 +441,19 @@ public function listInvalidProperties() public function valid() { - if ($this->container['variable_name'] === null) { + if ($this->container['source_name'] === null) { return false; } - if ($this->container['source_name'] === null) { + if ($this->container['start_time_string'] === null) { + return false; + } + if ($this->container['unit_abbreviated_name'] === null) { return false; } if ($this->container['value'] === null) { return false; } - if ($this->container['abbreviated_unit_name'] === null) { + if ($this->container['variable_name'] === null) { return false; } return true; @@ -217,127 +461,358 @@ public function valid() /** - * Gets variable_name + * Gets client_id * @return string */ - public function getVariableName() + public function getClientId() { - return $this->container['variable_name']; + return $this->container['client_id']; } /** - * Sets variable_name - * @param string $variable_name Name of the variable for which we are creating the measurement records + * Sets client_id + * @param string $client_id Example: quantimodo * @return $this */ - public function setVariableName($variable_name) + public function setClientId($client_id) { - $this->container['variable_name'] = $variable_name; + $this->container['client_id'] = $client_id; return $this; } /** - * Gets source_name + * Gets connector_id + * @return int + */ + public function getConnectorId() + { + return $this->container['connector_id']; + } + + /** + * Sets connector_id + * @param int $connector_id Example: 13 + * @return $this + */ + public function setConnectorId($connector_id) + { + $this->container['connector_id'] = $connector_id; + + return $this; + } + + /** + * Gets created_at * @return string */ - public function getSourceName() + public function getCreatedAt() { - return $this->container['source_name']; + return $this->container['created_at']; } /** - * Sets source_name - * @param string $source_name Application or device used to record the measurement values + * Sets created_at + * @param string $created_at Example: 2017-07-30 21:08:36 * @return $this */ - public function setSourceName($source_name) + public function setCreatedAt($created_at) { - $this->container['source_name'] = $source_name; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets start_time_string + * Gets icon_icon * @return string */ - public function getStartTimeString() + public function getIconIcon() { - return $this->container['start_time_string']; + return $this->container['icon_icon']; } /** - * Sets start_time_string - * @param string $start_time_string Start Time for the measurement event in UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" + * Sets icon_icon + * @param string $icon_icon Example: ion-sad-outline * @return $this */ - public function setStartTimeString($start_time_string) + public function setIconIcon($icon_icon) { - $this->container['start_time_string'] = $start_time_string; + $this->container['icon_icon'] = $icon_icon; return $this; } /** - * Gets start_time_epoch + * Gets id * @return int */ - public function getStartTimeEpoch() + public function getId() { - return $this->container['start_time_epoch']; + return $this->container['id']; } /** - * Sets start_time_epoch - * @param int $start_time_epoch Seconds between the start of the event measured and 1970 (Unix timestamp) + * Sets id + * @param int $id Example: 1051466127 * @return $this */ - public function setStartTimeEpoch($start_time_epoch) + public function setId($id) { - $this->container['start_time_epoch'] = $start_time_epoch; + $this->container['id'] = $id; return $this; } /** - * Gets human_time - * @return \QuantiModo\Client\Model\HumanTime + * Gets input_type + * @return string */ - public function getHumanTime() + public function getInputType() { - return $this->container['human_time']; + return $this->container['input_type']; } /** - * Sets human_time - * @param \QuantiModo\Client\Model\HumanTime $human_time + * Sets input_type + * @param string $input_type Example: value * @return $this */ - public function setHumanTime($human_time) + public function setInputType($input_type) { - $this->container['human_time'] = $human_time; + $this->container['input_type'] = $input_type; return $this; } /** - * Gets value - * @return double + * Gets ion_icon + * @return string */ - public function getValue() + public function getIonIcon() { - return $this->container['value']; + return $this->container['ion_icon']; } /** - * Sets value - * @param double $value Converted measurement value in requested unit + * Sets ion_icon + * @param string $ion_icon Example: ion-ios-medkit-outline * @return $this */ - public function setValue($value) + public function setIonIcon($ion_icon) { - $this->container['value'] = $value; + $this->container['ion_icon'] = $ion_icon; + + return $this; + } + + /** + * Gets manual_tracking + * @return bool + */ + public function getManualTracking() + { + return $this->container['manual_tracking']; + } + + /** + * Sets manual_tracking + * @param bool $manual_tracking Example: 1 + * @return $this + */ + public function setManualTracking($manual_tracking) + { + $this->container['manual_tracking'] = $manual_tracking; + + return $this; + } + + /** + * Gets maximum_allowed_value + * @return int + */ + public function getMaximumAllowedValue() + { + return $this->container['maximum_allowed_value']; + } + + /** + * Sets maximum_allowed_value + * @param int $maximum_allowed_value Example: 5 + * @return $this + */ + public function setMaximumAllowedValue($maximum_allowed_value) + { + $this->container['maximum_allowed_value'] = $maximum_allowed_value; + + return $this; + } + + /** + * Gets minimum_allowed_value + * @return int + */ + public function getMinimumAllowedValue() + { + return $this->container['minimum_allowed_value']; + } + + /** + * Sets minimum_allowed_value + * @param int $minimum_allowed_value Example: 1 + * @return $this + */ + public function setMinimumAllowedValue($minimum_allowed_value) + { + $this->container['minimum_allowed_value'] = $minimum_allowed_value; + + return $this; + } + + /** + * Gets note + * @return string + */ + public function getNote() + { + return $this->container['note']; + } + + /** + * Sets note + * @param string $note Note of measurement + * @return $this + */ + public function setNote($note) + { + $this->container['note'] = $note; + + return $this; + } + + /** + * Gets originalunit_abbreviated_name + * @return string + */ + public function getOriginalunitAbbreviatedName() + { + return $this->container['originalunit_abbreviated_name']; + } + + /** + * Sets originalunit_abbreviated_name + * @param string $originalunit_abbreviated_name Original Unit of measurement as originally submitted + * @return $this + */ + public function setOriginalunitAbbreviatedName($originalunit_abbreviated_name) + { + $this->container['originalunit_abbreviated_name'] = $originalunit_abbreviated_name; + + return $this; + } + + /** + * Gets original_unit_abbreviated_name + * @return string + */ + public function getOriginalUnitAbbreviatedName() + { + return $this->container['original_unit_abbreviated_name']; + } + + /** + * Sets original_unit_abbreviated_name + * @param string $original_unit_abbreviated_name Example: count + * @return $this + */ + public function setOriginalUnitAbbreviatedName($original_unit_abbreviated_name) + { + $this->container['original_unit_abbreviated_name'] = $original_unit_abbreviated_name; + + return $this; + } + + /** + * Gets original_unit_category_id + * @return int + */ + public function getOriginalUnitCategoryId() + { + return $this->container['original_unit_category_id']; + } + + /** + * Sets original_unit_category_id + * @param int $original_unit_category_id Example: 6 + * @return $this + */ + public function setOriginalUnitCategoryId($original_unit_category_id) + { + $this->container['original_unit_category_id'] = $original_unit_category_id; + + return $this; + } + + /** + * Gets original_unit_category_name + * @return string + */ + public function getOriginalUnitCategoryName() + { + return $this->container['original_unit_category_name']; + } + + /** + * Sets original_unit_category_name + * @param string $original_unit_category_name Example: Miscellany + * @return $this + */ + public function setOriginalUnitCategoryName($original_unit_category_name) + { + $this->container['original_unit_category_name'] = $original_unit_category_name; + + return $this; + } + + /** + * Gets original_unit_id + * @return int + */ + public function getOriginalUnitId() + { + return $this->container['original_unit_id']; + } + + /** + * Sets original_unit_id + * @param int $original_unit_id Example: 23 + * @return $this + */ + public function setOriginalUnitId($original_unit_id) + { + $this->container['original_unit_id'] = $original_unit_id; + + return $this; + } + + /** + * Gets original_unit_name + * @return string + */ + public function getOriginalUnitName() + { + return $this->container['original_unit_name']; + } + + /** + * Sets original_unit_name + * @param string $original_unit_name Example: Count + * @return $this + */ + public function setOriginalUnitName($original_unit_name) + { + $this->container['original_unit_name'] = $original_unit_name; return $this; } @@ -364,64 +839,589 @@ public function setOriginalValue($original_value) } /** - * Gets original_abbreviated_unit_name + * Gets png_path * @return string */ - public function getOriginalAbbreviatedUnitName() + public function getPngPath() { - return $this->container['original_abbreviated_unit_name']; + return $this->container['png_path']; } /** - * Sets original_abbreviated_unit_name - * @param string $original_abbreviated_unit_name Original Unit of measurement as originally submitted + * Sets png_path + * @param string $png_path Example: img/variable_categories/treatments.png * @return $this */ - public function setOriginalAbbreviatedUnitName($original_abbreviated_unit_name) + public function setPngPath($png_path) { - $this->container['original_abbreviated_unit_name'] = $original_abbreviated_unit_name; + $this->container['png_path'] = $png_path; return $this; } /** - * Gets abbreviated_unit_name + * Gets png_url * @return string */ - public function getAbbreviatedUnitName() + public function getPngUrl() { - return $this->container['abbreviated_unit_name']; + return $this->container['png_url']; } /** - * Sets abbreviated_unit_name - * @param string $abbreviated_unit_name Abbreviated name for the unit of measurement + * Sets png_url + * @param string $png_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/treatments.png * @return $this */ - public function setAbbreviatedUnitName($abbreviated_unit_name) + public function setPngUrl($png_url) { - $this->container['abbreviated_unit_name'] = $abbreviated_unit_name; + $this->container['png_url'] = $png_url; return $this; } /** - * Gets note + * Gets source_name * @return string */ - public function getNote() + public function getSourceName() { - return $this->container['note']; + return $this->container['source_name']; } /** - * Sets note - * @param string $note Note of measurement + * Sets source_name + * @param string $source_name Application or device used to record the measurement values * @return $this */ - public function setNote($note) + public function setSourceName($source_name) { - $this->container['note'] = $note; + $this->container['source_name'] = $source_name; + + return $this; + } + + /** + * Gets start_date + * @return string + */ + public function getStartDate() + { + return $this->container['start_date']; + } + + /** + * Sets start_date + * @param string $start_date Example: 2014-08-27 + * @return $this + */ + public function setStartDate($start_date) + { + $this->container['start_date'] = $start_date; + + return $this; + } + + /** + * Gets start_time_epoch + * @return int + */ + public function getStartTimeEpoch() + { + return $this->container['start_time_epoch']; + } + + /** + * Sets start_time_epoch + * @param int $start_time_epoch Seconds between the start of the event measured and 1970 (Unix timestamp) + * @return $this + */ + public function setStartTimeEpoch($start_time_epoch) + { + $this->container['start_time_epoch'] = $start_time_epoch; + + return $this; + } + + /** + * Gets start_time_string + * @return string + */ + public function getStartTimeString() + { + return $this->container['start_time_string']; + } + + /** + * Sets start_time_string + * @param string $start_time_string Start Time for the measurement event in UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` + * @return $this + */ + public function setStartTimeString($start_time_string) + { + $this->container['start_time_string'] = $start_time_string; + + return $this; + } + + /** + * Gets svg_url + * @return string + */ + public function getSvgUrl() + { + return $this->container['svg_url']; + } + + /** + * Sets svg_url + * @param string $svg_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/treatments.svg + * @return $this + */ + public function setSvgUrl($svg_url) + { + $this->container['svg_url'] = $svg_url; + + return $this; + } + + /** + * Gets unit_abbreviated_name + * @return string + */ + public function getUnitAbbreviatedName() + { + return $this->container['unit_abbreviated_name']; + } + + /** + * Sets unit_abbreviated_name + * @param string $unit_abbreviated_name Abbreviated name for the unit of measurement + * @return $this + */ + public function setUnitAbbreviatedName($unit_abbreviated_name) + { + $this->container['unit_abbreviated_name'] = $unit_abbreviated_name; + + return $this; + } + + /** + * Gets unit_category_id + * @return int + */ + public function getUnitCategoryId() + { + return $this->container['unit_category_id']; + } + + /** + * Sets unit_category_id + * @param int $unit_category_id Example: 6 + * @return $this + */ + public function setUnitCategoryId($unit_category_id) + { + $this->container['unit_category_id'] = $unit_category_id; + + return $this; + } + + /** + * Gets unit_category_name + * @return string + */ + public function getUnitCategoryName() + { + return $this->container['unit_category_name']; + } + + /** + * Sets unit_category_name + * @param string $unit_category_name Example: Miscellany + * @return $this + */ + public function setUnitCategoryName($unit_category_name) + { + $this->container['unit_category_name'] = $unit_category_name; + + return $this; + } + + /** + * Gets unit_id + * @return int + */ + public function getUnitId() + { + return $this->container['unit_id']; + } + + /** + * Sets unit_id + * @param int $unit_id Example: 23 + * @return $this + */ + public function setUnitId($unit_id) + { + $this->container['unit_id'] = $unit_id; + + return $this; + } + + /** + * Gets unit_name + * @return string + */ + public function getUnitName() + { + return $this->container['unit_name']; + } + + /** + * Sets unit_name + * @param string $unit_name Example: Count + * @return $this + */ + public function setUnitName($unit_name) + { + $this->container['unit_name'] = $unit_name; + + return $this; + } + + /** + * Gets updated_at + * @return string + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * @param string $updated_at Example: 2017-07-30 21:08:36 + * @return $this + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets user_variable_unit_abbreviated_name + * @return string + */ + public function getUserVariableUnitAbbreviatedName() + { + return $this->container['user_variable_unit_abbreviated_name']; + } + + /** + * Sets user_variable_unit_abbreviated_name + * @param string $user_variable_unit_abbreviated_name Example: count + * @return $this + */ + public function setUserVariableUnitAbbreviatedName($user_variable_unit_abbreviated_name) + { + $this->container['user_variable_unit_abbreviated_name'] = $user_variable_unit_abbreviated_name; + + return $this; + } + + /** + * Gets user_variable_unit_category_id + * @return int + */ + public function getUserVariableUnitCategoryId() + { + return $this->container['user_variable_unit_category_id']; + } + + /** + * Sets user_variable_unit_category_id + * @param int $user_variable_unit_category_id Example: 6 + * @return $this + */ + public function setUserVariableUnitCategoryId($user_variable_unit_category_id) + { + $this->container['user_variable_unit_category_id'] = $user_variable_unit_category_id; + + return $this; + } + + /** + * Gets user_variable_unit_category_name + * @return string + */ + public function getUserVariableUnitCategoryName() + { + return $this->container['user_variable_unit_category_name']; + } + + /** + * Sets user_variable_unit_category_name + * @param string $user_variable_unit_category_name Example: Miscellany + * @return $this + */ + public function setUserVariableUnitCategoryName($user_variable_unit_category_name) + { + $this->container['user_variable_unit_category_name'] = $user_variable_unit_category_name; + + return $this; + } + + /** + * Gets user_variable_unit_id + * @return int + */ + public function getUserVariableUnitId() + { + return $this->container['user_variable_unit_id']; + } + + /** + * Sets user_variable_unit_id + * @param int $user_variable_unit_id Example: 23 + * @return $this + */ + public function setUserVariableUnitId($user_variable_unit_id) + { + $this->container['user_variable_unit_id'] = $user_variable_unit_id; + + return $this; + } + + /** + * Gets user_variable_unit_name + * @return string + */ + public function getUserVariableUnitName() + { + return $this->container['user_variable_unit_name']; + } + + /** + * Sets user_variable_unit_name + * @param string $user_variable_unit_name Example: Count + * @return $this + */ + public function setUserVariableUnitName($user_variable_unit_name) + { + $this->container['user_variable_unit_name'] = $user_variable_unit_name; + + return $this; + } + + /** + * Gets user_variable_variable_category_id + * @return int + */ + public function getUserVariableVariableCategoryId() + { + return $this->container['user_variable_variable_category_id']; + } + + /** + * Sets user_variable_variable_category_id + * @param int $user_variable_variable_category_id Example: 13 + * @return $this + */ + public function setUserVariableVariableCategoryId($user_variable_variable_category_id) + { + $this->container['user_variable_variable_category_id'] = $user_variable_variable_category_id; + + return $this; + } + + /** + * Gets user_variable_variable_category_name + * @return string + */ + public function getUserVariableVariableCategoryName() + { + return $this->container['user_variable_variable_category_name']; + } + + /** + * Sets user_variable_variable_category_name + * @param string $user_variable_variable_category_name Example: Treatments + * @return $this + */ + public function setUserVariableVariableCategoryName($user_variable_variable_category_name) + { + $this->container['user_variable_variable_category_name'] = $user_variable_variable_category_name; + + return $this; + } + + /** + * Gets valence + * @return string + */ + public function getValence() + { + return $this->container['valence']; + } + + /** + * Sets valence + * @param string $valence Example: negative + * @return $this + */ + public function setValence($valence) + { + $this->container['valence'] = $valence; + + return $this; + } + + /** + * Gets value + * @return double + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * @param double $value Converted measurement value in requested unit + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets variable_category_id + * @return int + */ + public function getVariableCategoryId() + { + return $this->container['variable_category_id']; + } + + /** + * Sets variable_category_id + * @param int $variable_category_id Example: 13 + * @return $this + */ + public function setVariableCategoryId($variable_category_id) + { + $this->container['variable_category_id'] = $variable_category_id; + + return $this; + } + + /** + * Gets variable_category_image_url + * @return string + */ + public function getVariableCategoryImageUrl() + { + return $this->container['variable_category_image_url']; + } + + /** + * Sets variable_category_image_url + * @param string $variable_category_image_url Example: https://maxcdn.icons8.com/Color/PNG/96/Healthcare/pill-96.png + * @return $this + */ + public function setVariableCategoryImageUrl($variable_category_image_url) + { + $this->container['variable_category_image_url'] = $variable_category_image_url; + + return $this; + } + + /** + * Gets variable_category_name + * @return string + */ + public function getVariableCategoryName() + { + return $this->container['variable_category_name']; + } + + /** + * Sets variable_category_name + * @param string $variable_category_name Example: Treatments + * @return $this + */ + public function setVariableCategoryName($variable_category_name) + { + $this->container['variable_category_name'] = $variable_category_name; + + return $this; + } + + /** + * Gets variable_description + * @return string + */ + public function getVariableDescription() + { + return $this->container['variable_description']; + } + + /** + * Sets variable_description + * @param string $variable_description Example: negative + * @return $this + */ + public function setVariableDescription($variable_description) + { + $this->container['variable_description'] = $variable_description; + + return $this; + } + + /** + * Gets variable_id + * @return int + */ + public function getVariableId() + { + return $this->container['variable_id']; + } + + /** + * Sets variable_id + * @param int $variable_id Example: 5956846 + * @return $this + */ + public function setVariableId($variable_id) + { + $this->container['variable_id'] = $variable_id; + + return $this; + } + + /** + * Gets variable_name + * @return string + */ + public function getVariableName() + { + return $this->container['variable_name']; + } + + /** + * Sets variable_name + * @param string $variable_name Name of the variable for which we are creating the measurement records + * @return $this + */ + public function setVariableName($variable_name) + { + $this->container['variable_name'] = $variable_name; return $this; } diff --git a/lib/Model/MeasurementArray.php b/lib/Model/MeasurementArray.php new file mode 100644 index 0000000..84eece8 --- /dev/null +++ b/lib/Model/MeasurementArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/MeasurementDelete.php b/lib/Model/MeasurementDelete.php index 6112135..570db06 100644 --- a/lib/Model/MeasurementDelete.php +++ b/lib/Model/MeasurementDelete.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,8 +54,17 @@ class MeasurementDelete implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'variable_id' => 'int', - 'start_time' => 'int' + 'start_time' => 'int', + 'variable_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'start_time' => null, + 'variable_id' => null ]; public static function swaggerTypes() @@ -63,13 +72,18 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'variable_id' => 'variableId', - 'start_time' => 'startTime' + 'start_time' => 'startTime', + 'variable_id' => 'variableId' ]; @@ -78,8 +92,8 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'variable_id' => 'setVariableId', - 'start_time' => 'setStartTime' + 'start_time' => 'setStartTime', + 'variable_id' => 'setVariableId' ]; @@ -88,8 +102,8 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'variable_id' => 'getVariableId', - 'start_time' => 'getStartTime' + 'start_time' => 'getStartTime', + 'variable_id' => 'getVariableId' ]; public static function attributeMap() @@ -123,8 +137,8 @@ public static function getters() */ public function __construct(array $data = null) { - $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; + $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; } /** @@ -136,12 +150,12 @@ public function listInvalidProperties() { $invalid_properties = []; - if ($this->container['variable_id'] === null) { - $invalid_properties[] = "'variable_id' can't be null"; - } if ($this->container['start_time'] === null) { $invalid_properties[] = "'start_time' can't be null"; } + if ($this->container['variable_id'] === null) { + $invalid_properties[] = "'variable_id' can't be null"; + } return $invalid_properties; } @@ -154,10 +168,10 @@ public function listInvalidProperties() public function valid() { - if ($this->container['variable_id'] === null) { + if ($this->container['start_time'] === null) { return false; } - if ($this->container['start_time'] === null) { + if ($this->container['variable_id'] === null) { return false; } return true; @@ -165,43 +179,43 @@ public function valid() /** - * Gets variable_id + * Gets start_time * @return int */ - public function getVariableId() + public function getStartTime() { - return $this->container['variable_id']; + return $this->container['start_time']; } /** - * Sets variable_id - * @param int $variable_id Variable id of the measurement to be deleted + * Sets start_time + * @param int $start_time Start time of the measurement to be deleted * @return $this */ - public function setVariableId($variable_id) + public function setStartTime($start_time) { - $this->container['variable_id'] = $variable_id; + $this->container['start_time'] = $start_time; return $this; } /** - * Gets start_time + * Gets variable_id * @return int */ - public function getStartTime() + public function getVariableId() { - return $this->container['start_time']; + return $this->container['variable_id']; } /** - * Sets start_time - * @param int $start_time Start time of the measurement to be deleted + * Sets variable_id + * @param int $variable_id Variable id of the measurement to be deleted * @return $this */ - public function setStartTime($start_time) + public function setVariableId($variable_id) { - $this->container['start_time'] = $start_time; + $this->container['variable_id'] = $variable_id; return $this; } diff --git a/lib/Model/MeasurementItem.php b/lib/Model/MeasurementItem.php new file mode 100644 index 0000000..f26c90a --- /dev/null +++ b/lib/Model/MeasurementItem.php @@ -0,0 +1,308 @@ + 'string', + 'timestamp' => 'int', + 'value' => 'double' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'note' => null, + 'timestamp' => 'int64', + 'value' => 'double' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'note' => 'note', + 'timestamp' => 'timestamp', + 'value' => 'value' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'note' => 'setNote', + 'timestamp' => 'setTimestamp', + 'value' => 'setValue' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'note' => 'getNote', + 'timestamp' => 'getTimestamp', + 'value' => 'getValue' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['note'] = isset($data['note']) ? $data['note'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['timestamp'] === null) { + $invalid_properties[] = "'timestamp' can't be null"; + } + if ($this->container['value'] === null) { + $invalid_properties[] = "'value' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['timestamp'] === null) { + return false; + } + if ($this->container['value'] === null) { + return false; + } + return true; + } + + + /** + * Gets note + * @return string + */ + public function getNote() + { + return $this->container['note']; + } + + /** + * Sets note + * @param string $note Optional note to include with the measurement + * @return $this + */ + public function setNote($note) + { + $this->container['note'] = $note; + + return $this; + } + + /** + * Gets timestamp + * @return int + */ + public function getTimestamp() + { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * @param int $timestamp Timestamp for the measurement event in epoch time (unixtime) + * @return $this + */ + public function setTimestamp($timestamp) + { + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets value + * @return double + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * @param double $value Measurement value + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/MeasurementRange.php b/lib/Model/MeasurementRange.php deleted file mode 100644 index 030bf2b..0000000 --- a/lib/Model/MeasurementRange.php +++ /dev/null @@ -1,261 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * MeasurementRange Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class MeasurementRange implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'MeasurementRange'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'lower_limit' => 'int', - 'upper_limit' => 'int' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'lower_limit' => 'lowerLimit', - 'upper_limit' => 'upperLimit' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'lower_limit' => 'setLowerLimit', - 'upper_limit' => 'setUpperLimit' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'lower_limit' => 'getLowerLimit', - 'upper_limit' => 'getUpperLimit' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['lower_limit'] = isset($data['lower_limit']) ? $data['lower_limit'] : null; - $this->container['upper_limit'] = isset($data['upper_limit']) ? $data['upper_limit'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['lower_limit'] === null) { - $invalid_properties[] = "'lower_limit' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['lower_limit'] === null) { - return false; - } - return true; - } - - - /** - * Gets lower_limit - * @return int - */ - public function getLowerLimit() - { - return $this->container['lower_limit']; - } - - /** - * Sets lower_limit - * @param int $lower_limit The timestamp of the earliest measurement for a user. - * @return $this - */ - public function setLowerLimit($lower_limit) - { - $this->container['lower_limit'] = $lower_limit; - - return $this; - } - - /** - * Gets upper_limit - * @return int - */ - public function getUpperLimit() - { - return $this->container['upper_limit']; - } - - /** - * Sets upper_limit - * @param int $upper_limit The timestamp of the most recent measurement for a user. - * @return $this - */ - public function setUpperLimit($upper_limit) - { - $this->container['upper_limit'] = $upper_limit; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/MeasurementSet.php b/lib/Model/MeasurementSet.php index 9557127..91091a2 100644 --- a/lib/Model/MeasurementSet.php +++ b/lib/Model/MeasurementSet.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,12 +54,25 @@ class MeasurementSet implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'measurements' => '\QuantiModo\Client\Model\ValueObject[]', - 'variable_name' => 'string', + 'combination_operation' => 'string', + 'measurement_items' => '\QuantiModo\Client\Model\MeasurementItem[]', 'source_name' => 'string', + 'unit_abbreviated_name' => 'string', 'variable_category_name' => 'string', - 'combination_operation' => 'string', - 'abbreviated_unit_name' => 'string' + 'variable_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'combination_operation' => null, + 'measurement_items' => null, + 'source_name' => null, + 'unit_abbreviated_name' => null, + 'variable_category_name' => null, + 'variable_name' => null ]; public static function swaggerTypes() @@ -67,17 +80,22 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'measurements' => 'measurements', - 'variable_name' => 'variableName', + 'combination_operation' => 'combinationOperation', + 'measurement_items' => 'measurementItems', 'source_name' => 'sourceName', + 'unit_abbreviated_name' => 'unitAbbreviatedName', 'variable_category_name' => 'variableCategoryName', - 'combination_operation' => 'combinationOperation', - 'abbreviated_unit_name' => 'abbreviatedUnitName' + 'variable_name' => 'variableName' ]; @@ -86,12 +104,12 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'measurements' => 'setMeasurements', - 'variable_name' => 'setVariableName', + 'combination_operation' => 'setCombinationOperation', + 'measurement_items' => 'setMeasurementItems', 'source_name' => 'setSourceName', + 'unit_abbreviated_name' => 'setUnitAbbreviatedName', 'variable_category_name' => 'setVariableCategoryName', - 'combination_operation' => 'setCombinationOperation', - 'abbreviated_unit_name' => 'setAbbreviatedUnitName' + 'variable_name' => 'setVariableName' ]; @@ -100,12 +118,12 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'measurements' => 'getMeasurements', - 'variable_name' => 'getVariableName', + 'combination_operation' => 'getCombinationOperation', + 'measurement_items' => 'getMeasurementItems', 'source_name' => 'getSourceName', + 'unit_abbreviated_name' => 'getUnitAbbreviatedName', 'variable_category_name' => 'getVariableCategoryName', - 'combination_operation' => 'getCombinationOperation', - 'abbreviated_unit_name' => 'getAbbreviatedUnitName' + 'variable_name' => 'getVariableName' ]; public static function attributeMap() @@ -153,12 +171,12 @@ public function getCombinationOperationAllowableValues() */ public function __construct(array $data = null) { - $this->container['measurements'] = isset($data['measurements']) ? $data['measurements'] : null; - $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; + $this->container['combination_operation'] = isset($data['combination_operation']) ? $data['combination_operation'] : null; + $this->container['measurement_items'] = isset($data['measurement_items']) ? $data['measurement_items'] : null; $this->container['source_name'] = isset($data['source_name']) ? $data['source_name'] : null; + $this->container['unit_abbreviated_name'] = isset($data['unit_abbreviated_name']) ? $data['unit_abbreviated_name'] : null; $this->container['variable_category_name'] = isset($data['variable_category_name']) ? $data['variable_category_name'] : null; - $this->container['combination_operation'] = isset($data['combination_operation']) ? $data['combination_operation'] : null; - $this->container['abbreviated_unit_name'] = isset($data['abbreviated_unit_name']) ? $data['abbreviated_unit_name'] : null; + $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; } /** @@ -170,22 +188,25 @@ public function listInvalidProperties() { $invalid_properties = []; - if ($this->container['measurements'] === null) { - $invalid_properties[] = "'measurements' can't be null"; + $allowed_values = $this->getCombinationOperationAllowableValues(); + if (!in_array($this->container['combination_operation'], $allowed_values)) { + $invalid_properties[] = sprintf( + "invalid value for 'combination_operation', must be one of '%s'", + implode("', '", $allowed_values) + ); } - if ($this->container['variable_name'] === null) { - $invalid_properties[] = "'variable_name' can't be null"; + + if ($this->container['measurement_items'] === null) { + $invalid_properties[] = "'measurement_items' can't be null"; } if ($this->container['source_name'] === null) { $invalid_properties[] = "'source_name' can't be null"; } - $allowed_values = ["MEAN", "SUM"]; - if (!in_array($this->container['combination_operation'], $allowed_values)) { - $invalid_properties[] = "invalid value for 'combination_operation', must be one of 'MEAN', 'SUM'."; + if ($this->container['unit_abbreviated_name'] === null) { + $invalid_properties[] = "'unit_abbreviated_name' can't be null"; } - - if ($this->container['abbreviated_unit_name'] === null) { - $invalid_properties[] = "'abbreviated_unit_name' can't be null"; + if ($this->container['variable_name'] === null) { + $invalid_properties[] = "'variable_name' can't be null"; } return $invalid_properties; } @@ -199,20 +220,20 @@ public function listInvalidProperties() public function valid() { - if ($this->container['measurements'] === null) { + $allowed_values = $this->getCombinationOperationAllowableValues(); + if (!in_array($this->container['combination_operation'], $allowed_values)) { return false; } - if ($this->container['variable_name'] === null) { + if ($this->container['measurement_items'] === null) { return false; } if ($this->container['source_name'] === null) { return false; } - $allowed_values = ["MEAN", "SUM"]; - if (!in_array($this->container['combination_operation'], $allowed_values)) { + if ($this->container['unit_abbreviated_name'] === null) { return false; } - if ($this->container['abbreviated_unit_name'] === null) { + if ($this->container['variable_name'] === null) { return false; } return true; @@ -220,43 +241,52 @@ public function valid() /** - * Gets measurements - * @return \QuantiModo\Client\Model\ValueObject[] + * Gets combination_operation + * @return string */ - public function getMeasurements() + public function getCombinationOperation() { - return $this->container['measurements']; + return $this->container['combination_operation']; } /** - * Sets measurements - * @param \QuantiModo\Client\Model\ValueObject[] $measurements Array of timestamps, values, and optional notes + * Sets combination_operation + * @param string $combination_operation Way to aggregate measurements over time. Options are \"MEAN\" or \"SUM\". SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED. * @return $this */ - public function setMeasurements($measurements) + public function setCombinationOperation($combination_operation) { - $this->container['measurements'] = $measurements; + $allowed_values = $this->getCombinationOperationAllowableValues(); + if (!is_null($combination_operation) && !in_array($combination_operation, $allowed_values)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'combination_operation', must be one of '%s'", + implode("', '", $allowed_values) + ) + ); + } + $this->container['combination_operation'] = $combination_operation; return $this; } /** - * Gets variable_name - * @return string + * Gets measurement_items + * @return \QuantiModo\Client\Model\MeasurementItem[] */ - public function getVariableName() + public function getMeasurementItems() { - return $this->container['variable_name']; + return $this->container['measurement_items']; } /** - * Sets variable_name - * @param string $variable_name ORIGINAL name of the variable for which we are creating the measurement records + * Sets measurement_items + * @param \QuantiModo\Client\Model\MeasurementItem[] $measurement_items Array of timestamps, values, and optional notes * @return $this */ - public function setVariableName($variable_name) + public function setMeasurementItems($measurement_items) { - $this->container['variable_name'] = $variable_name; + $this->container['measurement_items'] = $measurement_items; return $this; } @@ -283,68 +313,64 @@ public function setSourceName($source_name) } /** - * Gets variable_category_name + * Gets unit_abbreviated_name * @return string */ - public function getVariableCategoryName() + public function getUnitAbbreviatedName() { - return $this->container['variable_category_name']; + return $this->container['unit_abbreviated_name']; } /** - * Sets variable_category_name - * @param string $variable_category_name Variable category name + * Sets unit_abbreviated_name + * @param string $unit_abbreviated_name Unit of measurement * @return $this */ - public function setVariableCategoryName($variable_category_name) + public function setUnitAbbreviatedName($unit_abbreviated_name) { - $this->container['variable_category_name'] = $variable_category_name; + $this->container['unit_abbreviated_name'] = $unit_abbreviated_name; return $this; } /** - * Gets combination_operation + * Gets variable_category_name * @return string */ - public function getCombinationOperation() + public function getVariableCategoryName() { - return $this->container['combination_operation']; + return $this->container['variable_category_name']; } /** - * Sets combination_operation - * @param string $combination_operation Way to aggregate measurements over time. Options are \"MEAN\" or \"SUM\". SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED. + * Sets variable_category_name + * @param string $variable_category_name Variable category name * @return $this */ - public function setCombinationOperation($combination_operation) + public function setVariableCategoryName($variable_category_name) { - $allowed_values = array('MEAN', 'SUM'); - if (!is_null($combination_operation) && (!in_array($combination_operation, $allowed_values))) { - throw new \InvalidArgumentException("Invalid value for 'combination_operation', must be one of 'MEAN', 'SUM'"); - } - $this->container['combination_operation'] = $combination_operation; + $this->container['variable_category_name'] = $variable_category_name; return $this; } /** - * Gets abbreviated_unit_name + * Gets variable_name * @return string */ - public function getAbbreviatedUnitName() + public function getVariableName() { - return $this->container['abbreviated_unit_name']; + return $this->container['variable_name']; } /** - * Sets abbreviated_unit_name - * @param string $abbreviated_unit_name Unit of measurement + * Sets variable_name + * @param string $variable_name ORIGINAL name of the variable for which we are creating the measurement records * @return $this */ - public function setAbbreviatedUnitName($abbreviated_unit_name) + public function setVariableName($variable_name) { - $this->container['abbreviated_unit_name'] = $abbreviated_unit_name; + $this->container['variable_name'] = $variable_name; return $this; } diff --git a/lib/Model/MeasurementSource.php b/lib/Model/MeasurementSource.php deleted file mode 100644 index acc628a..0000000 --- a/lib/Model/MeasurementSource.php +++ /dev/null @@ -1,235 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * MeasurementSource Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class MeasurementSource implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'MeasurementSource'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'name' => 'string' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['name'] === null) { - $invalid_properties[] = "'name' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['name'] === null) { - return false; - } - return true; - } - - - /** - * Gets name - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * @param string $name Name of the application or device. - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/MeasurementUpdate.php b/lib/Model/MeasurementUpdate.php index ec78b2f..11c4a1f 100644 --- a/lib/Model/MeasurementUpdate.php +++ b/lib/Model/MeasurementUpdate.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -55,9 +55,20 @@ class MeasurementUpdate implements ArrayAccess */ protected static $swaggerTypes = [ 'id' => 'int', + 'note' => 'string', 'start_time' => 'int', - 'value' => 'double', - 'note' => 'string' + 'value' => 'double' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'note' => null, + 'start_time' => null, + 'value' => 'double' ]; public static function swaggerTypes() @@ -65,15 +76,20 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'id' => 'id', + 'note' => 'note', 'start_time' => 'startTime', - 'value' => 'value', - 'note' => 'note' + 'value' => 'value' ]; @@ -83,9 +99,9 @@ public static function swaggerTypes() */ protected static $setters = [ 'id' => 'setId', + 'note' => 'setNote', 'start_time' => 'setStartTime', - 'value' => 'setValue', - 'note' => 'setNote' + 'value' => 'setValue' ]; @@ -95,9 +111,9 @@ public static function swaggerTypes() */ protected static $getters = [ 'id' => 'getId', + 'note' => 'getNote', 'start_time' => 'getStartTime', - 'value' => 'getValue', - 'note' => 'getNote' + 'value' => 'getValue' ]; public static function attributeMap() @@ -132,9 +148,9 @@ public static function getters() public function __construct(array $data = null) { $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['note'] = isset($data['note']) ? $data['note'] : null; $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; $this->container['value'] = isset($data['value']) ? $data['value'] : null; - $this->container['note'] = isset($data['note']) ? $data['note'] : null; } /** @@ -179,7 +195,7 @@ public function getId() /** * Sets id - * @param int $id Variable id of the measurement to be deleted + * @param int $id Variable id of the measurement to be updated * @return $this */ public function setId($id) @@ -189,6 +205,27 @@ public function setId($id) return $this; } + /** + * Gets note + * @return string + */ + public function getNote() + { + return $this->container['note']; + } + + /** + * Sets note + * @param string $note The new note for the measurement (optional) + * @return $this + */ + public function setNote($note) + { + $this->container['note'] = $note; + + return $this; + } + /** * Gets start_time * @return int @@ -230,27 +267,6 @@ public function setValue($value) return $this; } - - /** - * Gets note - * @return string - */ - public function getNote() - { - return $this->container['note']; - } - - /** - * Sets note - * @param string $note The new note for the measurement (optional) - * @return $this - */ - public function setNote($note) - { - $this->container['note'] = $note; - - return $this; - } /** * Returns true if offset exists. False otherwise. * @param integer $offset Offset diff --git a/lib/Model/Option.php b/lib/Model/Option.php new file mode 100644 index 0000000..c6c5280 --- /dev/null +++ b/lib/Model/Option.php @@ -0,0 +1,545 @@ + '\QuantiModo\Client\Model\Chart', + 'colors' => 'string[]', + 'credits' => '\QuantiModo\Client\Model\Credit', + 'lang' => '\QuantiModo\Client\Model\Lang', + 'legend' => '\QuantiModo\Client\Model\Legend', + 'loading' => '\QuantiModo\Client\Model\Loading', + 'plot_options' => '\QuantiModo\Client\Model\PlotOption', + 'title' => '\QuantiModo\Client\Model\Title', + 'x_axis' => '\QuantiModo\Client\Model\XAxi', + 'y_axis' => '\QuantiModo\Client\Model\YAxi[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'chart' => null, + 'colors' => null, + 'credits' => null, + 'lang' => null, + 'legend' => null, + 'loading' => null, + 'plot_options' => null, + 'title' => null, + 'x_axis' => null, + 'y_axis' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'chart' => 'chart', + 'colors' => 'colors', + 'credits' => 'credits', + 'lang' => 'lang', + 'legend' => 'legend', + 'loading' => 'loading', + 'plot_options' => 'plotOptions', + 'title' => 'title', + 'x_axis' => 'xAxis', + 'y_axis' => 'yAxis' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'chart' => 'setChart', + 'colors' => 'setColors', + 'credits' => 'setCredits', + 'lang' => 'setLang', + 'legend' => 'setLegend', + 'loading' => 'setLoading', + 'plot_options' => 'setPlotOptions', + 'title' => 'setTitle', + 'x_axis' => 'setXAxis', + 'y_axis' => 'setYAxis' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'chart' => 'getChart', + 'colors' => 'getColors', + 'credits' => 'getCredits', + 'lang' => 'getLang', + 'legend' => 'getLegend', + 'loading' => 'getLoading', + 'plot_options' => 'getPlotOptions', + 'title' => 'getTitle', + 'x_axis' => 'getXAxis', + 'y_axis' => 'getYAxis' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['chart'] = isset($data['chart']) ? $data['chart'] : null; + $this->container['colors'] = isset($data['colors']) ? $data['colors'] : null; + $this->container['credits'] = isset($data['credits']) ? $data['credits'] : null; + $this->container['lang'] = isset($data['lang']) ? $data['lang'] : null; + $this->container['legend'] = isset($data['legend']) ? $data['legend'] : null; + $this->container['loading'] = isset($data['loading']) ? $data['loading'] : null; + $this->container['plot_options'] = isset($data['plot_options']) ? $data['plot_options'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + $this->container['x_axis'] = isset($data['x_axis']) ? $data['x_axis'] : null; + $this->container['y_axis'] = isset($data['y_axis']) ? $data['y_axis'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['chart'] === null) { + $invalid_properties[] = "'chart' can't be null"; + } + if ($this->container['colors'] === null) { + $invalid_properties[] = "'colors' can't be null"; + } + if ($this->container['credits'] === null) { + $invalid_properties[] = "'credits' can't be null"; + } + if ($this->container['lang'] === null) { + $invalid_properties[] = "'lang' can't be null"; + } + if ($this->container['legend'] === null) { + $invalid_properties[] = "'legend' can't be null"; + } + if ($this->container['loading'] === null) { + $invalid_properties[] = "'loading' can't be null"; + } + if ($this->container['plot_options'] === null) { + $invalid_properties[] = "'plot_options' can't be null"; + } + if ($this->container['title'] === null) { + $invalid_properties[] = "'title' can't be null"; + } + if ($this->container['x_axis'] === null) { + $invalid_properties[] = "'x_axis' can't be null"; + } + if ($this->container['y_axis'] === null) { + $invalid_properties[] = "'y_axis' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['chart'] === null) { + return false; + } + if ($this->container['colors'] === null) { + return false; + } + if ($this->container['credits'] === null) { + return false; + } + if ($this->container['lang'] === null) { + return false; + } + if ($this->container['legend'] === null) { + return false; + } + if ($this->container['loading'] === null) { + return false; + } + if ($this->container['plot_options'] === null) { + return false; + } + if ($this->container['title'] === null) { + return false; + } + if ($this->container['x_axis'] === null) { + return false; + } + if ($this->container['y_axis'] === null) { + return false; + } + return true; + } + + + /** + * Gets chart + * @return \QuantiModo\Client\Model\Chart + */ + public function getChart() + { + return $this->container['chart']; + } + + /** + * Sets chart + * @param \QuantiModo\Client\Model\Chart $chart + * @return $this + */ + public function setChart($chart) + { + $this->container['chart'] = $chart; + + return $this; + } + + /** + * Gets colors + * @return string[] + */ + public function getColors() + { + return $this->container['colors']; + } + + /** + * Sets colors + * @param string[] $colors + * @return $this + */ + public function setColors($colors) + { + $this->container['colors'] = $colors; + + return $this; + } + + /** + * Gets credits + * @return \QuantiModo\Client\Model\Credit + */ + public function getCredits() + { + return $this->container['credits']; + } + + /** + * Sets credits + * @param \QuantiModo\Client\Model\Credit $credits + * @return $this + */ + public function setCredits($credits) + { + $this->container['credits'] = $credits; + + return $this; + } + + /** + * Gets lang + * @return \QuantiModo\Client\Model\Lang + */ + public function getLang() + { + return $this->container['lang']; + } + + /** + * Sets lang + * @param \QuantiModo\Client\Model\Lang $lang + * @return $this + */ + public function setLang($lang) + { + $this->container['lang'] = $lang; + + return $this; + } + + /** + * Gets legend + * @return \QuantiModo\Client\Model\Legend + */ + public function getLegend() + { + return $this->container['legend']; + } + + /** + * Sets legend + * @param \QuantiModo\Client\Model\Legend $legend + * @return $this + */ + public function setLegend($legend) + { + $this->container['legend'] = $legend; + + return $this; + } + + /** + * Gets loading + * @return \QuantiModo\Client\Model\Loading + */ + public function getLoading() + { + return $this->container['loading']; + } + + /** + * Sets loading + * @param \QuantiModo\Client\Model\Loading $loading + * @return $this + */ + public function setLoading($loading) + { + $this->container['loading'] = $loading; + + return $this; + } + + /** + * Gets plot_options + * @return \QuantiModo\Client\Model\PlotOption + */ + public function getPlotOptions() + { + return $this->container['plot_options']; + } + + /** + * Sets plot_options + * @param \QuantiModo\Client\Model\PlotOption $plot_options + * @return $this + */ + public function setPlotOptions($plot_options) + { + $this->container['plot_options'] = $plot_options; + + return $this; + } + + /** + * Gets title + * @return \QuantiModo\Client\Model\Title + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * @param \QuantiModo\Client\Model\Title $title + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets x_axis + * @return \QuantiModo\Client\Model\XAxi + */ + public function getXAxis() + { + return $this->container['x_axis']; + } + + /** + * Sets x_axis + * @param \QuantiModo\Client\Model\XAxi $x_axis + * @return $this + */ + public function setXAxis($x_axis) + { + $this->container['x_axis'] = $x_axis; + + return $this; + } + + /** + * Gets y_axis + * @return \QuantiModo\Client\Model\YAxi[] + */ + public function getYAxis() + { + return $this->container['y_axis']; + } + + /** + * Sets y_axis + * @param \QuantiModo\Client\Model\YAxi[] $y_axis + * @return $this + */ + public function setYAxis($y_axis) + { + $this->container['y_axis'] = $y_axis; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Pair.php b/lib/Model/Pair.php new file mode 100644 index 0000000..4f8c960 --- /dev/null +++ b/lib/Model/Pair.php @@ -0,0 +1,560 @@ + 'double', + 'cause_measurement_value' => 'double', + 'cause_variable_unit_abbreviated_name' => 'string', + 'effect_measurement' => 'double', + 'effect_measurement_value' => 'double', + 'effect_variable_unit_abbreviated_name' => 'string', + 'event_at' => '\DateTime', + 'event_at_unix_time' => 'int', + 'start_time_sting' => '\DateTime', + 'start_time_string' => '\DateTime', + 'timestamp' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'cause_measurement' => 'double', + 'cause_measurement_value' => 'double', + 'cause_variable_unit_abbreviated_name' => null, + 'effect_measurement' => 'double', + 'effect_measurement_value' => 'double', + 'effect_variable_unit_abbreviated_name' => null, + 'event_at' => 'date-time', + 'event_at_unix_time' => null, + 'start_time_sting' => 'date-time', + 'start_time_string' => 'date-time', + 'timestamp' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'cause_measurement' => 'causeMeasurement', + 'cause_measurement_value' => 'causeMeasurementValue', + 'cause_variable_unit_abbreviated_name' => 'causeVariableUnitAbbreviatedName', + 'effect_measurement' => 'effectMeasurement', + 'effect_measurement_value' => 'effectMeasurementValue', + 'effect_variable_unit_abbreviated_name' => 'effectVariableUnitAbbreviatedName', + 'event_at' => 'eventAt', + 'event_at_unix_time' => 'eventAtUnixTime', + 'start_time_sting' => 'startTimeSting', + 'start_time_string' => 'startTimeString', + 'timestamp' => 'timestamp' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'cause_measurement' => 'setCauseMeasurement', + 'cause_measurement_value' => 'setCauseMeasurementValue', + 'cause_variable_unit_abbreviated_name' => 'setCauseVariableUnitAbbreviatedName', + 'effect_measurement' => 'setEffectMeasurement', + 'effect_measurement_value' => 'setEffectMeasurementValue', + 'effect_variable_unit_abbreviated_name' => 'setEffectVariableUnitAbbreviatedName', + 'event_at' => 'setEventAt', + 'event_at_unix_time' => 'setEventAtUnixTime', + 'start_time_sting' => 'setStartTimeSting', + 'start_time_string' => 'setStartTimeString', + 'timestamp' => 'setTimestamp' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'cause_measurement' => 'getCauseMeasurement', + 'cause_measurement_value' => 'getCauseMeasurementValue', + 'cause_variable_unit_abbreviated_name' => 'getCauseVariableUnitAbbreviatedName', + 'effect_measurement' => 'getEffectMeasurement', + 'effect_measurement_value' => 'getEffectMeasurementValue', + 'effect_variable_unit_abbreviated_name' => 'getEffectVariableUnitAbbreviatedName', + 'event_at' => 'getEventAt', + 'event_at_unix_time' => 'getEventAtUnixTime', + 'start_time_sting' => 'getStartTimeSting', + 'start_time_string' => 'getStartTimeString', + 'timestamp' => 'getTimestamp' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['cause_measurement'] = isset($data['cause_measurement']) ? $data['cause_measurement'] : null; + $this->container['cause_measurement_value'] = isset($data['cause_measurement_value']) ? $data['cause_measurement_value'] : null; + $this->container['cause_variable_unit_abbreviated_name'] = isset($data['cause_variable_unit_abbreviated_name']) ? $data['cause_variable_unit_abbreviated_name'] : null; + $this->container['effect_measurement'] = isset($data['effect_measurement']) ? $data['effect_measurement'] : null; + $this->container['effect_measurement_value'] = isset($data['effect_measurement_value']) ? $data['effect_measurement_value'] : null; + $this->container['effect_variable_unit_abbreviated_name'] = isset($data['effect_variable_unit_abbreviated_name']) ? $data['effect_variable_unit_abbreviated_name'] : null; + $this->container['event_at'] = isset($data['event_at']) ? $data['event_at'] : null; + $this->container['event_at_unix_time'] = isset($data['event_at_unix_time']) ? $data['event_at_unix_time'] : null; + $this->container['start_time_sting'] = isset($data['start_time_sting']) ? $data['start_time_sting'] : null; + $this->container['start_time_string'] = isset($data['start_time_string']) ? $data['start_time_string'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['cause_measurement'] === null) { + $invalid_properties[] = "'cause_measurement' can't be null"; + } + if ($this->container['cause_measurement_value'] === null) { + $invalid_properties[] = "'cause_measurement_value' can't be null"; + } + if ($this->container['cause_variable_unit_abbreviated_name'] === null) { + $invalid_properties[] = "'cause_variable_unit_abbreviated_name' can't be null"; + } + if ($this->container['effect_measurement'] === null) { + $invalid_properties[] = "'effect_measurement' can't be null"; + } + if ($this->container['effect_measurement_value'] === null) { + $invalid_properties[] = "'effect_measurement_value' can't be null"; + } + if ($this->container['effect_variable_unit_abbreviated_name'] === null) { + $invalid_properties[] = "'effect_variable_unit_abbreviated_name' can't be null"; + } + if ($this->container['start_time_sting'] === null) { + $invalid_properties[] = "'start_time_sting' can't be null"; + } + if ($this->container['timestamp'] === null) { + $invalid_properties[] = "'timestamp' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['cause_measurement'] === null) { + return false; + } + if ($this->container['cause_measurement_value'] === null) { + return false; + } + if ($this->container['cause_variable_unit_abbreviated_name'] === null) { + return false; + } + if ($this->container['effect_measurement'] === null) { + return false; + } + if ($this->container['effect_measurement_value'] === null) { + return false; + } + if ($this->container['effect_variable_unit_abbreviated_name'] === null) { + return false; + } + if ($this->container['start_time_sting'] === null) { + return false; + } + if ($this->container['timestamp'] === null) { + return false; + } + return true; + } + + + /** + * Gets cause_measurement + * @return double + */ + public function getCauseMeasurement() + { + return $this->container['cause_measurement']; + } + + /** + * Sets cause_measurement + * @param double $cause_measurement Example: 101341.66666667 + * @return $this + */ + public function setCauseMeasurement($cause_measurement) + { + $this->container['cause_measurement'] = $cause_measurement; + + return $this; + } + + /** + * Gets cause_measurement_value + * @return double + */ + public function getCauseMeasurementValue() + { + return $this->container['cause_measurement_value']; + } + + /** + * Sets cause_measurement_value + * @param double $cause_measurement_value Example: 101341.66666667 + * @return $this + */ + public function setCauseMeasurementValue($cause_measurement_value) + { + $this->container['cause_measurement_value'] = $cause_measurement_value; + + return $this; + } + + /** + * Gets cause_variable_unit_abbreviated_name + * @return string + */ + public function getCauseVariableUnitAbbreviatedName() + { + return $this->container['cause_variable_unit_abbreviated_name']; + } + + /** + * Sets cause_variable_unit_abbreviated_name + * @param string $cause_variable_unit_abbreviated_name Example: mg + * @return $this + */ + public function setCauseVariableUnitAbbreviatedName($cause_variable_unit_abbreviated_name) + { + $this->container['cause_variable_unit_abbreviated_name'] = $cause_variable_unit_abbreviated_name; + + return $this; + } + + /** + * Gets effect_measurement + * @return double + */ + public function getEffectMeasurement() + { + return $this->container['effect_measurement']; + } + + /** + * Sets effect_measurement + * @param double $effect_measurement Example: 7.98 + * @return $this + */ + public function setEffectMeasurement($effect_measurement) + { + $this->container['effect_measurement'] = $effect_measurement; + + return $this; + } + + /** + * Gets effect_measurement_value + * @return double + */ + public function getEffectMeasurementValue() + { + return $this->container['effect_measurement_value']; + } + + /** + * Sets effect_measurement_value + * @param double $effect_measurement_value Example: 7.98 + * @return $this + */ + public function setEffectMeasurementValue($effect_measurement_value) + { + $this->container['effect_measurement_value'] = $effect_measurement_value; + + return $this; + } + + /** + * Gets effect_variable_unit_abbreviated_name + * @return string + */ + public function getEffectVariableUnitAbbreviatedName() + { + return $this->container['effect_variable_unit_abbreviated_name']; + } + + /** + * Sets effect_variable_unit_abbreviated_name + * @param string $effect_variable_unit_abbreviated_name Example: % + * @return $this + */ + public function setEffectVariableUnitAbbreviatedName($effect_variable_unit_abbreviated_name) + { + $this->container['effect_variable_unit_abbreviated_name'] = $effect_variable_unit_abbreviated_name; + + return $this; + } + + /** + * Gets event_at + * @return \DateTime + */ + public function getEventAt() + { + return $this->container['event_at']; + } + + /** + * Sets event_at + * @param \DateTime $event_at Example: 2015-08-06 15:49:02 + * @return $this + */ + public function setEventAt($event_at) + { + $this->container['event_at'] = $event_at; + + return $this; + } + + /** + * Gets event_at_unix_time + * @return int + */ + public function getEventAtUnixTime() + { + return $this->container['event_at_unix_time']; + } + + /** + * Sets event_at_unix_time + * @param int $event_at_unix_time Example: 1438876142 + * @return $this + */ + public function setEventAtUnixTime($event_at_unix_time) + { + $this->container['event_at_unix_time'] = $event_at_unix_time; + + return $this; + } + + /** + * Gets start_time_sting + * @return \DateTime + */ + public function getStartTimeSting() + { + return $this->container['start_time_sting']; + } + + /** + * Sets start_time_sting + * @param \DateTime $start_time_sting Example: 2016-06-03 07:00:00 + * @return $this + */ + public function setStartTimeSting($start_time_sting) + { + $this->container['start_time_sting'] = $start_time_sting; + + return $this; + } + + /** + * Gets start_time_string + * @return \DateTime + */ + public function getStartTimeString() + { + return $this->container['start_time_string']; + } + + /** + * Sets start_time_string + * @param \DateTime $start_time_string Example: 2015-08-06 15:49:02 + * @return $this + */ + public function setStartTimeString($start_time_string) + { + $this->container['start_time_string'] = $start_time_string; + + return $this; + } + + /** + * Gets timestamp + * @return int + */ + public function getTimestamp() + { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * @param int $timestamp Example: 1464937200 + * @return $this + */ + public function setTimestamp($timestamp) + { + $this->container['timestamp'] = $timestamp; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PairArray.php b/lib/Model/PairArray.php new file mode 100644 index 0000000..d6e9e42 --- /dev/null +++ b/lib/Model/PairArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Pairs.php b/lib/Model/Pairs.php index abe46b6..1226295 100644 --- a/lib/Model/Pairs.php +++ b/lib/Model/Pairs.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -57,11 +57,24 @@ class Pairs implements ArrayAccess 'name' => 'string' ]; + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null + ]; + public static function swaggerTypes() { return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] diff --git a/lib/Model/PairsOfAveragesForAllUser.php b/lib/Model/PairsOfAveragesForAllUser.php new file mode 100644 index 0000000..280f705 --- /dev/null +++ b/lib/Model/PairsOfAveragesForAllUser.php @@ -0,0 +1,269 @@ + 'double', + 'effect_variable_average_value' => 'double' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'cause_variable_average_value' => 'double', + 'effect_variable_average_value' => 'double' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'cause_variable_average_value' => 'causeVariableAverageValue', + 'effect_variable_average_value' => 'effectVariableAverageValue' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'cause_variable_average_value' => 'setCauseVariableAverageValue', + 'effect_variable_average_value' => 'setEffectVariableAverageValue' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'cause_variable_average_value' => 'getCauseVariableAverageValue', + 'effect_variable_average_value' => 'getEffectVariableAverageValue' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['cause_variable_average_value'] = isset($data['cause_variable_average_value']) ? $data['cause_variable_average_value'] : null; + $this->container['effect_variable_average_value'] = isset($data['effect_variable_average_value']) ? $data['effect_variable_average_value'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets cause_variable_average_value + * @return double + */ + public function getCauseVariableAverageValue() + { + return $this->container['cause_variable_average_value']; + } + + /** + * Sets cause_variable_average_value + * @param double $cause_variable_average_value Example: 435.73 + * @return $this + */ + public function setCauseVariableAverageValue($cause_variable_average_value) + { + $this->container['cause_variable_average_value'] = $cause_variable_average_value; + + return $this; + } + + /** + * Gets effect_variable_average_value + * @return double + */ + public function getEffectVariableAverageValue() + { + return $this->container['effect_variable_average_value']; + } + + /** + * Sets effect_variable_average_value + * @param double $effect_variable_average_value Example: 3.3705 + * @return $this + */ + public function setEffectVariableAverageValue($effect_variable_average_value) + { + $this->container['effect_variable_average_value'] = $effect_variable_average_value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PairsOfAveragesForAllUserArray.php b/lib/Model/PairsOfAveragesForAllUserArray.php new file mode 100644 index 0000000..f318d1a --- /dev/null +++ b/lib/Model/PairsOfAveragesForAllUserArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ParticipantInstruction.php b/lib/Model/ParticipantInstruction.php new file mode 100644 index 0000000..8600a4b --- /dev/null +++ b/lib/Model/ParticipantInstruction.php @@ -0,0 +1,269 @@ + 'string', + 'instructions_for_effect_variable' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'instructions_for_cause_variable' => null, + 'instructions_for_effect_variable' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'instructions_for_cause_variable' => 'instructionsForCauseVariable', + 'instructions_for_effect_variable' => 'instructionsForEffectVariable' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'instructions_for_cause_variable' => 'setInstructionsForCauseVariable', + 'instructions_for_effect_variable' => 'setInstructionsForEffectVariable' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'instructions_for_cause_variable' => 'getInstructionsForCauseVariable', + 'instructions_for_effect_variable' => 'getInstructionsForEffectVariable' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['instructions_for_cause_variable'] = isset($data['instructions_for_cause_variable']) ? $data['instructions_for_cause_variable'] : null; + $this->container['instructions_for_effect_variable'] = isset($data['instructions_for_effect_variable']) ? $data['instructions_for_effect_variable'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets instructions_for_cause_variable + * @return string + */ + public function getInstructionsForCauseVariable() + { + return $this->container['instructions_for_cause_variable']; + } + + /** + * Sets instructions_for_cause_variable + * @param string $instructions_for_cause_variable Example: Obtain Fitbit and use it to record your Sleep Duration. Once you have a Fitbit account, connect your Fitbit account at QuantiModo to automatically import and analyze your data. + * @return $this + */ + public function setInstructionsForCauseVariable($instructions_for_cause_variable) + { + $this->container['instructions_for_cause_variable'] = $instructions_for_cause_variable; + + return $this; + } + + /** + * Gets instructions_for_effect_variable + * @return string + */ + public function getInstructionsForEffectVariable() + { + return $this->container['instructions_for_effect_variable']; + } + + /** + * Sets instructions_for_effect_variable + * @param string $instructions_for_effect_variable Example: Obtain QuantiModo and use it to record your Overall Mood. Once you have a QuantiModo account, connect your QuantiModo account at QuantiModo to automatically import and analyze your data. + * @return $this + */ + public function setInstructionsForEffectVariable($instructions_for_effect_variable) + { + $this->container['instructions_for_effect_variable'] = $instructions_for_effect_variable; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Permission.php b/lib/Model/Permission.php deleted file mode 100644 index 66ea93b..0000000 --- a/lib/Model/Permission.php +++ /dev/null @@ -1,427 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * Permission Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class Permission implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'Permission'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'target' => 'int', - 'variable_name' => 'string', - 'min_timestamp' => 'int', - 'max_timestamp' => 'int', - 'min_time_of_day' => 'int', - 'max_time_of_day' => 'int', - 'week' => 'string' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'target' => 'target', - 'variable_name' => 'variableName', - 'min_timestamp' => 'minTimestamp', - 'max_timestamp' => 'maxTimestamp', - 'min_time_of_day' => 'minTimeOfDay', - 'max_time_of_day' => 'maxTimeOfDay', - 'week' => 'week' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'target' => 'setTarget', - 'variable_name' => 'setVariableName', - 'min_timestamp' => 'setMinTimestamp', - 'max_timestamp' => 'setMaxTimestamp', - 'min_time_of_day' => 'setMinTimeOfDay', - 'max_time_of_day' => 'setMaxTimeOfDay', - 'week' => 'setWeek' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'target' => 'getTarget', - 'variable_name' => 'getVariableName', - 'min_timestamp' => 'getMinTimestamp', - 'max_timestamp' => 'getMaxTimestamp', - 'min_time_of_day' => 'getMinTimeOfDay', - 'max_time_of_day' => 'getMaxTimeOfDay', - 'week' => 'getWeek' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['target'] = isset($data['target']) ? $data['target'] : null; - $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; - $this->container['min_timestamp'] = isset($data['min_timestamp']) ? $data['min_timestamp'] : null; - $this->container['max_timestamp'] = isset($data['max_timestamp']) ? $data['max_timestamp'] : null; - $this->container['min_time_of_day'] = isset($data['min_time_of_day']) ? $data['min_time_of_day'] : null; - $this->container['max_time_of_day'] = isset($data['max_time_of_day']) ? $data['max_time_of_day'] : null; - $this->container['week'] = isset($data['week']) ? $data['week'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['target'] === null) { - $invalid_properties[] = "'target' can't be null"; - } - if ($this->container['variable_name'] === null) { - $invalid_properties[] = "'variable_name' can't be null"; - } - if ($this->container['min_timestamp'] === null) { - $invalid_properties[] = "'min_timestamp' can't be null"; - } - if ($this->container['max_timestamp'] === null) { - $invalid_properties[] = "'max_timestamp' can't be null"; - } - if ($this->container['min_time_of_day'] === null) { - $invalid_properties[] = "'min_time_of_day' can't be null"; - } - if ($this->container['max_time_of_day'] === null) { - $invalid_properties[] = "'max_time_of_day' can't be null"; - } - if ($this->container['week'] === null) { - $invalid_properties[] = "'week' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['target'] === null) { - return false; - } - if ($this->container['variable_name'] === null) { - return false; - } - if ($this->container['min_timestamp'] === null) { - return false; - } - if ($this->container['max_timestamp'] === null) { - return false; - } - if ($this->container['min_time_of_day'] === null) { - return false; - } - if ($this->container['max_time_of_day'] === null) { - return false; - } - if ($this->container['week'] === null) { - return false; - } - return true; - } - - - /** - * Gets target - * @return int - */ - public function getTarget() - { - return $this->container['target']; - } - - /** - * Sets target - * @param int $target Grant permission to target user or public so they may access measurements within the given parameters. TODO: Rename target to something more intuitive. - * @return $this - */ - public function setTarget($target) - { - $this->container['target'] = $target; - - return $this; - } - - /** - * Gets variable_name - * @return string - */ - public function getVariableName() - { - return $this->container['variable_name']; - } - - /** - * Sets variable_name - * @param string $variable_name ORIGINAL Variable name - * @return $this - */ - public function setVariableName($variable_name) - { - $this->container['variable_name'] = $variable_name; - - return $this; - } - - /** - * Gets min_timestamp - * @return int - */ - public function getMinTimestamp() - { - return $this->container['min_timestamp']; - } - - /** - * Sets min_timestamp - * @param int $min_timestamp Earliest time when measurements will be accessible in epoch seconds - * @return $this - */ - public function setMinTimestamp($min_timestamp) - { - $this->container['min_timestamp'] = $min_timestamp; - - return $this; - } - - /** - * Gets max_timestamp - * @return int - */ - public function getMaxTimestamp() - { - return $this->container['max_timestamp']; - } - - /** - * Sets max_timestamp - * @param int $max_timestamp Latest time when measurements will be accessible in epoch seconds - * @return $this - */ - public function setMaxTimestamp($max_timestamp) - { - $this->container['max_timestamp'] = $max_timestamp; - - return $this; - } - - /** - * Gets min_time_of_day - * @return int - */ - public function getMinTimeOfDay() - { - return $this->container['min_time_of_day']; - } - - /** - * Sets min_time_of_day - * @param int $min_time_of_day Earliest time of day when measurements will be accessible in epoch seconds - * @return $this - */ - public function setMinTimeOfDay($min_time_of_day) - { - $this->container['min_time_of_day'] = $min_time_of_day; - - return $this; - } - - /** - * Gets max_time_of_day - * @return int - */ - public function getMaxTimeOfDay() - { - return $this->container['max_time_of_day']; - } - - /** - * Sets max_time_of_day - * @param int $max_time_of_day Latest time of day when measurements will be accessible in epoch seconds - * @return $this - */ - public function setMaxTimeOfDay($max_time_of_day) - { - $this->container['max_time_of_day'] = $max_time_of_day; - - return $this; - } - - /** - * Gets week - * @return string - */ - public function getWeek() - { - return $this->container['week']; - } - - /** - * Sets week - * @param string $week Maybe specifies if only weekday measurements should be accessible - * @return $this - */ - public function setWeek($week) - { - $this->container['week'] = $week; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/PlotOption.php b/lib/Model/PlotOption.php new file mode 100644 index 0000000..f6a25cb --- /dev/null +++ b/lib/Model/PlotOption.php @@ -0,0 +1,281 @@ + '\QuantiModo\Client\Model\Column', + 'scatter' => '\QuantiModo\Client\Model\Scatter' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'column' => null, + 'scatter' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'column' => 'column', + 'scatter' => 'scatter' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'column' => 'setColumn', + 'scatter' => 'setScatter' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'column' => 'getColumn', + 'scatter' => 'getScatter' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['column'] = isset($data['column']) ? $data['column'] : null; + $this->container['scatter'] = isset($data['scatter']) ? $data['scatter'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['column'] === null) { + $invalid_properties[] = "'column' can't be null"; + } + if ($this->container['scatter'] === null) { + $invalid_properties[] = "'scatter' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['column'] === null) { + return false; + } + if ($this->container['scatter'] === null) { + return false; + } + return true; + } + + + /** + * Gets column + * @return \QuantiModo\Client\Model\Column + */ + public function getColumn() + { + return $this->container['column']; + } + + /** + * Sets column + * @param \QuantiModo\Client\Model\Column $column + * @return $this + */ + public function setColumn($column) + { + $this->container['column'] = $column; + + return $this; + } + + /** + * Gets scatter + * @return \QuantiModo\Client\Model\Scatter + */ + public function getScatter() + { + return $this->container['scatter']; + } + + /** + * Sets scatter + * @param \QuantiModo\Client\Model\Scatter $scatter + * @return $this + */ + public function setScatter($scatter) + { + $this->container['scatter'] = $scatter; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PostCorrelation.php b/lib/Model/PostCorrelation.php index 3486152..c0f9939 100644 --- a/lib/Model/PostCorrelation.php +++ b/lib/Model/PostCorrelation.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -55,24 +55,40 @@ class PostCorrelation implements ArrayAccess */ protected static $swaggerTypes = [ 'cause_variable_name' => 'string', - 'effect_variable_name' => 'string', 'correlation' => 'double', + 'effect_variable_name' => 'string', 'vote' => 'int' ]; + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'cause_variable_name' => null, + 'correlation' => 'double', + 'effect_variable_name' => null, + 'vote' => null + ]; + public static function swaggerTypes() { return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'cause_variable_name' => 'causeVariableName', - 'effect_variable_name' => 'effectVariableName', 'correlation' => 'correlation', + 'effect_variable_name' => 'effectVariableName', 'vote' => 'vote' ]; @@ -83,8 +99,8 @@ public static function swaggerTypes() */ protected static $setters = [ 'cause_variable_name' => 'setCauseVariableName', - 'effect_variable_name' => 'setEffectVariableName', 'correlation' => 'setCorrelation', + 'effect_variable_name' => 'setEffectVariableName', 'vote' => 'setVote' ]; @@ -95,8 +111,8 @@ public static function swaggerTypes() */ protected static $getters = [ 'cause_variable_name' => 'getCauseVariableName', - 'effect_variable_name' => 'getEffectVariableName', 'correlation' => 'getCorrelation', + 'effect_variable_name' => 'getEffectVariableName', 'vote' => 'getVote' ]; @@ -132,8 +148,8 @@ public static function getters() public function __construct(array $data = null) { $this->container['cause_variable_name'] = isset($data['cause_variable_name']) ? $data['cause_variable_name'] : null; - $this->container['effect_variable_name'] = isset($data['effect_variable_name']) ? $data['effect_variable_name'] : null; $this->container['correlation'] = isset($data['correlation']) ? $data['correlation'] : null; + $this->container['effect_variable_name'] = isset($data['effect_variable_name']) ? $data['effect_variable_name'] : null; $this->container['vote'] = isset($data['vote']) ? $data['vote'] : null; } @@ -149,12 +165,12 @@ public function listInvalidProperties() if ($this->container['cause_variable_name'] === null) { $invalid_properties[] = "'cause_variable_name' can't be null"; } - if ($this->container['effect_variable_name'] === null) { - $invalid_properties[] = "'effect_variable_name' can't be null"; - } if ($this->container['correlation'] === null) { $invalid_properties[] = "'correlation' can't be null"; } + if ($this->container['effect_variable_name'] === null) { + $invalid_properties[] = "'effect_variable_name' can't be null"; + } return $invalid_properties; } @@ -170,10 +186,10 @@ public function valid() if ($this->container['cause_variable_name'] === null) { return false; } - if ($this->container['effect_variable_name'] === null) { + if ($this->container['correlation'] === null) { return false; } - if ($this->container['correlation'] === null) { + if ($this->container['effect_variable_name'] === null) { return false; } return true; @@ -202,43 +218,43 @@ public function setCauseVariableName($cause_variable_name) } /** - * Gets effect_variable_name - * @return string + * Gets correlation + * @return double */ - public function getEffectVariableName() + public function getCorrelation() { - return $this->container['effect_variable_name']; + return $this->container['correlation']; } /** - * Sets effect_variable_name - * @param string $effect_variable_name Effect variable name + * Sets correlation + * @param double $correlation Correlation value * @return $this */ - public function setEffectVariableName($effect_variable_name) + public function setCorrelation($correlation) { - $this->container['effect_variable_name'] = $effect_variable_name; + $this->container['correlation'] = $correlation; return $this; } /** - * Gets correlation - * @return double + * Gets effect_variable_name + * @return string */ - public function getCorrelation() + public function getEffectVariableName() { - return $this->container['correlation']; + return $this->container['effect_variable_name']; } /** - * Sets correlation - * @param double $correlation Correlation value + * Sets effect_variable_name + * @param string $effect_variable_name Effect variable name * @return $this */ - public function setCorrelation($correlation) + public function setEffectVariableName($effect_variable_name) { - $this->container['correlation'] = $correlation; + $this->container['effect_variable_name'] = $effect_variable_name; return $this; } diff --git a/lib/Model/PostMeasurementsDataResponse.php b/lib/Model/PostMeasurementsDataResponse.php new file mode 100644 index 0000000..58ebac4 --- /dev/null +++ b/lib/Model/PostMeasurementsDataResponse.php @@ -0,0 +1,242 @@ + '\QuantiModo\Client\Model\UserVariable[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'user_variables' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'user_variables' => 'userVariables' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'user_variables' => 'setUserVariables' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'user_variables' => 'getUserVariables' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['user_variables'] = isset($data['user_variables']) ? $data['user_variables'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets user_variables + * @return \QuantiModo\Client\Model\UserVariable[] + */ + public function getUserVariables() + { + return $this->container['user_variables']; + } + + /** + * Sets user_variables + * @param \QuantiModo\Client\Model\UserVariable[] $user_variables + * @return $this + */ + public function setUserVariables($user_variables) + { + $this->container['user_variables'] = $user_variables; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PostMeasurementsResponse.php b/lib/Model/PostMeasurementsResponse.php new file mode 100644 index 0000000..da1e577 --- /dev/null +++ b/lib/Model/PostMeasurementsResponse.php @@ -0,0 +1,335 @@ + '\QuantiModo\Client\Model\PostMeasurementsDataResponse', + 'message' => 'string', + 'status' => 'int', + 'success' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'data' => null, + 'message' => null, + 'status' => null, + 'success' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'message' => 'message', + 'status' => 'status', + 'success' => 'success' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'message' => 'setMessage', + 'status' => 'setStatus', + 'success' => 'setSuccess' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'message' => 'getMessage', + 'status' => 'getStatus', + 'success' => 'getSuccess' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['status'] === null) { + $invalid_properties[] = "'status' can't be null"; + } + if ($this->container['success'] === null) { + $invalid_properties[] = "'success' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['status'] === null) { + return false; + } + if ($this->container['success'] === null) { + return false; + } + return true; + } + + + /** + * Gets data + * @return \QuantiModo\Client\Model\PostMeasurementsDataResponse + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * @param \QuantiModo\Client\Model\PostMeasurementsDataResponse $data + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets message + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * @param string $message Message + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets status + * @return int + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * @param int $status Status code + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets success + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * @param bool $success + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PostStudyPublishResponse.php b/lib/Model/PostStudyPublishResponse.php new file mode 100644 index 0000000..7473363 --- /dev/null +++ b/lib/Model/PostStudyPublishResponse.php @@ -0,0 +1,269 @@ + 'string', + 'success' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'status' => null, + 'success' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'success' => 'success' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'success' => 'setSuccess' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'success' => 'getSuccess' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets status + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * @param string $status Example: ok + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets success + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * @param bool $success Example: true + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PostTrackingRemindersDataResponse.php b/lib/Model/PostTrackingRemindersDataResponse.php new file mode 100644 index 0000000..e38a01a --- /dev/null +++ b/lib/Model/PostTrackingRemindersDataResponse.php @@ -0,0 +1,296 @@ + '\QuantiModo\Client\Model\TrackingReminderNotification[]', + 'tracking_reminders' => '\QuantiModo\Client\Model\TrackingReminder[]', + 'user_variables' => '\QuantiModo\Client\Model\UserVariable[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'tracking_reminder_notifications' => null, + 'tracking_reminders' => null, + 'user_variables' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'tracking_reminder_notifications' => 'trackingReminderNotifications', + 'tracking_reminders' => 'trackingReminders', + 'user_variables' => 'userVariables' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'tracking_reminder_notifications' => 'setTrackingReminderNotifications', + 'tracking_reminders' => 'setTrackingReminders', + 'user_variables' => 'setUserVariables' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'tracking_reminder_notifications' => 'getTrackingReminderNotifications', + 'tracking_reminders' => 'getTrackingReminders', + 'user_variables' => 'getUserVariables' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tracking_reminder_notifications'] = isset($data['tracking_reminder_notifications']) ? $data['tracking_reminder_notifications'] : null; + $this->container['tracking_reminders'] = isset($data['tracking_reminders']) ? $data['tracking_reminders'] : null; + $this->container['user_variables'] = isset($data['user_variables']) ? $data['user_variables'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets tracking_reminder_notifications + * @return \QuantiModo\Client\Model\TrackingReminderNotification[] + */ + public function getTrackingReminderNotifications() + { + return $this->container['tracking_reminder_notifications']; + } + + /** + * Sets tracking_reminder_notifications + * @param \QuantiModo\Client\Model\TrackingReminderNotification[] $tracking_reminder_notifications + * @return $this + */ + public function setTrackingReminderNotifications($tracking_reminder_notifications) + { + $this->container['tracking_reminder_notifications'] = $tracking_reminder_notifications; + + return $this; + } + + /** + * Gets tracking_reminders + * @return \QuantiModo\Client\Model\TrackingReminder[] + */ + public function getTrackingReminders() + { + return $this->container['tracking_reminders']; + } + + /** + * Sets tracking_reminders + * @param \QuantiModo\Client\Model\TrackingReminder[] $tracking_reminders + * @return $this + */ + public function setTrackingReminders($tracking_reminders) + { + $this->container['tracking_reminders'] = $tracking_reminders; + + return $this; + } + + /** + * Gets user_variables + * @return \QuantiModo\Client\Model\UserVariable[] + */ + public function getUserVariables() + { + return $this->container['user_variables']; + } + + /** + * Sets user_variables + * @param \QuantiModo\Client\Model\UserVariable[] $user_variables + * @return $this + */ + public function setUserVariables($user_variables) + { + $this->container['user_variables'] = $user_variables; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PostTrackingRemindersResponse.php b/lib/Model/PostTrackingRemindersResponse.php new file mode 100644 index 0000000..d10e1e7 --- /dev/null +++ b/lib/Model/PostTrackingRemindersResponse.php @@ -0,0 +1,335 @@ + '\QuantiModo\Client\Model\PostTrackingRemindersDataResponse', + 'message' => 'string', + 'status' => 'int', + 'success' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'data' => null, + 'message' => null, + 'status' => null, + 'success' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'message' => 'message', + 'status' => 'status', + 'success' => 'success' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'message' => 'setMessage', + 'status' => 'setStatus', + 'success' => 'setSuccess' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'message' => 'getMessage', + 'status' => 'getStatus', + 'success' => 'getSuccess' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['status'] === null) { + $invalid_properties[] = "'status' can't be null"; + } + if ($this->container['success'] === null) { + $invalid_properties[] = "'success' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['status'] === null) { + return false; + } + if ($this->container['success'] === null) { + return false; + } + return true; + } + + + /** + * Gets data + * @return \QuantiModo\Client\Model\PostTrackingRemindersDataResponse + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * @param \QuantiModo\Client\Model\PostTrackingRemindersDataResponse $data + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets message + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * @param string $message Message + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets status + * @return int + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * @param int $status Status code + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets success + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * @param bool $success + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PostUserSettingsDataResponse.php b/lib/Model/PostUserSettingsDataResponse.php new file mode 100644 index 0000000..b303c04 --- /dev/null +++ b/lib/Model/PostUserSettingsDataResponse.php @@ -0,0 +1,242 @@ + 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'purchase_id' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'purchase_id' => 'purchaseId' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'purchase_id' => 'setPurchaseId' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'purchase_id' => 'getPurchaseId' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['purchase_id'] = isset($data['purchase_id']) ? $data['purchase_id'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets purchase_id + * @return int + */ + public function getPurchaseId() + { + return $this->container['purchase_id']; + } + + /** + * Sets purchase_id + * @param int $purchase_id Example: 1 + * @return $this + */ + public function setPurchaseId($purchase_id) + { + $this->container['purchase_id'] = $purchase_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PostUserSettingsResponse.php b/lib/Model/PostUserSettingsResponse.php new file mode 100644 index 0000000..5ea3a1e --- /dev/null +++ b/lib/Model/PostUserSettingsResponse.php @@ -0,0 +1,335 @@ + '\QuantiModo\Client\Model\PostUserSettingsDataResponse', + 'message' => 'string', + 'status' => 'int', + 'success' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'data' => null, + 'message' => null, + 'status' => null, + 'success' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'message' => 'message', + 'status' => 'status', + 'success' => 'success' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'message' => 'setMessage', + 'status' => 'setStatus', + 'success' => 'setSuccess' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'message' => 'getMessage', + 'status' => 'getStatus', + 'success' => 'getSuccess' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['status'] === null) { + $invalid_properties[] = "'status' can't be null"; + } + if ($this->container['success'] === null) { + $invalid_properties[] = "'success' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['status'] === null) { + return false; + } + if ($this->container['success'] === null) { + return false; + } + return true; + } + + + /** + * Gets data + * @return \QuantiModo\Client\Model\PostUserSettingsDataResponse + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * @param \QuantiModo\Client\Model\PostUserSettingsDataResponse $data + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets message + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * @param string $message Message + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets status + * @return int + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * @param int $status Status code + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets success + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * @param bool $success + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PostVote.php b/lib/Model/PostVote.php deleted file mode 100644 index d247970..0000000 --- a/lib/Model/PostVote.php +++ /dev/null @@ -1,299 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * PostVote Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class PostVote implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'PostVote'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'cause_variable_id' => 'int', - 'effect_variable_id' => 'int', - 'vote' => 'bool' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'cause_variable_id' => 'causeVariableId', - 'effect_variable_id' => 'effectVariableId', - 'vote' => 'vote' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'cause_variable_id' => 'setCauseVariableId', - 'effect_variable_id' => 'setEffectVariableId', - 'vote' => 'setVote' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'cause_variable_id' => 'getCauseVariableId', - 'effect_variable_id' => 'getEffectVariableId', - 'vote' => 'getVote' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['cause_variable_id'] = isset($data['cause_variable_id']) ? $data['cause_variable_id'] : null; - $this->container['effect_variable_id'] = isset($data['effect_variable_id']) ? $data['effect_variable_id'] : null; - $this->container['vote'] = isset($data['vote']) ? $data['vote'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['cause_variable_id'] === null) { - $invalid_properties[] = "'cause_variable_id' can't be null"; - } - if ($this->container['effect_variable_id'] === null) { - $invalid_properties[] = "'effect_variable_id' can't be null"; - } - if ($this->container['vote'] === null) { - $invalid_properties[] = "'vote' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['cause_variable_id'] === null) { - return false; - } - if ($this->container['effect_variable_id'] === null) { - return false; - } - if ($this->container['vote'] === null) { - return false; - } - return true; - } - - - /** - * Gets cause_variable_id - * @return int - */ - public function getCauseVariableId() - { - return $this->container['cause_variable_id']; - } - - /** - * Sets cause_variable_id - * @param int $cause_variable_id Cause variable id - * @return $this - */ - public function setCauseVariableId($cause_variable_id) - { - $this->container['cause_variable_id'] = $cause_variable_id; - - return $this; - } - - /** - * Gets effect_variable_id - * @return int - */ - public function getEffectVariableId() - { - return $this->container['effect_variable_id']; - } - - /** - * Sets effect_variable_id - * @param int $effect_variable_id Effect variable id - * @return $this - */ - public function setEffectVariableId($effect_variable_id) - { - $this->container['effect_variable_id'] = $effect_variable_id; - - return $this; - } - - /** - * Gets vote - * @return bool - */ - public function getVote() - { - return $this->container['vote']; - } - - /** - * Sets vote - * @param bool $vote Vote: 0 (for implausible) or 1 (for plausible) - * @return $this - */ - public function setVote($vote) - { - $this->container['vote'] = $vote; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/ProcessedDailyMeasurement.php b/lib/Model/ProcessedDailyMeasurement.php new file mode 100644 index 0000000..31f5a31 --- /dev/null +++ b/lib/Model/ProcessedDailyMeasurement.php @@ -0,0 +1,644 @@ + 'int', + 'id' => 'string', + 'note' => 'string', + 'original_unit_id' => 'string', + 'original_value' => 'string', + 'start_date' => 'string', + 'start_time_epoch' => 'int', + 'start_time_string' => '\DateTime', + 'unit_id' => 'int', + 'value' => 'double', + 'variable_category_id' => 'int', + 'variable_id' => 'int', + 'variable_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'duration' => null, + 'id' => null, + 'note' => null, + 'original_unit_id' => null, + 'original_value' => null, + 'start_date' => null, + 'start_time_epoch' => null, + 'start_time_string' => 'date-time', + 'unit_id' => null, + 'value' => 'double', + 'variable_category_id' => null, + 'variable_id' => null, + 'variable_name' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'duration' => 'duration', + 'id' => 'id', + 'note' => 'note', + 'original_unit_id' => 'originalUnitId', + 'original_value' => 'originalValue', + 'start_date' => 'startDate', + 'start_time_epoch' => 'startTimeEpoch', + 'start_time_string' => 'startTimeString', + 'unit_id' => 'unitId', + 'value' => 'value', + 'variable_category_id' => 'variableCategoryId', + 'variable_id' => 'variableId', + 'variable_name' => 'variableName' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'duration' => 'setDuration', + 'id' => 'setId', + 'note' => 'setNote', + 'original_unit_id' => 'setOriginalUnitId', + 'original_value' => 'setOriginalValue', + 'start_date' => 'setStartDate', + 'start_time_epoch' => 'setStartTimeEpoch', + 'start_time_string' => 'setStartTimeString', + 'unit_id' => 'setUnitId', + 'value' => 'setValue', + 'variable_category_id' => 'setVariableCategoryId', + 'variable_id' => 'setVariableId', + 'variable_name' => 'setVariableName' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'duration' => 'getDuration', + 'id' => 'getId', + 'note' => 'getNote', + 'original_unit_id' => 'getOriginalUnitId', + 'original_value' => 'getOriginalValue', + 'start_date' => 'getStartDate', + 'start_time_epoch' => 'getStartTimeEpoch', + 'start_time_string' => 'getStartTimeString', + 'unit_id' => 'getUnitId', + 'value' => 'getValue', + 'variable_category_id' => 'getVariableCategoryId', + 'variable_id' => 'getVariableId', + 'variable_name' => 'getVariableName' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['duration'] = isset($data['duration']) ? $data['duration'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['note'] = isset($data['note']) ? $data['note'] : null; + $this->container['original_unit_id'] = isset($data['original_unit_id']) ? $data['original_unit_id'] : null; + $this->container['original_value'] = isset($data['original_value']) ? $data['original_value'] : null; + $this->container['start_date'] = isset($data['start_date']) ? $data['start_date'] : null; + $this->container['start_time_epoch'] = isset($data['start_time_epoch']) ? $data['start_time_epoch'] : null; + $this->container['start_time_string'] = isset($data['start_time_string']) ? $data['start_time_string'] : null; + $this->container['unit_id'] = isset($data['unit_id']) ? $data['unit_id'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['variable_category_id'] = isset($data['variable_category_id']) ? $data['variable_category_id'] : null; + $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; + $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['duration'] === null) { + $invalid_properties[] = "'duration' can't be null"; + } + if ($this->container['id'] === null) { + $invalid_properties[] = "'id' can't be null"; + } + if ($this->container['note'] === null) { + $invalid_properties[] = "'note' can't be null"; + } + if ($this->container['original_unit_id'] === null) { + $invalid_properties[] = "'original_unit_id' can't be null"; + } + if ($this->container['original_value'] === null) { + $invalid_properties[] = "'original_value' can't be null"; + } + if ($this->container['start_date'] === null) { + $invalid_properties[] = "'start_date' can't be null"; + } + if ($this->container['start_time_epoch'] === null) { + $invalid_properties[] = "'start_time_epoch' can't be null"; + } + if ($this->container['start_time_string'] === null) { + $invalid_properties[] = "'start_time_string' can't be null"; + } + if ($this->container['unit_id'] === null) { + $invalid_properties[] = "'unit_id' can't be null"; + } + if ($this->container['value'] === null) { + $invalid_properties[] = "'value' can't be null"; + } + if ($this->container['variable_category_id'] === null) { + $invalid_properties[] = "'variable_category_id' can't be null"; + } + if ($this->container['variable_id'] === null) { + $invalid_properties[] = "'variable_id' can't be null"; + } + if ($this->container['variable_name'] === null) { + $invalid_properties[] = "'variable_name' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['duration'] === null) { + return false; + } + if ($this->container['id'] === null) { + return false; + } + if ($this->container['note'] === null) { + return false; + } + if ($this->container['original_unit_id'] === null) { + return false; + } + if ($this->container['original_value'] === null) { + return false; + } + if ($this->container['start_date'] === null) { + return false; + } + if ($this->container['start_time_epoch'] === null) { + return false; + } + if ($this->container['start_time_string'] === null) { + return false; + } + if ($this->container['unit_id'] === null) { + return false; + } + if ($this->container['value'] === null) { + return false; + } + if ($this->container['variable_category_id'] === null) { + return false; + } + if ($this->container['variable_id'] === null) { + return false; + } + if ($this->container['variable_name'] === null) { + return false; + } + return true; + } + + + /** + * Gets duration + * @return int + */ + public function getDuration() + { + return $this->container['duration']; + } + + /** + * Sets duration + * @param int $duration Example: 0 + * @return $this + */ + public function setDuration($duration) + { + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets id + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param string $id Example: + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets note + * @return string + */ + public function getNote() + { + return $this->container['note']; + } + + /** + * Sets note + * @param string $note Example: + * @return $this + */ + public function setNote($note) + { + $this->container['note'] = $note; + + return $this; + } + + /** + * Gets original_unit_id + * @return string + */ + public function getOriginalUnitId() + { + return $this->container['original_unit_id']; + } + + /** + * Sets original_unit_id + * @param string $original_unit_id Example: 47, 47, 47, 47, 47, 47 + * @return $this + */ + public function setOriginalUnitId($original_unit_id) + { + $this->container['original_unit_id'] = $original_unit_id; + + return $this; + } + + /** + * Gets original_value + * @return string + */ + public function getOriginalValue() + { + return $this->container['original_value']; + } + + /** + * Sets original_value + * @param string $original_value Example: 101800, 101800, 101700, 101600, 101600, 101600 + * @return $this + */ + public function setOriginalValue($original_value) + { + $this->container['original_value'] = $original_value; + + return $this; + } + + /** + * Gets start_date + * @return string + */ + public function getStartDate() + { + return $this->container['start_date']; + } + + /** + * Sets start_date + * @param string $start_date Example: 2016-06-03 + * @return $this + */ + public function setStartDate($start_date) + { + $this->container['start_date'] = $start_date; + + return $this; + } + + /** + * Gets start_time_epoch + * @return int + */ + public function getStartTimeEpoch() + { + return $this->container['start_time_epoch']; + } + + /** + * Sets start_time_epoch + * @param int $start_time_epoch Example: 1464937200 + * @return $this + */ + public function setStartTimeEpoch($start_time_epoch) + { + $this->container['start_time_epoch'] = $start_time_epoch; + + return $this; + } + + /** + * Gets start_time_string + * @return \DateTime + */ + public function getStartTimeString() + { + return $this->container['start_time_string']; + } + + /** + * Sets start_time_string + * @param \DateTime $start_time_string Example: 2016-06-03 07:00:00 + * @return $this + */ + public function setStartTimeString($start_time_string) + { + $this->container['start_time_string'] = $start_time_string; + + return $this; + } + + /** + * Gets unit_id + * @return int + */ + public function getUnitId() + { + return $this->container['unit_id']; + } + + /** + * Sets unit_id + * @param int $unit_id Example: 47 + * @return $this + */ + public function setUnitId($unit_id) + { + $this->container['unit_id'] = $unit_id; + + return $this; + } + + /** + * Gets value + * @return double + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * @param double $value Example: 101341.66666667 + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets variable_category_id + * @return int + */ + public function getVariableCategoryId() + { + return $this->container['variable_category_id']; + } + + /** + * Sets variable_category_id + * @param int $variable_category_id Example: 17 + * @return $this + */ + public function setVariableCategoryId($variable_category_id) + { + $this->container['variable_category_id'] = $variable_category_id; + + return $this; + } + + /** + * Gets variable_id + * @return int + */ + public function getVariableId() + { + return $this->container['variable_id']; + } + + /** + * Sets variable_id + * @param int $variable_id Example: 96380 + * @return $this + */ + public function setVariableId($variable_id) + { + $this->container['variable_id'] = $variable_id; + + return $this; + } + + /** + * Gets variable_name + * @return string + */ + public function getVariableName() + { + return $this->container['variable_name']; + } + + /** + * Sets variable_name + * @param string $variable_name Example: Barometric Pressure + * @return $this + */ + public function setVariableName($variable_name) + { + $this->container['variable_name'] = $variable_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Scatter.php b/lib/Model/Scatter.php new file mode 100644 index 0000000..19c1cbe --- /dev/null +++ b/lib/Model/Scatter.php @@ -0,0 +1,314 @@ + '\QuantiModo\Client\Model\Marker', + 'states' => '\QuantiModo\Client\Model\State', + 'tooltip' => '\QuantiModo\Client\Model\Tooltip' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'marker' => null, + 'states' => null, + 'tooltip' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'marker' => 'marker', + 'states' => 'states', + 'tooltip' => 'tooltip' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'marker' => 'setMarker', + 'states' => 'setStates', + 'tooltip' => 'setTooltip' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'marker' => 'getMarker', + 'states' => 'getStates', + 'tooltip' => 'getTooltip' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['marker'] = isset($data['marker']) ? $data['marker'] : null; + $this->container['states'] = isset($data['states']) ? $data['states'] : null; + $this->container['tooltip'] = isset($data['tooltip']) ? $data['tooltip'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['marker'] === null) { + $invalid_properties[] = "'marker' can't be null"; + } + if ($this->container['states'] === null) { + $invalid_properties[] = "'states' can't be null"; + } + if ($this->container['tooltip'] === null) { + $invalid_properties[] = "'tooltip' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['marker'] === null) { + return false; + } + if ($this->container['states'] === null) { + return false; + } + if ($this->container['tooltip'] === null) { + return false; + } + return true; + } + + + /** + * Gets marker + * @return \QuantiModo\Client\Model\Marker + */ + public function getMarker() + { + return $this->container['marker']; + } + + /** + * Sets marker + * @param \QuantiModo\Client\Model\Marker $marker + * @return $this + */ + public function setMarker($marker) + { + $this->container['marker'] = $marker; + + return $this; + } + + /** + * Gets states + * @return \QuantiModo\Client\Model\State + */ + public function getStates() + { + return $this->container['states']; + } + + /** + * Sets states + * @param \QuantiModo\Client\Model\State $states + * @return $this + */ + public function setStates($states) + { + $this->container['states'] = $states; + + return $this; + } + + /** + * Gets tooltip + * @return \QuantiModo\Client\Model\Tooltip + */ + public function getTooltip() + { + return $this->container['tooltip']; + } + + /** + * Sets tooltip + * @param \QuantiModo\Client\Model\Tooltip $tooltip + * @return $this + */ + public function setTooltip($tooltip) + { + $this->container['tooltip'] = $tooltip; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Scope.php b/lib/Model/Scope.php new file mode 100644 index 0000000..49e84bb --- /dev/null +++ b/lib/Model/Scope.php @@ -0,0 +1,242 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'scalar' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'scalar' => 'scalar' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'scalar' => 'setScalar' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'scalar' => 'getScalar' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['scalar'] = isset($data['scalar']) ? $data['scalar'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets scalar + * @return string + */ + public function getScalar() + { + return $this->container['scalar']; + } + + /** + * Sets scalar + * @param string $scalar Example: user_likes + * @return $this + */ + public function setScalar($scalar) + { + $this->container['scalar'] = $scalar; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ScopeArray.php b/lib/Model/ScopeArray.php new file mode 100644 index 0000000..15a091a --- /dev/null +++ b/lib/Model/ScopeArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Series.php b/lib/Model/Series.php new file mode 100644 index 0000000..db1f4f0 --- /dev/null +++ b/lib/Model/Series.php @@ -0,0 +1,413 @@ + 'string', + 'data' => '\QuantiModo\Client\Model\Series[]', + 'name' => 'string', + 'tooltip' => '\QuantiModo\Client\Model\Tooltip', + 'type' => 'string', + 'y_axis' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'color' => null, + 'data' => null, + 'name' => null, + 'tooltip' => null, + 'type' => null, + 'y_axis' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'color' => 'color', + 'data' => 'data', + 'name' => 'name', + 'tooltip' => 'tooltip', + 'type' => 'type', + 'y_axis' => 'yAxis' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'color' => 'setColor', + 'data' => 'setData', + 'name' => 'setName', + 'tooltip' => 'setTooltip', + 'type' => 'setType', + 'y_axis' => 'setYAxis' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'color' => 'getColor', + 'data' => 'getData', + 'name' => 'getName', + 'tooltip' => 'getTooltip', + 'type' => 'getType', + 'y_axis' => 'getYAxis' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['color'] = isset($data['color']) ? $data['color'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['tooltip'] = isset($data['tooltip']) ? $data['tooltip'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['y_axis'] = isset($data['y_axis']) ? $data['y_axis'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['color'] === null) { + $invalid_properties[] = "'color' can't be null"; + } + if ($this->container['data'] === null) { + $invalid_properties[] = "'data' can't be null"; + } + if ($this->container['name'] === null) { + $invalid_properties[] = "'name' can't be null"; + } + if ($this->container['tooltip'] === null) { + $invalid_properties[] = "'tooltip' can't be null"; + } + if ($this->container['type'] === null) { + $invalid_properties[] = "'type' can't be null"; + } + if ($this->container['y_axis'] === null) { + $invalid_properties[] = "'y_axis' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['color'] === null) { + return false; + } + if ($this->container['data'] === null) { + return false; + } + if ($this->container['name'] === null) { + return false; + } + if ($this->container['tooltip'] === null) { + return false; + } + if ($this->container['type'] === null) { + return false; + } + if ($this->container['y_axis'] === null) { + return false; + } + return true; + } + + + /** + * Gets color + * @return string + */ + public function getColor() + { + return $this->container['color']; + } + + /** + * Sets color + * @param string $color Example: rgba(223, 83, 83, .5) + * @return $this + */ + public function setColor($color) + { + $this->container['color'] = $color; + + return $this; + } + + /** + * Gets data + * @return \QuantiModo\Client\Model\Series[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * @param \QuantiModo\Client\Model\Series[] $data + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets name + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * @param string $name Example: Reference And Learning Hours by Barometric Pressure + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets tooltip + * @return \QuantiModo\Client\Model\Tooltip + */ + public function getTooltip() + { + return $this->container['tooltip']; + } + + /** + * Sets tooltip + * @param \QuantiModo\Client\Model\Tooltip $tooltip + * @return $this + */ + public function setTooltip($tooltip) + { + $this->container['tooltip'] = $tooltip; + + return $this; + } + + /** + * Gets type + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * @param string $type Example: spline + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets y_axis + * @return int + */ + public function getYAxis() + { + return $this->container['y_axis']; + } + + /** + * Sets y_axis + * @param int $y_axis Example: 1 + * @return $this + */ + public function setYAxis($y_axis) + { + $this->container['y_axis'] = $y_axis; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/State.php b/lib/Model/State.php new file mode 100644 index 0000000..89eb020 --- /dev/null +++ b/lib/Model/State.php @@ -0,0 +1,248 @@ + '\QuantiModo\Client\Model\Hover' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'hover' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'hover' => 'hover' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'hover' => 'setHover' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'hover' => 'getHover' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['hover'] = isset($data['hover']) ? $data['hover'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['hover'] === null) { + $invalid_properties[] = "'hover' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['hover'] === null) { + return false; + } + return true; + } + + + /** + * Gets hover + * @return \QuantiModo\Client\Model\Hover + */ + public function getHover() + { + return $this->container['hover']; + } + + /** + * Sets hover + * @param \QuantiModo\Client\Model\Hover $hover + * @return $this + */ + public function setHover($hover) + { + $this->container['hover'] = $hover; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Study.php b/lib/Model/Study.php new file mode 100644 index 0000000..a135e9c --- /dev/null +++ b/lib/Model/Study.php @@ -0,0 +1,566 @@ + '\QuantiModo\Client\Model\ProcessedDailyMeasurement[]', + 'cause_variable' => '\QuantiModo\Client\Model\UserVariable', + 'charts' => '\QuantiModo\Client\Model\Highchart[]', + 'effect_processed_daily_measurements' => '\QuantiModo\Client\Model\ProcessedDailyMeasurement[]', + 'effect_variable' => '\QuantiModo\Client\Model\UserVariable', + 'highcharts' => '\QuantiModo\Client\Model\HighchartArray', + 'pairs' => '\QuantiModo\Client\Model\Pair[]', + 'statistics' => '\QuantiModo\Client\Model\Correlation', + 'text' => 'string', + 'user' => 'string', + 'user_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'cause_processed_daily_measurements' => null, + 'cause_variable' => null, + 'charts' => null, + 'effect_processed_daily_measurements' => null, + 'effect_variable' => null, + 'highcharts' => null, + 'pairs' => null, + 'statistics' => null, + 'text' => null, + 'user' => null, + 'user_id' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'cause_processed_daily_measurements' => 'causeProcessedDailyMeasurements', + 'cause_variable' => 'causeVariable', + 'charts' => 'charts', + 'effect_processed_daily_measurements' => 'effectProcessedDailyMeasurements', + 'effect_variable' => 'effectVariable', + 'highcharts' => 'highcharts', + 'pairs' => 'pairs', + 'statistics' => 'statistics', + 'text' => 'text', + 'user' => 'user', + 'user_id' => 'userId' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'cause_processed_daily_measurements' => 'setCauseProcessedDailyMeasurements', + 'cause_variable' => 'setCauseVariable', + 'charts' => 'setCharts', + 'effect_processed_daily_measurements' => 'setEffectProcessedDailyMeasurements', + 'effect_variable' => 'setEffectVariable', + 'highcharts' => 'setHighcharts', + 'pairs' => 'setPairs', + 'statistics' => 'setStatistics', + 'text' => 'setText', + 'user' => 'setUser', + 'user_id' => 'setUserId' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'cause_processed_daily_measurements' => 'getCauseProcessedDailyMeasurements', + 'cause_variable' => 'getCauseVariable', + 'charts' => 'getCharts', + 'effect_processed_daily_measurements' => 'getEffectProcessedDailyMeasurements', + 'effect_variable' => 'getEffectVariable', + 'highcharts' => 'getHighcharts', + 'pairs' => 'getPairs', + 'statistics' => 'getStatistics', + 'text' => 'getText', + 'user' => 'getUser', + 'user_id' => 'getUserId' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['cause_processed_daily_measurements'] = isset($data['cause_processed_daily_measurements']) ? $data['cause_processed_daily_measurements'] : null; + $this->container['cause_variable'] = isset($data['cause_variable']) ? $data['cause_variable'] : null; + $this->container['charts'] = isset($data['charts']) ? $data['charts'] : null; + $this->container['effect_processed_daily_measurements'] = isset($data['effect_processed_daily_measurements']) ? $data['effect_processed_daily_measurements'] : null; + $this->container['effect_variable'] = isset($data['effect_variable']) ? $data['effect_variable'] : null; + $this->container['highcharts'] = isset($data['highcharts']) ? $data['highcharts'] : null; + $this->container['pairs'] = isset($data['pairs']) ? $data['pairs'] : null; + $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + $this->container['user'] = isset($data['user']) ? $data['user'] : null; + $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['cause_processed_daily_measurements'] === null) { + $invalid_properties[] = "'cause_processed_daily_measurements' can't be null"; + } + if ($this->container['cause_variable'] === null) { + $invalid_properties[] = "'cause_variable' can't be null"; + } + if ($this->container['charts'] === null) { + $invalid_properties[] = "'charts' can't be null"; + } + if ($this->container['effect_processed_daily_measurements'] === null) { + $invalid_properties[] = "'effect_processed_daily_measurements' can't be null"; + } + if ($this->container['effect_variable'] === null) { + $invalid_properties[] = "'effect_variable' can't be null"; + } + if ($this->container['pairs'] === null) { + $invalid_properties[] = "'pairs' can't be null"; + } + if ($this->container['statistics'] === null) { + $invalid_properties[] = "'statistics' can't be null"; + } + if ($this->container['text'] === null) { + $invalid_properties[] = "'text' can't be null"; + } + if ($this->container['user'] === null) { + $invalid_properties[] = "'user' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['cause_processed_daily_measurements'] === null) { + return false; + } + if ($this->container['cause_variable'] === null) { + return false; + } + if ($this->container['charts'] === null) { + return false; + } + if ($this->container['effect_processed_daily_measurements'] === null) { + return false; + } + if ($this->container['effect_variable'] === null) { + return false; + } + if ($this->container['pairs'] === null) { + return false; + } + if ($this->container['statistics'] === null) { + return false; + } + if ($this->container['text'] === null) { + return false; + } + if ($this->container['user'] === null) { + return false; + } + return true; + } + + + /** + * Gets cause_processed_daily_measurements + * @return \QuantiModo\Client\Model\ProcessedDailyMeasurement[] + */ + public function getCauseProcessedDailyMeasurements() + { + return $this->container['cause_processed_daily_measurements']; + } + + /** + * Sets cause_processed_daily_measurements + * @param \QuantiModo\Client\Model\ProcessedDailyMeasurement[] $cause_processed_daily_measurements + * @return $this + */ + public function setCauseProcessedDailyMeasurements($cause_processed_daily_measurements) + { + $this->container['cause_processed_daily_measurements'] = $cause_processed_daily_measurements; + + return $this; + } + + /** + * Gets cause_variable + * @return \QuantiModo\Client\Model\UserVariable + */ + public function getCauseVariable() + { + return $this->container['cause_variable']; + } + + /** + * Sets cause_variable + * @param \QuantiModo\Client\Model\UserVariable $cause_variable + * @return $this + */ + public function setCauseVariable($cause_variable) + { + $this->container['cause_variable'] = $cause_variable; + + return $this; + } + + /** + * Gets charts + * @return \QuantiModo\Client\Model\Highchart[] + */ + public function getCharts() + { + return $this->container['charts']; + } + + /** + * Sets charts + * @param \QuantiModo\Client\Model\Highchart[] $charts + * @return $this + */ + public function setCharts($charts) + { + $this->container['charts'] = $charts; + + return $this; + } + + /** + * Gets effect_processed_daily_measurements + * @return \QuantiModo\Client\Model\ProcessedDailyMeasurement[] + */ + public function getEffectProcessedDailyMeasurements() + { + return $this->container['effect_processed_daily_measurements']; + } + + /** + * Sets effect_processed_daily_measurements + * @param \QuantiModo\Client\Model\ProcessedDailyMeasurement[] $effect_processed_daily_measurements + * @return $this + */ + public function setEffectProcessedDailyMeasurements($effect_processed_daily_measurements) + { + $this->container['effect_processed_daily_measurements'] = $effect_processed_daily_measurements; + + return $this; + } + + /** + * Gets effect_variable + * @return \QuantiModo\Client\Model\UserVariable + */ + public function getEffectVariable() + { + return $this->container['effect_variable']; + } + + /** + * Sets effect_variable + * @param \QuantiModo\Client\Model\UserVariable $effect_variable + * @return $this + */ + public function setEffectVariable($effect_variable) + { + $this->container['effect_variable'] = $effect_variable; + + return $this; + } + + /** + * Gets highcharts + * @return \QuantiModo\Client\Model\HighchartArray + */ + public function getHighcharts() + { + return $this->container['highcharts']; + } + + /** + * Sets highcharts + * @param \QuantiModo\Client\Model\HighchartArray $highcharts + * @return $this + */ + public function setHighcharts($highcharts) + { + $this->container['highcharts'] = $highcharts; + + return $this; + } + + /** + * Gets pairs + * @return \QuantiModo\Client\Model\Pair[] + */ + public function getPairs() + { + return $this->container['pairs']; + } + + /** + * Sets pairs + * @param \QuantiModo\Client\Model\Pair[] $pairs + * @return $this + */ + public function setPairs($pairs) + { + $this->container['pairs'] = $pairs; + + return $this; + } + + /** + * Gets statistics + * @return \QuantiModo\Client\Model\Correlation + */ + public function getStatistics() + { + return $this->container['statistics']; + } + + /** + * Sets statistics + * @param \QuantiModo\Client\Model\Correlation $statistics + * @return $this + */ + public function setStatistics($statistics) + { + $this->container['statistics'] = $statistics; + + return $this; + } + + /** + * Gets text + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * @param string $text Example: + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets user + * @return string + */ + public function getUser() + { + return $this->container['user']; + } + + /** + * Sets user + * @param string $user Example: + * @return $this + */ + public function setUser($user) + { + $this->container['user'] = $user; + + return $this; + } + + /** + * Gets user_id + * @return int + */ + public function getUserId() + { + return $this->container['user_id']; + } + + /** + * Sets user_id + * @param int $user_id Example: 230 + * @return $this + */ + public function setUserId($user_id) + { + $this->container['user_id'] = $user_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Subtitle.php b/lib/Model/Subtitle.php new file mode 100644 index 0000000..d46276a --- /dev/null +++ b/lib/Model/Subtitle.php @@ -0,0 +1,248 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'text' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'text' => 'text' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'text' => 'setText' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'text' => 'getText' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['text'] === null) { + $invalid_properties[] = "'text' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['text'] === null) { + return false; + } + return true; + } + + + /** + * Gets text + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * @param string $text Example: + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Text.php b/lib/Model/Text.php new file mode 100644 index 0000000..87cfb10 --- /dev/null +++ b/lib/Model/Text.php @@ -0,0 +1,458 @@ + 'string', + 'data_sources' => 'string', + 'significance_explanation' => 'string', + 'study_abstract' => 'string', + 'study_design' => 'string', + 'study_limitations' => 'string', + 'study_objective' => 'string', + 'study_results' => 'string', + 'study_title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'data_analysis' => null, + 'data_sources' => null, + 'significance_explanation' => null, + 'study_abstract' => null, + 'study_design' => null, + 'study_limitations' => null, + 'study_objective' => null, + 'study_results' => null, + 'study_title' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'data_analysis' => 'dataAnalysis', + 'data_sources' => 'dataSources', + 'significance_explanation' => 'significanceExplanation', + 'study_abstract' => 'studyAbstract', + 'study_design' => 'studyDesign', + 'study_limitations' => 'studyLimitations', + 'study_objective' => 'studyObjective', + 'study_results' => 'studyResults', + 'study_title' => 'studyTitle' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'data_analysis' => 'setDataAnalysis', + 'data_sources' => 'setDataSources', + 'significance_explanation' => 'setSignificanceExplanation', + 'study_abstract' => 'setStudyAbstract', + 'study_design' => 'setStudyDesign', + 'study_limitations' => 'setStudyLimitations', + 'study_objective' => 'setStudyObjective', + 'study_results' => 'setStudyResults', + 'study_title' => 'setStudyTitle' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'data_analysis' => 'getDataAnalysis', + 'data_sources' => 'getDataSources', + 'significance_explanation' => 'getSignificanceExplanation', + 'study_abstract' => 'getStudyAbstract', + 'study_design' => 'getStudyDesign', + 'study_limitations' => 'getStudyLimitations', + 'study_objective' => 'getStudyObjective', + 'study_results' => 'getStudyResults', + 'study_title' => 'getStudyTitle' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data_analysis'] = isset($data['data_analysis']) ? $data['data_analysis'] : null; + $this->container['data_sources'] = isset($data['data_sources']) ? $data['data_sources'] : null; + $this->container['significance_explanation'] = isset($data['significance_explanation']) ? $data['significance_explanation'] : null; + $this->container['study_abstract'] = isset($data['study_abstract']) ? $data['study_abstract'] : null; + $this->container['study_design'] = isset($data['study_design']) ? $data['study_design'] : null; + $this->container['study_limitations'] = isset($data['study_limitations']) ? $data['study_limitations'] : null; + $this->container['study_objective'] = isset($data['study_objective']) ? $data['study_objective'] : null; + $this->container['study_results'] = isset($data['study_results']) ? $data['study_results'] : null; + $this->container['study_title'] = isset($data['study_title']) ? $data['study_title'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets data_analysis + * @return string + */ + public function getDataAnalysis() + { + return $this->container['data_analysis']; + } + + /** + * Sets data_analysis + * @param string $data_analysis Example: It was assumed that 0 hours would pass before a change in Very Distracting Time would produce an observable change in Video Activities. It was assumed that Very Distracting Time could produce an observable change in Video Activities for as much as 7 days after the stimulus event. + * @return $this + */ + public function setDataAnalysis($data_analysis) + { + $this->container['data_analysis'] = $data_analysis; + + return $this; + } + + /** + * Gets data_sources + * @return string + */ + public function getDataSources() + { + return $this->container['data_sources']; + } + + /** + * Sets data_sources + * @param string $data_sources Example: Very Distracting Time data was primarily collected using RescueTime. Detailed reports show which applications and websites you spent time on. Activities are automatically grouped into pre-defined categories with built-in productivity scores covering thousands of websites and applications. You can customize categories and productivity scores to meet your needs.
Video Activities data was primarily collected using RescueTime. Detailed reports show which applications and websites you spent time on. Activities are automatically grouped into pre-defined categories with built-in productivity scores covering thousands of websites and applications. You can customize categories and productivity scores to meet your needs. + * @return $this + */ + public function setDataSources($data_sources) + { + $this->container['data_sources'] = $data_sources; + + return $this; + } + + /** + * Gets significance_explanation + * @return string + */ + public function getSignificanceExplanation() + { + return $this->container['significance_explanation']; + } + + /** + * Sets significance_explanation + * @param string $significance_explanation Example: Using a two-tailed t-test with alpha = 0.05, it was determined that the change in Video Activities is statistically significant at 95% confidence interval. + * @return $this + */ + public function setSignificanceExplanation($significance_explanation) + { + $this->container['significance_explanation'] = $significance_explanation; + + return $this; + } + + /** + * Gets study_abstract + * @return string + */ + public function getStudyAbstract() + { + return $this->container['study_abstract']; + } + + /** + * Sets study_abstract + * @param string $study_abstract Example: Aggregated data from 21 suggests with a low degree of confidence (p=0.097) that Very Distracting Time (Work) has a moderately positive predictive relationship (R=0.354) with Video Activities (Activity). The highest quartile of Video Activities measurements were observed following an average 2.03h Very Distracting Timeper day. The lowest quartile of Video Activities measurements were observed following an average 1.04h Very Distracting Timeper day. + * @return $this + */ + public function setStudyAbstract($study_abstract) + { + $this->container['study_abstract'] = $study_abstract; + + return $this; + } + + /** + * Gets study_design + * @return string + */ + public function getStudyDesign() + { + return $this->container['study_design']; + } + + /** + * Sets study_design + * @param string $study_design Example: This study is based on data donated by 21 QuantiModo users. Thus, the study design is equivalent to the aggregation of 21 separate n=1 observational natural experiments. + * @return $this + */ + public function setStudyDesign($study_design) + { + $this->container['study_design'] = $study_design; + + return $this; + } + + /** + * Gets study_limitations + * @return string + */ + public function getStudyLimitations() + { + return $this->container['study_limitations']; + } + + /** + * Sets study_limitations + * @param string $study_limitations Example: As with any human experiment, it was impossible to control for all potentially confounding variables. Correlation does not necessarily imply correlation. We can never know for sure if one factor is definitely the cause of an outcome. However, lack of correlation definitely implies the lack of a causal relationship. Hence, we can with great confidence rule out non-existent relationships. For instance, if we discover no relationship between mood and an antidepressant this information is just as or even more valuable than the discovery that there is a relationship.

We can also take advantage of several characteristics of time series data from many subjects to infer the likelihood of a causal relationship if we do find a correlational relationship. The criteria for causation are a group of minimal conditions necessary to provide adequate evidence of a causal relationship between an incidence and a possible consequence. The list of the criteria is as follows:
1. Strength (effect size): A small association does not mean that there is not a causal effect, though the larger the association, the more likely that it is causal.
2. Consistency (reproducibility): Consistent findings observed by different persons in different places with different samples strengthens the likelihood of an effect.
3. Specificity: Causation is likely if a very specific population at a specific site and disease with no other likely explanation. The more specific an association between a factor and an effect is, the bigger the probability of a causal relationship.
4. Temporality: The effect has to occur after the cause (and if there is an expected delay between the cause and expected effect, then the effect must occur after that delay).
5. Biological gradient: Greater exposure should generally lead to greater incidence of the effect. However, in some cases, the mere presence of the factor can trigger the effect. In other cases, an inverse proportion is observed: greater exposure leads to lower incidence.
6. Plausibility: A plausible mechanism between cause and effect is helpful.
7. Coherence: Coherence between epidemiological and laboratory findings increases the likelihood of an effect.
8. Experiment: \"Occasionally it is possible to appeal to experimental evidence\".
9. Analogy: The effect of similar factors may be considered.

The confidence in a causal relationship is bolstered by the fact that time-precedence was taken into account in all calculations. Furthermore, in accordance with the law of large numbers (LLN), the predictive power and accuracy of these results will continually grow over time. 146 paired data points were used in this analysis. Assuming that the relationship is merely coincidental, as the participant independently modifies their Very Distracting Time values, the observed strength of the relationship will decline until it is below the threshold of significance. To it another way, in the case that we do find a spurious correlation, suggesting that banana intake improves mood for instance, one will likely increase their banana intake. Due to the fact that this correlation is spurious, it is unlikely that you will see a continued and persistent corresponding increase in mood. So over time, the spurious correlation will naturally dissipate.Furthermore, it will be very enlightening to aggregate this data with the data from other participants with similar genetic, diseasomic, environmentomic, and demographic profiles. + * @return $this + */ + public function setStudyLimitations($study_limitations) + { + $this->container['study_limitations'] = $study_limitations; + + return $this; + } + + /** + * Gets study_objective + * @return string + */ + public function getStudyObjective() + { + return $this->container['study_objective']; + } + + /** + * Sets study_objective + * @param string $study_objective Example: The objective of this study is to determine the nature of the relationship (if any) between the Very Distracting Time and the Video Activities. Additionally, we attempt to determine the Very Distracting Time values most likely to produce optimal Video Activities values. + * @return $this + */ + public function setStudyObjective($study_objective) + { + $this->container['study_objective'] = $study_objective; + + return $this; + } + + /** + * Gets study_results + * @return string + */ + public function getStudyResults() + { + return $this->container['study_results']; + } + + /** + * Sets study_results + * @param string $study_results Example: This analysis suggests that higher Very Distracting Time (Work) generally predicts negative Video Activities (p = 0.097). Video Activities is, on average, 36% higher after around 2.03 Very Distracting Time. After an onset delay of 168 hours, Video Activities is, on average, 16% lower than its average over the 168 hours following around 1.04 Very Distracting Time. 146 data points were used in this analysis. The value for Very Distracting Time changed 2984 times, effectively running 1492 separate natural experiments. The top quartile outcome values are preceded by an average 2.03 h of Very Distracting Time. The bottom quartile outcome values are preceded by an average 1.04 h of Very Distracting Time. Forward Pearson Correlation Coefficient was 0.354 (p=0.097, 95% CI -0.437 to 1.144 onset delay = 0 hours, duration of action = 168 hours) . The Reverse Pearson Correlation Coefficient was 0.208 (P=0.097, 95% CI -0.583 to 0.998, onset delay = -0 hours, duration of action = -168 hours). When the Very Distracting Time value is closer to 2.03 h than 1.04 h, the Video Activities value which follows is, on average, 36% percent higher than its typical value. When the Very Distracting Time value is closer to 1.04 h than 2.03 h, the Video Activities value which follows is 0% lower than its typical value. Video Activities is 5 h (67% higher) on average after days with around 5 h Very Distracting Time + * @return $this + */ + public function setStudyResults($study_results) + { + $this->container['study_results'] = $study_results; + + return $this; + } + + /** + * Gets study_title + * @return string + */ + public function getStudyTitle() + { + return $this->container['study_title']; + } + + /** + * Sets study_title + * @param string $study_title Example: N1 Study: Very Distracting Time Predicts Negative Video Activities + * @return $this + */ + public function setStudyTitle($study_title) + { + $this->container['study_title'] = $study_title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Title.php b/lib/Model/Title.php new file mode 100644 index 0000000..2a7ef4a --- /dev/null +++ b/lib/Model/Title.php @@ -0,0 +1,281 @@ + 'bool', + 'text' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'enabled' => null, + 'text' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled', + 'text' => 'text' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled', + 'text' => 'setText' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled', + 'text' => 'getText' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['enabled'] === null) { + $invalid_properties[] = "'enabled' can't be null"; + } + if ($this->container['text'] === null) { + $invalid_properties[] = "'text' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['enabled'] === null) { + return false; + } + if ($this->container['text'] === null) { + return false; + } + return true; + } + + + /** + * Gets enabled + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * @param bool $enabled Example: true + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets text + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * @param string $text Example: Barometric Pressure (Pa) + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Tooltip.php b/lib/Model/Tooltip.php new file mode 100644 index 0000000..40302a7 --- /dev/null +++ b/lib/Model/Tooltip.php @@ -0,0 +1,281 @@ + 'string', + 'value_suffix' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'point_format' => null, + 'value_suffix' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'point_format' => 'pointFormat', + 'value_suffix' => 'valueSuffix' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'point_format' => 'setPointFormat', + 'value_suffix' => 'setValueSuffix' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'point_format' => 'getPointFormat', + 'value_suffix' => 'getValueSuffix' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['point_format'] = isset($data['point_format']) ? $data['point_format'] : null; + $this->container['value_suffix'] = isset($data['value_suffix']) ? $data['value_suffix'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['point_format'] === null) { + $invalid_properties[] = "'point_format' can't be null"; + } + if ($this->container['value_suffix'] === null) { + $invalid_properties[] = "'value_suffix' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['point_format'] === null) { + return false; + } + if ($this->container['value_suffix'] === null) { + return false; + } + return true; + } + + + /** + * Gets point_format + * @return string + */ + public function getPointFormat() + { + return $this->container['point_format']; + } + + /** + * Sets point_format + * @param string $point_format Example: {point.x}Pa, {point.y}h + * @return $this + */ + public function setPointFormat($point_format) + { + $this->container['point_format'] = $point_format; + + return $this; + } + + /** + * Gets value_suffix + * @return string + */ + public function getValueSuffix() + { + return $this->container['value_suffix']; + } + + /** + * Sets value_suffix + * @param string $value_suffix Example: Pa + * @return $this + */ + public function setValueSuffix($value_suffix) + { + $this->container['value_suffix'] = $value_suffix; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TrackingReminder.php b/lib/Model/TrackingReminder.php index 054665d..1fcbdb2 100644 --- a/lib/Model/TrackingReminder.php +++ b/lib/Model/TrackingReminder.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,28 +54,155 @@ class TrackingReminder implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'id' => 'int', + 'available_units' => '\QuantiModo\Client\Model\Unit[]', 'client_id' => 'string', - 'user_id' => 'int', - 'variable_id' => 'int', + 'combination_operation' => 'string', + 'created_at' => '\DateTime', + 'unit_abbreviated_name' => 'string', + 'unit_category_id' => 'int', + 'unit_category_name' => 'string', + 'unit_id' => 'int', + 'unit_name' => 'string', 'default_value' => 'float', - 'reminder_start_time' => 'string', + 'email' => 'bool', + 'error_message' => 'string', + 'filling_value' => 'int', + 'first_daily_reminder_time' => '\DateTime', + 'frequency_text_description' => 'string', + 'frequency_text_description_with_time' => 'string', + 'id' => 'int', + 'input_type' => 'string', + 'instructions' => 'string', + 'ion_icon' => 'string', + 'last_tracked' => '\DateTime', + 'last_value' => 'double', + 'latest_tracking_reminder_notification_reminder_time' => '\DateTime', + 'local_daily_reminder_notification_times' => 'string[]', + 'local_daily_reminder_notification_times_for_all_reminders' => 'string[]', + 'manual_tracking' => 'bool', + 'maximum_allowed_value' => 'int', + 'minimum_allowed_value' => 'int', + 'next_reminder_time_epoch_seconds' => 'int', + 'notification_bar' => 'bool', + 'number_of_raw_measurements' => 'int', + 'number_of_unique_values' => 'int', + 'png_path' => 'string', + 'png_url' => 'string', + 'pop_up' => 'bool', 'reminder_end_time' => 'string', - 'reminder_sound' => 'string', 'reminder_frequency' => 'int', - 'pop_up' => 'bool', + 'reminder_sound' => 'string', + 'reminder_start_epoch_seconds' => 'int', + 'reminder_start_time' => 'string', + 'reminder_start_time_local' => '\DateTime', + 'reminder_start_time_local_human_formatted' => '\DateTime', + 'repeating' => 'bool', + 'second_daily_reminder_time' => '\DateTime', + 'second_to_last_value' => 'double', 'sms' => 'bool', - 'email' => 'bool', - 'notification_bar' => 'bool', - 'latest_tracking_reminder_notification_reminder_time' => '\DateTime', - 'last_tracked' => '\DateTime', 'start_tracking_date' => 'string', 'stop_tracking_date' => 'string', + 'svg_url' => 'string', + 'third_daily_reminder_time' => '\DateTime', + 'third_to_last_value' => 'double', + 'tracking_reminder_id' => 'int', + 'tracking_reminder_image_url' => 'string', 'updated_at' => '\DateTime', - 'variable_name' => 'string', + 'user_id' => 'int', + 'user_variable_unit_abbreviated_name' => 'string', + 'user_variable_unit_category_id' => 'int', + 'user_variable_unit_category_name' => 'string', + 'user_variable_unit_id' => 'int', + 'user_variable_unit_name' => 'string', + 'user_variable_variable_category_id' => 'int', + 'user_variable_variable_category_name' => 'string', + 'valence' => 'string', + 'value_and_frequency_text_description' => 'string', + 'value_and_frequency_text_description_with_time' => 'string', + 'variable_category_id' => 'int', + 'variable_category_image_url' => 'string', 'variable_category_name' => 'string', - 'abbreviated_unit_name' => 'string', - 'combination_operation' => 'string' + 'variable_description' => 'string', + 'variable_id' => 'int', + 'variable_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'available_units' => null, + 'client_id' => null, + 'combination_operation' => null, + 'created_at' => 'date-time', + 'unit_abbreviated_name' => null, + 'unit_category_id' => null, + 'unit_category_name' => null, + 'unit_id' => null, + 'unit_name' => null, + 'default_value' => 'float', + 'email' => null, + 'error_message' => null, + 'filling_value' => null, + 'first_daily_reminder_time' => 'date-time', + 'frequency_text_description' => null, + 'frequency_text_description_with_time' => null, + 'id' => 'int32', + 'input_type' => null, + 'instructions' => null, + 'ion_icon' => null, + 'last_tracked' => 'date-time', + 'last_value' => 'double', + 'latest_tracking_reminder_notification_reminder_time' => 'date-time', + 'local_daily_reminder_notification_times' => null, + 'local_daily_reminder_notification_times_for_all_reminders' => null, + 'manual_tracking' => null, + 'maximum_allowed_value' => null, + 'minimum_allowed_value' => null, + 'next_reminder_time_epoch_seconds' => null, + 'notification_bar' => null, + 'number_of_raw_measurements' => null, + 'number_of_unique_values' => null, + 'png_path' => null, + 'png_url' => null, + 'pop_up' => null, + 'reminder_end_time' => null, + 'reminder_frequency' => 'int32', + 'reminder_sound' => null, + 'reminder_start_epoch_seconds' => null, + 'reminder_start_time' => null, + 'reminder_start_time_local' => 'date-time', + 'reminder_start_time_local_human_formatted' => 'date-time', + 'repeating' => null, + 'second_daily_reminder_time' => 'date-time', + 'second_to_last_value' => 'double', + 'sms' => null, + 'start_tracking_date' => 'string', + 'stop_tracking_date' => 'string', + 'svg_url' => null, + 'third_daily_reminder_time' => 'date-time', + 'third_to_last_value' => 'double', + 'tracking_reminder_id' => null, + 'tracking_reminder_image_url' => null, + 'updated_at' => 'date-time', + 'user_id' => 'int32', + 'user_variable_unit_abbreviated_name' => null, + 'user_variable_unit_category_id' => null, + 'user_variable_unit_category_name' => null, + 'user_variable_unit_id' => null, + 'user_variable_unit_name' => null, + 'user_variable_variable_category_id' => null, + 'user_variable_variable_category_name' => null, + 'valence' => null, + 'value_and_frequency_text_description' => null, + 'value_and_frequency_text_description_with_time' => null, + 'variable_category_id' => null, + 'variable_category_image_url' => null, + 'variable_category_name' => null, + 'variable_description' => null, + 'variable_id' => 'int32', + 'variable_name' => null ]; public static function swaggerTypes() @@ -83,33 +210,87 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', + 'available_units' => 'availableUnits', 'client_id' => 'clientId', - 'user_id' => 'userId', - 'variable_id' => 'variableId', + 'combination_operation' => 'combinationOperation', + 'created_at' => 'createdAt', + 'unit_abbreviated_name' => 'unitAbbreviatedName', + 'unit_category_id' => 'unitCategoryId', + 'unit_category_name' => 'unitCategoryName', + 'unit_id' => 'unitId', + 'unit_name' => 'unitName', 'default_value' => 'defaultValue', - 'reminder_start_time' => 'reminderStartTime', + 'email' => 'email', + 'error_message' => 'errorMessage', + 'filling_value' => 'fillingValue', + 'first_daily_reminder_time' => 'firstDailyReminderTime', + 'frequency_text_description' => 'frequencyTextDescription', + 'frequency_text_description_with_time' => 'frequencyTextDescriptionWithTime', + 'id' => 'id', + 'input_type' => 'inputType', + 'instructions' => 'instructions', + 'ion_icon' => 'ionIcon', + 'last_tracked' => 'lastTracked', + 'last_value' => 'lastValue', + 'latest_tracking_reminder_notification_reminder_time' => 'latestTrackingReminderNotificationReminderTime', + 'local_daily_reminder_notification_times' => 'localDailyReminderNotificationTimes', + 'local_daily_reminder_notification_times_for_all_reminders' => 'localDailyReminderNotificationTimesForAllReminders', + 'manual_tracking' => 'manualTracking', + 'maximum_allowed_value' => 'maximumAllowedValue', + 'minimum_allowed_value' => 'minimumAllowedValue', + 'next_reminder_time_epoch_seconds' => 'nextReminderTimeEpochSeconds', + 'notification_bar' => 'notificationBar', + 'number_of_raw_measurements' => 'numberOfRawMeasurements', + 'number_of_unique_values' => 'numberOfUniqueValues', + 'png_path' => 'pngPath', + 'png_url' => 'pngUrl', + 'pop_up' => 'popUp', 'reminder_end_time' => 'reminderEndTime', - 'reminder_sound' => 'reminderSound', 'reminder_frequency' => 'reminderFrequency', - 'pop_up' => 'popUp', + 'reminder_sound' => 'reminderSound', + 'reminder_start_epoch_seconds' => 'reminderStartEpochSeconds', + 'reminder_start_time' => 'reminderStartTime', + 'reminder_start_time_local' => 'reminderStartTimeLocal', + 'reminder_start_time_local_human_formatted' => 'reminderStartTimeLocalHumanFormatted', + 'repeating' => 'repeating', + 'second_daily_reminder_time' => 'secondDailyReminderTime', + 'second_to_last_value' => 'secondToLastValue', 'sms' => 'sms', - 'email' => 'email', - 'notification_bar' => 'notificationBar', - 'latest_tracking_reminder_notification_reminder_time' => 'latestTrackingReminderNotificationReminderTime', - 'last_tracked' => 'lastTracked', 'start_tracking_date' => 'startTrackingDate', 'stop_tracking_date' => 'stopTrackingDate', + 'svg_url' => 'svgUrl', + 'third_daily_reminder_time' => 'thirdDailyReminderTime', + 'third_to_last_value' => 'thirdToLastValue', + 'tracking_reminder_id' => 'trackingReminderId', + 'tracking_reminder_image_url' => 'trackingReminderImageUrl', 'updated_at' => 'updatedAt', - 'variable_name' => 'variableName', + 'user_id' => 'userId', + 'user_variable_unit_abbreviated_name' => 'userVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'userVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'userVariableUnitCategoryName', + 'user_variable_unit_id' => 'userVariableUnitId', + 'user_variable_unit_name' => 'userVariableUnitName', + 'user_variable_variable_category_id' => 'userVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'userVariableVariableCategoryName', + 'valence' => 'valence', + 'value_and_frequency_text_description' => 'valueAndFrequencyTextDescription', + 'value_and_frequency_text_description_with_time' => 'valueAndFrequencyTextDescriptionWithTime', + 'variable_category_id' => 'variableCategoryId', + 'variable_category_image_url' => 'variableCategoryImageUrl', 'variable_category_name' => 'variableCategoryName', - 'abbreviated_unit_name' => 'abbreviatedUnitName', - 'combination_operation' => 'combinationOperation' + 'variable_description' => 'variableDescription', + 'variable_id' => 'variableId', + 'variable_name' => 'variableName' ]; @@ -118,28 +299,77 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'id' => 'setId', + 'available_units' => 'setAvailableUnits', 'client_id' => 'setClientId', - 'user_id' => 'setUserId', - 'variable_id' => 'setVariableId', + 'combination_operation' => 'setCombinationOperation', + 'created_at' => 'setCreatedAt', + 'unit_abbreviated_name' => 'setUnitAbbreviatedName', + 'unit_category_id' => 'setUnitCategoryId', + 'unit_category_name' => 'setUnitCategoryName', + 'unit_id' => 'setUnitId', + 'unit_name' => 'setUnitName', 'default_value' => 'setDefaultValue', - 'reminder_start_time' => 'setReminderStartTime', + 'email' => 'setEmail', + 'error_message' => 'setErrorMessage', + 'filling_value' => 'setFillingValue', + 'first_daily_reminder_time' => 'setFirstDailyReminderTime', + 'frequency_text_description' => 'setFrequencyTextDescription', + 'frequency_text_description_with_time' => 'setFrequencyTextDescriptionWithTime', + 'id' => 'setId', + 'input_type' => 'setInputType', + 'instructions' => 'setInstructions', + 'ion_icon' => 'setIonIcon', + 'last_tracked' => 'setLastTracked', + 'last_value' => 'setLastValue', + 'latest_tracking_reminder_notification_reminder_time' => 'setLatestTrackingReminderNotificationReminderTime', + 'local_daily_reminder_notification_times' => 'setLocalDailyReminderNotificationTimes', + 'local_daily_reminder_notification_times_for_all_reminders' => 'setLocalDailyReminderNotificationTimesForAllReminders', + 'manual_tracking' => 'setManualTracking', + 'maximum_allowed_value' => 'setMaximumAllowedValue', + 'minimum_allowed_value' => 'setMinimumAllowedValue', + 'next_reminder_time_epoch_seconds' => 'setNextReminderTimeEpochSeconds', + 'notification_bar' => 'setNotificationBar', + 'number_of_raw_measurements' => 'setNumberOfRawMeasurements', + 'number_of_unique_values' => 'setNumberOfUniqueValues', + 'png_path' => 'setPngPath', + 'png_url' => 'setPngUrl', + 'pop_up' => 'setPopUp', 'reminder_end_time' => 'setReminderEndTime', - 'reminder_sound' => 'setReminderSound', 'reminder_frequency' => 'setReminderFrequency', - 'pop_up' => 'setPopUp', + 'reminder_sound' => 'setReminderSound', + 'reminder_start_epoch_seconds' => 'setReminderStartEpochSeconds', + 'reminder_start_time' => 'setReminderStartTime', + 'reminder_start_time_local' => 'setReminderStartTimeLocal', + 'reminder_start_time_local_human_formatted' => 'setReminderStartTimeLocalHumanFormatted', + 'repeating' => 'setRepeating', + 'second_daily_reminder_time' => 'setSecondDailyReminderTime', + 'second_to_last_value' => 'setSecondToLastValue', 'sms' => 'setSms', - 'email' => 'setEmail', - 'notification_bar' => 'setNotificationBar', - 'latest_tracking_reminder_notification_reminder_time' => 'setLatestTrackingReminderNotificationReminderTime', - 'last_tracked' => 'setLastTracked', 'start_tracking_date' => 'setStartTrackingDate', 'stop_tracking_date' => 'setStopTrackingDate', + 'svg_url' => 'setSvgUrl', + 'third_daily_reminder_time' => 'setThirdDailyReminderTime', + 'third_to_last_value' => 'setThirdToLastValue', + 'tracking_reminder_id' => 'setTrackingReminderId', + 'tracking_reminder_image_url' => 'setTrackingReminderImageUrl', 'updated_at' => 'setUpdatedAt', - 'variable_name' => 'setVariableName', + 'user_id' => 'setUserId', + 'user_variable_unit_abbreviated_name' => 'setUserVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'setUserVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'setUserVariableUnitCategoryName', + 'user_variable_unit_id' => 'setUserVariableUnitId', + 'user_variable_unit_name' => 'setUserVariableUnitName', + 'user_variable_variable_category_id' => 'setUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'setUserVariableVariableCategoryName', + 'valence' => 'setValence', + 'value_and_frequency_text_description' => 'setValueAndFrequencyTextDescription', + 'value_and_frequency_text_description_with_time' => 'setValueAndFrequencyTextDescriptionWithTime', + 'variable_category_id' => 'setVariableCategoryId', + 'variable_category_image_url' => 'setVariableCategoryImageUrl', 'variable_category_name' => 'setVariableCategoryName', - 'abbreviated_unit_name' => 'setAbbreviatedUnitName', - 'combination_operation' => 'setCombinationOperation' + 'variable_description' => 'setVariableDescription', + 'variable_id' => 'setVariableId', + 'variable_name' => 'setVariableName' ]; @@ -148,28 +378,77 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'id' => 'getId', + 'available_units' => 'getAvailableUnits', 'client_id' => 'getClientId', - 'user_id' => 'getUserId', - 'variable_id' => 'getVariableId', + 'combination_operation' => 'getCombinationOperation', + 'created_at' => 'getCreatedAt', + 'unit_abbreviated_name' => 'getUnitAbbreviatedName', + 'unit_category_id' => 'getUnitCategoryId', + 'unit_category_name' => 'getUnitCategoryName', + 'unit_id' => 'getUnitId', + 'unit_name' => 'getUnitName', 'default_value' => 'getDefaultValue', - 'reminder_start_time' => 'getReminderStartTime', + 'email' => 'getEmail', + 'error_message' => 'getErrorMessage', + 'filling_value' => 'getFillingValue', + 'first_daily_reminder_time' => 'getFirstDailyReminderTime', + 'frequency_text_description' => 'getFrequencyTextDescription', + 'frequency_text_description_with_time' => 'getFrequencyTextDescriptionWithTime', + 'id' => 'getId', + 'input_type' => 'getInputType', + 'instructions' => 'getInstructions', + 'ion_icon' => 'getIonIcon', + 'last_tracked' => 'getLastTracked', + 'last_value' => 'getLastValue', + 'latest_tracking_reminder_notification_reminder_time' => 'getLatestTrackingReminderNotificationReminderTime', + 'local_daily_reminder_notification_times' => 'getLocalDailyReminderNotificationTimes', + 'local_daily_reminder_notification_times_for_all_reminders' => 'getLocalDailyReminderNotificationTimesForAllReminders', + 'manual_tracking' => 'getManualTracking', + 'maximum_allowed_value' => 'getMaximumAllowedValue', + 'minimum_allowed_value' => 'getMinimumAllowedValue', + 'next_reminder_time_epoch_seconds' => 'getNextReminderTimeEpochSeconds', + 'notification_bar' => 'getNotificationBar', + 'number_of_raw_measurements' => 'getNumberOfRawMeasurements', + 'number_of_unique_values' => 'getNumberOfUniqueValues', + 'png_path' => 'getPngPath', + 'png_url' => 'getPngUrl', + 'pop_up' => 'getPopUp', 'reminder_end_time' => 'getReminderEndTime', - 'reminder_sound' => 'getReminderSound', 'reminder_frequency' => 'getReminderFrequency', - 'pop_up' => 'getPopUp', + 'reminder_sound' => 'getReminderSound', + 'reminder_start_epoch_seconds' => 'getReminderStartEpochSeconds', + 'reminder_start_time' => 'getReminderStartTime', + 'reminder_start_time_local' => 'getReminderStartTimeLocal', + 'reminder_start_time_local_human_formatted' => 'getReminderStartTimeLocalHumanFormatted', + 'repeating' => 'getRepeating', + 'second_daily_reminder_time' => 'getSecondDailyReminderTime', + 'second_to_last_value' => 'getSecondToLastValue', 'sms' => 'getSms', - 'email' => 'getEmail', - 'notification_bar' => 'getNotificationBar', - 'latest_tracking_reminder_notification_reminder_time' => 'getLatestTrackingReminderNotificationReminderTime', - 'last_tracked' => 'getLastTracked', 'start_tracking_date' => 'getStartTrackingDate', 'stop_tracking_date' => 'getStopTrackingDate', + 'svg_url' => 'getSvgUrl', + 'third_daily_reminder_time' => 'getThirdDailyReminderTime', + 'third_to_last_value' => 'getThirdToLastValue', + 'tracking_reminder_id' => 'getTrackingReminderId', + 'tracking_reminder_image_url' => 'getTrackingReminderImageUrl', 'updated_at' => 'getUpdatedAt', - 'variable_name' => 'getVariableName', + 'user_id' => 'getUserId', + 'user_variable_unit_abbreviated_name' => 'getUserVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'getUserVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'getUserVariableUnitCategoryName', + 'user_variable_unit_id' => 'getUserVariableUnitId', + 'user_variable_unit_name' => 'getUserVariableUnitName', + 'user_variable_variable_category_id' => 'getUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'getUserVariableVariableCategoryName', + 'valence' => 'getValence', + 'value_and_frequency_text_description' => 'getValueAndFrequencyTextDescription', + 'value_and_frequency_text_description_with_time' => 'getValueAndFrequencyTextDescriptionWithTime', + 'variable_category_id' => 'getVariableCategoryId', + 'variable_category_image_url' => 'getVariableCategoryImageUrl', 'variable_category_name' => 'getVariableCategoryName', - 'abbreviated_unit_name' => 'getAbbreviatedUnitName', - 'combination_operation' => 'getCombinationOperation' + 'variable_description' => 'getVariableDescription', + 'variable_id' => 'getVariableId', + 'variable_name' => 'getVariableName' ]; public static function attributeMap() @@ -217,28 +496,77 @@ public function getCombinationOperationAllowableValues() */ public function __construct(array $data = null) { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['available_units'] = isset($data['available_units']) ? $data['available_units'] : null; $this->container['client_id'] = isset($data['client_id']) ? $data['client_id'] : null; - $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; - $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; + $this->container['combination_operation'] = isset($data['combination_operation']) ? $data['combination_operation'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['unit_abbreviated_name'] = isset($data['unit_abbreviated_name']) ? $data['unit_abbreviated_name'] : null; + $this->container['unit_category_id'] = isset($data['unit_category_id']) ? $data['unit_category_id'] : null; + $this->container['unit_category_name'] = isset($data['unit_category_name']) ? $data['unit_category_name'] : null; + $this->container['unit_id'] = isset($data['unit_id']) ? $data['unit_id'] : null; + $this->container['unit_name'] = isset($data['unit_name']) ? $data['unit_name'] : null; $this->container['default_value'] = isset($data['default_value']) ? $data['default_value'] : null; - $this->container['reminder_start_time'] = isset($data['reminder_start_time']) ? $data['reminder_start_time'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['error_message'] = isset($data['error_message']) ? $data['error_message'] : null; + $this->container['filling_value'] = isset($data['filling_value']) ? $data['filling_value'] : null; + $this->container['first_daily_reminder_time'] = isset($data['first_daily_reminder_time']) ? $data['first_daily_reminder_time'] : null; + $this->container['frequency_text_description'] = isset($data['frequency_text_description']) ? $data['frequency_text_description'] : null; + $this->container['frequency_text_description_with_time'] = isset($data['frequency_text_description_with_time']) ? $data['frequency_text_description_with_time'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['input_type'] = isset($data['input_type']) ? $data['input_type'] : null; + $this->container['instructions'] = isset($data['instructions']) ? $data['instructions'] : null; + $this->container['ion_icon'] = isset($data['ion_icon']) ? $data['ion_icon'] : null; + $this->container['last_tracked'] = isset($data['last_tracked']) ? $data['last_tracked'] : null; + $this->container['last_value'] = isset($data['last_value']) ? $data['last_value'] : null; + $this->container['latest_tracking_reminder_notification_reminder_time'] = isset($data['latest_tracking_reminder_notification_reminder_time']) ? $data['latest_tracking_reminder_notification_reminder_time'] : null; + $this->container['local_daily_reminder_notification_times'] = isset($data['local_daily_reminder_notification_times']) ? $data['local_daily_reminder_notification_times'] : null; + $this->container['local_daily_reminder_notification_times_for_all_reminders'] = isset($data['local_daily_reminder_notification_times_for_all_reminders']) ? $data['local_daily_reminder_notification_times_for_all_reminders'] : null; + $this->container['manual_tracking'] = isset($data['manual_tracking']) ? $data['manual_tracking'] : null; + $this->container['maximum_allowed_value'] = isset($data['maximum_allowed_value']) ? $data['maximum_allowed_value'] : null; + $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; + $this->container['next_reminder_time_epoch_seconds'] = isset($data['next_reminder_time_epoch_seconds']) ? $data['next_reminder_time_epoch_seconds'] : null; + $this->container['notification_bar'] = isset($data['notification_bar']) ? $data['notification_bar'] : null; + $this->container['number_of_raw_measurements'] = isset($data['number_of_raw_measurements']) ? $data['number_of_raw_measurements'] : null; + $this->container['number_of_unique_values'] = isset($data['number_of_unique_values']) ? $data['number_of_unique_values'] : null; + $this->container['png_path'] = isset($data['png_path']) ? $data['png_path'] : null; + $this->container['png_url'] = isset($data['png_url']) ? $data['png_url'] : null; + $this->container['pop_up'] = isset($data['pop_up']) ? $data['pop_up'] : null; $this->container['reminder_end_time'] = isset($data['reminder_end_time']) ? $data['reminder_end_time'] : null; - $this->container['reminder_sound'] = isset($data['reminder_sound']) ? $data['reminder_sound'] : null; $this->container['reminder_frequency'] = isset($data['reminder_frequency']) ? $data['reminder_frequency'] : null; - $this->container['pop_up'] = isset($data['pop_up']) ? $data['pop_up'] : null; + $this->container['reminder_sound'] = isset($data['reminder_sound']) ? $data['reminder_sound'] : null; + $this->container['reminder_start_epoch_seconds'] = isset($data['reminder_start_epoch_seconds']) ? $data['reminder_start_epoch_seconds'] : null; + $this->container['reminder_start_time'] = isset($data['reminder_start_time']) ? $data['reminder_start_time'] : null; + $this->container['reminder_start_time_local'] = isset($data['reminder_start_time_local']) ? $data['reminder_start_time_local'] : null; + $this->container['reminder_start_time_local_human_formatted'] = isset($data['reminder_start_time_local_human_formatted']) ? $data['reminder_start_time_local_human_formatted'] : null; + $this->container['repeating'] = isset($data['repeating']) ? $data['repeating'] : null; + $this->container['second_daily_reminder_time'] = isset($data['second_daily_reminder_time']) ? $data['second_daily_reminder_time'] : null; + $this->container['second_to_last_value'] = isset($data['second_to_last_value']) ? $data['second_to_last_value'] : null; $this->container['sms'] = isset($data['sms']) ? $data['sms'] : null; - $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['notification_bar'] = isset($data['notification_bar']) ? $data['notification_bar'] : null; - $this->container['latest_tracking_reminder_notification_reminder_time'] = isset($data['latest_tracking_reminder_notification_reminder_time']) ? $data['latest_tracking_reminder_notification_reminder_time'] : null; - $this->container['last_tracked'] = isset($data['last_tracked']) ? $data['last_tracked'] : null; $this->container['start_tracking_date'] = isset($data['start_tracking_date']) ? $data['start_tracking_date'] : null; $this->container['stop_tracking_date'] = isset($data['stop_tracking_date']) ? $data['stop_tracking_date'] : null; + $this->container['svg_url'] = isset($data['svg_url']) ? $data['svg_url'] : null; + $this->container['third_daily_reminder_time'] = isset($data['third_daily_reminder_time']) ? $data['third_daily_reminder_time'] : null; + $this->container['third_to_last_value'] = isset($data['third_to_last_value']) ? $data['third_to_last_value'] : null; + $this->container['tracking_reminder_id'] = isset($data['tracking_reminder_id']) ? $data['tracking_reminder_id'] : null; + $this->container['tracking_reminder_image_url'] = isset($data['tracking_reminder_image_url']) ? $data['tracking_reminder_image_url'] : null; $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; - $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; + $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; + $this->container['user_variable_unit_abbreviated_name'] = isset($data['user_variable_unit_abbreviated_name']) ? $data['user_variable_unit_abbreviated_name'] : null; + $this->container['user_variable_unit_category_id'] = isset($data['user_variable_unit_category_id']) ? $data['user_variable_unit_category_id'] : null; + $this->container['user_variable_unit_category_name'] = isset($data['user_variable_unit_category_name']) ? $data['user_variable_unit_category_name'] : null; + $this->container['user_variable_unit_id'] = isset($data['user_variable_unit_id']) ? $data['user_variable_unit_id'] : null; + $this->container['user_variable_unit_name'] = isset($data['user_variable_unit_name']) ? $data['user_variable_unit_name'] : null; + $this->container['user_variable_variable_category_id'] = isset($data['user_variable_variable_category_id']) ? $data['user_variable_variable_category_id'] : null; + $this->container['user_variable_variable_category_name'] = isset($data['user_variable_variable_category_name']) ? $data['user_variable_variable_category_name'] : null; + $this->container['valence'] = isset($data['valence']) ? $data['valence'] : null; + $this->container['value_and_frequency_text_description'] = isset($data['value_and_frequency_text_description']) ? $data['value_and_frequency_text_description'] : null; + $this->container['value_and_frequency_text_description_with_time'] = isset($data['value_and_frequency_text_description_with_time']) ? $data['value_and_frequency_text_description_with_time'] : null; + $this->container['variable_category_id'] = isset($data['variable_category_id']) ? $data['variable_category_id'] : null; + $this->container['variable_category_image_url'] = isset($data['variable_category_image_url']) ? $data['variable_category_image_url'] : null; $this->container['variable_category_name'] = isset($data['variable_category_name']) ? $data['variable_category_name'] : null; - $this->container['abbreviated_unit_name'] = isset($data['abbreviated_unit_name']) ? $data['abbreviated_unit_name'] : null; - $this->container['combination_operation'] = isset($data['combination_operation']) ? $data['combination_operation'] : null; + $this->container['variable_description'] = isset($data['variable_description']) ? $data['variable_description'] : null; + $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; + $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; } /** @@ -250,20 +578,26 @@ public function listInvalidProperties() { $invalid_properties = []; - if ($this->container['variable_id'] === null) { - $invalid_properties[] = "'variable_id' can't be null"; + $allowed_values = $this->getCombinationOperationAllowableValues(); + if (!in_array($this->container['combination_operation'], $allowed_values)) { + $invalid_properties[] = sprintf( + "invalid value for 'combination_operation', must be one of '%s'", + implode("', '", $allowed_values) + ); } - if ($this->container['default_value'] === null) { - $invalid_properties[] = "'default_value' can't be null"; + + if ($this->container['unit_abbreviated_name'] === null) { + $invalid_properties[] = "'unit_abbreviated_name' can't be null"; } if ($this->container['reminder_frequency'] === null) { $invalid_properties[] = "'reminder_frequency' can't be null"; } - $allowed_values = ["MEAN", "SUM"]; - if (!in_array($this->container['combination_operation'], $allowed_values)) { - $invalid_properties[] = "invalid value for 'combination_operation', must be one of 'MEAN', 'SUM'."; + if ($this->container['variable_category_name'] === null) { + $invalid_properties[] = "'variable_category_name' can't be null"; + } + if ($this->container['variable_name'] === null) { + $invalid_properties[] = "'variable_name' can't be null"; } - return $invalid_properties; } @@ -276,17 +610,20 @@ public function listInvalidProperties() public function valid() { - if ($this->container['variable_id'] === null) { + $allowed_values = $this->getCombinationOperationAllowableValues(); + if (!in_array($this->container['combination_operation'], $allowed_values)) { return false; } - if ($this->container['default_value'] === null) { + if ($this->container['unit_abbreviated_name'] === null) { return false; } if ($this->container['reminder_frequency'] === null) { return false; } - $allowed_values = ["MEAN", "SUM"]; - if (!in_array($this->container['combination_operation'], $allowed_values)) { + if ($this->container['variable_category_name'] === null) { + return false; + } + if ($this->container['variable_name'] === null) { return false; } return true; @@ -294,22 +631,22 @@ public function valid() /** - * Gets id - * @return int + * Gets available_units + * @return \QuantiModo\Client\Model\Unit[] */ - public function getId() + public function getAvailableUnits() { - return $this->container['id']; + return $this->container['available_units']; } /** - * Sets id - * @param int $id id + * Sets available_units + * @param \QuantiModo\Client\Model\Unit[] $available_units * @return $this */ - public function setId($id) + public function setAvailableUnits($available_units) { - $this->container['id'] = $id; + $this->container['available_units'] = $available_units; return $this; } @@ -336,190 +673,178 @@ public function setClientId($client_id) } /** - * Gets user_id - * @return int - */ - public function getUserId() - { - return $this->container['user_id']; - } - - /** - * Sets user_id - * @param int $user_id ID of User - * @return $this - */ - public function setUserId($user_id) - { - $this->container['user_id'] = $user_id; - - return $this; - } - - /** - * Gets variable_id - * @return int + * Gets combination_operation + * @return string */ - public function getVariableId() + public function getCombinationOperation() { - return $this->container['variable_id']; + return $this->container['combination_operation']; } /** - * Sets variable_id - * @param int $variable_id Id for the variable to be tracked + * Sets combination_operation + * @param string $combination_operation The way multiple measurements are aggregated over time * @return $this */ - public function setVariableId($variable_id) + public function setCombinationOperation($combination_operation) { - $this->container['variable_id'] = $variable_id; + $allowed_values = $this->getCombinationOperationAllowableValues(); + if (!is_null($combination_operation) && !in_array($combination_operation, $allowed_values)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'combination_operation', must be one of '%s'", + implode("', '", $allowed_values) + ) + ); + } + $this->container['combination_operation'] = $combination_operation; return $this; } /** - * Gets default_value - * @return float + * Gets created_at + * @return \DateTime */ - public function getDefaultValue() + public function getCreatedAt() { - return $this->container['default_value']; + return $this->container['created_at']; } /** - * Sets default_value - * @param float $default_value Default value to use for the measurement when tracking + * Sets created_at + * @param \DateTime $created_at Example: 2016-05-18 02:24:08 * @return $this */ - public function setDefaultValue($default_value) + public function setCreatedAt($created_at) { - $this->container['default_value'] = $default_value; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets reminder_start_time + * Gets unit_abbreviated_name * @return string */ - public function getReminderStartTime() + public function getUnitAbbreviatedName() { - return $this->container['reminder_start_time']; + return $this->container['unit_abbreviated_name']; } /** - * Sets reminder_start_time - * @param string $reminder_start_time Earliest time of day at which reminders should appear in UTC HH:MM:SS format + * Sets unit_abbreviated_name + * @param string $unit_abbreviated_name Example: /5 * @return $this */ - public function setReminderStartTime($reminder_start_time) + public function setUnitAbbreviatedName($unit_abbreviated_name) { - $this->container['reminder_start_time'] = $reminder_start_time; + $this->container['unit_abbreviated_name'] = $unit_abbreviated_name; return $this; } /** - * Gets reminder_end_time - * @return string + * Gets unit_category_id + * @return int */ - public function getReminderEndTime() + public function getUnitCategoryId() { - return $this->container['reminder_end_time']; + return $this->container['unit_category_id']; } /** - * Sets reminder_end_time - * @param string $reminder_end_time Latest time of day at which reminders should appear in UTC HH:MM:SS format + * Sets unit_category_id + * @param int $unit_category_id Example: 5 * @return $this */ - public function setReminderEndTime($reminder_end_time) + public function setUnitCategoryId($unit_category_id) { - $this->container['reminder_end_time'] = $reminder_end_time; + $this->container['unit_category_id'] = $unit_category_id; return $this; } /** - * Gets reminder_sound + * Gets unit_category_name * @return string */ - public function getReminderSound() + public function getUnitCategoryName() { - return $this->container['reminder_sound']; + return $this->container['unit_category_name']; } /** - * Sets reminder_sound - * @param string $reminder_sound String identifier for the sound to accompany the reminder + * Sets unit_category_name + * @param string $unit_category_name Example: Rating * @return $this */ - public function setReminderSound($reminder_sound) + public function setUnitCategoryName($unit_category_name) { - $this->container['reminder_sound'] = $reminder_sound; + $this->container['unit_category_name'] = $unit_category_name; return $this; } /** - * Gets reminder_frequency + * Gets unit_id * @return int */ - public function getReminderFrequency() + public function getUnitId() { - return $this->container['reminder_frequency']; + return $this->container['unit_id']; } /** - * Sets reminder_frequency - * @param int $reminder_frequency Number of seconds between one reminder and the next + * Sets unit_id + * @param int $unit_id Example: 10 * @return $this */ - public function setReminderFrequency($reminder_frequency) + public function setUnitId($unit_id) { - $this->container['reminder_frequency'] = $reminder_frequency; + $this->container['unit_id'] = $unit_id; return $this; } /** - * Gets pop_up - * @return bool + * Gets unit_name + * @return string */ - public function getPopUp() + public function getUnitName() { - return $this->container['pop_up']; + return $this->container['unit_name']; } /** - * Sets pop_up - * @param bool $pop_up True if the reminders should appear as a popup notification + * Sets unit_name + * @param string $unit_name Example: 1 to 5 Rating * @return $this */ - public function setPopUp($pop_up) + public function setUnitName($unit_name) { - $this->container['pop_up'] = $pop_up; + $this->container['unit_name'] = $unit_name; return $this; } /** - * Gets sms - * @return bool + * Gets default_value + * @return float */ - public function getSms() + public function getDefaultValue() { - return $this->container['sms']; + return $this->container['default_value']; } /** - * Sets sms - * @param bool $sms True if the reminders should be delivered via SMS + * Sets default_value + * @param float $default_value Default value to use for the measurement when tracking * @return $this */ - public function setSms($sms) + public function setDefaultValue($default_value) { - $this->container['sms'] = $sms; + $this->container['default_value'] = $default_value; return $this; } @@ -546,62 +871,209 @@ public function setEmail($email) } /** - * Gets notification_bar - * @return bool + * Gets error_message + * @return string */ - public function getNotificationBar() + public function getErrorMessage() { - return $this->container['notification_bar']; + return $this->container['error_message']; } /** - * Sets notification_bar - * @param bool $notification_bar True if the reminders should appear in the notification bar + * Sets error_message + * @param string $error_message Example: reminderStartTimeLocal is less than $user->earliestReminderTime or greater than $user->latestReminderTime * @return $this */ - public function setNotificationBar($notification_bar) + public function setErrorMessage($error_message) { - $this->container['notification_bar'] = $notification_bar; + $this->container['error_message'] = $error_message; return $this; } /** - * Gets latest_tracking_reminder_notification_reminder_time - * @return \DateTime + * Gets filling_value + * @return int */ - public function getLatestTrackingReminderNotificationReminderTime() + public function getFillingValue() { - return $this->container['latest_tracking_reminder_notification_reminder_time']; + return $this->container['filling_value']; } /** - * Sets latest_tracking_reminder_notification_reminder_time - * @param \DateTime $latest_tracking_reminder_notification_reminder_time UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" timestamp for the reminder time of the latest tracking reminder notification that has been pre-emptively generated in the database + * Sets filling_value + * @param int $filling_value Example: 0 * @return $this */ - public function setLatestTrackingReminderNotificationReminderTime($latest_tracking_reminder_notification_reminder_time) + public function setFillingValue($filling_value) { - $this->container['latest_tracking_reminder_notification_reminder_time'] = $latest_tracking_reminder_notification_reminder_time; + $this->container['filling_value'] = $filling_value; return $this; } /** - * Gets last_tracked + * Gets first_daily_reminder_time * @return \DateTime */ - public function getLastTracked() + public function getFirstDailyReminderTime() { - return $this->container['last_tracked']; + return $this->container['first_daily_reminder_time']; } /** - * Sets last_tracked - * @param \DateTime $last_tracked UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" timestamp for the last time a measurement was received for this user and variable + * Sets first_daily_reminder_time + * @param \DateTime $first_daily_reminder_time Example: 02:45:20 * @return $this */ - public function setLastTracked($last_tracked) + public function setFirstDailyReminderTime($first_daily_reminder_time) + { + $this->container['first_daily_reminder_time'] = $first_daily_reminder_time; + + return $this; + } + + /** + * Gets frequency_text_description + * @return string + */ + public function getFrequencyTextDescription() + { + return $this->container['frequency_text_description']; + } + + /** + * Sets frequency_text_description + * @param string $frequency_text_description Example: Daily + * @return $this + */ + public function setFrequencyTextDescription($frequency_text_description) + { + $this->container['frequency_text_description'] = $frequency_text_description; + + return $this; + } + + /** + * Gets frequency_text_description_with_time + * @return string + */ + public function getFrequencyTextDescriptionWithTime() + { + return $this->container['frequency_text_description_with_time']; + } + + /** + * Sets frequency_text_description_with_time + * @param string $frequency_text_description_with_time Example: Daily at 09:45 PM + * @return $this + */ + public function setFrequencyTextDescriptionWithTime($frequency_text_description_with_time) + { + $this->container['frequency_text_description_with_time'] = $frequency_text_description_with_time; + + return $this; + } + + /** + * Gets id + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param int $id id + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets input_type + * @return string + */ + public function getInputType() + { + return $this->container['input_type']; + } + + /** + * Sets input_type + * @param string $input_type Example: saddestFaceIsFive + * @return $this + */ + public function setInputType($input_type) + { + $this->container['input_type'] = $input_type; + + return $this; + } + + /** + * Gets instructions + * @return string + */ + public function getInstructions() + { + return $this->container['instructions']; + } + + /** + * Sets instructions + * @param string $instructions Example: I am an instruction! + * @return $this + */ + public function setInstructions($instructions) + { + $this->container['instructions'] = $instructions; + + return $this; + } + + /** + * Gets ion_icon + * @return string + */ + public function getIonIcon() + { + return $this->container['ion_icon']; + } + + /** + * Sets ion_icon + * @param string $ion_icon Example: ion-sad-outline + * @return $this + */ + public function setIonIcon($ion_icon) + { + $this->container['ion_icon'] = $ion_icon; + + return $this; + } + + /** + * Gets last_tracked + * @return \DateTime + */ + public function getLastTracked() + { + return $this->container['last_tracked']; + } + + /** + * Sets last_tracked + * @param \DateTime $last_tracked UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` timestamp for the last time a measurement was received for this user and variable + * @return $this + */ + public function setLastTracked($last_tracked) { $this->container['last_tracked'] = $last_tracked; @@ -609,43 +1081,673 @@ public function setLastTracked($last_tracked) } /** - * Gets start_tracking_date - * @return string + * Gets last_value + * @return double + */ + public function getLastValue() + { + return $this->container['last_value']; + } + + /** + * Sets last_value + * @param double $last_value Example: 2 + * @return $this + */ + public function setLastValue($last_value) + { + $this->container['last_value'] = $last_value; + + return $this; + } + + /** + * Gets latest_tracking_reminder_notification_reminder_time + * @return \DateTime + */ + public function getLatestTrackingReminderNotificationReminderTime() + { + return $this->container['latest_tracking_reminder_notification_reminder_time']; + } + + /** + * Sets latest_tracking_reminder_notification_reminder_time + * @param \DateTime $latest_tracking_reminder_notification_reminder_time UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` timestamp for the reminder time of the latest tracking reminder notification that has been pre-emptively generated in the database + * @return $this + */ + public function setLatestTrackingReminderNotificationReminderTime($latest_tracking_reminder_notification_reminder_time) + { + $this->container['latest_tracking_reminder_notification_reminder_time'] = $latest_tracking_reminder_notification_reminder_time; + + return $this; + } + + /** + * Gets local_daily_reminder_notification_times + * @return string[] + */ + public function getLocalDailyReminderNotificationTimes() + { + return $this->container['local_daily_reminder_notification_times']; + } + + /** + * Sets local_daily_reminder_notification_times + * @param string[] $local_daily_reminder_notification_times + * @return $this + */ + public function setLocalDailyReminderNotificationTimes($local_daily_reminder_notification_times) + { + $this->container['local_daily_reminder_notification_times'] = $local_daily_reminder_notification_times; + + return $this; + } + + /** + * Gets local_daily_reminder_notification_times_for_all_reminders + * @return string[] + */ + public function getLocalDailyReminderNotificationTimesForAllReminders() + { + return $this->container['local_daily_reminder_notification_times_for_all_reminders']; + } + + /** + * Sets local_daily_reminder_notification_times_for_all_reminders + * @param string[] $local_daily_reminder_notification_times_for_all_reminders + * @return $this + */ + public function setLocalDailyReminderNotificationTimesForAllReminders($local_daily_reminder_notification_times_for_all_reminders) + { + $this->container['local_daily_reminder_notification_times_for_all_reminders'] = $local_daily_reminder_notification_times_for_all_reminders; + + return $this; + } + + /** + * Gets manual_tracking + * @return bool + */ + public function getManualTracking() + { + return $this->container['manual_tracking']; + } + + /** + * Sets manual_tracking + * @param bool $manual_tracking Example: 1 + * @return $this + */ + public function setManualTracking($manual_tracking) + { + $this->container['manual_tracking'] = $manual_tracking; + + return $this; + } + + /** + * Gets maximum_allowed_value + * @return int + */ + public function getMaximumAllowedValue() + { + return $this->container['maximum_allowed_value']; + } + + /** + * Sets maximum_allowed_value + * @param int $maximum_allowed_value Example: 5 + * @return $this + */ + public function setMaximumAllowedValue($maximum_allowed_value) + { + $this->container['maximum_allowed_value'] = $maximum_allowed_value; + + return $this; + } + + /** + * Gets minimum_allowed_value + * @return int + */ + public function getMinimumAllowedValue() + { + return $this->container['minimum_allowed_value']; + } + + /** + * Sets minimum_allowed_value + * @param int $minimum_allowed_value Example: 1 + * @return $this + */ + public function setMinimumAllowedValue($minimum_allowed_value) + { + $this->container['minimum_allowed_value'] = $minimum_allowed_value; + + return $this; + } + + /** + * Gets next_reminder_time_epoch_seconds + * @return int + */ + public function getNextReminderTimeEpochSeconds() + { + return $this->container['next_reminder_time_epoch_seconds']; + } + + /** + * Sets next_reminder_time_epoch_seconds + * @param int $next_reminder_time_epoch_seconds Example: 1501555520 + * @return $this + */ + public function setNextReminderTimeEpochSeconds($next_reminder_time_epoch_seconds) + { + $this->container['next_reminder_time_epoch_seconds'] = $next_reminder_time_epoch_seconds; + + return $this; + } + + /** + * Gets notification_bar + * @return bool + */ + public function getNotificationBar() + { + return $this->container['notification_bar']; + } + + /** + * Sets notification_bar + * @param bool $notification_bar True if the reminders should appear in the notification bar + * @return $this + */ + public function setNotificationBar($notification_bar) + { + $this->container['notification_bar'] = $notification_bar; + + return $this; + } + + /** + * Gets number_of_raw_measurements + * @return int + */ + public function getNumberOfRawMeasurements() + { + return $this->container['number_of_raw_measurements']; + } + + /** + * Sets number_of_raw_measurements + * @param int $number_of_raw_measurements Example: 445 + * @return $this + */ + public function setNumberOfRawMeasurements($number_of_raw_measurements) + { + $this->container['number_of_raw_measurements'] = $number_of_raw_measurements; + + return $this; + } + + /** + * Gets number_of_unique_values + * @return int + */ + public function getNumberOfUniqueValues() + { + return $this->container['number_of_unique_values']; + } + + /** + * Sets number_of_unique_values + * @param int $number_of_unique_values Example: 1 + * @return $this + */ + public function setNumberOfUniqueValues($number_of_unique_values) + { + $this->container['number_of_unique_values'] = $number_of_unique_values; + + return $this; + } + + /** + * Gets png_path + * @return string + */ + public function getPngPath() + { + return $this->container['png_path']; + } + + /** + * Sets png_path + * @param string $png_path Example: img/variable_categories/symptoms.png + * @return $this + */ + public function setPngPath($png_path) + { + $this->container['png_path'] = $png_path; + + return $this; + } + + /** + * Gets png_url + * @return string + */ + public function getPngUrl() + { + return $this->container['png_url']; + } + + /** + * Sets png_url + * @param string $png_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/symptoms.png + * @return $this + */ + public function setPngUrl($png_url) + { + $this->container['png_url'] = $png_url; + + return $this; + } + + /** + * Gets pop_up + * @return bool + */ + public function getPopUp() + { + return $this->container['pop_up']; + } + + /** + * Sets pop_up + * @param bool $pop_up True if the reminders should appear as a popup notification + * @return $this + */ + public function setPopUp($pop_up) + { + $this->container['pop_up'] = $pop_up; + + return $this; + } + + /** + * Gets reminder_end_time + * @return string + */ + public function getReminderEndTime() + { + return $this->container['reminder_end_time']; + } + + /** + * Sets reminder_end_time + * @param string $reminder_end_time Latest time of day at which reminders should appear in UTC HH:MM:SS format + * @return $this + */ + public function setReminderEndTime($reminder_end_time) + { + $this->container['reminder_end_time'] = $reminder_end_time; + + return $this; + } + + /** + * Gets reminder_frequency + * @return int + */ + public function getReminderFrequency() + { + return $this->container['reminder_frequency']; + } + + /** + * Sets reminder_frequency + * @param int $reminder_frequency Number of seconds between one reminder and the next + * @return $this + */ + public function setReminderFrequency($reminder_frequency) + { + $this->container['reminder_frequency'] = $reminder_frequency; + + return $this; + } + + /** + * Gets reminder_sound + * @return string + */ + public function getReminderSound() + { + return $this->container['reminder_sound']; + } + + /** + * Sets reminder_sound + * @param string $reminder_sound String identifier for the sound to accompany the reminder + * @return $this + */ + public function setReminderSound($reminder_sound) + { + $this->container['reminder_sound'] = $reminder_sound; + + return $this; + } + + /** + * Gets reminder_start_epoch_seconds + * @return int + */ + public function getReminderStartEpochSeconds() + { + return $this->container['reminder_start_epoch_seconds']; + } + + /** + * Sets reminder_start_epoch_seconds + * @param int $reminder_start_epoch_seconds Example: 1469760320 + * @return $this + */ + public function setReminderStartEpochSeconds($reminder_start_epoch_seconds) + { + $this->container['reminder_start_epoch_seconds'] = $reminder_start_epoch_seconds; + + return $this; + } + + /** + * Gets reminder_start_time + * @return string + */ + public function getReminderStartTime() + { + return $this->container['reminder_start_time']; + } + + /** + * Sets reminder_start_time + * @param string $reminder_start_time Earliest time of day at which reminders should appear in UTC HH:MM:SS format + * @return $this + */ + public function setReminderStartTime($reminder_start_time) + { + $this->container['reminder_start_time'] = $reminder_start_time; + + return $this; + } + + /** + * Gets reminder_start_time_local + * @return \DateTime + */ + public function getReminderStartTimeLocal() + { + return $this->container['reminder_start_time_local']; + } + + /** + * Sets reminder_start_time_local + * @param \DateTime $reminder_start_time_local Example: 21:45:20 + * @return $this + */ + public function setReminderStartTimeLocal($reminder_start_time_local) + { + $this->container['reminder_start_time_local'] = $reminder_start_time_local; + + return $this; + } + + /** + * Gets reminder_start_time_local_human_formatted + * @return \DateTime + */ + public function getReminderStartTimeLocalHumanFormatted() + { + return $this->container['reminder_start_time_local_human_formatted']; + } + + /** + * Sets reminder_start_time_local_human_formatted + * @param \DateTime $reminder_start_time_local_human_formatted Example: 09:45 PM + * @return $this + */ + public function setReminderStartTimeLocalHumanFormatted($reminder_start_time_local_human_formatted) + { + $this->container['reminder_start_time_local_human_formatted'] = $reminder_start_time_local_human_formatted; + + return $this; + } + + /** + * Gets repeating + * @return bool + */ + public function getRepeating() + { + return $this->container['repeating']; + } + + /** + * Sets repeating + * @param bool $repeating Example: true + * @return $this + */ + public function setRepeating($repeating) + { + $this->container['repeating'] = $repeating; + + return $this; + } + + /** + * Gets second_daily_reminder_time + * @return \DateTime + */ + public function getSecondDailyReminderTime() + { + return $this->container['second_daily_reminder_time']; + } + + /** + * Sets second_daily_reminder_time + * @param \DateTime $second_daily_reminder_time Example: 01:00:00 + * @return $this + */ + public function setSecondDailyReminderTime($second_daily_reminder_time) + { + $this->container['second_daily_reminder_time'] = $second_daily_reminder_time; + + return $this; + } + + /** + * Gets second_to_last_value + * @return double + */ + public function getSecondToLastValue() + { + return $this->container['second_to_last_value']; + } + + /** + * Sets second_to_last_value + * @param double $second_to_last_value Example: 1 + * @return $this + */ + public function setSecondToLastValue($second_to_last_value) + { + $this->container['second_to_last_value'] = $second_to_last_value; + + return $this; + } + + /** + * Gets sms + * @return bool + */ + public function getSms() + { + return $this->container['sms']; + } + + /** + * Sets sms + * @param bool $sms True if the reminders should be delivered via SMS + * @return $this + */ + public function setSms($sms) + { + $this->container['sms'] = $sms; + + return $this; + } + + /** + * Gets start_tracking_date + * @return string + */ + public function getStartTrackingDate() + { + return $this->container['start_tracking_date']; + } + + /** + * Sets start_tracking_date + * @param string $start_tracking_date Earliest date on which the user should be reminded to track in YYYY-MM-DD format + * @return $this + */ + public function setStartTrackingDate($start_tracking_date) + { + $this->container['start_tracking_date'] = $start_tracking_date; + + return $this; + } + + /** + * Gets stop_tracking_date + * @return string + */ + public function getStopTrackingDate() + { + return $this->container['stop_tracking_date']; + } + + /** + * Sets stop_tracking_date + * @param string $stop_tracking_date Latest date on which the user should be reminded to track in YYYY-MM-DD format + * @return $this + */ + public function setStopTrackingDate($stop_tracking_date) + { + $this->container['stop_tracking_date'] = $stop_tracking_date; + + return $this; + } + + /** + * Gets svg_url + * @return string + */ + public function getSvgUrl() + { + return $this->container['svg_url']; + } + + /** + * Sets svg_url + * @param string $svg_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/symptoms.svg + * @return $this + */ + public function setSvgUrl($svg_url) + { + $this->container['svg_url'] = $svg_url; + + return $this; + } + + /** + * Gets third_daily_reminder_time + * @return \DateTime + */ + public function getThirdDailyReminderTime() + { + return $this->container['third_daily_reminder_time']; + } + + /** + * Sets third_daily_reminder_time + * @param \DateTime $third_daily_reminder_time Example: 20:00:00 + * @return $this + */ + public function setThirdDailyReminderTime($third_daily_reminder_time) + { + $this->container['third_daily_reminder_time'] = $third_daily_reminder_time; + + return $this; + } + + /** + * Gets third_to_last_value + * @return double */ - public function getStartTrackingDate() + public function getThirdToLastValue() { - return $this->container['start_tracking_date']; + return $this->container['third_to_last_value']; } /** - * Sets start_tracking_date - * @param string $start_tracking_date Earliest date on which the user should be reminded to track in YYYY-MM-DD format + * Sets third_to_last_value + * @param double $third_to_last_value Example: 3 * @return $this */ - public function setStartTrackingDate($start_tracking_date) + public function setThirdToLastValue($third_to_last_value) { - $this->container['start_tracking_date'] = $start_tracking_date; + $this->container['third_to_last_value'] = $third_to_last_value; return $this; } /** - * Gets stop_tracking_date + * Gets tracking_reminder_id + * @return int + */ + public function getTrackingReminderId() + { + return $this->container['tracking_reminder_id']; + } + + /** + * Sets tracking_reminder_id + * @param int $tracking_reminder_id Example: 11841 + * @return $this + */ + public function setTrackingReminderId($tracking_reminder_id) + { + $this->container['tracking_reminder_id'] = $tracking_reminder_id; + + return $this; + } + + /** + * Gets tracking_reminder_image_url * @return string */ - public function getStopTrackingDate() + public function getTrackingReminderImageUrl() { - return $this->container['stop_tracking_date']; + return $this->container['tracking_reminder_image_url']; } /** - * Sets stop_tracking_date - * @param string $stop_tracking_date Latest date on which the user should be reminded to track in YYYY-MM-DD format + * Sets tracking_reminder_image_url + * @param string $tracking_reminder_image_url Example: Not Found * @return $this */ - public function setStopTrackingDate($stop_tracking_date) + public function setTrackingReminderImageUrl($tracking_reminder_image_url) { - $this->container['stop_tracking_date'] = $stop_tracking_date; + $this->container['tracking_reminder_image_url'] = $tracking_reminder_image_url; return $this; } @@ -661,7 +1763,7 @@ public function getUpdatedAt() /** * Sets updated_at - * @param \DateTime $updated_at When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. + * @param \DateTime $updated_at When the record in the database was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. * @return $this */ public function setUpdatedAt($updated_at) @@ -672,22 +1774,274 @@ public function setUpdatedAt($updated_at) } /** - * Gets variable_name + * Gets user_id + * @return int + */ + public function getUserId() + { + return $this->container['user_id']; + } + + /** + * Sets user_id + * @param int $user_id ID of User + * @return $this + */ + public function setUserId($user_id) + { + $this->container['user_id'] = $user_id; + + return $this; + } + + /** + * Gets user_variable_unit_abbreviated_name * @return string */ - public function getVariableName() + public function getUserVariableUnitAbbreviatedName() { - return $this->container['variable_name']; + return $this->container['user_variable_unit_abbreviated_name']; } /** - * Sets variable_name - * @param string $variable_name Name of the variable to be used when sending measurements + * Sets user_variable_unit_abbreviated_name + * @param string $user_variable_unit_abbreviated_name Example: /5 * @return $this */ - public function setVariableName($variable_name) + public function setUserVariableUnitAbbreviatedName($user_variable_unit_abbreviated_name) { - $this->container['variable_name'] = $variable_name; + $this->container['user_variable_unit_abbreviated_name'] = $user_variable_unit_abbreviated_name; + + return $this; + } + + /** + * Gets user_variable_unit_category_id + * @return int + */ + public function getUserVariableUnitCategoryId() + { + return $this->container['user_variable_unit_category_id']; + } + + /** + * Sets user_variable_unit_category_id + * @param int $user_variable_unit_category_id Example: 5 + * @return $this + */ + public function setUserVariableUnitCategoryId($user_variable_unit_category_id) + { + $this->container['user_variable_unit_category_id'] = $user_variable_unit_category_id; + + return $this; + } + + /** + * Gets user_variable_unit_category_name + * @return string + */ + public function getUserVariableUnitCategoryName() + { + return $this->container['user_variable_unit_category_name']; + } + + /** + * Sets user_variable_unit_category_name + * @param string $user_variable_unit_category_name Example: Rating + * @return $this + */ + public function setUserVariableUnitCategoryName($user_variable_unit_category_name) + { + $this->container['user_variable_unit_category_name'] = $user_variable_unit_category_name; + + return $this; + } + + /** + * Gets user_variable_unit_id + * @return int + */ + public function getUserVariableUnitId() + { + return $this->container['user_variable_unit_id']; + } + + /** + * Sets user_variable_unit_id + * @param int $user_variable_unit_id Example: 10 + * @return $this + */ + public function setUserVariableUnitId($user_variable_unit_id) + { + $this->container['user_variable_unit_id'] = $user_variable_unit_id; + + return $this; + } + + /** + * Gets user_variable_unit_name + * @return string + */ + public function getUserVariableUnitName() + { + return $this->container['user_variable_unit_name']; + } + + /** + * Sets user_variable_unit_name + * @param string $user_variable_unit_name Example: 1 to 5 Rating + * @return $this + */ + public function setUserVariableUnitName($user_variable_unit_name) + { + $this->container['user_variable_unit_name'] = $user_variable_unit_name; + + return $this; + } + + /** + * Gets user_variable_variable_category_id + * @return int + */ + public function getUserVariableVariableCategoryId() + { + return $this->container['user_variable_variable_category_id']; + } + + /** + * Sets user_variable_variable_category_id + * @param int $user_variable_variable_category_id Example: 10 + * @return $this + */ + public function setUserVariableVariableCategoryId($user_variable_variable_category_id) + { + $this->container['user_variable_variable_category_id'] = $user_variable_variable_category_id; + + return $this; + } + + /** + * Gets user_variable_variable_category_name + * @return string + */ + public function getUserVariableVariableCategoryName() + { + return $this->container['user_variable_variable_category_name']; + } + + /** + * Sets user_variable_variable_category_name + * @param string $user_variable_variable_category_name Example: Symptoms + * @return $this + */ + public function setUserVariableVariableCategoryName($user_variable_variable_category_name) + { + $this->container['user_variable_variable_category_name'] = $user_variable_variable_category_name; + + return $this; + } + + /** + * Gets valence + * @return string + */ + public function getValence() + { + return $this->container['valence']; + } + + /** + * Sets valence + * @param string $valence Example: negative + * @return $this + */ + public function setValence($valence) + { + $this->container['valence'] = $valence; + + return $this; + } + + /** + * Gets value_and_frequency_text_description + * @return string + */ + public function getValueAndFrequencyTextDescription() + { + return $this->container['value_and_frequency_text_description']; + } + + /** + * Sets value_and_frequency_text_description + * @param string $value_and_frequency_text_description Example: Rate daily + * @return $this + */ + public function setValueAndFrequencyTextDescription($value_and_frequency_text_description) + { + $this->container['value_and_frequency_text_description'] = $value_and_frequency_text_description; + + return $this; + } + + /** + * Gets value_and_frequency_text_description_with_time + * @return string + */ + public function getValueAndFrequencyTextDescriptionWithTime() + { + return $this->container['value_and_frequency_text_description_with_time']; + } + + /** + * Sets value_and_frequency_text_description_with_time + * @param string $value_and_frequency_text_description_with_time Example: Rate daily at 09:45 PM + * @return $this + */ + public function setValueAndFrequencyTextDescriptionWithTime($value_and_frequency_text_description_with_time) + { + $this->container['value_and_frequency_text_description_with_time'] = $value_and_frequency_text_description_with_time; + + return $this; + } + + /** + * Gets variable_category_id + * @return int + */ + public function getVariableCategoryId() + { + return $this->container['variable_category_id']; + } + + /** + * Sets variable_category_id + * @param int $variable_category_id Example: 10 + * @return $this + */ + public function setVariableCategoryId($variable_category_id) + { + $this->container['variable_category_id'] = $variable_category_id; + + return $this; + } + + /** + * Gets variable_category_image_url + * @return string + */ + public function getVariableCategoryImageUrl() + { + return $this->container['variable_category_image_url']; + } + + /** + * Sets variable_category_image_url + * @param string $variable_category_image_url Example: https://maxcdn.icons8.com/Color/PNG/96/Messaging/sad-96.png + * @return $this + */ + public function setVariableCategoryImageUrl($variable_category_image_url) + { + $this->container['variable_category_image_url'] = $variable_category_image_url; return $this; } @@ -714,47 +2068,64 @@ public function setVariableCategoryName($variable_category_name) } /** - * Gets abbreviated_unit_name + * Gets variable_description * @return string */ - public function getAbbreviatedUnitName() + public function getVariableDescription() { - return $this->container['abbreviated_unit_name']; + return $this->container['variable_description']; } /** - * Sets abbreviated_unit_name - * @param string $abbreviated_unit_name Abbreviated name of the unit to be used when sending measurements + * Sets variable_description + * @param string $variable_description Example: negative * @return $this */ - public function setAbbreviatedUnitName($abbreviated_unit_name) + public function setVariableDescription($variable_description) { - $this->container['abbreviated_unit_name'] = $abbreviated_unit_name; + $this->container['variable_description'] = $variable_description; return $this; } /** - * Gets combination_operation + * Gets variable_id + * @return int + */ + public function getVariableId() + { + return $this->container['variable_id']; + } + + /** + * Sets variable_id + * @param int $variable_id Id for the variable to be tracked + * @return $this + */ + public function setVariableId($variable_id) + { + $this->container['variable_id'] = $variable_id; + + return $this; + } + + /** + * Gets variable_name * @return string */ - public function getCombinationOperation() + public function getVariableName() { - return $this->container['combination_operation']; + return $this->container['variable_name']; } /** - * Sets combination_operation - * @param string $combination_operation The way multiple measurements are aggregated over time + * Sets variable_name + * @param string $variable_name Name of the variable to be used when sending measurements * @return $this */ - public function setCombinationOperation($combination_operation) + public function setVariableName($variable_name) { - $allowed_values = array('MEAN', 'SUM'); - if (!is_null($combination_operation) && (!in_array($combination_operation, $allowed_values))) { - throw new \InvalidArgumentException("Invalid value for 'combination_operation', must be one of 'MEAN', 'SUM'"); - } - $this->container['combination_operation'] = $combination_operation; + $this->container['variable_name'] = $variable_name; return $this; } diff --git a/lib/Model/TrackingReminderArray.php b/lib/Model/TrackingReminderArray.php new file mode 100644 index 0000000..ca84fd8 --- /dev/null +++ b/lib/Model/TrackingReminderArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TrackingReminderDelete.php b/lib/Model/TrackingReminderDelete.php index 9ecc377..1243fde 100644 --- a/lib/Model/TrackingReminderDelete.php +++ b/lib/Model/TrackingReminderDelete.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -57,11 +57,24 @@ class TrackingReminderDelete implements ArrayAccess 'id' => 'int' ]; + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null + ]; + public static function swaggerTypes() { return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] @@ -164,7 +177,7 @@ public function getId() /** * Sets id - * @param int $id Id of the PENDING reminder to be deleted + * @param int $id Id of the TrackingReminder to be deleted * @return $this */ public function setId($id) diff --git a/lib/Model/TrackingReminderNotification.php b/lib/Model/TrackingReminderNotification.php index 5c3d2ca..978f500 100644 --- a/lib/Model/TrackingReminderNotification.php +++ b/lib/Model/TrackingReminderNotification.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,23 +54,145 @@ class TrackingReminderNotification implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'id' => 'int', - 'tracking_reminder_id' => 'int', + 'action_array' => '\QuantiModo\Client\Model\TrackingReminderNotificationActionArray[]', + 'available_units' => '\QuantiModo\Client\Model\Unit[]', 'client_id' => 'string', - 'user_id' => 'int', - 'variable_id' => 'int', - 'pending_reminder_time' => '\DateTime', + 'combination_operation' => 'string', + 'created_at' => '\DateTime', + 'unit_abbreviated_name' => 'string', + 'unit_category_id' => 'int', + 'unit_category_name' => 'string', + 'unit_id' => 'int', + 'unit_name' => 'string', 'default_value' => 'float', - 'reminder_sound' => 'string', - 'pop_up' => 'bool', - 'sms' => 'bool', + 'description' => 'string', 'email' => 'bool', + 'filling_value' => 'int', + 'icon_icon' => 'string', + 'id' => 'int', + 'image_url' => 'string', + 'input_type' => 'string', + 'ion_icon' => 'string', + 'last_value' => 'double', + 'manual_tracking' => 'bool', + 'maximum_allowed_value' => 'int', + 'minimum_allowed_value' => 'int', + 'most_common_value' => 'double', 'notification_bar' => 'bool', + 'notified_at' => '\DateTime', + 'number_of_unique_values' => 'int', + 'png_path' => 'string', + 'png_url' => 'string', + 'pop_up' => 'bool', + 'reminder_end_time' => '\DateTime', + 'reminder_frequency' => 'int', + 'reminder_sound' => 'string', + 'reminder_start_time' => 'string', + 'reminder_time' => '\DateTime', + 'second_most_common_value' => 'double', + 'second_to_last_value' => 'double', + 'sms' => 'bool', + 'svg_url' => 'string', + 'third_most_common_value' => 'double', + 'third_to_last_value' => 'double', + 'title' => 'string', + 'total' => 'double', + 'track_all_actions' => '\QuantiModo\Client\Model\TrackingReminderNotificationTrackAllAction[]', + 'tracking_reminder_id' => 'int', + 'tracking_reminder_image_url' => 'string', + 'tracking_reminder_notification_id' => 'int', + 'tracking_reminder_notification_time' => '\DateTime', + 'tracking_reminder_notification_time_epoch' => 'int', + 'tracking_reminder_notification_time_local' => 'string', 'updated_at' => '\DateTime', - 'variable_name' => 'string', + 'user_id' => 'int', + 'user_variable_unit_abbreviated_name' => 'string', + 'user_variable_unit_category_id' => 'int', + 'user_variable_unit_category_name' => 'string', + 'user_variable_unit_id' => 'int', + 'user_variable_unit_name' => 'string', + 'user_variable_variable_category_id' => 'int', + 'user_variable_variable_category_name' => 'string', + 'valence' => 'string', + 'variable_category_id' => 'int', + 'variable_category_image_url' => 'string', 'variable_category_name' => 'string', - 'abbreviated_unit_name' => 'string', - 'combination_operation' => 'string' + 'variable_id' => 'int', + 'variable_image_url' => 'string', + 'variable_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'action_array' => null, + 'available_units' => null, + 'client_id' => null, + 'combination_operation' => null, + 'created_at' => 'date-time', + 'unit_abbreviated_name' => null, + 'unit_category_id' => null, + 'unit_category_name' => null, + 'unit_id' => null, + 'unit_name' => null, + 'default_value' => 'float', + 'description' => null, + 'email' => null, + 'filling_value' => null, + 'icon_icon' => null, + 'id' => 'int32', + 'image_url' => null, + 'input_type' => null, + 'ion_icon' => null, + 'last_value' => 'double', + 'manual_tracking' => null, + 'maximum_allowed_value' => null, + 'minimum_allowed_value' => null, + 'most_common_value' => 'double', + 'notification_bar' => null, + 'notified_at' => 'date-time', + 'number_of_unique_values' => null, + 'png_path' => null, + 'png_url' => null, + 'pop_up' => null, + 'reminder_end_time' => 'date-time', + 'reminder_frequency' => null, + 'reminder_sound' => null, + 'reminder_start_time' => null, + 'reminder_time' => 'date-time', + 'second_most_common_value' => 'double', + 'second_to_last_value' => 'double', + 'sms' => null, + 'svg_url' => null, + 'third_most_common_value' => 'double', + 'third_to_last_value' => 'double', + 'title' => null, + 'total' => 'double', + 'track_all_actions' => null, + 'tracking_reminder_id' => 'int32', + 'tracking_reminder_image_url' => null, + 'tracking_reminder_notification_id' => null, + 'tracking_reminder_notification_time' => 'date-time', + 'tracking_reminder_notification_time_epoch' => null, + 'tracking_reminder_notification_time_local' => null, + 'updated_at' => 'date-time', + 'user_id' => 'int32', + 'user_variable_unit_abbreviated_name' => null, + 'user_variable_unit_category_id' => null, + 'user_variable_unit_category_name' => null, + 'user_variable_unit_id' => null, + 'user_variable_unit_name' => null, + 'user_variable_variable_category_id' => null, + 'user_variable_variable_category_name' => null, + 'valence' => null, + 'variable_category_id' => null, + 'variable_category_image_url' => null, + 'variable_category_name' => null, + 'variable_id' => 'int32', + 'variable_image_url' => null, + 'variable_name' => null ]; public static function swaggerTypes() @@ -78,28 +200,82 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'tracking_reminder_id' => 'trackingReminderId', + 'action_array' => 'actionArray', + 'available_units' => 'availableUnits', 'client_id' => 'clientId', - 'user_id' => 'userId', - 'variable_id' => 'variableId', - 'pending_reminder_time' => 'pendingReminderTime', + 'combination_operation' => 'combinationOperation', + 'created_at' => 'createdAt', + 'unit_abbreviated_name' => 'unitAbbreviatedName', + 'unit_category_id' => 'unitCategoryId', + 'unit_category_name' => 'unitCategoryName', + 'unit_id' => 'unitId', + 'unit_name' => 'unitName', 'default_value' => 'defaultValue', - 'reminder_sound' => 'reminderSound', - 'pop_up' => 'popUp', - 'sms' => 'sms', + 'description' => 'description', 'email' => 'email', + 'filling_value' => 'fillingValue', + 'icon_icon' => 'iconIcon', + 'id' => 'id', + 'image_url' => 'imageUrl', + 'input_type' => 'inputType', + 'ion_icon' => 'ionIcon', + 'last_value' => 'lastValue', + 'manual_tracking' => 'manualTracking', + 'maximum_allowed_value' => 'maximumAllowedValue', + 'minimum_allowed_value' => 'minimumAllowedValue', + 'most_common_value' => 'mostCommonValue', 'notification_bar' => 'notificationBar', + 'notified_at' => 'notifiedAt', + 'number_of_unique_values' => 'numberOfUniqueValues', + 'png_path' => 'pngPath', + 'png_url' => 'pngUrl', + 'pop_up' => 'popUp', + 'reminder_end_time' => 'reminderEndTime', + 'reminder_frequency' => 'reminderFrequency', + 'reminder_sound' => 'reminderSound', + 'reminder_start_time' => 'reminderStartTime', + 'reminder_time' => 'reminderTime', + 'second_most_common_value' => 'secondMostCommonValue', + 'second_to_last_value' => 'secondToLastValue', + 'sms' => 'sms', + 'svg_url' => 'svgUrl', + 'third_most_common_value' => 'thirdMostCommonValue', + 'third_to_last_value' => 'thirdToLastValue', + 'title' => 'title', + 'total' => 'total', + 'track_all_actions' => 'trackAllActions', + 'tracking_reminder_id' => 'trackingReminderId', + 'tracking_reminder_image_url' => 'trackingReminderImageUrl', + 'tracking_reminder_notification_id' => 'trackingReminderNotificationId', + 'tracking_reminder_notification_time' => 'trackingReminderNotificationTime', + 'tracking_reminder_notification_time_epoch' => 'trackingReminderNotificationTimeEpoch', + 'tracking_reminder_notification_time_local' => 'trackingReminderNotificationTimeLocal', 'updated_at' => 'updatedAt', - 'variable_name' => 'variableName', + 'user_id' => 'userId', + 'user_variable_unit_abbreviated_name' => 'userVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'userVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'userVariableUnitCategoryName', + 'user_variable_unit_id' => 'userVariableUnitId', + 'user_variable_unit_name' => 'userVariableUnitName', + 'user_variable_variable_category_id' => 'userVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'userVariableVariableCategoryName', + 'valence' => 'valence', + 'variable_category_id' => 'variableCategoryId', + 'variable_category_image_url' => 'variableCategoryImageUrl', 'variable_category_name' => 'variableCategoryName', - 'abbreviated_unit_name' => 'abbreviatedUnitName', - 'combination_operation' => 'combinationOperation' + 'variable_id' => 'variableId', + 'variable_image_url' => 'variableImageUrl', + 'variable_name' => 'variableName' ]; @@ -108,23 +284,72 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'tracking_reminder_id' => 'setTrackingReminderId', + 'action_array' => 'setActionArray', + 'available_units' => 'setAvailableUnits', 'client_id' => 'setClientId', - 'user_id' => 'setUserId', - 'variable_id' => 'setVariableId', - 'pending_reminder_time' => 'setPendingReminderTime', + 'combination_operation' => 'setCombinationOperation', + 'created_at' => 'setCreatedAt', + 'unit_abbreviated_name' => 'setUnitAbbreviatedName', + 'unit_category_id' => 'setUnitCategoryId', + 'unit_category_name' => 'setUnitCategoryName', + 'unit_id' => 'setUnitId', + 'unit_name' => 'setUnitName', 'default_value' => 'setDefaultValue', - 'reminder_sound' => 'setReminderSound', - 'pop_up' => 'setPopUp', - 'sms' => 'setSms', + 'description' => 'setDescription', 'email' => 'setEmail', + 'filling_value' => 'setFillingValue', + 'icon_icon' => 'setIconIcon', + 'id' => 'setId', + 'image_url' => 'setImageUrl', + 'input_type' => 'setInputType', + 'ion_icon' => 'setIonIcon', + 'last_value' => 'setLastValue', + 'manual_tracking' => 'setManualTracking', + 'maximum_allowed_value' => 'setMaximumAllowedValue', + 'minimum_allowed_value' => 'setMinimumAllowedValue', + 'most_common_value' => 'setMostCommonValue', 'notification_bar' => 'setNotificationBar', + 'notified_at' => 'setNotifiedAt', + 'number_of_unique_values' => 'setNumberOfUniqueValues', + 'png_path' => 'setPngPath', + 'png_url' => 'setPngUrl', + 'pop_up' => 'setPopUp', + 'reminder_end_time' => 'setReminderEndTime', + 'reminder_frequency' => 'setReminderFrequency', + 'reminder_sound' => 'setReminderSound', + 'reminder_start_time' => 'setReminderStartTime', + 'reminder_time' => 'setReminderTime', + 'second_most_common_value' => 'setSecondMostCommonValue', + 'second_to_last_value' => 'setSecondToLastValue', + 'sms' => 'setSms', + 'svg_url' => 'setSvgUrl', + 'third_most_common_value' => 'setThirdMostCommonValue', + 'third_to_last_value' => 'setThirdToLastValue', + 'title' => 'setTitle', + 'total' => 'setTotal', + 'track_all_actions' => 'setTrackAllActions', + 'tracking_reminder_id' => 'setTrackingReminderId', + 'tracking_reminder_image_url' => 'setTrackingReminderImageUrl', + 'tracking_reminder_notification_id' => 'setTrackingReminderNotificationId', + 'tracking_reminder_notification_time' => 'setTrackingReminderNotificationTime', + 'tracking_reminder_notification_time_epoch' => 'setTrackingReminderNotificationTimeEpoch', + 'tracking_reminder_notification_time_local' => 'setTrackingReminderNotificationTimeLocal', 'updated_at' => 'setUpdatedAt', - 'variable_name' => 'setVariableName', + 'user_id' => 'setUserId', + 'user_variable_unit_abbreviated_name' => 'setUserVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'setUserVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'setUserVariableUnitCategoryName', + 'user_variable_unit_id' => 'setUserVariableUnitId', + 'user_variable_unit_name' => 'setUserVariableUnitName', + 'user_variable_variable_category_id' => 'setUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'setUserVariableVariableCategoryName', + 'valence' => 'setValence', + 'variable_category_id' => 'setVariableCategoryId', + 'variable_category_image_url' => 'setVariableCategoryImageUrl', 'variable_category_name' => 'setVariableCategoryName', - 'abbreviated_unit_name' => 'setAbbreviatedUnitName', - 'combination_operation' => 'setCombinationOperation' + 'variable_id' => 'setVariableId', + 'variable_image_url' => 'setVariableImageUrl', + 'variable_name' => 'setVariableName' ]; @@ -133,23 +358,72 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'tracking_reminder_id' => 'getTrackingReminderId', + 'action_array' => 'getActionArray', + 'available_units' => 'getAvailableUnits', 'client_id' => 'getClientId', - 'user_id' => 'getUserId', - 'variable_id' => 'getVariableId', - 'pending_reminder_time' => 'getPendingReminderTime', + 'combination_operation' => 'getCombinationOperation', + 'created_at' => 'getCreatedAt', + 'unit_abbreviated_name' => 'getUnitAbbreviatedName', + 'unit_category_id' => 'getUnitCategoryId', + 'unit_category_name' => 'getUnitCategoryName', + 'unit_id' => 'getUnitId', + 'unit_name' => 'getUnitName', 'default_value' => 'getDefaultValue', - 'reminder_sound' => 'getReminderSound', - 'pop_up' => 'getPopUp', - 'sms' => 'getSms', + 'description' => 'getDescription', 'email' => 'getEmail', + 'filling_value' => 'getFillingValue', + 'icon_icon' => 'getIconIcon', + 'id' => 'getId', + 'image_url' => 'getImageUrl', + 'input_type' => 'getInputType', + 'ion_icon' => 'getIonIcon', + 'last_value' => 'getLastValue', + 'manual_tracking' => 'getManualTracking', + 'maximum_allowed_value' => 'getMaximumAllowedValue', + 'minimum_allowed_value' => 'getMinimumAllowedValue', + 'most_common_value' => 'getMostCommonValue', 'notification_bar' => 'getNotificationBar', + 'notified_at' => 'getNotifiedAt', + 'number_of_unique_values' => 'getNumberOfUniqueValues', + 'png_path' => 'getPngPath', + 'png_url' => 'getPngUrl', + 'pop_up' => 'getPopUp', + 'reminder_end_time' => 'getReminderEndTime', + 'reminder_frequency' => 'getReminderFrequency', + 'reminder_sound' => 'getReminderSound', + 'reminder_start_time' => 'getReminderStartTime', + 'reminder_time' => 'getReminderTime', + 'second_most_common_value' => 'getSecondMostCommonValue', + 'second_to_last_value' => 'getSecondToLastValue', + 'sms' => 'getSms', + 'svg_url' => 'getSvgUrl', + 'third_most_common_value' => 'getThirdMostCommonValue', + 'third_to_last_value' => 'getThirdToLastValue', + 'title' => 'getTitle', + 'total' => 'getTotal', + 'track_all_actions' => 'getTrackAllActions', + 'tracking_reminder_id' => 'getTrackingReminderId', + 'tracking_reminder_image_url' => 'getTrackingReminderImageUrl', + 'tracking_reminder_notification_id' => 'getTrackingReminderNotificationId', + 'tracking_reminder_notification_time' => 'getTrackingReminderNotificationTime', + 'tracking_reminder_notification_time_epoch' => 'getTrackingReminderNotificationTimeEpoch', + 'tracking_reminder_notification_time_local' => 'getTrackingReminderNotificationTimeLocal', 'updated_at' => 'getUpdatedAt', - 'variable_name' => 'getVariableName', + 'user_id' => 'getUserId', + 'user_variable_unit_abbreviated_name' => 'getUserVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'getUserVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'getUserVariableUnitCategoryName', + 'user_variable_unit_id' => 'getUserVariableUnitId', + 'user_variable_unit_name' => 'getUserVariableUnitName', + 'user_variable_variable_category_id' => 'getUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'getUserVariableVariableCategoryName', + 'valence' => 'getValence', + 'variable_category_id' => 'getVariableCategoryId', + 'variable_category_image_url' => 'getVariableCategoryImageUrl', 'variable_category_name' => 'getVariableCategoryName', - 'abbreviated_unit_name' => 'getAbbreviatedUnitName', - 'combination_operation' => 'getCombinationOperation' + 'variable_id' => 'getVariableId', + 'variable_image_url' => 'getVariableImageUrl', + 'variable_name' => 'getVariableName' ]; public static function attributeMap() @@ -197,23 +471,72 @@ public function getCombinationOperationAllowableValues() */ public function __construct(array $data = null) { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['tracking_reminder_id'] = isset($data['tracking_reminder_id']) ? $data['tracking_reminder_id'] : null; + $this->container['action_array'] = isset($data['action_array']) ? $data['action_array'] : null; + $this->container['available_units'] = isset($data['available_units']) ? $data['available_units'] : null; $this->container['client_id'] = isset($data['client_id']) ? $data['client_id'] : null; - $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; - $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; - $this->container['pending_reminder_time'] = isset($data['pending_reminder_time']) ? $data['pending_reminder_time'] : null; + $this->container['combination_operation'] = isset($data['combination_operation']) ? $data['combination_operation'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['unit_abbreviated_name'] = isset($data['unit_abbreviated_name']) ? $data['unit_abbreviated_name'] : null; + $this->container['unit_category_id'] = isset($data['unit_category_id']) ? $data['unit_category_id'] : null; + $this->container['unit_category_name'] = isset($data['unit_category_name']) ? $data['unit_category_name'] : null; + $this->container['unit_id'] = isset($data['unit_id']) ? $data['unit_id'] : null; + $this->container['unit_name'] = isset($data['unit_name']) ? $data['unit_name'] : null; $this->container['default_value'] = isset($data['default_value']) ? $data['default_value'] : null; - $this->container['reminder_sound'] = isset($data['reminder_sound']) ? $data['reminder_sound'] : null; - $this->container['pop_up'] = isset($data['pop_up']) ? $data['pop_up'] : null; - $this->container['sms'] = isset($data['sms']) ? $data['sms'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['filling_value'] = isset($data['filling_value']) ? $data['filling_value'] : null; + $this->container['icon_icon'] = isset($data['icon_icon']) ? $data['icon_icon'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['image_url'] = isset($data['image_url']) ? $data['image_url'] : null; + $this->container['input_type'] = isset($data['input_type']) ? $data['input_type'] : null; + $this->container['ion_icon'] = isset($data['ion_icon']) ? $data['ion_icon'] : null; + $this->container['last_value'] = isset($data['last_value']) ? $data['last_value'] : null; + $this->container['manual_tracking'] = isset($data['manual_tracking']) ? $data['manual_tracking'] : null; + $this->container['maximum_allowed_value'] = isset($data['maximum_allowed_value']) ? $data['maximum_allowed_value'] : null; + $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; + $this->container['most_common_value'] = isset($data['most_common_value']) ? $data['most_common_value'] : null; $this->container['notification_bar'] = isset($data['notification_bar']) ? $data['notification_bar'] : null; + $this->container['notified_at'] = isset($data['notified_at']) ? $data['notified_at'] : null; + $this->container['number_of_unique_values'] = isset($data['number_of_unique_values']) ? $data['number_of_unique_values'] : null; + $this->container['png_path'] = isset($data['png_path']) ? $data['png_path'] : null; + $this->container['png_url'] = isset($data['png_url']) ? $data['png_url'] : null; + $this->container['pop_up'] = isset($data['pop_up']) ? $data['pop_up'] : null; + $this->container['reminder_end_time'] = isset($data['reminder_end_time']) ? $data['reminder_end_time'] : null; + $this->container['reminder_frequency'] = isset($data['reminder_frequency']) ? $data['reminder_frequency'] : null; + $this->container['reminder_sound'] = isset($data['reminder_sound']) ? $data['reminder_sound'] : null; + $this->container['reminder_start_time'] = isset($data['reminder_start_time']) ? $data['reminder_start_time'] : null; + $this->container['reminder_time'] = isset($data['reminder_time']) ? $data['reminder_time'] : null; + $this->container['second_most_common_value'] = isset($data['second_most_common_value']) ? $data['second_most_common_value'] : null; + $this->container['second_to_last_value'] = isset($data['second_to_last_value']) ? $data['second_to_last_value'] : null; + $this->container['sms'] = isset($data['sms']) ? $data['sms'] : null; + $this->container['svg_url'] = isset($data['svg_url']) ? $data['svg_url'] : null; + $this->container['third_most_common_value'] = isset($data['third_most_common_value']) ? $data['third_most_common_value'] : null; + $this->container['third_to_last_value'] = isset($data['third_to_last_value']) ? $data['third_to_last_value'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + $this->container['total'] = isset($data['total']) ? $data['total'] : null; + $this->container['track_all_actions'] = isset($data['track_all_actions']) ? $data['track_all_actions'] : null; + $this->container['tracking_reminder_id'] = isset($data['tracking_reminder_id']) ? $data['tracking_reminder_id'] : null; + $this->container['tracking_reminder_image_url'] = isset($data['tracking_reminder_image_url']) ? $data['tracking_reminder_image_url'] : null; + $this->container['tracking_reminder_notification_id'] = isset($data['tracking_reminder_notification_id']) ? $data['tracking_reminder_notification_id'] : null; + $this->container['tracking_reminder_notification_time'] = isset($data['tracking_reminder_notification_time']) ? $data['tracking_reminder_notification_time'] : null; + $this->container['tracking_reminder_notification_time_epoch'] = isset($data['tracking_reminder_notification_time_epoch']) ? $data['tracking_reminder_notification_time_epoch'] : null; + $this->container['tracking_reminder_notification_time_local'] = isset($data['tracking_reminder_notification_time_local']) ? $data['tracking_reminder_notification_time_local'] : null; $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; - $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; + $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; + $this->container['user_variable_unit_abbreviated_name'] = isset($data['user_variable_unit_abbreviated_name']) ? $data['user_variable_unit_abbreviated_name'] : null; + $this->container['user_variable_unit_category_id'] = isset($data['user_variable_unit_category_id']) ? $data['user_variable_unit_category_id'] : null; + $this->container['user_variable_unit_category_name'] = isset($data['user_variable_unit_category_name']) ? $data['user_variable_unit_category_name'] : null; + $this->container['user_variable_unit_id'] = isset($data['user_variable_unit_id']) ? $data['user_variable_unit_id'] : null; + $this->container['user_variable_unit_name'] = isset($data['user_variable_unit_name']) ? $data['user_variable_unit_name'] : null; + $this->container['user_variable_variable_category_id'] = isset($data['user_variable_variable_category_id']) ? $data['user_variable_variable_category_id'] : null; + $this->container['user_variable_variable_category_name'] = isset($data['user_variable_variable_category_name']) ? $data['user_variable_variable_category_name'] : null; + $this->container['valence'] = isset($data['valence']) ? $data['valence'] : null; + $this->container['variable_category_id'] = isset($data['variable_category_id']) ? $data['variable_category_id'] : null; + $this->container['variable_category_image_url'] = isset($data['variable_category_image_url']) ? $data['variable_category_image_url'] : null; $this->container['variable_category_name'] = isset($data['variable_category_name']) ? $data['variable_category_name'] : null; - $this->container['abbreviated_unit_name'] = isset($data['abbreviated_unit_name']) ? $data['abbreviated_unit_name'] : null; - $this->container['combination_operation'] = isset($data['combination_operation']) ? $data['combination_operation'] : null; + $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; + $this->container['variable_image_url'] = isset($data['variable_image_url']) ? $data['variable_image_url'] : null; + $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; } /** @@ -225,17 +548,29 @@ public function listInvalidProperties() { $invalid_properties = []; - if ($this->container['id'] === null) { - $invalid_properties[] = "'id' can't be null"; + if ($this->container['action_array'] === null) { + $invalid_properties[] = "'action_array' can't be null"; } - if ($this->container['tracking_reminder_id'] === null) { - $invalid_properties[] = "'tracking_reminder_id' can't be null"; + if ($this->container['available_units'] === null) { + $invalid_properties[] = "'available_units' can't be null"; } - $allowed_values = ["MEAN", "SUM"]; + $allowed_values = $this->getCombinationOperationAllowableValues(); if (!in_array($this->container['combination_operation'], $allowed_values)) { - $invalid_properties[] = "invalid value for 'combination_operation', must be one of 'MEAN', 'SUM'."; + $invalid_properties[] = sprintf( + "invalid value for 'combination_operation', must be one of '%s'", + implode("', '", $allowed_values) + ); } + if ($this->container['filling_value'] === null) { + $invalid_properties[] = "'filling_value' can't be null"; + } + if ($this->container['id'] === null) { + $invalid_properties[] = "'id' can't be null"; + } + if ($this->container['track_all_actions'] === null) { + $invalid_properties[] = "'track_all_actions' can't be null"; + } return $invalid_properties; } @@ -248,58 +583,67 @@ public function listInvalidProperties() public function valid() { - if ($this->container['id'] === null) { + if ($this->container['action_array'] === null) { return false; } - if ($this->container['tracking_reminder_id'] === null) { + if ($this->container['available_units'] === null) { return false; } - $allowed_values = ["MEAN", "SUM"]; + $allowed_values = $this->getCombinationOperationAllowableValues(); if (!in_array($this->container['combination_operation'], $allowed_values)) { return false; } + if ($this->container['filling_value'] === null) { + return false; + } + if ($this->container['id'] === null) { + return false; + } + if ($this->container['track_all_actions'] === null) { + return false; + } return true; } /** - * Gets id - * @return int + * Gets action_array + * @return \QuantiModo\Client\Model\TrackingReminderNotificationActionArray[] */ - public function getId() + public function getActionArray() { - return $this->container['id']; + return $this->container['action_array']; } /** - * Sets id - * @param int $id id for the specific PENDING tracking remidner + * Sets action_array + * @param \QuantiModo\Client\Model\TrackingReminderNotificationActionArray[] $action_array * @return $this */ - public function setId($id) + public function setActionArray($action_array) { - $this->container['id'] = $id; + $this->container['action_array'] = $action_array; return $this; } /** - * Gets tracking_reminder_id - * @return int + * Gets available_units + * @return \QuantiModo\Client\Model\Unit[] */ - public function getTrackingReminderId() + public function getAvailableUnits() { - return $this->container['tracking_reminder_id']; + return $this->container['available_units']; } /** - * Sets tracking_reminder_id - * @param int $tracking_reminder_id id for the repeating tracking remidner + * Sets available_units + * @param \QuantiModo\Client\Model\Unit[] $available_units * @return $this */ - public function setTrackingReminderId($tracking_reminder_id) + public function setAvailableUnits($available_units) { - $this->container['tracking_reminder_id'] = $tracking_reminder_id; + $this->container['available_units'] = $available_units; return $this; } @@ -326,148 +670,199 @@ public function setClientId($client_id) } /** - * Gets user_id - * @return int + * Gets combination_operation + * @return string */ - public function getUserId() + public function getCombinationOperation() { - return $this->container['user_id']; + return $this->container['combination_operation']; } /** - * Sets user_id - * @param int $user_id ID of User + * Sets combination_operation + * @param string $combination_operation The way multiple measurements are aggregated over time * @return $this */ - public function setUserId($user_id) + public function setCombinationOperation($combination_operation) { - $this->container['user_id'] = $user_id; + $allowed_values = $this->getCombinationOperationAllowableValues(); + if (!is_null($combination_operation) && !in_array($combination_operation, $allowed_values)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'combination_operation', must be one of '%s'", + implode("', '", $allowed_values) + ) + ); + } + $this->container['combination_operation'] = $combination_operation; return $this; } /** - * Gets variable_id + * Gets created_at + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * @param \DateTime $created_at Example: 2017-07-29 20:49:54 + * @return $this + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets unit_abbreviated_name + * @return string + */ + public function getUnitAbbreviatedName() + { + return $this->container['unit_abbreviated_name']; + } + + /** + * Sets unit_abbreviated_name + * @param string $unit_abbreviated_name Example: /5 + * @return $this + */ + public function setUnitAbbreviatedName($unit_abbreviated_name) + { + $this->container['unit_abbreviated_name'] = $unit_abbreviated_name; + + return $this; + } + + /** + * Gets unit_category_id * @return int */ - public function getVariableId() + public function getUnitCategoryId() { - return $this->container['variable_id']; + return $this->container['unit_category_id']; } /** - * Sets variable_id - * @param int $variable_id Id for the variable to be tracked + * Sets unit_category_id + * @param int $unit_category_id Example: 5 * @return $this */ - public function setVariableId($variable_id) + public function setUnitCategoryId($unit_category_id) { - $this->container['variable_id'] = $variable_id; + $this->container['unit_category_id'] = $unit_category_id; return $this; } /** - * Gets pending_reminder_time - * @return \DateTime + * Gets unit_category_name + * @return string */ - public function getPendingReminderTime() + public function getUnitCategoryName() { - return $this->container['pending_reminder_time']; + return $this->container['unit_category_name']; } /** - * Sets pending_reminder_time - * @param \DateTime $pending_reminder_time UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" timestamp for the specific time the variable should be tracked in UTC. This will be used for the measurement startTime if the track endpoint is used. + * Sets unit_category_name + * @param string $unit_category_name Example: Rating * @return $this */ - public function setPendingReminderTime($pending_reminder_time) + public function setUnitCategoryName($unit_category_name) { - $this->container['pending_reminder_time'] = $pending_reminder_time; + $this->container['unit_category_name'] = $unit_category_name; return $this; } /** - * Gets default_value - * @return float + * Gets unit_id + * @return int */ - public function getDefaultValue() + public function getUnitId() { - return $this->container['default_value']; + return $this->container['unit_id']; } /** - * Sets default_value - * @param float $default_value Default value to use for the measurement when tracking + * Sets unit_id + * @param int $unit_id Example: 10 * @return $this */ - public function setDefaultValue($default_value) + public function setUnitId($unit_id) { - $this->container['default_value'] = $default_value; + $this->container['unit_id'] = $unit_id; return $this; } /** - * Gets reminder_sound + * Gets unit_name * @return string */ - public function getReminderSound() + public function getUnitName() { - return $this->container['reminder_sound']; + return $this->container['unit_name']; } /** - * Sets reminder_sound - * @param string $reminder_sound String identifier for the sound to accompany the reminder + * Sets unit_name + * @param string $unit_name Example: 1 to 5 Rating * @return $this */ - public function setReminderSound($reminder_sound) + public function setUnitName($unit_name) { - $this->container['reminder_sound'] = $reminder_sound; + $this->container['unit_name'] = $unit_name; return $this; } /** - * Gets pop_up - * @return bool + * Gets default_value + * @return float */ - public function getPopUp() + public function getDefaultValue() { - return $this->container['pop_up']; + return $this->container['default_value']; } /** - * Sets pop_up - * @param bool $pop_up True if the reminders should appear as a popup notification + * Sets default_value + * @param float $default_value Default value to use for the measurement when tracking * @return $this */ - public function setPopUp($pop_up) + public function setDefaultValue($default_value) { - $this->container['pop_up'] = $pop_up; + $this->container['default_value'] = $default_value; return $this; } /** - * Gets sms - * @return bool + * Gets description + * @return string */ - public function getSms() + public function getDescription() { - return $this->container['sms']; + return $this->container['description']; } /** - * Sets sms - * @param bool $sms True if the reminders should be delivered via SMS + * Sets description + * @param string $description Example: positive * @return $this */ - public function setSms($sms) + public function setDescription($description) { - $this->container['sms'] = $sms; + $this->container['description'] = $description; return $this; } @@ -494,131 +889,1114 @@ public function setEmail($email) } /** - * Gets notification_bar - * @return bool + * Gets filling_value + * @return int */ - public function getNotificationBar() + public function getFillingValue() { - return $this->container['notification_bar']; + return $this->container['filling_value']; } /** - * Sets notification_bar - * @param bool $notification_bar True if the reminders should appear in the notification bar + * Sets filling_value + * @param int $filling_value Example: 0 * @return $this */ - public function setNotificationBar($notification_bar) + public function setFillingValue($filling_value) { - $this->container['notification_bar'] = $notification_bar; + $this->container['filling_value'] = $filling_value; return $this; } /** - * Gets updated_at - * @return \DateTime + * Gets icon_icon + * @return string */ - public function getUpdatedAt() + public function getIconIcon() { - return $this->container['updated_at']; + return $this->container['icon_icon']; } /** - * Sets updated_at - * @param \DateTime $updated_at When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format. Time zone should be UTC and not local. + * Sets icon_icon + * @param string $icon_icon Example: ion-sad-outline * @return $this */ - public function setUpdatedAt($updated_at) + public function setIconIcon($icon_icon) { - $this->container['updated_at'] = $updated_at; + $this->container['icon_icon'] = $icon_icon; return $this; } /** - * Gets variable_name - * @return string + * Gets id + * @return int */ - public function getVariableName() + public function getId() { - return $this->container['variable_name']; + return $this->container['id']; } /** - * Sets variable_name - * @param string $variable_name Name of the variable to be used when sending measurements + * Sets id + * @param int $id id for the specific PENDING tracking remidner * @return $this */ - public function setVariableName($variable_name) + public function setId($id) { - $this->container['variable_name'] = $variable_name; + $this->container['id'] = $id; return $this; } /** - * Gets variable_category_name + * Gets image_url * @return string */ - public function getVariableCategoryName() + public function getImageUrl() { - return $this->container['variable_category_name']; + return $this->container['image_url']; } /** - * Sets variable_category_name - * @param string $variable_category_name Name of the variable category to be used when sending measurements + * Sets image_url + * @param string $image_url Example: https://rximage.nlm.nih.gov/image/images/gallery/original/55111-0129-60_RXNAVIMAGE10_B051D81E.jpg * @return $this */ - public function setVariableCategoryName($variable_category_name) + public function setImageUrl($image_url) { - $this->container['variable_category_name'] = $variable_category_name; + $this->container['image_url'] = $image_url; return $this; } /** - * Gets abbreviated_unit_name + * Gets input_type * @return string */ - public function getAbbreviatedUnitName() + public function getInputType() { - return $this->container['abbreviated_unit_name']; + return $this->container['input_type']; } /** - * Sets abbreviated_unit_name - * @param string $abbreviated_unit_name Abbreviated name of the unit to be used when sending measurements + * Sets input_type + * @param string $input_type Example: happiestFaceIsFive * @return $this */ - public function setAbbreviatedUnitName($abbreviated_unit_name) + public function setInputType($input_type) { - $this->container['abbreviated_unit_name'] = $abbreviated_unit_name; + $this->container['input_type'] = $input_type; return $this; } /** - * Gets combination_operation + * Gets ion_icon * @return string */ - public function getCombinationOperation() + public function getIonIcon() { - return $this->container['combination_operation']; + return $this->container['ion_icon']; } /** - * Sets combination_operation - * @param string $combination_operation The way multiple measurements are aggregated over time + * Sets ion_icon + * @param string $ion_icon Example: ion-happy-outline * @return $this */ - public function setCombinationOperation($combination_operation) + public function setIonIcon($ion_icon) { - $allowed_values = array('MEAN', 'SUM'); - if (!is_null($combination_operation) && (!in_array($combination_operation, $allowed_values))) { - throw new \InvalidArgumentException("Invalid value for 'combination_operation', must be one of 'MEAN', 'SUM'"); - } - $this->container['combination_operation'] = $combination_operation; + $this->container['ion_icon'] = $ion_icon; + + return $this; + } + + /** + * Gets last_value + * @return double + */ + public function getLastValue() + { + return $this->container['last_value']; + } + + /** + * Sets last_value + * @param double $last_value Example: 3 + * @return $this + */ + public function setLastValue($last_value) + { + $this->container['last_value'] = $last_value; + + return $this; + } + + /** + * Gets manual_tracking + * @return bool + */ + public function getManualTracking() + { + return $this->container['manual_tracking']; + } + + /** + * Sets manual_tracking + * @param bool $manual_tracking Example: 1 + * @return $this + */ + public function setManualTracking($manual_tracking) + { + $this->container['manual_tracking'] = $manual_tracking; + + return $this; + } + + /** + * Gets maximum_allowed_value + * @return int + */ + public function getMaximumAllowedValue() + { + return $this->container['maximum_allowed_value']; + } + + /** + * Sets maximum_allowed_value + * @param int $maximum_allowed_value Example: 5 + * @return $this + */ + public function setMaximumAllowedValue($maximum_allowed_value) + { + $this->container['maximum_allowed_value'] = $maximum_allowed_value; + + return $this; + } + + /** + * Gets minimum_allowed_value + * @return int + */ + public function getMinimumAllowedValue() + { + return $this->container['minimum_allowed_value']; + } + + /** + * Sets minimum_allowed_value + * @param int $minimum_allowed_value Example: 1 + * @return $this + */ + public function setMinimumAllowedValue($minimum_allowed_value) + { + $this->container['minimum_allowed_value'] = $minimum_allowed_value; + + return $this; + } + + /** + * Gets most_common_value + * @return double + */ + public function getMostCommonValue() + { + return $this->container['most_common_value']; + } + + /** + * Sets most_common_value + * @param double $most_common_value Example: 3 + * @return $this + */ + public function setMostCommonValue($most_common_value) + { + $this->container['most_common_value'] = $most_common_value; + + return $this; + } + + /** + * Gets notification_bar + * @return bool + */ + public function getNotificationBar() + { + return $this->container['notification_bar']; + } + + /** + * Sets notification_bar + * @param bool $notification_bar True if the reminders should appear in the notification bar + * @return $this + */ + public function setNotificationBar($notification_bar) + { + $this->container['notification_bar'] = $notification_bar; + + return $this; + } + + /** + * Gets notified_at + * @return \DateTime + */ + public function getNotifiedAt() + { + return $this->container['notified_at']; + } + + /** + * Sets notified_at + * @param \DateTime $notified_at Example: + * @return $this + */ + public function setNotifiedAt($notified_at) + { + $this->container['notified_at'] = $notified_at; + + return $this; + } + + /** + * Gets number_of_unique_values + * @return int + */ + public function getNumberOfUniqueValues() + { + return $this->container['number_of_unique_values']; + } + + /** + * Sets number_of_unique_values + * @param int $number_of_unique_values Example: 5 + * @return $this + */ + public function setNumberOfUniqueValues($number_of_unique_values) + { + $this->container['number_of_unique_values'] = $number_of_unique_values; + + return $this; + } + + /** + * Gets png_path + * @return string + */ + public function getPngPath() + { + return $this->container['png_path']; + } + + /** + * Sets png_path + * @param string $png_path Example: img/variable_categories/emotions.png + * @return $this + */ + public function setPngPath($png_path) + { + $this->container['png_path'] = $png_path; + + return $this; + } + + /** + * Gets png_url + * @return string + */ + public function getPngUrl() + { + return $this->container['png_url']; + } + + /** + * Sets png_url + * @param string $png_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.png + * @return $this + */ + public function setPngUrl($png_url) + { + $this->container['png_url'] = $png_url; + + return $this; + } + + /** + * Gets pop_up + * @return bool + */ + public function getPopUp() + { + return $this->container['pop_up']; + } + + /** + * Sets pop_up + * @param bool $pop_up True if the reminders should appear as a popup notification + * @return $this + */ + public function setPopUp($pop_up) + { + $this->container['pop_up'] = $pop_up; + + return $this; + } + + /** + * Gets reminder_end_time + * @return \DateTime + */ + public function getReminderEndTime() + { + return $this->container['reminder_end_time']; + } + + /** + * Sets reminder_end_time + * @param \DateTime $reminder_end_time Example: + * @return $this + */ + public function setReminderEndTime($reminder_end_time) + { + $this->container['reminder_end_time'] = $reminder_end_time; + + return $this; + } + + /** + * Gets reminder_frequency + * @return int + */ + public function getReminderFrequency() + { + return $this->container['reminder_frequency']; + } + + /** + * Sets reminder_frequency + * @param int $reminder_frequency How often user should be reminded in seconds. Example: 86400 + * @return $this + */ + public function setReminderFrequency($reminder_frequency) + { + $this->container['reminder_frequency'] = $reminder_frequency; + + return $this; + } + + /** + * Gets reminder_sound + * @return string + */ + public function getReminderSound() + { + return $this->container['reminder_sound']; + } + + /** + * Sets reminder_sound + * @param string $reminder_sound String identifier for the sound to accompany the reminder + * @return $this + */ + public function setReminderSound($reminder_sound) + { + $this->container['reminder_sound'] = $reminder_sound; + + return $this; + } + + /** + * Gets reminder_start_time + * @return string + */ + public function getReminderStartTime() + { + return $this->container['reminder_start_time']; + } + + /** + * Sets reminder_start_time + * @param string $reminder_start_time Earliest time of day at which reminders should appear in UTC HH:MM:SS format + * @return $this + */ + public function setReminderStartTime($reminder_start_time) + { + $this->container['reminder_start_time'] = $reminder_start_time; + + return $this; + } + + /** + * Gets reminder_time + * @return \DateTime + */ + public function getReminderTime() + { + return $this->container['reminder_time']; + } + + /** + * Sets reminder_time + * @param \DateTime $reminder_time UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` timestamp for the specific time the variable should be tracked in UTC. This will be used for the measurement startTime if the track endpoint is used. + * @return $this + */ + public function setReminderTime($reminder_time) + { + $this->container['reminder_time'] = $reminder_time; + + return $this; + } + + /** + * Gets second_most_common_value + * @return double + */ + public function getSecondMostCommonValue() + { + return $this->container['second_most_common_value']; + } + + /** + * Sets second_most_common_value + * @param double $second_most_common_value Example: 4 + * @return $this + */ + public function setSecondMostCommonValue($second_most_common_value) + { + $this->container['second_most_common_value'] = $second_most_common_value; + + return $this; + } + + /** + * Gets second_to_last_value + * @return double + */ + public function getSecondToLastValue() + { + return $this->container['second_to_last_value']; + } + + /** + * Sets second_to_last_value + * @param double $second_to_last_value Example: 1 + * @return $this + */ + public function setSecondToLastValue($second_to_last_value) + { + $this->container['second_to_last_value'] = $second_to_last_value; + + return $this; + } + + /** + * Gets sms + * @return bool + */ + public function getSms() + { + return $this->container['sms']; + } + + /** + * Sets sms + * @param bool $sms True if the reminders should be delivered via SMS + * @return $this + */ + public function setSms($sms) + { + $this->container['sms'] = $sms; + + return $this; + } + + /** + * Gets svg_url + * @return string + */ + public function getSvgUrl() + { + return $this->container['svg_url']; + } + + /** + * Sets svg_url + * @param string $svg_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.svg + * @return $this + */ + public function setSvgUrl($svg_url) + { + $this->container['svg_url'] = $svg_url; + + return $this; + } + + /** + * Gets third_most_common_value + * @return double + */ + public function getThirdMostCommonValue() + { + return $this->container['third_most_common_value']; + } + + /** + * Sets third_most_common_value + * @param double $third_most_common_value Example: 2 + * @return $this + */ + public function setThirdMostCommonValue($third_most_common_value) + { + $this->container['third_most_common_value'] = $third_most_common_value; + + return $this; + } + + /** + * Gets third_to_last_value + * @return double + */ + public function getThirdToLastValue() + { + return $this->container['third_to_last_value']; + } + + /** + * Sets third_to_last_value + * @param double $third_to_last_value Example: 2 + * @return $this + */ + public function setThirdToLastValue($third_to_last_value) + { + $this->container['third_to_last_value'] = $third_to_last_value; + + return $this; + } + + /** + * Gets title + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * @param string $title Example: Rate Overall Mood + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets total + * @return double + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * @param double $total Example: 3 + * @return $this + */ + public function setTotal($total) + { + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets track_all_actions + * @return \QuantiModo\Client\Model\TrackingReminderNotificationTrackAllAction[] + */ + public function getTrackAllActions() + { + return $this->container['track_all_actions']; + } + + /** + * Sets track_all_actions + * @param \QuantiModo\Client\Model\TrackingReminderNotificationTrackAllAction[] $track_all_actions + * @return $this + */ + public function setTrackAllActions($track_all_actions) + { + $this->container['track_all_actions'] = $track_all_actions; + + return $this; + } + + /** + * Gets tracking_reminder_id + * @return int + */ + public function getTrackingReminderId() + { + return $this->container['tracking_reminder_id']; + } + + /** + * Sets tracking_reminder_id + * @param int $tracking_reminder_id id for the repeating tracking remidner + * @return $this + */ + public function setTrackingReminderId($tracking_reminder_id) + { + $this->container['tracking_reminder_id'] = $tracking_reminder_id; + + return $this; + } + + /** + * Gets tracking_reminder_image_url + * @return string + */ + public function getTrackingReminderImageUrl() + { + return $this->container['tracking_reminder_image_url']; + } + + /** + * Sets tracking_reminder_image_url + * @param string $tracking_reminder_image_url Example: https://rximage.nlm.nih.gov/image/images/gallery/original/55111-0129-60_RXNAVIMAGE10_B051D81E.jpg + * @return $this + */ + public function setTrackingReminderImageUrl($tracking_reminder_image_url) + { + $this->container['tracking_reminder_image_url'] = $tracking_reminder_image_url; + + return $this; + } + + /** + * Gets tracking_reminder_notification_id + * @return int + */ + public function getTrackingReminderNotificationId() + { + return $this->container['tracking_reminder_notification_id']; + } + + /** + * Sets tracking_reminder_notification_id + * @param int $tracking_reminder_notification_id Example: 5072482 + * @return $this + */ + public function setTrackingReminderNotificationId($tracking_reminder_notification_id) + { + $this->container['tracking_reminder_notification_id'] = $tracking_reminder_notification_id; + + return $this; + } + + /** + * Gets tracking_reminder_notification_time + * @return \DateTime + */ + public function getTrackingReminderNotificationTime() + { + return $this->container['tracking_reminder_notification_time']; + } + + /** + * Sets tracking_reminder_notification_time + * @param \DateTime $tracking_reminder_notification_time UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` timestamp for the specific time the variable should be tracked in UTC. This will be used for the measurement startTime if the track endpoint is used. + * @return $this + */ + public function setTrackingReminderNotificationTime($tracking_reminder_notification_time) + { + $this->container['tracking_reminder_notification_time'] = $tracking_reminder_notification_time; + + return $this; + } + + /** + * Gets tracking_reminder_notification_time_epoch + * @return int + */ + public function getTrackingReminderNotificationTimeEpoch() + { + return $this->container['tracking_reminder_notification_time_epoch']; + } + + /** + * Sets tracking_reminder_notification_time_epoch + * @param int $tracking_reminder_notification_time_epoch Example: 1501534124 + * @return $this + */ + public function setTrackingReminderNotificationTimeEpoch($tracking_reminder_notification_time_epoch) + { + $this->container['tracking_reminder_notification_time_epoch'] = $tracking_reminder_notification_time_epoch; + + return $this; + } + + /** + * Gets tracking_reminder_notification_time_local + * @return string + */ + public function getTrackingReminderNotificationTimeLocal() + { + return $this->container['tracking_reminder_notification_time_local']; + } + + /** + * Sets tracking_reminder_notification_time_local + * @param string $tracking_reminder_notification_time_local Example: 15:48:44 + * @return $this + */ + public function setTrackingReminderNotificationTimeLocal($tracking_reminder_notification_time_local) + { + $this->container['tracking_reminder_notification_time_local'] = $tracking_reminder_notification_time_local; + + return $this; + } + + /** + * Gets updated_at + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * @param \DateTime $updated_at When the record in the database was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format. Time zone should be UTC and not local. + * @return $this + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets user_id + * @return int + */ + public function getUserId() + { + return $this->container['user_id']; + } + + /** + * Sets user_id + * @param int $user_id ID of User + * @return $this + */ + public function setUserId($user_id) + { + $this->container['user_id'] = $user_id; + + return $this; + } + + /** + * Gets user_variable_unit_abbreviated_name + * @return string + */ + public function getUserVariableUnitAbbreviatedName() + { + return $this->container['user_variable_unit_abbreviated_name']; + } + + /** + * Sets user_variable_unit_abbreviated_name + * @param string $user_variable_unit_abbreviated_name Example: /5 + * @return $this + */ + public function setUserVariableUnitAbbreviatedName($user_variable_unit_abbreviated_name) + { + $this->container['user_variable_unit_abbreviated_name'] = $user_variable_unit_abbreviated_name; + + return $this; + } + + /** + * Gets user_variable_unit_category_id + * @return int + */ + public function getUserVariableUnitCategoryId() + { + return $this->container['user_variable_unit_category_id']; + } + + /** + * Sets user_variable_unit_category_id + * @param int $user_variable_unit_category_id Example: 5 + * @return $this + */ + public function setUserVariableUnitCategoryId($user_variable_unit_category_id) + { + $this->container['user_variable_unit_category_id'] = $user_variable_unit_category_id; + + return $this; + } + + /** + * Gets user_variable_unit_category_name + * @return string + */ + public function getUserVariableUnitCategoryName() + { + return $this->container['user_variable_unit_category_name']; + } + + /** + * Sets user_variable_unit_category_name + * @param string $user_variable_unit_category_name Example: Rating + * @return $this + */ + public function setUserVariableUnitCategoryName($user_variable_unit_category_name) + { + $this->container['user_variable_unit_category_name'] = $user_variable_unit_category_name; + + return $this; + } + + /** + * Gets user_variable_unit_id + * @return int + */ + public function getUserVariableUnitId() + { + return $this->container['user_variable_unit_id']; + } + + /** + * Sets user_variable_unit_id + * @param int $user_variable_unit_id Example: 10 + * @return $this + */ + public function setUserVariableUnitId($user_variable_unit_id) + { + $this->container['user_variable_unit_id'] = $user_variable_unit_id; + + return $this; + } + + /** + * Gets user_variable_unit_name + * @return string + */ + public function getUserVariableUnitName() + { + return $this->container['user_variable_unit_name']; + } + + /** + * Sets user_variable_unit_name + * @param string $user_variable_unit_name Example: 1 to 5 Rating + * @return $this + */ + public function setUserVariableUnitName($user_variable_unit_name) + { + $this->container['user_variable_unit_name'] = $user_variable_unit_name; + + return $this; + } + + /** + * Gets user_variable_variable_category_id + * @return int + */ + public function getUserVariableVariableCategoryId() + { + return $this->container['user_variable_variable_category_id']; + } + + /** + * Sets user_variable_variable_category_id + * @param int $user_variable_variable_category_id Example: 1 + * @return $this + */ + public function setUserVariableVariableCategoryId($user_variable_variable_category_id) + { + $this->container['user_variable_variable_category_id'] = $user_variable_variable_category_id; + + return $this; + } + + /** + * Gets user_variable_variable_category_name + * @return string + */ + public function getUserVariableVariableCategoryName() + { + return $this->container['user_variable_variable_category_name']; + } + + /** + * Sets user_variable_variable_category_name + * @param string $user_variable_variable_category_name Example: Emotions + * @return $this + */ + public function setUserVariableVariableCategoryName($user_variable_variable_category_name) + { + $this->container['user_variable_variable_category_name'] = $user_variable_variable_category_name; + + return $this; + } + + /** + * Gets valence + * @return string + */ + public function getValence() + { + return $this->container['valence']; + } + + /** + * Sets valence + * @param string $valence Example: positive + * @return $this + */ + public function setValence($valence) + { + $this->container['valence'] = $valence; + + return $this; + } + + /** + * Gets variable_category_id + * @return int + */ + public function getVariableCategoryId() + { + return $this->container['variable_category_id']; + } + + /** + * Sets variable_category_id + * @param int $variable_category_id Example: 1 + * @return $this + */ + public function setVariableCategoryId($variable_category_id) + { + $this->container['variable_category_id'] = $variable_category_id; + + return $this; + } + + /** + * Gets variable_category_image_url + * @return string + */ + public function getVariableCategoryImageUrl() + { + return $this->container['variable_category_image_url']; + } + + /** + * Sets variable_category_image_url + * @param string $variable_category_image_url Example: https://maxcdn.icons8.com/Color/PNG/96/Cinema/theatre_mask-96.png + * @return $this + */ + public function setVariableCategoryImageUrl($variable_category_image_url) + { + $this->container['variable_category_image_url'] = $variable_category_image_url; + + return $this; + } + + /** + * Gets variable_category_name + * @return string + */ + public function getVariableCategoryName() + { + return $this->container['variable_category_name']; + } + + /** + * Sets variable_category_name + * @param string $variable_category_name Name of the variable category to be used when sending measurements + * @return $this + */ + public function setVariableCategoryName($variable_category_name) + { + $this->container['variable_category_name'] = $variable_category_name; + + return $this; + } + + /** + * Gets variable_id + * @return int + */ + public function getVariableId() + { + return $this->container['variable_id']; + } + + /** + * Sets variable_id + * @param int $variable_id Id for the variable to be tracked + * @return $this + */ + public function setVariableId($variable_id) + { + $this->container['variable_id'] = $variable_id; + + return $this; + } + + /** + * Gets variable_image_url + * @return string + */ + public function getVariableImageUrl() + { + return $this->container['variable_image_url']; + } + + /** + * Sets variable_image_url + * @param string $variable_image_url Example: + * @return $this + */ + public function setVariableImageUrl($variable_image_url) + { + $this->container['variable_image_url'] = $variable_image_url; + + return $this; + } + + /** + * Gets variable_name + * @return string + */ + public function getVariableName() + { + return $this->container['variable_name']; + } + + /** + * Sets variable_name + * @param string $variable_name Name of the variable to be used when sending measurements + * @return $this + */ + public function setVariableName($variable_name) + { + $this->container['variable_name'] = $variable_name; return $this; } diff --git a/lib/Model/TrackingReminderNotificationActionArray.php b/lib/Model/TrackingReminderNotificationActionArray.php new file mode 100644 index 0000000..07dcf93 --- /dev/null +++ b/lib/Model/TrackingReminderNotificationActionArray.php @@ -0,0 +1,347 @@ + 'string', + 'callback' => 'string', + 'modified_value' => 'int', + 'title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'action' => null, + 'callback' => null, + 'modified_value' => null, + 'title' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'action' => 'action', + 'callback' => 'callback', + 'modified_value' => 'modifiedValue', + 'title' => 'title' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'action' => 'setAction', + 'callback' => 'setCallback', + 'modified_value' => 'setModifiedValue', + 'title' => 'setTitle' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'action' => 'getAction', + 'callback' => 'getCallback', + 'modified_value' => 'getModifiedValue', + 'title' => 'getTitle' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['action'] = isset($data['action']) ? $data['action'] : null; + $this->container['callback'] = isset($data['callback']) ? $data['callback'] : null; + $this->container['modified_value'] = isset($data['modified_value']) ? $data['modified_value'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['action'] === null) { + $invalid_properties[] = "'action' can't be null"; + } + if ($this->container['callback'] === null) { + $invalid_properties[] = "'callback' can't be null"; + } + if ($this->container['modified_value'] === null) { + $invalid_properties[] = "'modified_value' can't be null"; + } + if ($this->container['title'] === null) { + $invalid_properties[] = "'title' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['action'] === null) { + return false; + } + if ($this->container['callback'] === null) { + return false; + } + if ($this->container['modified_value'] === null) { + return false; + } + if ($this->container['title'] === null) { + return false; + } + return true; + } + + + /** + * Gets action + * @return string + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * @param string $action Example: track + * @return $this + */ + public function setAction($action) + { + $this->container['action'] = $action; + + return $this; + } + + /** + * Gets callback + * @return string + */ + public function getCallback() + { + return $this->container['callback']; + } + + /** + * Sets callback + * @param string $callback Example: trackThreeRatingAction + * @return $this + */ + public function setCallback($callback) + { + $this->container['callback'] = $callback; + + return $this; + } + + /** + * Gets modified_value + * @return int + */ + public function getModifiedValue() + { + return $this->container['modified_value']; + } + + /** + * Sets modified_value + * @param int $modified_value Example: 3 + * @return $this + */ + public function setModifiedValue($modified_value) + { + $this->container['modified_value'] = $modified_value; + + return $this; + } + + /** + * Gets title + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * @param string $title Example: Rate 3/5 + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TrackingReminderNotificationArray.php b/lib/Model/TrackingReminderNotificationArray.php new file mode 100644 index 0000000..9e26b89 --- /dev/null +++ b/lib/Model/TrackingReminderNotificationArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TrackingReminderNotificationPost.php b/lib/Model/TrackingReminderNotificationPost.php new file mode 100644 index 0000000..b38d7ba --- /dev/null +++ b/lib/Model/TrackingReminderNotificationPost.php @@ -0,0 +1,345 @@ + 'string', + 'id' => 'float', + 'modified_value' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'action' => null, + 'id' => null, + 'modified_value' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'action' => 'action', + 'id' => 'id', + 'modified_value' => 'modifiedValue' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'action' => 'setAction', + 'id' => 'setId', + 'modified_value' => 'setModifiedValue' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'action' => 'getAction', + 'id' => 'getId', + 'modified_value' => 'getModifiedValue' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + const ACTION_SKIP = 'skip'; + const ACTION_SNOOZE = 'snooze'; + const ACTION_TRACK = 'track'; + + + + /** + * Gets allowable values of the enum + * @return string[] + */ + public function getActionAllowableValues() + { + return [ + self::ACTION_SKIP, + self::ACTION_SNOOZE, + self::ACTION_TRACK, + ]; + } + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['action'] = isset($data['action']) ? $data['action'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['modified_value'] = isset($data['modified_value']) ? $data['modified_value'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['action'] === null) { + $invalid_properties[] = "'action' can't be null"; + } + $allowed_values = $this->getActionAllowableValues(); + if (!in_array($this->container['action'], $allowed_values)) { + $invalid_properties[] = sprintf( + "invalid value for 'action', must be one of '%s'", + implode("', '", $allowed_values) + ); + } + + if ($this->container['id'] === null) { + $invalid_properties[] = "'id' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['action'] === null) { + return false; + } + $allowed_values = $this->getActionAllowableValues(); + if (!in_array($this->container['action'], $allowed_values)) { + return false; + } + if ($this->container['id'] === null) { + return false; + } + return true; + } + + + /** + * Gets action + * @return string + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * @param string $action track records a measurement for the notification. snooze changes the notification to 1 hour from now. skip deletes the notification. + * @return $this + */ + public function setAction($action) + { + $allowed_values = $this->getActionAllowableValues(); + if (!in_array($action, $allowed_values)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'action', must be one of '%s'", + implode("', '", $allowed_values) + ) + ); + } + $this->container['action'] = $action; + + return $this; + } + + /** + * Gets id + * @return float + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param float $id Id of the TrackingReminderNotification + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets modified_value + * @return float + */ + public function getModifiedValue() + { + return $this->container['modified_value']; + } + + /** + * Sets modified_value + * @param float $modified_value Optional value to be recorded instead of the tracking reminder default value + * @return $this + */ + public function setModifiedValue($modified_value) + { + $this->container['modified_value'] = $modified_value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TrackingReminderNotificationSkip.php b/lib/Model/TrackingReminderNotificationSkip.php deleted file mode 100644 index 711f874..0000000 --- a/lib/Model/TrackingReminderNotificationSkip.php +++ /dev/null @@ -1,235 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * TrackingReminderNotificationSkip Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class TrackingReminderNotificationSkip implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'TrackingReminderNotificationSkip'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'id' => 'int' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['id'] === null) { - $invalid_properties[] = "'id' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['id'] === null) { - return false; - } - return true; - } - - - /** - * Gets id - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * @param int $id Id of the PENDING reminder to be skipped - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/TrackingReminderNotificationSnooze.php b/lib/Model/TrackingReminderNotificationSnooze.php deleted file mode 100644 index 515c7f9..0000000 --- a/lib/Model/TrackingReminderNotificationSnooze.php +++ /dev/null @@ -1,235 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * TrackingReminderNotificationSnooze Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class TrackingReminderNotificationSnooze implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'TrackingReminderNotificationSnooze'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'id' => 'int' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['id'] === null) { - $invalid_properties[] = "'id' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['id'] === null) { - return false; - } - return true; - } - - - /** - * Gets id - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * @param int $id Id of the PENDING reminder to be snoozed - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/TrackingReminderNotificationTrack.php b/lib/Model/TrackingReminderNotificationTrack.php deleted file mode 100644 index 4516be9..0000000 --- a/lib/Model/TrackingReminderNotificationTrack.php +++ /dev/null @@ -1,261 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * TrackingReminderNotificationTrack Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class TrackingReminderNotificationTrack implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'TrackingReminderNotificationTrack'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'tracking_reminder_notification' => '\QuantiModo\Client\Model\TrackingReminderNotification', - 'modified_value' => 'float' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'tracking_reminder_notification' => 'trackingReminderNotification', - 'modified_value' => 'modifiedValue' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'tracking_reminder_notification' => 'setTrackingReminderNotification', - 'modified_value' => 'setModifiedValue' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'tracking_reminder_notification' => 'getTrackingReminderNotification', - 'modified_value' => 'getModifiedValue' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['tracking_reminder_notification'] = isset($data['tracking_reminder_notification']) ? $data['tracking_reminder_notification'] : null; - $this->container['modified_value'] = isset($data['modified_value']) ? $data['modified_value'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['tracking_reminder_notification'] === null) { - $invalid_properties[] = "'tracking_reminder_notification' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['tracking_reminder_notification'] === null) { - return false; - } - return true; - } - - - /** - * Gets tracking_reminder_notification - * @return \QuantiModo\Client\Model\TrackingReminderNotification - */ - public function getTrackingReminderNotification() - { - return $this->container['tracking_reminder_notification']; - } - - /** - * Sets tracking_reminder_notification - * @param \QuantiModo\Client\Model\TrackingReminderNotification $tracking_reminder_notification - * @return $this - */ - public function setTrackingReminderNotification($tracking_reminder_notification) - { - $this->container['tracking_reminder_notification'] = $tracking_reminder_notification; - - return $this; - } - - /** - * Gets modified_value - * @return float - */ - public function getModifiedValue() - { - return $this->container['modified_value']; - } - - /** - * Sets modified_value - * @param float $modified_value Optional value to be recorded instead of the tracking reminder default value - * @return $this - */ - public function setModifiedValue($modified_value) - { - $this->container['modified_value'] = $modified_value; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/TrackingReminderNotificationTrackAllAction.php b/lib/Model/TrackingReminderNotificationTrackAllAction.php new file mode 100644 index 0000000..704b3fb --- /dev/null +++ b/lib/Model/TrackingReminderNotificationTrackAllAction.php @@ -0,0 +1,347 @@ + 'string', + 'callback' => 'string', + 'modified_value' => 'int', + 'title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'action' => null, + 'callback' => null, + 'modified_value' => null, + 'title' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'action' => 'action', + 'callback' => 'callback', + 'modified_value' => 'modifiedValue', + 'title' => 'title' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'action' => 'setAction', + 'callback' => 'setCallback', + 'modified_value' => 'setModifiedValue', + 'title' => 'setTitle' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'action' => 'getAction', + 'callback' => 'getCallback', + 'modified_value' => 'getModifiedValue', + 'title' => 'getTitle' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['action'] = isset($data['action']) ? $data['action'] : null; + $this->container['callback'] = isset($data['callback']) ? $data['callback'] : null; + $this->container['modified_value'] = isset($data['modified_value']) ? $data['modified_value'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['action'] === null) { + $invalid_properties[] = "'action' can't be null"; + } + if ($this->container['callback'] === null) { + $invalid_properties[] = "'callback' can't be null"; + } + if ($this->container['modified_value'] === null) { + $invalid_properties[] = "'modified_value' can't be null"; + } + if ($this->container['title'] === null) { + $invalid_properties[] = "'title' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['action'] === null) { + return false; + } + if ($this->container['callback'] === null) { + return false; + } + if ($this->container['modified_value'] === null) { + return false; + } + if ($this->container['title'] === null) { + return false; + } + return true; + } + + + /** + * Gets action + * @return string + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * @param string $action Example: trackAll + * @return $this + */ + public function setAction($action) + { + $this->container['action'] = $action; + + return $this; + } + + /** + * Gets callback + * @return string + */ + public function getCallback() + { + return $this->container['callback']; + } + + /** + * Sets callback + * @param string $callback Example: trackThreeRatingAction + * @return $this + */ + public function setCallback($callback) + { + $this->container['callback'] = $callback; + + return $this; + } + + /** + * Gets modified_value + * @return int + */ + public function getModifiedValue() + { + return $this->container['modified_value']; + } + + /** + * Sets modified_value + * @param int $modified_value Example: 3 + * @return $this + */ + public function setModifiedValue($modified_value) + { + $this->container['modified_value'] = $modified_value; + + return $this; + } + + /** + * Gets title + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * @param string $title Example: Rate 3/5 for all + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TrackingReminderNotificationsArray.php b/lib/Model/TrackingReminderNotificationsArray.php new file mode 100644 index 0000000..e86f1bc --- /dev/null +++ b/lib/Model/TrackingReminderNotificationsArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TrackingRemindersArray.php b/lib/Model/TrackingRemindersArray.php new file mode 100644 index 0000000..7db8b01 --- /dev/null +++ b/lib/Model/TrackingRemindersArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Unit.php b/lib/Model/Unit.php index f0faccc..78d8c14 100644 --- a/lib/Model/Unit.php +++ b/lib/Model/Unit.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,12 +54,41 @@ class Unit implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'name' => 'string', 'abbreviated_name' => 'string', + 'advanced' => 'int', 'category' => 'string', + 'category_id' => 'int', + 'category_name' => 'string', + 'conversion_steps' => '\QuantiModo\Client\Model\ConversionStep[]', + 'id' => 'int', + 'manual_tracking' => 'int', + 'maximum_allowed_value' => 'double', + 'maximum_value' => 'int', 'minimum_allowed_value' => 'double', + 'minimum_value' => 'int', + 'name' => 'string', + 'unit_category' => '\QuantiModo\Client\Model\UnitCategory' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'abbreviated_name' => null, + 'advanced' => null, + 'category' => null, + 'category_id' => null, + 'category_name' => null, + 'conversion_steps' => null, + 'id' => null, + 'manual_tracking' => null, 'maximum_allowed_value' => 'double', - 'conversion_steps' => '\QuantiModo\Client\Model\ConversionStep[]' + 'maximum_value' => null, + 'minimum_allowed_value' => 'double', + 'minimum_value' => null, + 'name' => null, + 'unit_category' => null ]; public static function swaggerTypes() @@ -67,17 +96,30 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'name' => 'name', 'abbreviated_name' => 'abbreviatedName', + 'advanced' => 'advanced', 'category' => 'category', - 'minimum_allowed_value' => 'minimumAllowedValue', + 'category_id' => 'categoryId', + 'category_name' => 'categoryName', + 'conversion_steps' => 'conversionSteps', + 'id' => 'id', + 'manual_tracking' => 'manualTracking', 'maximum_allowed_value' => 'maximumAllowedValue', - 'conversion_steps' => 'conversionSteps' + 'maximum_value' => 'maximumValue', + 'minimum_allowed_value' => 'minimumAllowedValue', + 'minimum_value' => 'minimumValue', + 'name' => 'name', + 'unit_category' => 'unitCategory' ]; @@ -86,12 +128,20 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'name' => 'setName', 'abbreviated_name' => 'setAbbreviatedName', + 'advanced' => 'setAdvanced', 'category' => 'setCategory', - 'minimum_allowed_value' => 'setMinimumAllowedValue', + 'category_id' => 'setCategoryId', + 'category_name' => 'setCategoryName', + 'conversion_steps' => 'setConversionSteps', + 'id' => 'setId', + 'manual_tracking' => 'setManualTracking', 'maximum_allowed_value' => 'setMaximumAllowedValue', - 'conversion_steps' => 'setConversionSteps' + 'maximum_value' => 'setMaximumValue', + 'minimum_allowed_value' => 'setMinimumAllowedValue', + 'minimum_value' => 'setMinimumValue', + 'name' => 'setName', + 'unit_category' => 'setUnitCategory' ]; @@ -100,12 +150,20 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'name' => 'getName', 'abbreviated_name' => 'getAbbreviatedName', + 'advanced' => 'getAdvanced', 'category' => 'getCategory', - 'minimum_allowed_value' => 'getMinimumAllowedValue', + 'category_id' => 'getCategoryId', + 'category_name' => 'getCategoryName', + 'conversion_steps' => 'getConversionSteps', + 'id' => 'getId', + 'manual_tracking' => 'getManualTracking', 'maximum_allowed_value' => 'getMaximumAllowedValue', - 'conversion_steps' => 'getConversionSteps' + 'maximum_value' => 'getMaximumValue', + 'minimum_allowed_value' => 'getMinimumAllowedValue', + 'minimum_value' => 'getMinimumValue', + 'name' => 'getName', + 'unit_category' => 'getUnitCategory' ]; public static function attributeMap() @@ -171,12 +229,20 @@ public function getCategoryAllowableValues() */ public function __construct(array $data = null) { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['abbreviated_name'] = isset($data['abbreviated_name']) ? $data['abbreviated_name'] : null; + $this->container['advanced'] = isset($data['advanced']) ? $data['advanced'] : null; $this->container['category'] = isset($data['category']) ? $data['category'] : null; - $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; - $this->container['maximum_allowed_value'] = isset($data['maximum_allowed_value']) ? $data['maximum_allowed_value'] : null; + $this->container['category_id'] = isset($data['category_id']) ? $data['category_id'] : null; + $this->container['category_name'] = isset($data['category_name']) ? $data['category_name'] : null; $this->container['conversion_steps'] = isset($data['conversion_steps']) ? $data['conversion_steps'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['manual_tracking'] = isset($data['manual_tracking']) ? $data['manual_tracking'] : null; + $this->container['maximum_allowed_value'] = isset($data['maximum_allowed_value']) ? $data['maximum_allowed_value'] : null; + $this->container['maximum_value'] = isset($data['maximum_value']) ? $data['maximum_value'] : null; + $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; + $this->container['minimum_value'] = isset($data['minimum_value']) ? $data['minimum_value'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['unit_category'] = isset($data['unit_category']) ? $data['unit_category'] : null; } /** @@ -188,23 +254,32 @@ public function listInvalidProperties() { $invalid_properties = []; - if ($this->container['name'] === null) { - $invalid_properties[] = "'name' can't be null"; - } if ($this->container['abbreviated_name'] === null) { $invalid_properties[] = "'abbreviated_name' can't be null"; } if ($this->container['category'] === null) { $invalid_properties[] = "'category' can't be null"; } - $allowed_values = ["Distance", "Duration", "Energy", "Frequency", "Miscellany", "Pressure", "Proportion", "Rating", "Temperature", "Volume", "Weight"]; + $allowed_values = $this->getCategoryAllowableValues(); if (!in_array($this->container['category'], $allowed_values)) { - $invalid_properties[] = "invalid value for 'category', must be one of 'Distance', 'Duration', 'Energy', 'Frequency', 'Miscellany', 'Pressure', 'Proportion', 'Rating', 'Temperature', 'Volume', 'Weight'."; + $invalid_properties[] = sprintf( + "invalid value for 'category', must be one of '%s'", + implode("', '", $allowed_values) + ); } if ($this->container['conversion_steps'] === null) { $invalid_properties[] = "'conversion_steps' can't be null"; } + if ($this->container['maximum_value'] === null) { + $invalid_properties[] = "'maximum_value' can't be null"; + } + if ($this->container['name'] === null) { + $invalid_properties[] = "'name' can't be null"; + } + if ($this->container['unit_category'] === null) { + $invalid_properties[] = "'unit_category' can't be null"; + } return $invalid_properties; } @@ -217,64 +292,70 @@ public function listInvalidProperties() public function valid() { - if ($this->container['name'] === null) { - return false; - } if ($this->container['abbreviated_name'] === null) { return false; } if ($this->container['category'] === null) { return false; } - $allowed_values = ["Distance", "Duration", "Energy", "Frequency", "Miscellany", "Pressure", "Proportion", "Rating", "Temperature", "Volume", "Weight"]; + $allowed_values = $this->getCategoryAllowableValues(); if (!in_array($this->container['category'], $allowed_values)) { return false; } if ($this->container['conversion_steps'] === null) { return false; } + if ($this->container['maximum_value'] === null) { + return false; + } + if ($this->container['name'] === null) { + return false; + } + if ($this->container['unit_category'] === null) { + return false; + } return true; } /** - * Gets name + * Gets abbreviated_name * @return string */ - public function getName() + public function getAbbreviatedName() { - return $this->container['name']; + return $this->container['abbreviated_name']; } /** - * Sets name - * @param string $name Unit name + * Sets abbreviated_name + * @param string $abbreviated_name Unit abbreviation * @return $this */ - public function setName($name) + public function setAbbreviatedName($abbreviated_name) { - $this->container['name'] = $name; + $this->container['abbreviated_name'] = $abbreviated_name; return $this; } /** - * Gets abbreviated_name - * @return string + * Gets advanced + * @return int */ - public function getAbbreviatedName() + public function getAdvanced() { - return $this->container['abbreviated_name']; + return $this->container['advanced']; } /** - * Sets abbreviated_name - * @param string $abbreviated_name Unit abbreviation + * Sets advanced + * @param int $advanced Example: 1 * @return $this */ - public function setAbbreviatedName($abbreviated_name) + public function setAdvanced($advanced) { - $this->container['abbreviated_name'] = $abbreviated_name; + $this->container['advanced'] = $advanced; return $this; } @@ -295,9 +376,14 @@ public function getCategory() */ public function setCategory($category) { - $allowed_values = array('Distance', 'Duration', 'Energy', 'Frequency', 'Miscellany', 'Pressure', 'Proportion', 'Rating', 'Temperature', 'Volume', 'Weight'); - if ((!in_array($category, $allowed_values))) { - throw new \InvalidArgumentException("Invalid value for 'category', must be one of 'Distance', 'Duration', 'Energy', 'Frequency', 'Miscellany', 'Pressure', 'Proportion', 'Rating', 'Temperature', 'Volume', 'Weight'"); + $allowed_values = $this->getCategoryAllowableValues(); + if (!in_array($category, $allowed_values)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'category', must be one of '%s'", + implode("', '", $allowed_values) + ) + ); } $this->container['category'] = $category; @@ -305,43 +391,43 @@ public function setCategory($category) } /** - * Gets minimum_allowed_value - * @return double + * Gets category_id + * @return int */ - public function getMinimumAllowedValue() + public function getCategoryId() { - return $this->container['minimum_allowed_value']; + return $this->container['category_id']; } /** - * Sets minimum_allowed_value - * @param double $minimum_allowed_value The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. + * Sets category_id + * @param int $category_id Example: 6 * @return $this */ - public function setMinimumAllowedValue($minimum_allowed_value) + public function setCategoryId($category_id) { - $this->container['minimum_allowed_value'] = $minimum_allowed_value; + $this->container['category_id'] = $category_id; return $this; } /** - * Gets maximum_allowed_value - * @return double + * Gets category_name + * @return string */ - public function getMaximumAllowedValue() + public function getCategoryName() { - return $this->container['maximum_allowed_value']; + return $this->container['category_name']; } /** - * Sets maximum_allowed_value - * @param double $maximum_allowed_value The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. + * Sets category_name + * @param string $category_name Example: Miscellany * @return $this */ - public function setMaximumAllowedValue($maximum_allowed_value) + public function setCategoryName($category_name) { - $this->container['maximum_allowed_value'] = $maximum_allowed_value; + $this->container['category_name'] = $category_name; return $this; } @@ -366,6 +452,174 @@ public function setConversionSteps($conversion_steps) return $this; } + + /** + * Gets id + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param int $id Example: 29 + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets manual_tracking + * @return int + */ + public function getManualTracking() + { + return $this->container['manual_tracking']; + } + + /** + * Sets manual_tracking + * @param int $manual_tracking Example: 0 + * @return $this + */ + public function setManualTracking($manual_tracking) + { + $this->container['manual_tracking'] = $manual_tracking; + + return $this; + } + + /** + * Gets maximum_allowed_value + * @return double + */ + public function getMaximumAllowedValue() + { + return $this->container['maximum_allowed_value']; + } + + /** + * Sets maximum_allowed_value + * @param double $maximum_allowed_value The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. + * @return $this + */ + public function setMaximumAllowedValue($maximum_allowed_value) + { + $this->container['maximum_allowed_value'] = $maximum_allowed_value; + + return $this; + } + + /** + * Gets maximum_value + * @return int + */ + public function getMaximumValue() + { + return $this->container['maximum_value']; + } + + /** + * Sets maximum_value + * @param int $maximum_value Example: 4 + * @return $this + */ + public function setMaximumValue($maximum_value) + { + $this->container['maximum_value'] = $maximum_value; + + return $this; + } + + /** + * Gets minimum_allowed_value + * @return double + */ + public function getMinimumAllowedValue() + { + return $this->container['minimum_allowed_value']; + } + + /** + * Sets minimum_allowed_value + * @param double $minimum_allowed_value The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. + * @return $this + */ + public function setMinimumAllowedValue($minimum_allowed_value) + { + $this->container['minimum_allowed_value'] = $minimum_allowed_value; + + return $this; + } + + /** + * Gets minimum_value + * @return int + */ + public function getMinimumValue() + { + return $this->container['minimum_value']; + } + + /** + * Sets minimum_value + * @param int $minimum_value Example: 0 + * @return $this + */ + public function setMinimumValue($minimum_value) + { + $this->container['minimum_value'] = $minimum_value; + + return $this; + } + + /** + * Gets name + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * @param string $name Unit name + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets unit_category + * @return \QuantiModo\Client\Model\UnitCategory + */ + public function getUnitCategory() + { + return $this->container['unit_category']; + } + + /** + * Sets unit_category + * @param \QuantiModo\Client\Model\UnitCategory $unit_category + * @return $this + */ + public function setUnitCategory($unit_category) + { + $this->container['unit_category'] = $unit_category; + + return $this; + } /** * Returns true if offset exists. False otherwise. * @param integer $offset Offset diff --git a/lib/Model/UnitArray.php b/lib/Model/UnitArray.php new file mode 100644 index 0000000..17d4644 --- /dev/null +++ b/lib/Model/UnitArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/UnitCategory.php b/lib/Model/UnitCategory.php index f07517f..99d8963 100644 --- a/lib/Model/UnitCategory.php +++ b/lib/Model/UnitCategory.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,7 +54,19 @@ class UnitCategory implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'name' => 'string' + 'id' => 'int', + 'name' => 'string', + 'standard_unit_abbreviated_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'name' => null, + 'standard_unit_abbreviated_name' => null ]; public static function swaggerTypes() @@ -62,12 +74,19 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'name' => 'name' + 'id' => 'id', + 'name' => 'name', + 'standard_unit_abbreviated_name' => 'standardUnitAbbreviatedName' ]; @@ -76,7 +95,9 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'name' => 'setName' + 'id' => 'setId', + 'name' => 'setName', + 'standard_unit_abbreviated_name' => 'setStandardUnitAbbreviatedName' ]; @@ -85,7 +106,9 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'name' => 'getName' + 'id' => 'getId', + 'name' => 'getName', + 'standard_unit_abbreviated_name' => 'getStandardUnitAbbreviatedName' ]; public static function attributeMap() @@ -119,7 +142,9 @@ public static function getters() */ public function __construct(array $data = null) { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['standard_unit_abbreviated_name'] = isset($data['standard_unit_abbreviated_name']) ? $data['standard_unit_abbreviated_name'] : null; } /** @@ -153,6 +178,27 @@ public function valid() } + /** + * Gets id + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param int $id id + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** * Gets name * @return string @@ -173,6 +219,27 @@ public function setName($name) return $this; } + + /** + * Gets standard_unit_abbreviated_name + * @return string + */ + public function getStandardUnitAbbreviatedName() + { + return $this->container['standard_unit_abbreviated_name']; + } + + /** + * Sets standard_unit_abbreviated_name + * @param string $standard_unit_abbreviated_name Base unit for in which measurements are to be converted to and stored + * @return $this + */ + public function setStandardUnitAbbreviatedName($standard_unit_abbreviated_name) + { + $this->container['standard_unit_abbreviated_name'] = $standard_unit_abbreviated_name; + + return $this; + } /** * Returns true if offset exists. False otherwise. * @param integer $offset Offset diff --git a/lib/Model/Update.php b/lib/Model/Update.php deleted file mode 100644 index 0bda213..0000000 --- a/lib/Model/Update.php +++ /dev/null @@ -1,423 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * Update Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class Update implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'Update'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'id' => 'int', - 'user_id' => 'int', - 'connector_id' => 'int', - 'number_of_measurements' => 'int', - 'success' => 'bool', - 'message' => 'string', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'user_id' => 'userId', - 'connector_id' => 'connectorId', - 'number_of_measurements' => 'numberOfMeasurements', - 'success' => 'success', - 'message' => 'message', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'user_id' => 'setUserId', - 'connector_id' => 'setConnectorId', - 'number_of_measurements' => 'setNumberOfMeasurements', - 'success' => 'setSuccess', - 'message' => 'setMessage', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'user_id' => 'getUserId', - 'connector_id' => 'getConnectorId', - 'number_of_measurements' => 'getNumberOfMeasurements', - 'success' => 'getSuccess', - 'message' => 'getMessage', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; - $this->container['connector_id'] = isset($data['connector_id']) ? $data['connector_id'] : null; - $this->container['number_of_measurements'] = isset($data['number_of_measurements']) ? $data['number_of_measurements'] : null; - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; - $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['success'] === null) { - $invalid_properties[] = "'success' can't be null"; - } - if ($this->container['message'] === null) { - $invalid_properties[] = "'message' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['success'] === null) { - return false; - } - if ($this->container['message'] === null) { - return false; - } - return true; - } - - - /** - * Gets id - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * @param int $id id - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets user_id - * @return int - */ - public function getUserId() - { - return $this->container['user_id']; - } - - /** - * Sets user_id - * @param int $user_id user_id - * @return $this - */ - public function setUserId($user_id) - { - $this->container['user_id'] = $user_id; - - return $this; - } - - /** - * Gets connector_id - * @return int - */ - public function getConnectorId() - { - return $this->container['connector_id']; - } - - /** - * Sets connector_id - * @param int $connector_id connector_id - * @return $this - */ - public function setConnectorId($connector_id) - { - $this->container['connector_id'] = $connector_id; - - return $this; - } - - /** - * Gets number_of_measurements - * @return int - */ - public function getNumberOfMeasurements() - { - return $this->container['number_of_measurements']; - } - - /** - * Sets number_of_measurements - * @param int $number_of_measurements number_of_measurements - * @return $this - */ - public function setNumberOfMeasurements($number_of_measurements) - { - $this->container['number_of_measurements'] = $number_of_measurements; - - return $this; - } - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - - /** - * Gets message - * @return string - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * @param string $message message - * @return $this - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets created_at - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * @param \DateTime $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format - * @return $this - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * @return \DateTime - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * @param \DateTime $updated_at When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format - * @return $this - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/User.php b/lib/Model/User.php index dcf8735..e57802e 100644 --- a/lib/Model/User.php +++ b/lib/Model/User.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,13 +54,99 @@ class User implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'id' => 'int', - 'wp_id' => 'int', + 'access_token' => 'string', + 'access_token_expires' => 'string', + 'access_token_expires_at_milliseconds' => 'int', + 'administrator' => 'bool', + 'avatar' => 'string', + 'avatar_image' => 'string', + 'capabilities' => 'string', + 'client_id' => 'string', + 'client_user_id' => 'string', + 'combine_notifications' => 'bool', 'display_name' => 'string', - 'login_name' => 'string', + 'earliest_reminder_time' => '\DateTime', 'email' => 'string', - 'token' => 'string', - 'administrator' => 'bool' + 'first_name' => 'string', + 'get_preview_builds' => 'bool', + 'has_android_app' => 'bool', + 'has_chrome_extension' => 'bool', + 'has_ios_app' => 'bool', + 'id' => 'int', + 'last_four' => 'string', + 'last_name' => 'string', + 'last_sms_tracking_reminder_notification_id' => 'string', + 'latest_reminder_time' => 'string', + 'login_name' => 'string', + 'password' => 'string', + 'phone_number' => 'string', + 'phone_verification_code' => 'string', + 'push_notifications_enabled' => 'bool', + 'refresh_token' => 'string', + 'roles' => 'string', + 'send_predictor_emails' => 'bool', + 'send_reminder_notification_emails' => 'bool', + 'sms_notifications_enabled' => 'bool', + 'stripe_active' => 'bool', + 'stripe_id' => 'string', + 'stripe_plan' => 'string', + 'stripe_subscription' => 'string', + 'subscription_ends_at' => '\DateTime', + 'subscription_provider' => 'string', + 'time_zone_offset' => 'int', + 'track_location' => 'bool', + 'user_registered' => '\DateTime', + 'user_url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'access_token' => null, + 'access_token_expires' => null, + 'access_token_expires_at_milliseconds' => null, + 'administrator' => null, + 'avatar' => null, + 'avatar_image' => null, + 'capabilities' => null, + 'client_id' => null, + 'client_user_id' => null, + 'combine_notifications' => null, + 'display_name' => null, + 'earliest_reminder_time' => 'date-time', + 'email' => null, + 'first_name' => null, + 'get_preview_builds' => null, + 'has_android_app' => null, + 'has_chrome_extension' => null, + 'has_ios_app' => null, + 'id' => null, + 'last_four' => null, + 'last_name' => null, + 'last_sms_tracking_reminder_notification_id' => null, + 'latest_reminder_time' => null, + 'login_name' => null, + 'password' => null, + 'phone_number' => null, + 'phone_verification_code' => null, + 'push_notifications_enabled' => null, + 'refresh_token' => null, + 'roles' => null, + 'send_predictor_emails' => null, + 'send_reminder_notification_emails' => null, + 'sms_notifications_enabled' => null, + 'stripe_active' => null, + 'stripe_id' => null, + 'stripe_plan' => null, + 'stripe_subscription' => null, + 'subscription_ends_at' => 'date-time', + 'subscription_provider' => null, + 'time_zone_offset' => null, + 'track_location' => null, + 'user_registered' => 'date-time', + 'user_url' => null ]; public static function swaggerTypes() @@ -68,18 +154,59 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'wp_id' => 'wpId', + 'access_token' => 'accessToken', + 'access_token_expires' => 'accessTokenExpires', + 'access_token_expires_at_milliseconds' => 'accessTokenExpiresAtMilliseconds', + 'administrator' => 'administrator', + 'avatar' => 'avatar', + 'avatar_image' => 'avatarImage', + 'capabilities' => 'capabilities', + 'client_id' => 'clientId', + 'client_user_id' => 'clientUserId', + 'combine_notifications' => 'combineNotifications', 'display_name' => 'displayName', - 'login_name' => 'loginName', + 'earliest_reminder_time' => 'earliestReminderTime', 'email' => 'email', - 'token' => 'token', - 'administrator' => 'administrator' + 'first_name' => 'firstName', + 'get_preview_builds' => 'getPreviewBuilds', + 'has_android_app' => 'hasAndroidApp', + 'has_chrome_extension' => 'hasChromeExtension', + 'has_ios_app' => 'hasIosApp', + 'id' => 'id', + 'last_four' => 'lastFour', + 'last_name' => 'lastName', + 'last_sms_tracking_reminder_notification_id' => 'lastSmsTrackingReminderNotificationId', + 'latest_reminder_time' => 'latestReminderTime', + 'login_name' => 'loginName', + 'password' => 'password', + 'phone_number' => 'phoneNumber', + 'phone_verification_code' => 'phoneVerificationCode', + 'push_notifications_enabled' => 'pushNotificationsEnabled', + 'refresh_token' => 'refreshToken', + 'roles' => 'roles', + 'send_predictor_emails' => 'sendPredictorEmails', + 'send_reminder_notification_emails' => 'sendReminderNotificationEmails', + 'sms_notifications_enabled' => 'smsNotificationsEnabled', + 'stripe_active' => 'stripeActive', + 'stripe_id' => 'stripeId', + 'stripe_plan' => 'stripePlan', + 'stripe_subscription' => 'stripeSubscription', + 'subscription_ends_at' => 'subscriptionEndsAt', + 'subscription_provider' => 'subscriptionProvider', + 'time_zone_offset' => 'timeZoneOffset', + 'track_location' => 'trackLocation', + 'user_registered' => 'userRegistered', + 'user_url' => 'userUrl' ]; @@ -88,13 +215,49 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'wp_id' => 'setWpId', + 'access_token' => 'setAccessToken', + 'access_token_expires' => 'setAccessTokenExpires', + 'access_token_expires_at_milliseconds' => 'setAccessTokenExpiresAtMilliseconds', + 'administrator' => 'setAdministrator', + 'avatar' => 'setAvatar', + 'avatar_image' => 'setAvatarImage', + 'capabilities' => 'setCapabilities', + 'client_id' => 'setClientId', + 'client_user_id' => 'setClientUserId', + 'combine_notifications' => 'setCombineNotifications', 'display_name' => 'setDisplayName', - 'login_name' => 'setLoginName', + 'earliest_reminder_time' => 'setEarliestReminderTime', 'email' => 'setEmail', - 'token' => 'setToken', - 'administrator' => 'setAdministrator' + 'first_name' => 'setFirstName', + 'get_preview_builds' => 'setGetPreviewBuilds', + 'has_android_app' => 'setHasAndroidApp', + 'has_chrome_extension' => 'setHasChromeExtension', + 'has_ios_app' => 'setHasIosApp', + 'id' => 'setId', + 'last_four' => 'setLastFour', + 'last_name' => 'setLastName', + 'last_sms_tracking_reminder_notification_id' => 'setLastSmsTrackingReminderNotificationId', + 'latest_reminder_time' => 'setLatestReminderTime', + 'login_name' => 'setLoginName', + 'password' => 'setPassword', + 'phone_number' => 'setPhoneNumber', + 'phone_verification_code' => 'setPhoneVerificationCode', + 'push_notifications_enabled' => 'setPushNotificationsEnabled', + 'refresh_token' => 'setRefreshToken', + 'roles' => 'setRoles', + 'send_predictor_emails' => 'setSendPredictorEmails', + 'send_reminder_notification_emails' => 'setSendReminderNotificationEmails', + 'sms_notifications_enabled' => 'setSmsNotificationsEnabled', + 'stripe_active' => 'setStripeActive', + 'stripe_id' => 'setStripeId', + 'stripe_plan' => 'setStripePlan', + 'stripe_subscription' => 'setStripeSubscription', + 'subscription_ends_at' => 'setSubscriptionEndsAt', + 'subscription_provider' => 'setSubscriptionProvider', + 'time_zone_offset' => 'setTimeZoneOffset', + 'track_location' => 'setTrackLocation', + 'user_registered' => 'setUserRegistered', + 'user_url' => 'setUserUrl' ]; @@ -103,13 +266,49 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'wp_id' => 'getWpId', + 'access_token' => 'getAccessToken', + 'access_token_expires' => 'getAccessTokenExpires', + 'access_token_expires_at_milliseconds' => 'getAccessTokenExpiresAtMilliseconds', + 'administrator' => 'getAdministrator', + 'avatar' => 'getAvatar', + 'avatar_image' => 'getAvatarImage', + 'capabilities' => 'getCapabilities', + 'client_id' => 'getClientId', + 'client_user_id' => 'getClientUserId', + 'combine_notifications' => 'getCombineNotifications', 'display_name' => 'getDisplayName', - 'login_name' => 'getLoginName', + 'earliest_reminder_time' => 'getEarliestReminderTime', 'email' => 'getEmail', - 'token' => 'getToken', - 'administrator' => 'getAdministrator' + 'first_name' => 'getFirstName', + 'get_preview_builds' => 'getGetPreviewBuilds', + 'has_android_app' => 'getHasAndroidApp', + 'has_chrome_extension' => 'getHasChromeExtension', + 'has_ios_app' => 'getHasIosApp', + 'id' => 'getId', + 'last_four' => 'getLastFour', + 'last_name' => 'getLastName', + 'last_sms_tracking_reminder_notification_id' => 'getLastSmsTrackingReminderNotificationId', + 'latest_reminder_time' => 'getLatestReminderTime', + 'login_name' => 'getLoginName', + 'password' => 'getPassword', + 'phone_number' => 'getPhoneNumber', + 'phone_verification_code' => 'getPhoneVerificationCode', + 'push_notifications_enabled' => 'getPushNotificationsEnabled', + 'refresh_token' => 'getRefreshToken', + 'roles' => 'getRoles', + 'send_predictor_emails' => 'getSendPredictorEmails', + 'send_reminder_notification_emails' => 'getSendReminderNotificationEmails', + 'sms_notifications_enabled' => 'getSmsNotificationsEnabled', + 'stripe_active' => 'getStripeActive', + 'stripe_id' => 'getStripeId', + 'stripe_plan' => 'getStripePlan', + 'stripe_subscription' => 'getStripeSubscription', + 'subscription_ends_at' => 'getSubscriptionEndsAt', + 'subscription_provider' => 'getSubscriptionProvider', + 'time_zone_offset' => 'getTimeZoneOffset', + 'track_location' => 'getTrackLocation', + 'user_registered' => 'getUserRegistered', + 'user_url' => 'getUserUrl' ]; public static function attributeMap() @@ -143,13 +342,49 @@ public static function getters() */ public function __construct(array $data = null) { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['wp_id'] = isset($data['wp_id']) ? $data['wp_id'] : null; + $this->container['access_token'] = isset($data['access_token']) ? $data['access_token'] : null; + $this->container['access_token_expires'] = isset($data['access_token_expires']) ? $data['access_token_expires'] : null; + $this->container['access_token_expires_at_milliseconds'] = isset($data['access_token_expires_at_milliseconds']) ? $data['access_token_expires_at_milliseconds'] : null; + $this->container['administrator'] = isset($data['administrator']) ? $data['administrator'] : null; + $this->container['avatar'] = isset($data['avatar']) ? $data['avatar'] : null; + $this->container['avatar_image'] = isset($data['avatar_image']) ? $data['avatar_image'] : null; + $this->container['capabilities'] = isset($data['capabilities']) ? $data['capabilities'] : null; + $this->container['client_id'] = isset($data['client_id']) ? $data['client_id'] : null; + $this->container['client_user_id'] = isset($data['client_user_id']) ? $data['client_user_id'] : null; + $this->container['combine_notifications'] = isset($data['combine_notifications']) ? $data['combine_notifications'] : null; $this->container['display_name'] = isset($data['display_name']) ? $data['display_name'] : null; - $this->container['login_name'] = isset($data['login_name']) ? $data['login_name'] : null; + $this->container['earliest_reminder_time'] = isset($data['earliest_reminder_time']) ? $data['earliest_reminder_time'] : null; $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['token'] = isset($data['token']) ? $data['token'] : null; - $this->container['administrator'] = isset($data['administrator']) ? $data['administrator'] : null; + $this->container['first_name'] = isset($data['first_name']) ? $data['first_name'] : null; + $this->container['get_preview_builds'] = isset($data['get_preview_builds']) ? $data['get_preview_builds'] : null; + $this->container['has_android_app'] = isset($data['has_android_app']) ? $data['has_android_app'] : null; + $this->container['has_chrome_extension'] = isset($data['has_chrome_extension']) ? $data['has_chrome_extension'] : null; + $this->container['has_ios_app'] = isset($data['has_ios_app']) ? $data['has_ios_app'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['last_four'] = isset($data['last_four']) ? $data['last_four'] : null; + $this->container['last_name'] = isset($data['last_name']) ? $data['last_name'] : null; + $this->container['last_sms_tracking_reminder_notification_id'] = isset($data['last_sms_tracking_reminder_notification_id']) ? $data['last_sms_tracking_reminder_notification_id'] : null; + $this->container['latest_reminder_time'] = isset($data['latest_reminder_time']) ? $data['latest_reminder_time'] : null; + $this->container['login_name'] = isset($data['login_name']) ? $data['login_name'] : null; + $this->container['password'] = isset($data['password']) ? $data['password'] : null; + $this->container['phone_number'] = isset($data['phone_number']) ? $data['phone_number'] : null; + $this->container['phone_verification_code'] = isset($data['phone_verification_code']) ? $data['phone_verification_code'] : null; + $this->container['push_notifications_enabled'] = isset($data['push_notifications_enabled']) ? $data['push_notifications_enabled'] : null; + $this->container['refresh_token'] = isset($data['refresh_token']) ? $data['refresh_token'] : null; + $this->container['roles'] = isset($data['roles']) ? $data['roles'] : null; + $this->container['send_predictor_emails'] = isset($data['send_predictor_emails']) ? $data['send_predictor_emails'] : null; + $this->container['send_reminder_notification_emails'] = isset($data['send_reminder_notification_emails']) ? $data['send_reminder_notification_emails'] : null; + $this->container['sms_notifications_enabled'] = isset($data['sms_notifications_enabled']) ? $data['sms_notifications_enabled'] : null; + $this->container['stripe_active'] = isset($data['stripe_active']) ? $data['stripe_active'] : null; + $this->container['stripe_id'] = isset($data['stripe_id']) ? $data['stripe_id'] : null; + $this->container['stripe_plan'] = isset($data['stripe_plan']) ? $data['stripe_plan'] : null; + $this->container['stripe_subscription'] = isset($data['stripe_subscription']) ? $data['stripe_subscription'] : null; + $this->container['subscription_ends_at'] = isset($data['subscription_ends_at']) ? $data['subscription_ends_at'] : null; + $this->container['subscription_provider'] = isset($data['subscription_provider']) ? $data['subscription_provider'] : null; + $this->container['time_zone_offset'] = isset($data['time_zone_offset']) ? $data['time_zone_offset'] : null; + $this->container['track_location'] = isset($data['track_location']) ? $data['track_location'] : null; + $this->container['user_registered'] = isset($data['user_registered']) ? $data['user_registered'] : null; + $this->container['user_url'] = isset($data['user_url']) ? $data['user_url'] : null; } /** @@ -161,26 +396,23 @@ public function listInvalidProperties() { $invalid_properties = []; - if ($this->container['id'] === null) { - $invalid_properties[] = "'id' can't be null"; + if ($this->container['access_token'] === null) { + $invalid_properties[] = "'access_token' can't be null"; } - if ($this->container['wp_id'] === null) { - $invalid_properties[] = "'wp_id' can't be null"; + if ($this->container['administrator'] === null) { + $invalid_properties[] = "'administrator' can't be null"; } if ($this->container['display_name'] === null) { $invalid_properties[] = "'display_name' can't be null"; } - if ($this->container['login_name'] === null) { - $invalid_properties[] = "'login_name' can't be null"; - } if ($this->container['email'] === null) { $invalid_properties[] = "'email' can't be null"; } - if ($this->container['token'] === null) { - $invalid_properties[] = "'token' can't be null"; + if ($this->container['id'] === null) { + $invalid_properties[] = "'id' can't be null"; } - if ($this->container['administrator'] === null) { - $invalid_properties[] = "'administrator' can't be null"; + if ($this->container['login_name'] === null) { + $invalid_properties[] = "'login_name' can't be null"; } return $invalid_properties; } @@ -194,25 +426,22 @@ public function listInvalidProperties() public function valid() { - if ($this->container['id'] === null) { + if ($this->container['access_token'] === null) { return false; } - if ($this->container['wp_id'] === null) { + if ($this->container['administrator'] === null) { return false; } if ($this->container['display_name'] === null) { return false; } - if ($this->container['login_name'] === null) { - return false; - } if ($this->container['email'] === null) { return false; } - if ($this->container['token'] === null) { + if ($this->container['id'] === null) { return false; } - if ($this->container['administrator'] === null) { + if ($this->container['login_name'] === null) { return false; } return true; @@ -220,43 +449,211 @@ public function valid() /** - * Gets id - * @return int + * Gets access_token + * @return string */ - public function getId() + public function getAccessToken() { - return $this->container['id']; + return $this->container['access_token']; } /** - * Sets id - * @param int $id User id + * Sets access_token + * @param string $access_token User access token * @return $this */ - public function setId($id) + public function setAccessToken($access_token) { - $this->container['id'] = $id; + $this->container['access_token'] = $access_token; + + return $this; + } + + /** + * Gets access_token_expires + * @return string + */ + public function getAccessTokenExpires() + { + return $this->container['access_token_expires']; + } + + /** + * Sets access_token_expires + * @param string $access_token_expires Example: 2018-08-08 02:41:19 + * @return $this + */ + public function setAccessTokenExpires($access_token_expires) + { + $this->container['access_token_expires'] = $access_token_expires; return $this; } /** - * Gets wp_id + * Gets access_token_expires_at_milliseconds * @return int */ - public function getWpId() + public function getAccessTokenExpiresAtMilliseconds() + { + return $this->container['access_token_expires_at_milliseconds']; + } + + /** + * Sets access_token_expires_at_milliseconds + * @param int $access_token_expires_at_milliseconds Example: 1533696079000 + * @return $this + */ + public function setAccessTokenExpiresAtMilliseconds($access_token_expires_at_milliseconds) + { + $this->container['access_token_expires_at_milliseconds'] = $access_token_expires_at_milliseconds; + + return $this; + } + + /** + * Gets administrator + * @return bool + */ + public function getAdministrator() + { + return $this->container['administrator']; + } + + /** + * Sets administrator + * @param bool $administrator Is user administrator + * @return $this + */ + public function setAdministrator($administrator) + { + $this->container['administrator'] = $administrator; + + return $this; + } + + /** + * Gets avatar + * @return string + */ + public function getAvatar() + { + return $this->container['avatar']; + } + + /** + * Sets avatar + * @param string $avatar Example: https://lh6.googleusercontent.com/-BHr4hyUWqZU/AAAAAAAAAAI/AAAAAAAIG28/2Lv0en738II/photo.jpg?sz=50 + * @return $this + */ + public function setAvatar($avatar) + { + $this->container['avatar'] = $avatar; + + return $this; + } + + /** + * Gets avatar_image + * @return string + */ + public function getAvatarImage() + { + return $this->container['avatar_image']; + } + + /** + * Sets avatar_image + * @param string $avatar_image Example: https://lh6.googleusercontent.com/-BHr4hyUWqZU/AAAAAAAAAAI/AAAAAAAIG28/2Lv0en738II/photo.jpg?sz=50 + * @return $this + */ + public function setAvatarImage($avatar_image) + { + $this->container['avatar_image'] = $avatar_image; + + return $this; + } + + /** + * Gets capabilities + * @return string + */ + public function getCapabilities() + { + return $this->container['capabilities']; + } + + /** + * Sets capabilities + * @param string $capabilities Example: a:1:{s:13:\"administrator\";b:1;} + * @return $this + */ + public function setCapabilities($capabilities) + { + $this->container['capabilities'] = $capabilities; + + return $this; + } + + /** + * Gets client_id + * @return string + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * @param string $client_id Example: quantimodo + * @return $this + */ + public function setClientId($client_id) + { + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets client_user_id + * @return string + */ + public function getClientUserId() + { + return $this->container['client_user_id']; + } + + /** + * Sets client_user_id + * @param string $client_user_id Example: 118444693184829555362 + * @return $this + */ + public function setClientUserId($client_user_id) + { + $this->container['client_user_id'] = $client_user_id; + + return $this; + } + + /** + * Gets combine_notifications + * @return bool + */ + public function getCombineNotifications() { - return $this->container['wp_id']; + return $this->container['combine_notifications']; } /** - * Sets wp_id - * @param int $wp_id Wordpress user id + * Sets combine_notifications + * @param bool $combine_notifications Example: 1 * @return $this */ - public function setWpId($wp_id) + public function setCombineNotifications($combine_notifications) { - $this->container['wp_id'] = $wp_id; + $this->container['combine_notifications'] = $combine_notifications; return $this; } @@ -283,22 +680,22 @@ public function setDisplayName($display_name) } /** - * Gets login_name - * @return string + * Gets earliest_reminder_time + * @return \DateTime */ - public function getLoginName() + public function getEarliestReminderTime() { - return $this->container['login_name']; + return $this->container['earliest_reminder_time']; } /** - * Sets login_name - * @param string $login_name User login name + * Sets earliest_reminder_time + * @param \DateTime $earliest_reminder_time Earliest time user should get notifications. Example: 05:00:00 * @return $this */ - public function setLoginName($login_name) + public function setEarliestReminderTime($earliest_reminder_time) { - $this->container['login_name'] = $login_name; + $this->container['earliest_reminder_time'] = $earliest_reminder_time; return $this; } @@ -325,43 +722,631 @@ public function setEmail($email) } /** - * Gets token + * Gets first_name * @return string */ - public function getToken() + public function getFirstName() { - return $this->container['token']; + return $this->container['first_name']; } /** - * Sets token - * @param string $token User token + * Sets first_name + * @param string $first_name Example: Mike * @return $this */ - public function setToken($token) + public function setFirstName($first_name) { - $this->container['token'] = $token; + $this->container['first_name'] = $first_name; return $this; } /** - * Gets administrator + * Gets get_preview_builds * @return bool */ - public function getAdministrator() + public function getGetPreviewBuilds() { - return $this->container['administrator']; + return $this->container['get_preview_builds']; } /** - * Sets administrator - * @param bool $administrator Is user administrator + * Sets get_preview_builds + * @param bool $get_preview_builds Example: false * @return $this */ - public function setAdministrator($administrator) + public function setGetPreviewBuilds($get_preview_builds) { - $this->container['administrator'] = $administrator; + $this->container['get_preview_builds'] = $get_preview_builds; + + return $this; + } + + /** + * Gets has_android_app + * @return bool + */ + public function getHasAndroidApp() + { + return $this->container['has_android_app']; + } + + /** + * Sets has_android_app + * @param bool $has_android_app Example: false + * @return $this + */ + public function setHasAndroidApp($has_android_app) + { + $this->container['has_android_app'] = $has_android_app; + + return $this; + } + + /** + * Gets has_chrome_extension + * @return bool + */ + public function getHasChromeExtension() + { + return $this->container['has_chrome_extension']; + } + + /** + * Sets has_chrome_extension + * @param bool $has_chrome_extension Example: false + * @return $this + */ + public function setHasChromeExtension($has_chrome_extension) + { + $this->container['has_chrome_extension'] = $has_chrome_extension; + + return $this; + } + + /** + * Gets has_ios_app + * @return bool + */ + public function getHasIosApp() + { + return $this->container['has_ios_app']; + } + + /** + * Sets has_ios_app + * @param bool $has_ios_app Example: false + * @return $this + */ + public function setHasIosApp($has_ios_app) + { + $this->container['has_ios_app'] = $has_ios_app; + + return $this; + } + + /** + * Gets id + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param int $id User id + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets last_four + * @return string + */ + public function getLastFour() + { + return $this->container['last_four']; + } + + /** + * Sets last_four + * @param string $last_four Example: 2009 + * @return $this + */ + public function setLastFour($last_four) + { + $this->container['last_four'] = $last_four; + + return $this; + } + + /** + * Gets last_name + * @return string + */ + public function getLastName() + { + return $this->container['last_name']; + } + + /** + * Sets last_name + * @param string $last_name Example: Sinn + * @return $this + */ + public function setLastName($last_name) + { + $this->container['last_name'] = $last_name; + + return $this; + } + + /** + * Gets last_sms_tracking_reminder_notification_id + * @return string + */ + public function getLastSmsTrackingReminderNotificationId() + { + return $this->container['last_sms_tracking_reminder_notification_id']; + } + + /** + * Sets last_sms_tracking_reminder_notification_id + * @param string $last_sms_tracking_reminder_notification_id Example: + * @return $this + */ + public function setLastSmsTrackingReminderNotificationId($last_sms_tracking_reminder_notification_id) + { + $this->container['last_sms_tracking_reminder_notification_id'] = $last_sms_tracking_reminder_notification_id; + + return $this; + } + + /** + * Gets latest_reminder_time + * @return string + */ + public function getLatestReminderTime() + { + return $this->container['latest_reminder_time']; + } + + /** + * Sets latest_reminder_time + * @param string $latest_reminder_time Latest time user should get notifications. Example: 23:00:00 + * @return $this + */ + public function setLatestReminderTime($latest_reminder_time) + { + $this->container['latest_reminder_time'] = $latest_reminder_time; + + return $this; + } + + /** + * Gets login_name + * @return string + */ + public function getLoginName() + { + return $this->container['login_name']; + } + + /** + * Sets login_name + * @param string $login_name User login name + * @return $this + */ + public function setLoginName($login_name) + { + $this->container['login_name'] = $login_name; + + return $this; + } + + /** + * Gets password + * @return string + */ + public function getPassword() + { + return $this->container['password']; + } + + /** + * Sets password + * @param string $password Example: PASSWORD + * @return $this + */ + public function setPassword($password) + { + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets phone_number + * @return string + */ + public function getPhoneNumber() + { + return $this->container['phone_number']; + } + + /** + * Sets phone_number + * @param string $phone_number Example: + * @return $this + */ + public function setPhoneNumber($phone_number) + { + $this->container['phone_number'] = $phone_number; + + return $this; + } + + /** + * Gets phone_verification_code + * @return string + */ + public function getPhoneVerificationCode() + { + return $this->container['phone_verification_code']; + } + + /** + * Sets phone_verification_code + * @param string $phone_verification_code Example: + * @return $this + */ + public function setPhoneVerificationCode($phone_verification_code) + { + $this->container['phone_verification_code'] = $phone_verification_code; + + return $this; + } + + /** + * Gets push_notifications_enabled + * @return bool + */ + public function getPushNotificationsEnabled() + { + return $this->container['push_notifications_enabled']; + } + + /** + * Sets push_notifications_enabled + * @param bool $push_notifications_enabled Example: 1 + * @return $this + */ + public function setPushNotificationsEnabled($push_notifications_enabled) + { + $this->container['push_notifications_enabled'] = $push_notifications_enabled; + + return $this; + } + + /** + * Gets refresh_token + * @return string + */ + public function getRefreshToken() + { + return $this->container['refresh_token']; + } + + /** + * Sets refresh_token + * @param string $refresh_token Example: 6e99b113d85586de1f92468433f2df1e666647cb + * @return $this + */ + public function setRefreshToken($refresh_token) + { + $this->container['refresh_token'] = $refresh_token; + + return $this; + } + + /** + * Gets roles + * @return string + */ + public function getRoles() + { + return $this->container['roles']; + } + + /** + * Sets roles + * @param string $roles Example: [\"admin\"] + * @return $this + */ + public function setRoles($roles) + { + $this->container['roles'] = $roles; + + return $this; + } + + /** + * Gets send_predictor_emails + * @return bool + */ + public function getSendPredictorEmails() + { + return $this->container['send_predictor_emails']; + } + + /** + * Sets send_predictor_emails + * @param bool $send_predictor_emails Example: 1 + * @return $this + */ + public function setSendPredictorEmails($send_predictor_emails) + { + $this->container['send_predictor_emails'] = $send_predictor_emails; + + return $this; + } + + /** + * Gets send_reminder_notification_emails + * @return bool + */ + public function getSendReminderNotificationEmails() + { + return $this->container['send_reminder_notification_emails']; + } + + /** + * Sets send_reminder_notification_emails + * @param bool $send_reminder_notification_emails Example: 1 + * @return $this + */ + public function setSendReminderNotificationEmails($send_reminder_notification_emails) + { + $this->container['send_reminder_notification_emails'] = $send_reminder_notification_emails; + + return $this; + } + + /** + * Gets sms_notifications_enabled + * @return bool + */ + public function getSmsNotificationsEnabled() + { + return $this->container['sms_notifications_enabled']; + } + + /** + * Sets sms_notifications_enabled + * @param bool $sms_notifications_enabled Example: false + * @return $this + */ + public function setSmsNotificationsEnabled($sms_notifications_enabled) + { + $this->container['sms_notifications_enabled'] = $sms_notifications_enabled; + + return $this; + } + + /** + * Gets stripe_active + * @return bool + */ + public function getStripeActive() + { + return $this->container['stripe_active']; + } + + /** + * Sets stripe_active + * @param bool $stripe_active Example: 1 + * @return $this + */ + public function setStripeActive($stripe_active) + { + $this->container['stripe_active'] = $stripe_active; + + return $this; + } + + /** + * Gets stripe_id + * @return string + */ + public function getStripeId() + { + return $this->container['stripe_id']; + } + + /** + * Sets stripe_id + * @param string $stripe_id Example: cus_A8CEmcvl8jwLhV + * @return $this + */ + public function setStripeId($stripe_id) + { + $this->container['stripe_id'] = $stripe_id; + + return $this; + } + + /** + * Gets stripe_plan + * @return string + */ + public function getStripePlan() + { + return $this->container['stripe_plan']; + } + + /** + * Sets stripe_plan + * @param string $stripe_plan Example: monthly7 + * @return $this + */ + public function setStripePlan($stripe_plan) + { + $this->container['stripe_plan'] = $stripe_plan; + + return $this; + } + + /** + * Gets stripe_subscription + * @return string + */ + public function getStripeSubscription() + { + return $this->container['stripe_subscription']; + } + + /** + * Sets stripe_subscription + * @param string $stripe_subscription Example: sub_ANTx3nOE7nzjQf + * @return $this + */ + public function setStripeSubscription($stripe_subscription) + { + $this->container['stripe_subscription'] = $stripe_subscription; + + return $this; + } + + /** + * Gets subscription_ends_at + * @return \DateTime + */ + public function getSubscriptionEndsAt() + { + return $this->container['subscription_ends_at']; + } + + /** + * Sets subscription_ends_at + * @param \DateTime $subscription_ends_at Example: + * @return $this + */ + public function setSubscriptionEndsAt($subscription_ends_at) + { + $this->container['subscription_ends_at'] = $subscription_ends_at; + + return $this; + } + + /** + * Gets subscription_provider + * @return string + */ + public function getSubscriptionProvider() + { + return $this->container['subscription_provider']; + } + + /** + * Sets subscription_provider + * @param string $subscription_provider Example: google + * @return $this + */ + public function setSubscriptionProvider($subscription_provider) + { + $this->container['subscription_provider'] = $subscription_provider; + + return $this; + } + + /** + * Gets time_zone_offset + * @return int + */ + public function getTimeZoneOffset() + { + return $this->container['time_zone_offset']; + } + + /** + * Sets time_zone_offset + * @param int $time_zone_offset Example: 300 + * @return $this + */ + public function setTimeZoneOffset($time_zone_offset) + { + $this->container['time_zone_offset'] = $time_zone_offset; + + return $this; + } + + /** + * Gets track_location + * @return bool + */ + public function getTrackLocation() + { + return $this->container['track_location']; + } + + /** + * Sets track_location + * @param bool $track_location Example: 1 + * @return $this + */ + public function setTrackLocation($track_location) + { + $this->container['track_location'] = $track_location; + + return $this; + } + + /** + * Gets user_registered + * @return \DateTime + */ + public function getUserRegistered() + { + return $this->container['user_registered']; + } + + /** + * Sets user_registered + * @param \DateTime $user_registered Example: 2013-12-03 15:25:13 + * @return $this + */ + public function setUserRegistered($user_registered) + { + $this->container['user_registered'] = $user_registered; + + return $this; + } + + /** + * Gets user_url + * @return string + */ + public function getUserUrl() + { + return $this->container['user_url']; + } + + /** + * Sets user_url + * @param string $user_url Example: https://plus.google.com/+MikeSinn + * @return $this + */ + public function setUserUrl($user_url) + { + $this->container['user_url'] = $user_url; return $this; } diff --git a/lib/Model/UserStudy.php b/lib/Model/UserStudy.php new file mode 100644 index 0000000..d8fe855 --- /dev/null +++ b/lib/Model/UserStudy.php @@ -0,0 +1,3455 @@ + 'double', + 'average_daily_high_cause' => 'double', + 'average_daily_low_cause' => 'double', + 'average_effect' => 'double', + 'average_effect_following_high_cause' => 'double', + 'average_effect_following_high_cause_explanation' => 'string', + 'average_effect_following_low_cause' => 'double', + 'average_effect_following_low_cause_explanation' => 'string', + 'causality_factor' => 'double', + 'cause_changes' => 'int', + 'cause_changes_statistical_significance' => 'double', + 'cause_data_source' => '\QuantiModo\Client\Model\DataSource', + 'cause_number_of_processed_daily_measurements' => 'int', + 'cause_number_of_raw_measurements' => 'int', + 'cause_value_spread' => 'double', + 'cause_variable' => '\QuantiModo\Client\Model\UserVariable', + 'cause_variable_category_id' => 'int', + 'cause_variable_category_name' => 'string', + 'cause_variable_unit_abbreviated_name' => 'string', + 'cause_variable_unit_id' => 'int', + 'cause_variable_id' => 'int', + 'cause_variable_image_url' => 'string', + 'cause_variable_ion_icon' => 'string', + 'cause_variable_most_common_connector_id' => 'int', + 'cause_variable_name' => 'string', + 'charts' => '\QuantiModo\Client\Model\Chart[]', + 'confidence_interval' => 'double', + 'confidence_level' => 'string', + 'correlation_coefficient' => 'double', + 'correlation_is_contradictory_to_optimal_values' => 'bool', + 'critical_t_value' => 'double', + 'data_analysis' => 'string', + 'data_sources' => 'string', + 'data_sources_paragraph_for_cause' => 'string', + 'data_sources_paragraph_for_effect' => 'string', + 'degrees_of_freedom' => 'int', + 'direction' => 'string', + 'distance_from_middle_to_be_hight_low_effect' => 'int', + 'duration_of_action' => 'int', + 'duration_of_action_in_hours' => 'int', + 'effect_changes' => 'int', + 'effect_data_source' => '\QuantiModo\Client\Model\DataSource', + 'effect_number_of_processed_daily_measurements' => 'int', + 'effect_number_of_raw_measurements' => 'int', + 'effect_size' => 'string', + 'effect_unit' => 'string', + 'effect_value_spread' => 'double', + 'effect_variable' => '\QuantiModo\Client\Model\UserVariable', + 'effect_variable_category_id' => 'int', + 'effect_variable_category_name' => 'string', + 'effect_variable_unit_abbreviated_name' => 'string', + 'effect_variable_unit_id' => 'int', + 'effect_variable_id' => 'int', + 'effect_variable_image_url' => 'string', + 'effect_variable_ion_icon' => 'string', + 'effect_variable_most_common_connector_id' => 'int', + 'effect_variable_name' => 'string', + 'error' => 'string', + 'experiment_end_time' => 'int', + 'experiment_start_time' => 'int', + 'forward_spearman_correlation_coefficient' => 'double', + 'gauge_image' => 'string', + 'gauge_image_square' => 'string', + 'image_url' => 'string', + 'instructions_for_cause' => 'string', + 'instructions_for_effect' => 'string', + 'maximum_cause_value' => 'double', + 'maximum_effect_value' => 'double', + 'minimum_cause_value' => 'double', + 'minimum_effect_value' => 'double', + 'minimum_probability' => 'double', + 'number_of_cause_changes_for_optimal_values' => 'int', + 'number_of_days' => 'int', + 'number_of_days_significance' => 'double', + 'number_of_effect_changes_for_optimal_values' => 'int', + 'number_of_high_effect_pairs' => 'int', + 'number_of_low_effect_pairs' => 'int', + 'number_of_pairs' => 'int', + 'number_of_samples' => 'int', + 'number_of_unique_cause_values_for_optimal_values' => 'int', + 'number_of_unique_effect_values_for_optimal_values' => 'int', + 'onset_delay' => 'int', + 'onset_delay_in_hours' => 'int', + 'optimal_change_spread' => 'double', + 'optimal_change_spread_significance' => 'double', + 'optimal_pearson_product' => 'double', + 'predictive_pearson_correlation_coefficient' => 'double', + 'predictor_explanation' => 'string', + 'predicts_high_effect_change' => 'double', + 'predicts_high_effect_change_sentence_fragment' => 'string', + 'predicts_low_effect_change' => 'double', + 'predicts_low_effect_change_sentence_fragment' => 'string', + 'raw_cause_measurement_significance' => 'double', + 'raw_effect_measurement_significance' => 'double', + 'share_user_measurements' => 'bool', + 'significance_explanation' => 'string', + 'significant_difference' => 'bool', + 'statistical_significance' => 'double', + 'strength_level' => 'string', + 'study_abstract' => 'string', + 'study_background' => 'string', + 'study_design' => 'string', + 'study_limitations' => 'string', + 'study_link_dynamic' => 'string', + 'study_link_email' => 'string', + 'study_link_facebook' => 'string', + 'study_link_google' => 'string', + 'study_link_static' => 'string', + 'study_link_twitter' => 'string', + 'study_objective' => 'string', + 'study_results' => 'string', + 'study_title' => 'string', + 'timestamp' => 'int', + 't_value' => 'double', + 'user_id' => 'int', + 'value_predicting_high_outcome' => 'double', + 'value_predicting_high_outcome_explanation' => 'string', + 'value_predicting_low_outcome' => 'double', + 'value_predicting_low_outcome_explanation' => 'string', + 'vote_statistical_significance' => 'double' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'all_pairs_significance' => 'double', + 'average_daily_high_cause' => 'double', + 'average_daily_low_cause' => 'double', + 'average_effect' => 'double', + 'average_effect_following_high_cause' => 'double', + 'average_effect_following_high_cause_explanation' => null, + 'average_effect_following_low_cause' => 'double', + 'average_effect_following_low_cause_explanation' => null, + 'causality_factor' => 'double', + 'cause_changes' => null, + 'cause_changes_statistical_significance' => 'double', + 'cause_data_source' => null, + 'cause_number_of_processed_daily_measurements' => null, + 'cause_number_of_raw_measurements' => null, + 'cause_value_spread' => 'double', + 'cause_variable' => null, + 'cause_variable_category_id' => null, + 'cause_variable_category_name' => null, + 'cause_variable_unit_abbreviated_name' => null, + 'cause_variable_unit_id' => null, + 'cause_variable_id' => null, + 'cause_variable_image_url' => null, + 'cause_variable_ion_icon' => null, + 'cause_variable_most_common_connector_id' => null, + 'cause_variable_name' => null, + 'charts' => null, + 'confidence_interval' => 'double', + 'confidence_level' => null, + 'correlation_coefficient' => 'double', + 'correlation_is_contradictory_to_optimal_values' => null, + 'critical_t_value' => 'double', + 'data_analysis' => null, + 'data_sources' => null, + 'data_sources_paragraph_for_cause' => null, + 'data_sources_paragraph_for_effect' => null, + 'degrees_of_freedom' => null, + 'direction' => null, + 'distance_from_middle_to_be_hight_low_effect' => null, + 'duration_of_action' => null, + 'duration_of_action_in_hours' => null, + 'effect_changes' => null, + 'effect_data_source' => null, + 'effect_number_of_processed_daily_measurements' => null, + 'effect_number_of_raw_measurements' => null, + 'effect_size' => null, + 'effect_unit' => null, + 'effect_value_spread' => 'double', + 'effect_variable' => null, + 'effect_variable_category_id' => null, + 'effect_variable_category_name' => null, + 'effect_variable_unit_abbreviated_name' => null, + 'effect_variable_unit_id' => null, + 'effect_variable_id' => null, + 'effect_variable_image_url' => null, + 'effect_variable_ion_icon' => null, + 'effect_variable_most_common_connector_id' => null, + 'effect_variable_name' => null, + 'error' => null, + 'experiment_end_time' => null, + 'experiment_start_time' => null, + 'forward_spearman_correlation_coefficient' => 'double', + 'gauge_image' => null, + 'gauge_image_square' => null, + 'image_url' => null, + 'instructions_for_cause' => null, + 'instructions_for_effect' => null, + 'maximum_cause_value' => 'double', + 'maximum_effect_value' => 'double', + 'minimum_cause_value' => 'double', + 'minimum_effect_value' => 'double', + 'minimum_probability' => 'double', + 'number_of_cause_changes_for_optimal_values' => null, + 'number_of_days' => null, + 'number_of_days_significance' => 'double', + 'number_of_effect_changes_for_optimal_values' => null, + 'number_of_high_effect_pairs' => null, + 'number_of_low_effect_pairs' => null, + 'number_of_pairs' => null, + 'number_of_samples' => null, + 'number_of_unique_cause_values_for_optimal_values' => null, + 'number_of_unique_effect_values_for_optimal_values' => null, + 'onset_delay' => null, + 'onset_delay_in_hours' => null, + 'optimal_change_spread' => 'double', + 'optimal_change_spread_significance' => 'double', + 'optimal_pearson_product' => 'double', + 'predictive_pearson_correlation_coefficient' => 'double', + 'predictor_explanation' => null, + 'predicts_high_effect_change' => 'double', + 'predicts_high_effect_change_sentence_fragment' => null, + 'predicts_low_effect_change' => 'double', + 'predicts_low_effect_change_sentence_fragment' => null, + 'raw_cause_measurement_significance' => 'double', + 'raw_effect_measurement_significance' => 'double', + 'share_user_measurements' => null, + 'significance_explanation' => null, + 'significant_difference' => null, + 'statistical_significance' => 'double', + 'strength_level' => null, + 'study_abstract' => null, + 'study_background' => null, + 'study_design' => null, + 'study_limitations' => null, + 'study_link_dynamic' => null, + 'study_link_email' => null, + 'study_link_facebook' => null, + 'study_link_google' => null, + 'study_link_static' => null, + 'study_link_twitter' => null, + 'study_objective' => null, + 'study_results' => null, + 'study_title' => null, + 'timestamp' => null, + 't_value' => 'double', + 'user_id' => null, + 'value_predicting_high_outcome' => 'double', + 'value_predicting_high_outcome_explanation' => null, + 'value_predicting_low_outcome' => 'double', + 'value_predicting_low_outcome_explanation' => null, + 'vote_statistical_significance' => 'double' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'all_pairs_significance' => 'allPairsSignificance', + 'average_daily_high_cause' => 'averageDailyHighCause', + 'average_daily_low_cause' => 'averageDailyLowCause', + 'average_effect' => 'averageEffect', + 'average_effect_following_high_cause' => 'averageEffectFollowingHighCause', + 'average_effect_following_high_cause_explanation' => 'averageEffectFollowingHighCauseExplanation', + 'average_effect_following_low_cause' => 'averageEffectFollowingLowCause', + 'average_effect_following_low_cause_explanation' => 'averageEffectFollowingLowCauseExplanation', + 'causality_factor' => 'causalityFactor', + 'cause_changes' => 'causeChanges', + 'cause_changes_statistical_significance' => 'causeChangesStatisticalSignificance', + 'cause_data_source' => 'causeDataSource', + 'cause_number_of_processed_daily_measurements' => 'causeNumberOfProcessedDailyMeasurements', + 'cause_number_of_raw_measurements' => 'causeNumberOfRawMeasurements', + 'cause_value_spread' => 'causeValueSpread', + 'cause_variable' => 'causeVariable', + 'cause_variable_category_id' => 'causeVariableCategoryId', + 'cause_variable_category_name' => 'causeVariableCategoryName', + 'cause_variable_unit_abbreviated_name' => 'causeVariableUnitAbbreviatedName', + 'cause_variable_unit_id' => 'causeVariableUnitId', + 'cause_variable_id' => 'causeVariableId', + 'cause_variable_image_url' => 'causeVariableImageUrl', + 'cause_variable_ion_icon' => 'causeVariableIonIcon', + 'cause_variable_most_common_connector_id' => 'causeVariableMostCommonConnectorId', + 'cause_variable_name' => 'causeVariableName', + 'charts' => 'charts', + 'confidence_interval' => 'confidenceInterval', + 'confidence_level' => 'confidenceLevel', + 'correlation_coefficient' => 'correlationCoefficient', + 'correlation_is_contradictory_to_optimal_values' => 'correlationIsContradictoryToOptimalValues', + 'critical_t_value' => 'criticalTValue', + 'data_analysis' => 'dataAnalysis', + 'data_sources' => 'dataSources', + 'data_sources_paragraph_for_cause' => 'dataSourcesParagraphForCause', + 'data_sources_paragraph_for_effect' => 'dataSourcesParagraphForEffect', + 'degrees_of_freedom' => 'degreesOfFreedom', + 'direction' => 'direction', + 'distance_from_middle_to_be_hight_low_effect' => 'distanceFromMiddleToBeHightLowEffect', + 'duration_of_action' => 'durationOfAction', + 'duration_of_action_in_hours' => 'durationOfActionInHours', + 'effect_changes' => 'effectChanges', + 'effect_data_source' => 'effectDataSource', + 'effect_number_of_processed_daily_measurements' => 'effectNumberOfProcessedDailyMeasurements', + 'effect_number_of_raw_measurements' => 'effectNumberOfRawMeasurements', + 'effect_size' => 'effectSize', + 'effect_unit' => 'effectUnit', + 'effect_value_spread' => 'effectValueSpread', + 'effect_variable' => 'effectVariable', + 'effect_variable_category_id' => 'effectVariableCategoryId', + 'effect_variable_category_name' => 'effectVariableCategoryName', + 'effect_variable_unit_abbreviated_name' => 'effectVariableUnitAbbreviatedName', + 'effect_variable_unit_id' => 'effectVariableUnitId', + 'effect_variable_id' => 'effectVariableId', + 'effect_variable_image_url' => 'effectVariableImageUrl', + 'effect_variable_ion_icon' => 'effectVariableIonIcon', + 'effect_variable_most_common_connector_id' => 'effectVariableMostCommonConnectorId', + 'effect_variable_name' => 'effectVariableName', + 'error' => 'error', + 'experiment_end_time' => 'experimentEndTime', + 'experiment_start_time' => 'experimentStartTime', + 'forward_spearman_correlation_coefficient' => 'forwardSpearmanCorrelationCoefficient', + 'gauge_image' => 'gaugeImage', + 'gauge_image_square' => 'gaugeImageSquare', + 'image_url' => 'imageUrl', + 'instructions_for_cause' => 'instructionsForCause', + 'instructions_for_effect' => 'instructionsForEffect', + 'maximum_cause_value' => 'maximumCauseValue', + 'maximum_effect_value' => 'maximumEffectValue', + 'minimum_cause_value' => 'minimumCauseValue', + 'minimum_effect_value' => 'minimumEffectValue', + 'minimum_probability' => 'minimumProbability', + 'number_of_cause_changes_for_optimal_values' => 'numberOfCauseChangesForOptimalValues', + 'number_of_days' => 'numberOfDays', + 'number_of_days_significance' => 'numberOfDaysSignificance', + 'number_of_effect_changes_for_optimal_values' => 'numberOfEffectChangesForOptimalValues', + 'number_of_high_effect_pairs' => 'numberOfHighEffectPairs', + 'number_of_low_effect_pairs' => 'numberOfLowEffectPairs', + 'number_of_pairs' => 'numberOfPairs', + 'number_of_samples' => 'numberOfSamples', + 'number_of_unique_cause_values_for_optimal_values' => 'numberOfUniqueCauseValuesForOptimalValues', + 'number_of_unique_effect_values_for_optimal_values' => 'numberOfUniqueEffectValuesForOptimalValues', + 'onset_delay' => 'onsetDelay', + 'onset_delay_in_hours' => 'onsetDelayInHours', + 'optimal_change_spread' => 'optimalChangeSpread', + 'optimal_change_spread_significance' => 'optimalChangeSpreadSignificance', + 'optimal_pearson_product' => 'optimalPearsonProduct', + 'predictive_pearson_correlation_coefficient' => 'predictivePearsonCorrelationCoefficient', + 'predictor_explanation' => 'predictorExplanation', + 'predicts_high_effect_change' => 'predictsHighEffectChange', + 'predicts_high_effect_change_sentence_fragment' => 'predictsHighEffectChangeSentenceFragment', + 'predicts_low_effect_change' => 'predictsLowEffectChange', + 'predicts_low_effect_change_sentence_fragment' => 'predictsLowEffectChangeSentenceFragment', + 'raw_cause_measurement_significance' => 'rawCauseMeasurementSignificance', + 'raw_effect_measurement_significance' => 'rawEffectMeasurementSignificance', + 'share_user_measurements' => 'shareUserMeasurements', + 'significance_explanation' => 'significanceExplanation', + 'significant_difference' => 'significantDifference', + 'statistical_significance' => 'statisticalSignificance', + 'strength_level' => 'strengthLevel', + 'study_abstract' => 'studyAbstract', + 'study_background' => 'studyBackground', + 'study_design' => 'studyDesign', + 'study_limitations' => 'studyLimitations', + 'study_link_dynamic' => 'studyLinkDynamic', + 'study_link_email' => 'studyLinkEmail', + 'study_link_facebook' => 'studyLinkFacebook', + 'study_link_google' => 'studyLinkGoogle', + 'study_link_static' => 'studyLinkStatic', + 'study_link_twitter' => 'studyLinkTwitter', + 'study_objective' => 'studyObjective', + 'study_results' => 'studyResults', + 'study_title' => 'studyTitle', + 'timestamp' => 'timestamp', + 't_value' => 'tValue', + 'user_id' => 'userId', + 'value_predicting_high_outcome' => 'valuePredictingHighOutcome', + 'value_predicting_high_outcome_explanation' => 'valuePredictingHighOutcomeExplanation', + 'value_predicting_low_outcome' => 'valuePredictingLowOutcome', + 'value_predicting_low_outcome_explanation' => 'valuePredictingLowOutcomeExplanation', + 'vote_statistical_significance' => 'voteStatisticalSignificance' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'all_pairs_significance' => 'setAllPairsSignificance', + 'average_daily_high_cause' => 'setAverageDailyHighCause', + 'average_daily_low_cause' => 'setAverageDailyLowCause', + 'average_effect' => 'setAverageEffect', + 'average_effect_following_high_cause' => 'setAverageEffectFollowingHighCause', + 'average_effect_following_high_cause_explanation' => 'setAverageEffectFollowingHighCauseExplanation', + 'average_effect_following_low_cause' => 'setAverageEffectFollowingLowCause', + 'average_effect_following_low_cause_explanation' => 'setAverageEffectFollowingLowCauseExplanation', + 'causality_factor' => 'setCausalityFactor', + 'cause_changes' => 'setCauseChanges', + 'cause_changes_statistical_significance' => 'setCauseChangesStatisticalSignificance', + 'cause_data_source' => 'setCauseDataSource', + 'cause_number_of_processed_daily_measurements' => 'setCauseNumberOfProcessedDailyMeasurements', + 'cause_number_of_raw_measurements' => 'setCauseNumberOfRawMeasurements', + 'cause_value_spread' => 'setCauseValueSpread', + 'cause_variable' => 'setCauseVariable', + 'cause_variable_category_id' => 'setCauseVariableCategoryId', + 'cause_variable_category_name' => 'setCauseVariableCategoryName', + 'cause_variable_unit_abbreviated_name' => 'setCauseVariableUnitAbbreviatedName', + 'cause_variable_unit_id' => 'setCauseVariableUnitId', + 'cause_variable_id' => 'setCauseVariableId', + 'cause_variable_image_url' => 'setCauseVariableImageUrl', + 'cause_variable_ion_icon' => 'setCauseVariableIonIcon', + 'cause_variable_most_common_connector_id' => 'setCauseVariableMostCommonConnectorId', + 'cause_variable_name' => 'setCauseVariableName', + 'charts' => 'setCharts', + 'confidence_interval' => 'setConfidenceInterval', + 'confidence_level' => 'setConfidenceLevel', + 'correlation_coefficient' => 'setCorrelationCoefficient', + 'correlation_is_contradictory_to_optimal_values' => 'setCorrelationIsContradictoryToOptimalValues', + 'critical_t_value' => 'setCriticalTValue', + 'data_analysis' => 'setDataAnalysis', + 'data_sources' => 'setDataSources', + 'data_sources_paragraph_for_cause' => 'setDataSourcesParagraphForCause', + 'data_sources_paragraph_for_effect' => 'setDataSourcesParagraphForEffect', + 'degrees_of_freedom' => 'setDegreesOfFreedom', + 'direction' => 'setDirection', + 'distance_from_middle_to_be_hight_low_effect' => 'setDistanceFromMiddleToBeHightLowEffect', + 'duration_of_action' => 'setDurationOfAction', + 'duration_of_action_in_hours' => 'setDurationOfActionInHours', + 'effect_changes' => 'setEffectChanges', + 'effect_data_source' => 'setEffectDataSource', + 'effect_number_of_processed_daily_measurements' => 'setEffectNumberOfProcessedDailyMeasurements', + 'effect_number_of_raw_measurements' => 'setEffectNumberOfRawMeasurements', + 'effect_size' => 'setEffectSize', + 'effect_unit' => 'setEffectUnit', + 'effect_value_spread' => 'setEffectValueSpread', + 'effect_variable' => 'setEffectVariable', + 'effect_variable_category_id' => 'setEffectVariableCategoryId', + 'effect_variable_category_name' => 'setEffectVariableCategoryName', + 'effect_variable_unit_abbreviated_name' => 'setEffectVariableUnitAbbreviatedName', + 'effect_variable_unit_id' => 'setEffectVariableUnitId', + 'effect_variable_id' => 'setEffectVariableId', + 'effect_variable_image_url' => 'setEffectVariableImageUrl', + 'effect_variable_ion_icon' => 'setEffectVariableIonIcon', + 'effect_variable_most_common_connector_id' => 'setEffectVariableMostCommonConnectorId', + 'effect_variable_name' => 'setEffectVariableName', + 'error' => 'setError', + 'experiment_end_time' => 'setExperimentEndTime', + 'experiment_start_time' => 'setExperimentStartTime', + 'forward_spearman_correlation_coefficient' => 'setForwardSpearmanCorrelationCoefficient', + 'gauge_image' => 'setGaugeImage', + 'gauge_image_square' => 'setGaugeImageSquare', + 'image_url' => 'setImageUrl', + 'instructions_for_cause' => 'setInstructionsForCause', + 'instructions_for_effect' => 'setInstructionsForEffect', + 'maximum_cause_value' => 'setMaximumCauseValue', + 'maximum_effect_value' => 'setMaximumEffectValue', + 'minimum_cause_value' => 'setMinimumCauseValue', + 'minimum_effect_value' => 'setMinimumEffectValue', + 'minimum_probability' => 'setMinimumProbability', + 'number_of_cause_changes_for_optimal_values' => 'setNumberOfCauseChangesForOptimalValues', + 'number_of_days' => 'setNumberOfDays', + 'number_of_days_significance' => 'setNumberOfDaysSignificance', + 'number_of_effect_changes_for_optimal_values' => 'setNumberOfEffectChangesForOptimalValues', + 'number_of_high_effect_pairs' => 'setNumberOfHighEffectPairs', + 'number_of_low_effect_pairs' => 'setNumberOfLowEffectPairs', + 'number_of_pairs' => 'setNumberOfPairs', + 'number_of_samples' => 'setNumberOfSamples', + 'number_of_unique_cause_values_for_optimal_values' => 'setNumberOfUniqueCauseValuesForOptimalValues', + 'number_of_unique_effect_values_for_optimal_values' => 'setNumberOfUniqueEffectValuesForOptimalValues', + 'onset_delay' => 'setOnsetDelay', + 'onset_delay_in_hours' => 'setOnsetDelayInHours', + 'optimal_change_spread' => 'setOptimalChangeSpread', + 'optimal_change_spread_significance' => 'setOptimalChangeSpreadSignificance', + 'optimal_pearson_product' => 'setOptimalPearsonProduct', + 'predictive_pearson_correlation_coefficient' => 'setPredictivePearsonCorrelationCoefficient', + 'predictor_explanation' => 'setPredictorExplanation', + 'predicts_high_effect_change' => 'setPredictsHighEffectChange', + 'predicts_high_effect_change_sentence_fragment' => 'setPredictsHighEffectChangeSentenceFragment', + 'predicts_low_effect_change' => 'setPredictsLowEffectChange', + 'predicts_low_effect_change_sentence_fragment' => 'setPredictsLowEffectChangeSentenceFragment', + 'raw_cause_measurement_significance' => 'setRawCauseMeasurementSignificance', + 'raw_effect_measurement_significance' => 'setRawEffectMeasurementSignificance', + 'share_user_measurements' => 'setShareUserMeasurements', + 'significance_explanation' => 'setSignificanceExplanation', + 'significant_difference' => 'setSignificantDifference', + 'statistical_significance' => 'setStatisticalSignificance', + 'strength_level' => 'setStrengthLevel', + 'study_abstract' => 'setStudyAbstract', + 'study_background' => 'setStudyBackground', + 'study_design' => 'setStudyDesign', + 'study_limitations' => 'setStudyLimitations', + 'study_link_dynamic' => 'setStudyLinkDynamic', + 'study_link_email' => 'setStudyLinkEmail', + 'study_link_facebook' => 'setStudyLinkFacebook', + 'study_link_google' => 'setStudyLinkGoogle', + 'study_link_static' => 'setStudyLinkStatic', + 'study_link_twitter' => 'setStudyLinkTwitter', + 'study_objective' => 'setStudyObjective', + 'study_results' => 'setStudyResults', + 'study_title' => 'setStudyTitle', + 'timestamp' => 'setTimestamp', + 't_value' => 'setTValue', + 'user_id' => 'setUserId', + 'value_predicting_high_outcome' => 'setValuePredictingHighOutcome', + 'value_predicting_high_outcome_explanation' => 'setValuePredictingHighOutcomeExplanation', + 'value_predicting_low_outcome' => 'setValuePredictingLowOutcome', + 'value_predicting_low_outcome_explanation' => 'setValuePredictingLowOutcomeExplanation', + 'vote_statistical_significance' => 'setVoteStatisticalSignificance' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'all_pairs_significance' => 'getAllPairsSignificance', + 'average_daily_high_cause' => 'getAverageDailyHighCause', + 'average_daily_low_cause' => 'getAverageDailyLowCause', + 'average_effect' => 'getAverageEffect', + 'average_effect_following_high_cause' => 'getAverageEffectFollowingHighCause', + 'average_effect_following_high_cause_explanation' => 'getAverageEffectFollowingHighCauseExplanation', + 'average_effect_following_low_cause' => 'getAverageEffectFollowingLowCause', + 'average_effect_following_low_cause_explanation' => 'getAverageEffectFollowingLowCauseExplanation', + 'causality_factor' => 'getCausalityFactor', + 'cause_changes' => 'getCauseChanges', + 'cause_changes_statistical_significance' => 'getCauseChangesStatisticalSignificance', + 'cause_data_source' => 'getCauseDataSource', + 'cause_number_of_processed_daily_measurements' => 'getCauseNumberOfProcessedDailyMeasurements', + 'cause_number_of_raw_measurements' => 'getCauseNumberOfRawMeasurements', + 'cause_value_spread' => 'getCauseValueSpread', + 'cause_variable' => 'getCauseVariable', + 'cause_variable_category_id' => 'getCauseVariableCategoryId', + 'cause_variable_category_name' => 'getCauseVariableCategoryName', + 'cause_variable_unit_abbreviated_name' => 'getCauseVariableUnitAbbreviatedName', + 'cause_variable_unit_id' => 'getCauseVariableUnitId', + 'cause_variable_id' => 'getCauseVariableId', + 'cause_variable_image_url' => 'getCauseVariableImageUrl', + 'cause_variable_ion_icon' => 'getCauseVariableIonIcon', + 'cause_variable_most_common_connector_id' => 'getCauseVariableMostCommonConnectorId', + 'cause_variable_name' => 'getCauseVariableName', + 'charts' => 'getCharts', + 'confidence_interval' => 'getConfidenceInterval', + 'confidence_level' => 'getConfidenceLevel', + 'correlation_coefficient' => 'getCorrelationCoefficient', + 'correlation_is_contradictory_to_optimal_values' => 'getCorrelationIsContradictoryToOptimalValues', + 'critical_t_value' => 'getCriticalTValue', + 'data_analysis' => 'getDataAnalysis', + 'data_sources' => 'getDataSources', + 'data_sources_paragraph_for_cause' => 'getDataSourcesParagraphForCause', + 'data_sources_paragraph_for_effect' => 'getDataSourcesParagraphForEffect', + 'degrees_of_freedom' => 'getDegreesOfFreedom', + 'direction' => 'getDirection', + 'distance_from_middle_to_be_hight_low_effect' => 'getDistanceFromMiddleToBeHightLowEffect', + 'duration_of_action' => 'getDurationOfAction', + 'duration_of_action_in_hours' => 'getDurationOfActionInHours', + 'effect_changes' => 'getEffectChanges', + 'effect_data_source' => 'getEffectDataSource', + 'effect_number_of_processed_daily_measurements' => 'getEffectNumberOfProcessedDailyMeasurements', + 'effect_number_of_raw_measurements' => 'getEffectNumberOfRawMeasurements', + 'effect_size' => 'getEffectSize', + 'effect_unit' => 'getEffectUnit', + 'effect_value_spread' => 'getEffectValueSpread', + 'effect_variable' => 'getEffectVariable', + 'effect_variable_category_id' => 'getEffectVariableCategoryId', + 'effect_variable_category_name' => 'getEffectVariableCategoryName', + 'effect_variable_unit_abbreviated_name' => 'getEffectVariableUnitAbbreviatedName', + 'effect_variable_unit_id' => 'getEffectVariableUnitId', + 'effect_variable_id' => 'getEffectVariableId', + 'effect_variable_image_url' => 'getEffectVariableImageUrl', + 'effect_variable_ion_icon' => 'getEffectVariableIonIcon', + 'effect_variable_most_common_connector_id' => 'getEffectVariableMostCommonConnectorId', + 'effect_variable_name' => 'getEffectVariableName', + 'error' => 'getError', + 'experiment_end_time' => 'getExperimentEndTime', + 'experiment_start_time' => 'getExperimentStartTime', + 'forward_spearman_correlation_coefficient' => 'getForwardSpearmanCorrelationCoefficient', + 'gauge_image' => 'getGaugeImage', + 'gauge_image_square' => 'getGaugeImageSquare', + 'image_url' => 'getImageUrl', + 'instructions_for_cause' => 'getInstructionsForCause', + 'instructions_for_effect' => 'getInstructionsForEffect', + 'maximum_cause_value' => 'getMaximumCauseValue', + 'maximum_effect_value' => 'getMaximumEffectValue', + 'minimum_cause_value' => 'getMinimumCauseValue', + 'minimum_effect_value' => 'getMinimumEffectValue', + 'minimum_probability' => 'getMinimumProbability', + 'number_of_cause_changes_for_optimal_values' => 'getNumberOfCauseChangesForOptimalValues', + 'number_of_days' => 'getNumberOfDays', + 'number_of_days_significance' => 'getNumberOfDaysSignificance', + 'number_of_effect_changes_for_optimal_values' => 'getNumberOfEffectChangesForOptimalValues', + 'number_of_high_effect_pairs' => 'getNumberOfHighEffectPairs', + 'number_of_low_effect_pairs' => 'getNumberOfLowEffectPairs', + 'number_of_pairs' => 'getNumberOfPairs', + 'number_of_samples' => 'getNumberOfSamples', + 'number_of_unique_cause_values_for_optimal_values' => 'getNumberOfUniqueCauseValuesForOptimalValues', + 'number_of_unique_effect_values_for_optimal_values' => 'getNumberOfUniqueEffectValuesForOptimalValues', + 'onset_delay' => 'getOnsetDelay', + 'onset_delay_in_hours' => 'getOnsetDelayInHours', + 'optimal_change_spread' => 'getOptimalChangeSpread', + 'optimal_change_spread_significance' => 'getOptimalChangeSpreadSignificance', + 'optimal_pearson_product' => 'getOptimalPearsonProduct', + 'predictive_pearson_correlation_coefficient' => 'getPredictivePearsonCorrelationCoefficient', + 'predictor_explanation' => 'getPredictorExplanation', + 'predicts_high_effect_change' => 'getPredictsHighEffectChange', + 'predicts_high_effect_change_sentence_fragment' => 'getPredictsHighEffectChangeSentenceFragment', + 'predicts_low_effect_change' => 'getPredictsLowEffectChange', + 'predicts_low_effect_change_sentence_fragment' => 'getPredictsLowEffectChangeSentenceFragment', + 'raw_cause_measurement_significance' => 'getRawCauseMeasurementSignificance', + 'raw_effect_measurement_significance' => 'getRawEffectMeasurementSignificance', + 'share_user_measurements' => 'getShareUserMeasurements', + 'significance_explanation' => 'getSignificanceExplanation', + 'significant_difference' => 'getSignificantDifference', + 'statistical_significance' => 'getStatisticalSignificance', + 'strength_level' => 'getStrengthLevel', + 'study_abstract' => 'getStudyAbstract', + 'study_background' => 'getStudyBackground', + 'study_design' => 'getStudyDesign', + 'study_limitations' => 'getStudyLimitations', + 'study_link_dynamic' => 'getStudyLinkDynamic', + 'study_link_email' => 'getStudyLinkEmail', + 'study_link_facebook' => 'getStudyLinkFacebook', + 'study_link_google' => 'getStudyLinkGoogle', + 'study_link_static' => 'getStudyLinkStatic', + 'study_link_twitter' => 'getStudyLinkTwitter', + 'study_objective' => 'getStudyObjective', + 'study_results' => 'getStudyResults', + 'study_title' => 'getStudyTitle', + 'timestamp' => 'getTimestamp', + 't_value' => 'getTValue', + 'user_id' => 'getUserId', + 'value_predicting_high_outcome' => 'getValuePredictingHighOutcome', + 'value_predicting_high_outcome_explanation' => 'getValuePredictingHighOutcomeExplanation', + 'value_predicting_low_outcome' => 'getValuePredictingLowOutcome', + 'value_predicting_low_outcome_explanation' => 'getValuePredictingLowOutcomeExplanation', + 'vote_statistical_significance' => 'getVoteStatisticalSignificance' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['all_pairs_significance'] = isset($data['all_pairs_significance']) ? $data['all_pairs_significance'] : null; + $this->container['average_daily_high_cause'] = isset($data['average_daily_high_cause']) ? $data['average_daily_high_cause'] : null; + $this->container['average_daily_low_cause'] = isset($data['average_daily_low_cause']) ? $data['average_daily_low_cause'] : null; + $this->container['average_effect'] = isset($data['average_effect']) ? $data['average_effect'] : null; + $this->container['average_effect_following_high_cause'] = isset($data['average_effect_following_high_cause']) ? $data['average_effect_following_high_cause'] : null; + $this->container['average_effect_following_high_cause_explanation'] = isset($data['average_effect_following_high_cause_explanation']) ? $data['average_effect_following_high_cause_explanation'] : null; + $this->container['average_effect_following_low_cause'] = isset($data['average_effect_following_low_cause']) ? $data['average_effect_following_low_cause'] : null; + $this->container['average_effect_following_low_cause_explanation'] = isset($data['average_effect_following_low_cause_explanation']) ? $data['average_effect_following_low_cause_explanation'] : null; + $this->container['causality_factor'] = isset($data['causality_factor']) ? $data['causality_factor'] : null; + $this->container['cause_changes'] = isset($data['cause_changes']) ? $data['cause_changes'] : null; + $this->container['cause_changes_statistical_significance'] = isset($data['cause_changes_statistical_significance']) ? $data['cause_changes_statistical_significance'] : null; + $this->container['cause_data_source'] = isset($data['cause_data_source']) ? $data['cause_data_source'] : null; + $this->container['cause_number_of_processed_daily_measurements'] = isset($data['cause_number_of_processed_daily_measurements']) ? $data['cause_number_of_processed_daily_measurements'] : null; + $this->container['cause_number_of_raw_measurements'] = isset($data['cause_number_of_raw_measurements']) ? $data['cause_number_of_raw_measurements'] : null; + $this->container['cause_value_spread'] = isset($data['cause_value_spread']) ? $data['cause_value_spread'] : null; + $this->container['cause_variable'] = isset($data['cause_variable']) ? $data['cause_variable'] : null; + $this->container['cause_variable_category_id'] = isset($data['cause_variable_category_id']) ? $data['cause_variable_category_id'] : null; + $this->container['cause_variable_category_name'] = isset($data['cause_variable_category_name']) ? $data['cause_variable_category_name'] : null; + $this->container['cause_variable_unit_abbreviated_name'] = isset($data['cause_variable_unit_abbreviated_name']) ? $data['cause_variable_unit_abbreviated_name'] : null; + $this->container['cause_variable_unit_id'] = isset($data['cause_variable_unit_id']) ? $data['cause_variable_unit_id'] : null; + $this->container['cause_variable_id'] = isset($data['cause_variable_id']) ? $data['cause_variable_id'] : null; + $this->container['cause_variable_image_url'] = isset($data['cause_variable_image_url']) ? $data['cause_variable_image_url'] : null; + $this->container['cause_variable_ion_icon'] = isset($data['cause_variable_ion_icon']) ? $data['cause_variable_ion_icon'] : null; + $this->container['cause_variable_most_common_connector_id'] = isset($data['cause_variable_most_common_connector_id']) ? $data['cause_variable_most_common_connector_id'] : null; + $this->container['cause_variable_name'] = isset($data['cause_variable_name']) ? $data['cause_variable_name'] : null; + $this->container['charts'] = isset($data['charts']) ? $data['charts'] : null; + $this->container['confidence_interval'] = isset($data['confidence_interval']) ? $data['confidence_interval'] : null; + $this->container['confidence_level'] = isset($data['confidence_level']) ? $data['confidence_level'] : null; + $this->container['correlation_coefficient'] = isset($data['correlation_coefficient']) ? $data['correlation_coefficient'] : null; + $this->container['correlation_is_contradictory_to_optimal_values'] = isset($data['correlation_is_contradictory_to_optimal_values']) ? $data['correlation_is_contradictory_to_optimal_values'] : null; + $this->container['critical_t_value'] = isset($data['critical_t_value']) ? $data['critical_t_value'] : null; + $this->container['data_analysis'] = isset($data['data_analysis']) ? $data['data_analysis'] : null; + $this->container['data_sources'] = isset($data['data_sources']) ? $data['data_sources'] : null; + $this->container['data_sources_paragraph_for_cause'] = isset($data['data_sources_paragraph_for_cause']) ? $data['data_sources_paragraph_for_cause'] : null; + $this->container['data_sources_paragraph_for_effect'] = isset($data['data_sources_paragraph_for_effect']) ? $data['data_sources_paragraph_for_effect'] : null; + $this->container['degrees_of_freedom'] = isset($data['degrees_of_freedom']) ? $data['degrees_of_freedom'] : null; + $this->container['direction'] = isset($data['direction']) ? $data['direction'] : null; + $this->container['distance_from_middle_to_be_hight_low_effect'] = isset($data['distance_from_middle_to_be_hight_low_effect']) ? $data['distance_from_middle_to_be_hight_low_effect'] : null; + $this->container['duration_of_action'] = isset($data['duration_of_action']) ? $data['duration_of_action'] : null; + $this->container['duration_of_action_in_hours'] = isset($data['duration_of_action_in_hours']) ? $data['duration_of_action_in_hours'] : null; + $this->container['effect_changes'] = isset($data['effect_changes']) ? $data['effect_changes'] : null; + $this->container['effect_data_source'] = isset($data['effect_data_source']) ? $data['effect_data_source'] : null; + $this->container['effect_number_of_processed_daily_measurements'] = isset($data['effect_number_of_processed_daily_measurements']) ? $data['effect_number_of_processed_daily_measurements'] : null; + $this->container['effect_number_of_raw_measurements'] = isset($data['effect_number_of_raw_measurements']) ? $data['effect_number_of_raw_measurements'] : null; + $this->container['effect_size'] = isset($data['effect_size']) ? $data['effect_size'] : null; + $this->container['effect_unit'] = isset($data['effect_unit']) ? $data['effect_unit'] : null; + $this->container['effect_value_spread'] = isset($data['effect_value_spread']) ? $data['effect_value_spread'] : null; + $this->container['effect_variable'] = isset($data['effect_variable']) ? $data['effect_variable'] : null; + $this->container['effect_variable_category_id'] = isset($data['effect_variable_category_id']) ? $data['effect_variable_category_id'] : null; + $this->container['effect_variable_category_name'] = isset($data['effect_variable_category_name']) ? $data['effect_variable_category_name'] : null; + $this->container['effect_variable_unit_abbreviated_name'] = isset($data['effect_variable_unit_abbreviated_name']) ? $data['effect_variable_unit_abbreviated_name'] : null; + $this->container['effect_variable_unit_id'] = isset($data['effect_variable_unit_id']) ? $data['effect_variable_unit_id'] : null; + $this->container['effect_variable_id'] = isset($data['effect_variable_id']) ? $data['effect_variable_id'] : null; + $this->container['effect_variable_image_url'] = isset($data['effect_variable_image_url']) ? $data['effect_variable_image_url'] : null; + $this->container['effect_variable_ion_icon'] = isset($data['effect_variable_ion_icon']) ? $data['effect_variable_ion_icon'] : null; + $this->container['effect_variable_most_common_connector_id'] = isset($data['effect_variable_most_common_connector_id']) ? $data['effect_variable_most_common_connector_id'] : null; + $this->container['effect_variable_name'] = isset($data['effect_variable_name']) ? $data['effect_variable_name'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + $this->container['experiment_end_time'] = isset($data['experiment_end_time']) ? $data['experiment_end_time'] : null; + $this->container['experiment_start_time'] = isset($data['experiment_start_time']) ? $data['experiment_start_time'] : null; + $this->container['forward_spearman_correlation_coefficient'] = isset($data['forward_spearman_correlation_coefficient']) ? $data['forward_spearman_correlation_coefficient'] : null; + $this->container['gauge_image'] = isset($data['gauge_image']) ? $data['gauge_image'] : null; + $this->container['gauge_image_square'] = isset($data['gauge_image_square']) ? $data['gauge_image_square'] : null; + $this->container['image_url'] = isset($data['image_url']) ? $data['image_url'] : null; + $this->container['instructions_for_cause'] = isset($data['instructions_for_cause']) ? $data['instructions_for_cause'] : null; + $this->container['instructions_for_effect'] = isset($data['instructions_for_effect']) ? $data['instructions_for_effect'] : null; + $this->container['maximum_cause_value'] = isset($data['maximum_cause_value']) ? $data['maximum_cause_value'] : null; + $this->container['maximum_effect_value'] = isset($data['maximum_effect_value']) ? $data['maximum_effect_value'] : null; + $this->container['minimum_cause_value'] = isset($data['minimum_cause_value']) ? $data['minimum_cause_value'] : null; + $this->container['minimum_effect_value'] = isset($data['minimum_effect_value']) ? $data['minimum_effect_value'] : null; + $this->container['minimum_probability'] = isset($data['minimum_probability']) ? $data['minimum_probability'] : null; + $this->container['number_of_cause_changes_for_optimal_values'] = isset($data['number_of_cause_changes_for_optimal_values']) ? $data['number_of_cause_changes_for_optimal_values'] : null; + $this->container['number_of_days'] = isset($data['number_of_days']) ? $data['number_of_days'] : null; + $this->container['number_of_days_significance'] = isset($data['number_of_days_significance']) ? $data['number_of_days_significance'] : null; + $this->container['number_of_effect_changes_for_optimal_values'] = isset($data['number_of_effect_changes_for_optimal_values']) ? $data['number_of_effect_changes_for_optimal_values'] : null; + $this->container['number_of_high_effect_pairs'] = isset($data['number_of_high_effect_pairs']) ? $data['number_of_high_effect_pairs'] : null; + $this->container['number_of_low_effect_pairs'] = isset($data['number_of_low_effect_pairs']) ? $data['number_of_low_effect_pairs'] : null; + $this->container['number_of_pairs'] = isset($data['number_of_pairs']) ? $data['number_of_pairs'] : null; + $this->container['number_of_samples'] = isset($data['number_of_samples']) ? $data['number_of_samples'] : null; + $this->container['number_of_unique_cause_values_for_optimal_values'] = isset($data['number_of_unique_cause_values_for_optimal_values']) ? $data['number_of_unique_cause_values_for_optimal_values'] : null; + $this->container['number_of_unique_effect_values_for_optimal_values'] = isset($data['number_of_unique_effect_values_for_optimal_values']) ? $data['number_of_unique_effect_values_for_optimal_values'] : null; + $this->container['onset_delay'] = isset($data['onset_delay']) ? $data['onset_delay'] : null; + $this->container['onset_delay_in_hours'] = isset($data['onset_delay_in_hours']) ? $data['onset_delay_in_hours'] : null; + $this->container['optimal_change_spread'] = isset($data['optimal_change_spread']) ? $data['optimal_change_spread'] : null; + $this->container['optimal_change_spread_significance'] = isset($data['optimal_change_spread_significance']) ? $data['optimal_change_spread_significance'] : null; + $this->container['optimal_pearson_product'] = isset($data['optimal_pearson_product']) ? $data['optimal_pearson_product'] : null; + $this->container['predictive_pearson_correlation_coefficient'] = isset($data['predictive_pearson_correlation_coefficient']) ? $data['predictive_pearson_correlation_coefficient'] : null; + $this->container['predictor_explanation'] = isset($data['predictor_explanation']) ? $data['predictor_explanation'] : null; + $this->container['predicts_high_effect_change'] = isset($data['predicts_high_effect_change']) ? $data['predicts_high_effect_change'] : null; + $this->container['predicts_high_effect_change_sentence_fragment'] = isset($data['predicts_high_effect_change_sentence_fragment']) ? $data['predicts_high_effect_change_sentence_fragment'] : null; + $this->container['predicts_low_effect_change'] = isset($data['predicts_low_effect_change']) ? $data['predicts_low_effect_change'] : null; + $this->container['predicts_low_effect_change_sentence_fragment'] = isset($data['predicts_low_effect_change_sentence_fragment']) ? $data['predicts_low_effect_change_sentence_fragment'] : null; + $this->container['raw_cause_measurement_significance'] = isset($data['raw_cause_measurement_significance']) ? $data['raw_cause_measurement_significance'] : null; + $this->container['raw_effect_measurement_significance'] = isset($data['raw_effect_measurement_significance']) ? $data['raw_effect_measurement_significance'] : null; + $this->container['share_user_measurements'] = isset($data['share_user_measurements']) ? $data['share_user_measurements'] : null; + $this->container['significance_explanation'] = isset($data['significance_explanation']) ? $data['significance_explanation'] : null; + $this->container['significant_difference'] = isset($data['significant_difference']) ? $data['significant_difference'] : null; + $this->container['statistical_significance'] = isset($data['statistical_significance']) ? $data['statistical_significance'] : null; + $this->container['strength_level'] = isset($data['strength_level']) ? $data['strength_level'] : null; + $this->container['study_abstract'] = isset($data['study_abstract']) ? $data['study_abstract'] : null; + $this->container['study_background'] = isset($data['study_background']) ? $data['study_background'] : null; + $this->container['study_design'] = isset($data['study_design']) ? $data['study_design'] : null; + $this->container['study_limitations'] = isset($data['study_limitations']) ? $data['study_limitations'] : null; + $this->container['study_link_dynamic'] = isset($data['study_link_dynamic']) ? $data['study_link_dynamic'] : null; + $this->container['study_link_email'] = isset($data['study_link_email']) ? $data['study_link_email'] : null; + $this->container['study_link_facebook'] = isset($data['study_link_facebook']) ? $data['study_link_facebook'] : null; + $this->container['study_link_google'] = isset($data['study_link_google']) ? $data['study_link_google'] : null; + $this->container['study_link_static'] = isset($data['study_link_static']) ? $data['study_link_static'] : null; + $this->container['study_link_twitter'] = isset($data['study_link_twitter']) ? $data['study_link_twitter'] : null; + $this->container['study_objective'] = isset($data['study_objective']) ? $data['study_objective'] : null; + $this->container['study_results'] = isset($data['study_results']) ? $data['study_results'] : null; + $this->container['study_title'] = isset($data['study_title']) ? $data['study_title'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['t_value'] = isset($data['t_value']) ? $data['t_value'] : null; + $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; + $this->container['value_predicting_high_outcome'] = isset($data['value_predicting_high_outcome']) ? $data['value_predicting_high_outcome'] : null; + $this->container['value_predicting_high_outcome_explanation'] = isset($data['value_predicting_high_outcome_explanation']) ? $data['value_predicting_high_outcome_explanation'] : null; + $this->container['value_predicting_low_outcome'] = isset($data['value_predicting_low_outcome']) ? $data['value_predicting_low_outcome'] : null; + $this->container['value_predicting_low_outcome_explanation'] = isset($data['value_predicting_low_outcome_explanation']) ? $data['value_predicting_low_outcome_explanation'] : null; + $this->container['vote_statistical_significance'] = isset($data['vote_statistical_significance']) ? $data['vote_statistical_significance'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets all_pairs_significance + * @return double + */ + public function getAllPairsSignificance() + { + return $this->container['all_pairs_significance']; + } + + /** + * Sets all_pairs_significance + * @param double $all_pairs_significance Example: 1 + * @return $this + */ + public function setAllPairsSignificance($all_pairs_significance) + { + $this->container['all_pairs_significance'] = $all_pairs_significance; + + return $this; + } + + /** + * Gets average_daily_high_cause + * @return double + */ + public function getAverageDailyHighCause() + { + return $this->container['average_daily_high_cause']; + } + + /** + * Sets average_daily_high_cause + * @param double $average_daily_high_cause Example: 8.8 + * @return $this + */ + public function setAverageDailyHighCause($average_daily_high_cause) + { + $this->container['average_daily_high_cause'] = $average_daily_high_cause; + + return $this; + } + + /** + * Gets average_daily_low_cause + * @return double + */ + public function getAverageDailyLowCause() + { + return $this->container['average_daily_low_cause']; + } + + /** + * Sets average_daily_low_cause + * @param double $average_daily_low_cause Example: 5.93 + * @return $this + */ + public function setAverageDailyLowCause($average_daily_low_cause) + { + $this->container['average_daily_low_cause'] = $average_daily_low_cause; + + return $this; + } + + /** + * Gets average_effect + * @return double + */ + public function getAverageEffect() + { + return $this->container['average_effect']; + } + + /** + * Sets average_effect + * @param double $average_effect Example: 2.7265782739077 + * @return $this + */ + public function setAverageEffect($average_effect) + { + $this->container['average_effect'] = $average_effect; + + return $this; + } + + /** + * Gets average_effect_following_high_cause + * @return double + */ + public function getAverageEffectFollowingHighCause() + { + return $this->container['average_effect_following_high_cause']; + } + + /** + * Sets average_effect_following_high_cause + * @param double $average_effect_following_high_cause Example: 2.62 + * @return $this + */ + public function setAverageEffectFollowingHighCause($average_effect_following_high_cause) + { + $this->container['average_effect_following_high_cause'] = $average_effect_following_high_cause; + + return $this; + } + + /** + * Gets average_effect_following_high_cause_explanation + * @return string + */ + public function getAverageEffectFollowingHighCauseExplanation() + { + return $this->container['average_effect_following_high_cause_explanation']; + } + + /** + * Sets average_effect_following_high_cause_explanation + * @param string $average_effect_following_high_cause_explanation Example: Overall Mood is 2.62/5 (4% lower) on average after days with around 8.8 h Sleep Duration + * @return $this + */ + public function setAverageEffectFollowingHighCauseExplanation($average_effect_following_high_cause_explanation) + { + $this->container['average_effect_following_high_cause_explanation'] = $average_effect_following_high_cause_explanation; + + return $this; + } + + /** + * Gets average_effect_following_low_cause + * @return double + */ + public function getAverageEffectFollowingLowCause() + { + return $this->container['average_effect_following_low_cause']; + } + + /** + * Sets average_effect_following_low_cause + * @param double $average_effect_following_low_cause Example: 2.82 + * @return $this + */ + public function setAverageEffectFollowingLowCause($average_effect_following_low_cause) + { + $this->container['average_effect_following_low_cause'] = $average_effect_following_low_cause; + + return $this; + } + + /** + * Gets average_effect_following_low_cause_explanation + * @return string + */ + public function getAverageEffectFollowingLowCauseExplanation() + { + return $this->container['average_effect_following_low_cause_explanation']; + } + + /** + * Sets average_effect_following_low_cause_explanation + * @param string $average_effect_following_low_cause_explanation Example: Overall Mood is 2.82/5 (3% higher) on average after days with around 5.93 h Sleep Duration + * @return $this + */ + public function setAverageEffectFollowingLowCauseExplanation($average_effect_following_low_cause_explanation) + { + $this->container['average_effect_following_low_cause_explanation'] = $average_effect_following_low_cause_explanation; + + return $this; + } + + /** + * Gets causality_factor + * @return double + */ + public function getCausalityFactor() + { + return $this->container['causality_factor']; + } + + /** + * Sets causality_factor + * @param double $causality_factor Example: -0.173 + * @return $this + */ + public function setCausalityFactor($causality_factor) + { + $this->container['causality_factor'] = $causality_factor; + + return $this; + } + + /** + * Gets cause_changes + * @return int + */ + public function getCauseChanges() + { + return $this->container['cause_changes']; + } + + /** + * Sets cause_changes + * @param int $cause_changes Example: 1010 + * @return $this + */ + public function setCauseChanges($cause_changes) + { + $this->container['cause_changes'] = $cause_changes; + + return $this; + } + + /** + * Gets cause_changes_statistical_significance + * @return double + */ + public function getCauseChangesStatisticalSignificance() + { + return $this->container['cause_changes_statistical_significance']; + } + + /** + * Sets cause_changes_statistical_significance + * @param double $cause_changes_statistical_significance Example: 1 + * @return $this + */ + public function setCauseChangesStatisticalSignificance($cause_changes_statistical_significance) + { + $this->container['cause_changes_statistical_significance'] = $cause_changes_statistical_significance; + + return $this; + } + + /** + * Gets cause_data_source + * @return \QuantiModo\Client\Model\DataSource + */ + public function getCauseDataSource() + { + return $this->container['cause_data_source']; + } + + /** + * Sets cause_data_source + * @param \QuantiModo\Client\Model\DataSource $cause_data_source + * @return $this + */ + public function setCauseDataSource($cause_data_source) + { + $this->container['cause_data_source'] = $cause_data_source; + + return $this; + } + + /** + * Gets cause_number_of_processed_daily_measurements + * @return int + */ + public function getCauseNumberOfProcessedDailyMeasurements() + { + return $this->container['cause_number_of_processed_daily_measurements']; + } + + /** + * Sets cause_number_of_processed_daily_measurements + * @param int $cause_number_of_processed_daily_measurements Example: 1113 + * @return $this + */ + public function setCauseNumberOfProcessedDailyMeasurements($cause_number_of_processed_daily_measurements) + { + $this->container['cause_number_of_processed_daily_measurements'] = $cause_number_of_processed_daily_measurements; + + return $this; + } + + /** + * Gets cause_number_of_raw_measurements + * @return int + */ + public function getCauseNumberOfRawMeasurements() + { + return $this->container['cause_number_of_raw_measurements']; + } + + /** + * Sets cause_number_of_raw_measurements + * @param int $cause_number_of_raw_measurements Example: 1942 + * @return $this + */ + public function setCauseNumberOfRawMeasurements($cause_number_of_raw_measurements) + { + $this->container['cause_number_of_raw_measurements'] = $cause_number_of_raw_measurements; + + return $this; + } + + /** + * Gets cause_value_spread + * @return double + */ + public function getCauseValueSpread() + { + return $this->container['cause_value_spread']; + } + + /** + * Sets cause_value_spread + * @param double $cause_value_spread Example: 12.45 + * @return $this + */ + public function setCauseValueSpread($cause_value_spread) + { + $this->container['cause_value_spread'] = $cause_value_spread; + + return $this; + } + + /** + * Gets cause_variable + * @return \QuantiModo\Client\Model\UserVariable + */ + public function getCauseVariable() + { + return $this->container['cause_variable']; + } + + /** + * Sets cause_variable + * @param \QuantiModo\Client\Model\UserVariable $cause_variable + * @return $this + */ + public function setCauseVariable($cause_variable) + { + $this->container['cause_variable'] = $cause_variable; + + return $this; + } + + /** + * Gets cause_variable_category_id + * @return int + */ + public function getCauseVariableCategoryId() + { + return $this->container['cause_variable_category_id']; + } + + /** + * Sets cause_variable_category_id + * @param int $cause_variable_category_id Example: 6 + * @return $this + */ + public function setCauseVariableCategoryId($cause_variable_category_id) + { + $this->container['cause_variable_category_id'] = $cause_variable_category_id; + + return $this; + } + + /** + * Gets cause_variable_category_name + * @return string + */ + public function getCauseVariableCategoryName() + { + return $this->container['cause_variable_category_name']; + } + + /** + * Sets cause_variable_category_name + * @param string $cause_variable_category_name Example: Sleep + * @return $this + */ + public function setCauseVariableCategoryName($cause_variable_category_name) + { + $this->container['cause_variable_category_name'] = $cause_variable_category_name; + + return $this; + } + + /** + * Gets cause_variable_unit_abbreviated_name + * @return string + */ + public function getCauseVariableUnitAbbreviatedName() + { + return $this->container['cause_variable_unit_abbreviated_name']; + } + + /** + * Sets cause_variable_unit_abbreviated_name + * @param string $cause_variable_unit_abbreviated_name Example: h + * @return $this + */ + public function setCauseVariableUnitAbbreviatedName($cause_variable_unit_abbreviated_name) + { + $this->container['cause_variable_unit_abbreviated_name'] = $cause_variable_unit_abbreviated_name; + + return $this; + } + + /** + * Gets cause_variable_unit_id + * @return int + */ + public function getCauseVariableUnitId() + { + return $this->container['cause_variable_unit_id']; + } + + /** + * Sets cause_variable_unit_id + * @param int $cause_variable_unit_id Example: 34 + * @return $this + */ + public function setCauseVariableUnitId($cause_variable_unit_id) + { + $this->container['cause_variable_unit_id'] = $cause_variable_unit_id; + + return $this; + } + + /** + * Gets cause_variable_id + * @return int + */ + public function getCauseVariableId() + { + return $this->container['cause_variable_id']; + } + + /** + * Sets cause_variable_id + * @param int $cause_variable_id Example: 1867 + * @return $this + */ + public function setCauseVariableId($cause_variable_id) + { + $this->container['cause_variable_id'] = $cause_variable_id; + + return $this; + } + + /** + * Gets cause_variable_image_url + * @return string + */ + public function getCauseVariableImageUrl() + { + return $this->container['cause_variable_image_url']; + } + + /** + * Sets cause_variable_image_url + * @param string $cause_variable_image_url Example: https://maxcdn.icons8.com/Color/PNG/96/Household/sleeping_in_bed-96.png + * @return $this + */ + public function setCauseVariableImageUrl($cause_variable_image_url) + { + $this->container['cause_variable_image_url'] = $cause_variable_image_url; + + return $this; + } + + /** + * Gets cause_variable_ion_icon + * @return string + */ + public function getCauseVariableIonIcon() + { + return $this->container['cause_variable_ion_icon']; + } + + /** + * Sets cause_variable_ion_icon + * @param string $cause_variable_ion_icon Example: ion-ios-cloudy-night-outline + * @return $this + */ + public function setCauseVariableIonIcon($cause_variable_ion_icon) + { + $this->container['cause_variable_ion_icon'] = $cause_variable_ion_icon; + + return $this; + } + + /** + * Gets cause_variable_most_common_connector_id + * @return int + */ + public function getCauseVariableMostCommonConnectorId() + { + return $this->container['cause_variable_most_common_connector_id']; + } + + /** + * Sets cause_variable_most_common_connector_id + * @param int $cause_variable_most_common_connector_id Example: 7 + * @return $this + */ + public function setCauseVariableMostCommonConnectorId($cause_variable_most_common_connector_id) + { + $this->container['cause_variable_most_common_connector_id'] = $cause_variable_most_common_connector_id; + + return $this; + } + + /** + * Gets cause_variable_name + * @return string + */ + public function getCauseVariableName() + { + return $this->container['cause_variable_name']; + } + + /** + * Sets cause_variable_name + * @param string $cause_variable_name Example: Sleep Duration + * @return $this + */ + public function setCauseVariableName($cause_variable_name) + { + $this->container['cause_variable_name'] = $cause_variable_name; + + return $this; + } + + /** + * Gets charts + * @return \QuantiModo\Client\Model\Chart[] + */ + public function getCharts() + { + return $this->container['charts']; + } + + /** + * Sets charts + * @param \QuantiModo\Client\Model\Chart[] $charts + * @return $this + */ + public function setCharts($charts) + { + $this->container['charts'] = $charts; + + return $this; + } + + /** + * Gets confidence_interval + * @return double + */ + public function getConfidenceInterval() + { + return $this->container['confidence_interval']; + } + + /** + * Sets confidence_interval + * @param double $confidence_interval Example: 0.055165978848875 + * @return $this + */ + public function setConfidenceInterval($confidence_interval) + { + $this->container['confidence_interval'] = $confidence_interval; + + return $this; + } + + /** + * Gets confidence_level + * @return string + */ + public function getConfidenceLevel() + { + return $this->container['confidence_level']; + } + + /** + * Sets confidence_level + * @param string $confidence_level Example: high + * @return $this + */ + public function setConfidenceLevel($confidence_level) + { + $this->container['confidence_level'] = $confidence_level; + + return $this; + } + + /** + * Gets correlation_coefficient + * @return double + */ + public function getCorrelationCoefficient() + { + return $this->container['correlation_coefficient']; + } + + /** + * Sets correlation_coefficient + * @param double $correlation_coefficient Example: -0.173 + * @return $this + */ + public function setCorrelationCoefficient($correlation_coefficient) + { + $this->container['correlation_coefficient'] = $correlation_coefficient; + + return $this; + } + + /** + * Gets correlation_is_contradictory_to_optimal_values + * @return bool + */ + public function getCorrelationIsContradictoryToOptimalValues() + { + return $this->container['correlation_is_contradictory_to_optimal_values']; + } + + /** + * Sets correlation_is_contradictory_to_optimal_values + * @param bool $correlation_is_contradictory_to_optimal_values Example: false + * @return $this + */ + public function setCorrelationIsContradictoryToOptimalValues($correlation_is_contradictory_to_optimal_values) + { + $this->container['correlation_is_contradictory_to_optimal_values'] = $correlation_is_contradictory_to_optimal_values; + + return $this; + } + + /** + * Gets critical_t_value + * @return double + */ + public function getCriticalTValue() + { + return $this->container['critical_t_value']; + } + + /** + * Sets critical_t_value + * @param double $critical_t_value Example: 1.646 + * @return $this + */ + public function setCriticalTValue($critical_t_value) + { + $this->container['critical_t_value'] = $critical_t_value; + + return $this; + } + + /** + * Gets data_analysis + * @return string + */ + public function getDataAnalysis() + { + return $this->container['data_analysis']; + } + + /** + * Sets data_analysis + * @param string $data_analysis Example: It was assumed that 0 hours would pass before a change in Sleep Duration would produce an observable change in Overall Mood. It was assumed that Sleep Duration could produce an observable change in Overall Mood for as much as 7 days after the stimulus event. + * @return $this + */ + public function setDataAnalysis($data_analysis) + { + $this->container['data_analysis'] = $data_analysis; + + return $this; + } + + /** + * Gets data_sources + * @return string + */ + public function getDataSources() + { + return $this->container['data_sources']; + } + + /** + * Sets data_sources + * @param string $data_sources Example: Sleep Duration data was primarily collected using Fitbit. Fitbit makes activity tracking easy and automatic.
Overall Mood data was primarily collected using QuantiModo. QuantiModo is a Chrome extension, Android app, iOS app, and web app that allows you to easily track mood, symptoms, or any outcome you want to optimize in a fraction of a second. You can also import your data from over 30 other apps and devices like Fitbit, Rescuetime, Jawbone Up, Withings, Facebook, Github, Google Calendar, Runkeeper, MoodPanda, Slice, Google Fit, and more. QuantiModo then analyzes your data to identify which hidden factors are most likely to be influencing your mood or symptoms and their optimal daily values. + * @return $this + */ + public function setDataSources($data_sources) + { + $this->container['data_sources'] = $data_sources; + + return $this; + } + + /** + * Gets data_sources_paragraph_for_cause + * @return string + */ + public function getDataSourcesParagraphForCause() + { + return $this->container['data_sources_paragraph_for_cause']; + } + + /** + * Sets data_sources_paragraph_for_cause + * @param string $data_sources_paragraph_for_cause Example: Sleep Duration data was primarily collected using Fitbit. Fitbit makes activity tracking easy and automatic. + * @return $this + */ + public function setDataSourcesParagraphForCause($data_sources_paragraph_for_cause) + { + $this->container['data_sources_paragraph_for_cause'] = $data_sources_paragraph_for_cause; + + return $this; + } + + /** + * Gets data_sources_paragraph_for_effect + * @return string + */ + public function getDataSourcesParagraphForEffect() + { + return $this->container['data_sources_paragraph_for_effect']; + } + + /** + * Sets data_sources_paragraph_for_effect + * @param string $data_sources_paragraph_for_effect Example: Overall Mood data was primarily collected using QuantiModo. QuantiModo is a Chrome extension, Android app, iOS app, and web app that allows you to easily track mood, symptoms, or any outcome you want to optimize in a fraction of a second. You can also import your data from over 30 other apps and devices like Fitbit, Rescuetime, Jawbone Up, Withings, Facebook, Github, Google Calendar, Runkeeper, MoodPanda, Slice, Google Fit, and more. QuantiModo then analyzes your data to identify which hidden factors are most likely to be influencing your mood or symptoms and their optimal daily values. + * @return $this + */ + public function setDataSourcesParagraphForEffect($data_sources_paragraph_for_effect) + { + $this->container['data_sources_paragraph_for_effect'] = $data_sources_paragraph_for_effect; + + return $this; + } + + /** + * Gets degrees_of_freedom + * @return int + */ + public function getDegreesOfFreedom() + { + return $this->container['degrees_of_freedom']; + } + + /** + * Sets degrees_of_freedom + * @param int $degrees_of_freedom Example: 200 + * @return $this + */ + public function setDegreesOfFreedom($degrees_of_freedom) + { + $this->container['degrees_of_freedom'] = $degrees_of_freedom; + + return $this; + } + + /** + * Gets direction + * @return string + */ + public function getDirection() + { + return $this->container['direction']; + } + + /** + * Sets direction + * @param string $direction Example: lower + * @return $this + */ + public function setDirection($direction) + { + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets distance_from_middle_to_be_hight_low_effect + * @return int + */ + public function getDistanceFromMiddleToBeHightLowEffect() + { + return $this->container['distance_from_middle_to_be_hight_low_effect']; + } + + /** + * Sets distance_from_middle_to_be_hight_low_effect + * @param int $distance_from_middle_to_be_hight_low_effect Example: 25 + * @return $this + */ + public function setDistanceFromMiddleToBeHightLowEffect($distance_from_middle_to_be_hight_low_effect) + { + $this->container['distance_from_middle_to_be_hight_low_effect'] = $distance_from_middle_to_be_hight_low_effect; + + return $this; + } + + /** + * Gets duration_of_action + * @return int + */ + public function getDurationOfAction() + { + return $this->container['duration_of_action']; + } + + /** + * Sets duration_of_action + * @param int $duration_of_action Example: 604800 + * @return $this + */ + public function setDurationOfAction($duration_of_action) + { + $this->container['duration_of_action'] = $duration_of_action; + + return $this; + } + + /** + * Gets duration_of_action_in_hours + * @return int + */ + public function getDurationOfActionInHours() + { + return $this->container['duration_of_action_in_hours']; + } + + /** + * Sets duration_of_action_in_hours + * @param int $duration_of_action_in_hours Example: 0 + * @return $this + */ + public function setDurationOfActionInHours($duration_of_action_in_hours) + { + $this->container['duration_of_action_in_hours'] = $duration_of_action_in_hours; + + return $this; + } + + /** + * Gets effect_changes + * @return int + */ + public function getEffectChanges() + { + return $this->container['effect_changes']; + } + + /** + * Sets effect_changes + * @param int $effect_changes Example: 521 + * @return $this + */ + public function setEffectChanges($effect_changes) + { + $this->container['effect_changes'] = $effect_changes; + + return $this; + } + + /** + * Gets effect_data_source + * @return \QuantiModo\Client\Model\DataSource + */ + public function getEffectDataSource() + { + return $this->container['effect_data_source']; + } + + /** + * Sets effect_data_source + * @param \QuantiModo\Client\Model\DataSource $effect_data_source + * @return $this + */ + public function setEffectDataSource($effect_data_source) + { + $this->container['effect_data_source'] = $effect_data_source; + + return $this; + } + + /** + * Gets effect_number_of_processed_daily_measurements + * @return int + */ + public function getEffectNumberOfProcessedDailyMeasurements() + { + return $this->container['effect_number_of_processed_daily_measurements']; + } + + /** + * Sets effect_number_of_processed_daily_measurements + * @param int $effect_number_of_processed_daily_measurements Example: 1492 + * @return $this + */ + public function setEffectNumberOfProcessedDailyMeasurements($effect_number_of_processed_daily_measurements) + { + $this->container['effect_number_of_processed_daily_measurements'] = $effect_number_of_processed_daily_measurements; + + return $this; + } + + /** + * Gets effect_number_of_raw_measurements + * @return int + */ + public function getEffectNumberOfRawMeasurements() + { + return $this->container['effect_number_of_raw_measurements']; + } + + /** + * Sets effect_number_of_raw_measurements + * @param int $effect_number_of_raw_measurements Example: 11866 + * @return $this + */ + public function setEffectNumberOfRawMeasurements($effect_number_of_raw_measurements) + { + $this->container['effect_number_of_raw_measurements'] = $effect_number_of_raw_measurements; + + return $this; + } + + /** + * Gets effect_size + * @return string + */ + public function getEffectSize() + { + return $this->container['effect_size']; + } + + /** + * Sets effect_size + * @param string $effect_size Example: weakly negative + * @return $this + */ + public function setEffectSize($effect_size) + { + $this->container['effect_size'] = $effect_size; + + return $this; + } + + /** + * Gets effect_unit + * @return string + */ + public function getEffectUnit() + { + return $this->container['effect_unit']; + } + + /** + * Sets effect_unit + * @param string $effect_unit Example: /5 + * @return $this + */ + public function setEffectUnit($effect_unit) + { + $this->container['effect_unit'] = $effect_unit; + + return $this; + } + + /** + * Gets effect_value_spread + * @return double + */ + public function getEffectValueSpread() + { + return $this->container['effect_value_spread']; + } + + /** + * Sets effect_value_spread + * @param double $effect_value_spread Example: 3.5 + * @return $this + */ + public function setEffectValueSpread($effect_value_spread) + { + $this->container['effect_value_spread'] = $effect_value_spread; + + return $this; + } + + /** + * Gets effect_variable + * @return \QuantiModo\Client\Model\UserVariable + */ + public function getEffectVariable() + { + return $this->container['effect_variable']; + } + + /** + * Sets effect_variable + * @param \QuantiModo\Client\Model\UserVariable $effect_variable + * @return $this + */ + public function setEffectVariable($effect_variable) + { + $this->container['effect_variable'] = $effect_variable; + + return $this; + } + + /** + * Gets effect_variable_category_id + * @return int + */ + public function getEffectVariableCategoryId() + { + return $this->container['effect_variable_category_id']; + } + + /** + * Sets effect_variable_category_id + * @param int $effect_variable_category_id Example: 1 + * @return $this + */ + public function setEffectVariableCategoryId($effect_variable_category_id) + { + $this->container['effect_variable_category_id'] = $effect_variable_category_id; + + return $this; + } + + /** + * Gets effect_variable_category_name + * @return string + */ + public function getEffectVariableCategoryName() + { + return $this->container['effect_variable_category_name']; + } + + /** + * Sets effect_variable_category_name + * @param string $effect_variable_category_name Example: Emotions + * @return $this + */ + public function setEffectVariableCategoryName($effect_variable_category_name) + { + $this->container['effect_variable_category_name'] = $effect_variable_category_name; + + return $this; + } + + /** + * Gets effect_variable_unit_abbreviated_name + * @return string + */ + public function getEffectVariableUnitAbbreviatedName() + { + return $this->container['effect_variable_unit_abbreviated_name']; + } + + /** + * Sets effect_variable_unit_abbreviated_name + * @param string $effect_variable_unit_abbreviated_name Example: /5 + * @return $this + */ + public function setEffectVariableUnitAbbreviatedName($effect_variable_unit_abbreviated_name) + { + $this->container['effect_variable_unit_abbreviated_name'] = $effect_variable_unit_abbreviated_name; + + return $this; + } + + /** + * Gets effect_variable_unit_id + * @return int + */ + public function getEffectVariableUnitId() + { + return $this->container['effect_variable_unit_id']; + } + + /** + * Sets effect_variable_unit_id + * @param int $effect_variable_unit_id Example: 10 + * @return $this + */ + public function setEffectVariableUnitId($effect_variable_unit_id) + { + $this->container['effect_variable_unit_id'] = $effect_variable_unit_id; + + return $this; + } + + /** + * Gets effect_variable_id + * @return int + */ + public function getEffectVariableId() + { + return $this->container['effect_variable_id']; + } + + /** + * Sets effect_variable_id + * @param int $effect_variable_id Example: 1398 + * @return $this + */ + public function setEffectVariableId($effect_variable_id) + { + $this->container['effect_variable_id'] = $effect_variable_id; + + return $this; + } + + /** + * Gets effect_variable_image_url + * @return string + */ + public function getEffectVariableImageUrl() + { + return $this->container['effect_variable_image_url']; + } + + /** + * Sets effect_variable_image_url + * @param string $effect_variable_image_url Example: https://maxcdn.icons8.com/Color/PNG/96/Cinema/theatre_mask-96.png + * @return $this + */ + public function setEffectVariableImageUrl($effect_variable_image_url) + { + $this->container['effect_variable_image_url'] = $effect_variable_image_url; + + return $this; + } + + /** + * Gets effect_variable_ion_icon + * @return string + */ + public function getEffectVariableIonIcon() + { + return $this->container['effect_variable_ion_icon']; + } + + /** + * Sets effect_variable_ion_icon + * @param string $effect_variable_ion_icon Example: ion-happy-outline + * @return $this + */ + public function setEffectVariableIonIcon($effect_variable_ion_icon) + { + $this->container['effect_variable_ion_icon'] = $effect_variable_ion_icon; + + return $this; + } + + /** + * Gets effect_variable_most_common_connector_id + * @return int + */ + public function getEffectVariableMostCommonConnectorId() + { + return $this->container['effect_variable_most_common_connector_id']; + } + + /** + * Sets effect_variable_most_common_connector_id + * @param int $effect_variable_most_common_connector_id Example: 5 + * @return $this + */ + public function setEffectVariableMostCommonConnectorId($effect_variable_most_common_connector_id) + { + $this->container['effect_variable_most_common_connector_id'] = $effect_variable_most_common_connector_id; + + return $this; + } + + /** + * Gets effect_variable_name + * @return string + */ + public function getEffectVariableName() + { + return $this->container['effect_variable_name']; + } + + /** + * Sets effect_variable_name + * @param string $effect_variable_name Example: Overall Mood + * @return $this + */ + public function setEffectVariableName($effect_variable_name) + { + $this->container['effect_variable_name'] = $effect_variable_name; + + return $this; + } + + /** + * Gets error + * @return string + */ + public function getError() + { + return $this->container['error']; + } + + /** + * Sets error + * @param string $error Example: optimalPearsonProduct is not defined + * @return $this + */ + public function setError($error) + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Gets experiment_end_time + * @return int + */ + public function getExperimentEndTime() + { + return $this->container['experiment_end_time']; + } + + /** + * Sets experiment_end_time + * @param int $experiment_end_time Example: 1491024591 + * @return $this + */ + public function setExperimentEndTime($experiment_end_time) + { + $this->container['experiment_end_time'] = $experiment_end_time; + + return $this; + } + + /** + * Gets experiment_start_time + * @return int + */ + public function getExperimentStartTime() + { + return $this->container['experiment_start_time']; + } + + /** + * Sets experiment_start_time + * @param int $experiment_start_time Example: 1336267020 + * @return $this + */ + public function setExperimentStartTime($experiment_start_time) + { + $this->container['experiment_start_time'] = $experiment_start_time; + + return $this; + } + + /** + * Gets forward_spearman_correlation_coefficient + * @return double + */ + public function getForwardSpearmanCorrelationCoefficient() + { + return $this->container['forward_spearman_correlation_coefficient']; + } + + /** + * Sets forward_spearman_correlation_coefficient + * @param double $forward_spearman_correlation_coefficient Example: -0.20037947834262 + * @return $this + */ + public function setForwardSpearmanCorrelationCoefficient($forward_spearman_correlation_coefficient) + { + $this->container['forward_spearman_correlation_coefficient'] = $forward_spearman_correlation_coefficient; + + return $this; + } + + /** + * Gets gauge_image + * @return string + */ + public function getGaugeImage() + { + return $this->container['gauge_image']; + } + + /** + * Sets gauge_image + * @param string $gauge_image Example: https://s3.amazonaws.com/quantimodo-docs/images/gauge-weakly-negative-relationship.png + * @return $this + */ + public function setGaugeImage($gauge_image) + { + $this->container['gauge_image'] = $gauge_image; + + return $this; + } + + /** + * Gets gauge_image_square + * @return string + */ + public function getGaugeImageSquare() + { + return $this->container['gauge_image_square']; + } + + /** + * Sets gauge_image_square + * @param string $gauge_image_square Example: https://s3.amazonaws.com/quantimodo-docs/images/gauge-weakly-negative-relationship-200-200.png + * @return $this + */ + public function setGaugeImageSquare($gauge_image_square) + { + $this->container['gauge_image_square'] = $gauge_image_square; + + return $this; + } + + /** + * Gets image_url + * @return string + */ + public function getImageUrl() + { + return $this->container['image_url']; + } + + /** + * Sets image_url + * @param string $image_url Example: https://s3-us-west-1.amazonaws.com/qmimages/variable_categories_gauges_logo_background/gauge-weakly-negative-relationship_sleep_emotions_logo_background.png + * @return $this + */ + public function setImageUrl($image_url) + { + $this->container['image_url'] = $image_url; + + return $this; + } + + /** + * Gets instructions_for_cause + * @return string + */ + public function getInstructionsForCause() + { + return $this->container['instructions_for_cause']; + } + + /** + * Sets instructions_for_cause + * @param string $instructions_for_cause Example: Obtain Fitbit and use it to record your Sleep Duration. Once you have a Fitbit account, connect your Fitbit account at QuantiModo to automatically import and analyze your data. + * @return $this + */ + public function setInstructionsForCause($instructions_for_cause) + { + $this->container['instructions_for_cause'] = $instructions_for_cause; + + return $this; + } + + /** + * Gets instructions_for_effect + * @return string + */ + public function getInstructionsForEffect() + { + return $this->container['instructions_for_effect']; + } + + /** + * Sets instructions_for_effect + * @param string $instructions_for_effect Example: Obtain QuantiModo and use it to record your Overall Mood. Once you have a QuantiModo account, connect your QuantiModo account at QuantiModo to automatically import and analyze your data. + * @return $this + */ + public function setInstructionsForEffect($instructions_for_effect) + { + $this->container['instructions_for_effect'] = $instructions_for_effect; + + return $this; + } + + /** + * Gets maximum_cause_value + * @return double + */ + public function getMaximumCauseValue() + { + return $this->container['maximum_cause_value']; + } + + /** + * Sets maximum_cause_value + * @param double $maximum_cause_value Example: 13.75 + * @return $this + */ + public function setMaximumCauseValue($maximum_cause_value) + { + $this->container['maximum_cause_value'] = $maximum_cause_value; + + return $this; + } + + /** + * Gets maximum_effect_value + * @return double + */ + public function getMaximumEffectValue() + { + return $this->container['maximum_effect_value']; + } + + /** + * Sets maximum_effect_value + * @param double $maximum_effect_value Example: 5 + * @return $this + */ + public function setMaximumEffectValue($maximum_effect_value) + { + $this->container['maximum_effect_value'] = $maximum_effect_value; + + return $this; + } + + /** + * Gets minimum_cause_value + * @return double + */ + public function getMinimumCauseValue() + { + return $this->container['minimum_cause_value']; + } + + /** + * Sets minimum_cause_value + * @param double $minimum_cause_value Example: 1.3 + * @return $this + */ + public function setMinimumCauseValue($minimum_cause_value) + { + $this->container['minimum_cause_value'] = $minimum_cause_value; + + return $this; + } + + /** + * Gets minimum_effect_value + * @return double + */ + public function getMinimumEffectValue() + { + return $this->container['minimum_effect_value']; + } + + /** + * Sets minimum_effect_value + * @param double $minimum_effect_value Example: 1.5 + * @return $this + */ + public function setMinimumEffectValue($minimum_effect_value) + { + $this->container['minimum_effect_value'] = $minimum_effect_value; + + return $this; + } + + /** + * Gets minimum_probability + * @return double + */ + public function getMinimumProbability() + { + return $this->container['minimum_probability']; + } + + /** + * Sets minimum_probability + * @param double $minimum_probability Example: 0.05 + * @return $this + */ + public function setMinimumProbability($minimum_probability) + { + $this->container['minimum_probability'] = $minimum_probability; + + return $this; + } + + /** + * Gets number_of_cause_changes_for_optimal_values + * @return int + */ + public function getNumberOfCauseChangesForOptimalValues() + { + return $this->container['number_of_cause_changes_for_optimal_values']; + } + + /** + * Sets number_of_cause_changes_for_optimal_values + * @param int $number_of_cause_changes_for_optimal_values Example: 1010 + * @return $this + */ + public function setNumberOfCauseChangesForOptimalValues($number_of_cause_changes_for_optimal_values) + { + $this->container['number_of_cause_changes_for_optimal_values'] = $number_of_cause_changes_for_optimal_values; + + return $this; + } + + /** + * Gets number_of_days + * @return int + */ + public function getNumberOfDays() + { + return $this->container['number_of_days']; + } + + /** + * Sets number_of_days + * @param int $number_of_days Example: 1791 + * @return $this + */ + public function setNumberOfDays($number_of_days) + { + $this->container['number_of_days'] = $number_of_days; + + return $this; + } + + /** + * Gets number_of_days_significance + * @return double + */ + public function getNumberOfDaysSignificance() + { + return $this->container['number_of_days_significance']; + } + + /** + * Sets number_of_days_significance + * @param double $number_of_days_significance Example: 1 + * @return $this + */ + public function setNumberOfDaysSignificance($number_of_days_significance) + { + $this->container['number_of_days_significance'] = $number_of_days_significance; + + return $this; + } + + /** + * Gets number_of_effect_changes_for_optimal_values + * @return int + */ + public function getNumberOfEffectChangesForOptimalValues() + { + return $this->container['number_of_effect_changes_for_optimal_values']; + } + + /** + * Sets number_of_effect_changes_for_optimal_values + * @param int $number_of_effect_changes_for_optimal_values Example: 521 + * @return $this + */ + public function setNumberOfEffectChangesForOptimalValues($number_of_effect_changes_for_optimal_values) + { + $this->container['number_of_effect_changes_for_optimal_values'] = $number_of_effect_changes_for_optimal_values; + + return $this; + } + + /** + * Gets number_of_high_effect_pairs + * @return int + */ + public function getNumberOfHighEffectPairs() + { + return $this->container['number_of_high_effect_pairs']; + } + + /** + * Sets number_of_high_effect_pairs + * @param int $number_of_high_effect_pairs Example: 28 + * @return $this + */ + public function setNumberOfHighEffectPairs($number_of_high_effect_pairs) + { + $this->container['number_of_high_effect_pairs'] = $number_of_high_effect_pairs; + + return $this; + } + + /** + * Gets number_of_low_effect_pairs + * @return int + */ + public function getNumberOfLowEffectPairs() + { + return $this->container['number_of_low_effect_pairs']; + } + + /** + * Sets number_of_low_effect_pairs + * @param int $number_of_low_effect_pairs Example: 275 + * @return $this + */ + public function setNumberOfLowEffectPairs($number_of_low_effect_pairs) + { + $this->container['number_of_low_effect_pairs'] = $number_of_low_effect_pairs; + + return $this; + } + + /** + * Gets number_of_pairs + * @return int + */ + public function getNumberOfPairs() + { + return $this->container['number_of_pairs']; + } + + /** + * Sets number_of_pairs + * @param int $number_of_pairs Example: 1011 + * @return $this + */ + public function setNumberOfPairs($number_of_pairs) + { + $this->container['number_of_pairs'] = $number_of_pairs; + + return $this; + } + + /** + * Gets number_of_samples + * @return int + */ + public function getNumberOfSamples() + { + return $this->container['number_of_samples']; + } + + /** + * Sets number_of_samples + * @param int $number_of_samples Example: 1011 + * @return $this + */ + public function setNumberOfSamples($number_of_samples) + { + $this->container['number_of_samples'] = $number_of_samples; + + return $this; + } + + /** + * Gets number_of_unique_cause_values_for_optimal_values + * @return int + */ + public function getNumberOfUniqueCauseValuesForOptimalValues() + { + return $this->container['number_of_unique_cause_values_for_optimal_values']; + } + + /** + * Sets number_of_unique_cause_values_for_optimal_values + * @param int $number_of_unique_cause_values_for_optimal_values Example: 671 + * @return $this + */ + public function setNumberOfUniqueCauseValuesForOptimalValues($number_of_unique_cause_values_for_optimal_values) + { + $this->container['number_of_unique_cause_values_for_optimal_values'] = $number_of_unique_cause_values_for_optimal_values; + + return $this; + } + + /** + * Gets number_of_unique_effect_values_for_optimal_values + * @return int + */ + public function getNumberOfUniqueEffectValuesForOptimalValues() + { + return $this->container['number_of_unique_effect_values_for_optimal_values']; + } + + /** + * Sets number_of_unique_effect_values_for_optimal_values + * @param int $number_of_unique_effect_values_for_optimal_values Example: 112 + * @return $this + */ + public function setNumberOfUniqueEffectValuesForOptimalValues($number_of_unique_effect_values_for_optimal_values) + { + $this->container['number_of_unique_effect_values_for_optimal_values'] = $number_of_unique_effect_values_for_optimal_values; + + return $this; + } + + /** + * Gets onset_delay + * @return int + */ + public function getOnsetDelay() + { + return $this->container['onset_delay']; + } + + /** + * Sets onset_delay + * @param int $onset_delay Example: 0 + * @return $this + */ + public function setOnsetDelay($onset_delay) + { + $this->container['onset_delay'] = $onset_delay; + + return $this; + } + + /** + * Gets onset_delay_in_hours + * @return int + */ + public function getOnsetDelayInHours() + { + return $this->container['onset_delay_in_hours']; + } + + /** + * Sets onset_delay_in_hours + * @param int $onset_delay_in_hours Example: 0 + * @return $this + */ + public function setOnsetDelayInHours($onset_delay_in_hours) + { + $this->container['onset_delay_in_hours'] = $onset_delay_in_hours; + + return $this; + } + + /** + * Gets optimal_change_spread + * @return double + */ + public function getOptimalChangeSpread() + { + return $this->container['optimal_change_spread']; + } + + /** + * Sets optimal_change_spread + * @param double $optimal_change_spread Example: 6.79 + * @return $this + */ + public function setOptimalChangeSpread($optimal_change_spread) + { + $this->container['optimal_change_spread'] = $optimal_change_spread; + + return $this; + } + + /** + * Gets optimal_change_spread_significance + * @return double + */ + public function getOptimalChangeSpreadSignificance() + { + return $this->container['optimal_change_spread_significance']; + } + + /** + * Sets optimal_change_spread_significance + * @param double $optimal_change_spread_significance Example: 0.8959967711131 + * @return $this + */ + public function setOptimalChangeSpreadSignificance($optimal_change_spread_significance) + { + $this->container['optimal_change_spread_significance'] = $optimal_change_spread_significance; + + return $this; + } + + /** + * Gets optimal_pearson_product + * @return double + */ + public function getOptimalPearsonProduct() + { + return $this->container['optimal_pearson_product']; + } + + /** + * Sets optimal_pearson_product + * @param double $optimal_pearson_product Example: 0.074088026546601 + * @return $this + */ + public function setOptimalPearsonProduct($optimal_pearson_product) + { + $this->container['optimal_pearson_product'] = $optimal_pearson_product; + + return $this; + } + + /** + * Gets predictive_pearson_correlation_coefficient + * @return double + */ + public function getPredictivePearsonCorrelationCoefficient() + { + return $this->container['predictive_pearson_correlation_coefficient']; + } + + /** + * Sets predictive_pearson_correlation_coefficient + * @param double $predictive_pearson_correlation_coefficient Example: -0.173 + * @return $this + */ + public function setPredictivePearsonCorrelationCoefficient($predictive_pearson_correlation_coefficient) + { + $this->container['predictive_pearson_correlation_coefficient'] = $predictive_pearson_correlation_coefficient; + + return $this; + } + + /** + * Gets predictor_explanation + * @return string + */ + public function getPredictorExplanation() + { + return $this->container['predictor_explanation']; + } + + /** + * Sets predictor_explanation + * @param string $predictor_explanation Example: Sleep Duration Predicts Lower Overall Mood + * @return $this + */ + public function setPredictorExplanation($predictor_explanation) + { + $this->container['predictor_explanation'] = $predictor_explanation; + + return $this; + } + + /** + * Gets predicts_high_effect_change + * @return double + */ + public function getPredictsHighEffectChange() + { + return $this->container['predicts_high_effect_change']; + } + + /** + * Sets predicts_high_effect_change + * @param double $predicts_high_effect_change Example: 3.54 + * @return $this + */ + public function setPredictsHighEffectChange($predicts_high_effect_change) + { + $this->container['predicts_high_effect_change'] = $predicts_high_effect_change; + + return $this; + } + + /** + * Gets predicts_high_effect_change_sentence_fragment + * @return string + */ + public function getPredictsHighEffectChangeSentenceFragment() + { + return $this->container['predicts_high_effect_change_sentence_fragment']; + } + + /** + * Sets predicts_high_effect_change_sentence_fragment + * @param string $predicts_high_effect_change_sentence_fragment Example: , on average, 3.54% + * @return $this + */ + public function setPredictsHighEffectChangeSentenceFragment($predicts_high_effect_change_sentence_fragment) + { + $this->container['predicts_high_effect_change_sentence_fragment'] = $predicts_high_effect_change_sentence_fragment; + + return $this; + } + + /** + * Gets predicts_low_effect_change + * @return double + */ + public function getPredictsLowEffectChange() + { + return $this->container['predicts_low_effect_change']; + } + + /** + * Sets predicts_low_effect_change + * @param double $predicts_low_effect_change Example: -3.25 + * @return $this + */ + public function setPredictsLowEffectChange($predicts_low_effect_change) + { + $this->container['predicts_low_effect_change'] = $predicts_low_effect_change; + + return $this; + } + + /** + * Gets predicts_low_effect_change_sentence_fragment + * @return string + */ + public function getPredictsLowEffectChangeSentenceFragment() + { + return $this->container['predicts_low_effect_change_sentence_fragment']; + } + + /** + * Sets predicts_low_effect_change_sentence_fragment + * @param string $predicts_low_effect_change_sentence_fragment Example: , on average, 3.25% + * @return $this + */ + public function setPredictsLowEffectChangeSentenceFragment($predicts_low_effect_change_sentence_fragment) + { + $this->container['predicts_low_effect_change_sentence_fragment'] = $predicts_low_effect_change_sentence_fragment; + + return $this; + } + + /** + * Gets raw_cause_measurement_significance + * @return double + */ + public function getRawCauseMeasurementSignificance() + { + return $this->container['raw_cause_measurement_significance']; + } + + /** + * Sets raw_cause_measurement_significance + * @param double $raw_cause_measurement_significance Example: 1 + * @return $this + */ + public function setRawCauseMeasurementSignificance($raw_cause_measurement_significance) + { + $this->container['raw_cause_measurement_significance'] = $raw_cause_measurement_significance; + + return $this; + } + + /** + * Gets raw_effect_measurement_significance + * @return double + */ + public function getRawEffectMeasurementSignificance() + { + return $this->container['raw_effect_measurement_significance']; + } + + /** + * Sets raw_effect_measurement_significance + * @param double $raw_effect_measurement_significance Example: 1 + * @return $this + */ + public function setRawEffectMeasurementSignificance($raw_effect_measurement_significance) + { + $this->container['raw_effect_measurement_significance'] = $raw_effect_measurement_significance; + + return $this; + } + + /** + * Gets share_user_measurements + * @return bool + */ + public function getShareUserMeasurements() + { + return $this->container['share_user_measurements']; + } + + /** + * Sets share_user_measurements + * @param bool $share_user_measurements Example: false + * @return $this + */ + public function setShareUserMeasurements($share_user_measurements) + { + $this->container['share_user_measurements'] = $share_user_measurements; + + return $this; + } + + /** + * Gets significance_explanation + * @return string + */ + public function getSignificanceExplanation() + { + return $this->container['significance_explanation']; + } + + /** + * Sets significance_explanation + * @param string $significance_explanation Example: Using a two-tailed t-test with alpha = 0.05, it was determined that the change in Overall Mood is statistically significant at 95% confidence interval. + * @return $this + */ + public function setSignificanceExplanation($significance_explanation) + { + $this->container['significance_explanation'] = $significance_explanation; + + return $this; + } + + /** + * Gets significant_difference + * @return bool + */ + public function getSignificantDifference() + { + return $this->container['significant_difference']; + } + + /** + * Sets significant_difference + * @param bool $significant_difference Example: true + * @return $this + */ + public function setSignificantDifference($significant_difference) + { + $this->container['significant_difference'] = $significant_difference; + + return $this; + } + + /** + * Gets statistical_significance + * @return double + */ + public function getStatisticalSignificance() + { + return $this->container['statistical_significance']; + } + + /** + * Sets statistical_significance + * @param double $statistical_significance Example: 0.83333333333333 + * @return $this + */ + public function setStatisticalSignificance($statistical_significance) + { + $this->container['statistical_significance'] = $statistical_significance; + + return $this; + } + + /** + * Gets strength_level + * @return string + */ + public function getStrengthLevel() + { + return $this->container['strength_level']; + } + + /** + * Sets strength_level + * @param string $strength_level Example: very weak + * @return $this + */ + public function setStrengthLevel($strength_level) + { + $this->container['strength_level'] = $strength_level; + + return $this; + } + + /** + * Gets study_abstract + * @return string + */ + public function getStudyAbstract() + { + return $this->container['study_abstract']; + } + + /** + * Sets study_abstract + * @param string $study_abstract Example: Your data suggests with a high degree of confidence (p=0) that Sleep Duration (Sleep) has a weakly negative predictive relationship (R=-0.173) with Overall Mood (Emotions). The highest quartile of Overall Mood measurements were observed following an average 6.79h Sleep Duration. The lowest quartile of Overall Mood measurements were observed following an average 7.54h Sleep Duration. + * @return $this + */ + public function setStudyAbstract($study_abstract) + { + $this->container['study_abstract'] = $study_abstract; + + return $this; + } + + /** + * Gets study_background + * @return string + */ + public function getStudyBackground() + { + return $this->container['study_background']; + } + + /** + * Sets study_background + * @param string $study_background In order to reduce suffering through the advancement of human knowledge... + * @return $this + */ + public function setStudyBackground($study_background) + { + $this->container['study_background'] = $study_background; + + return $this; + } + + /** + * Gets study_design + * @return string + */ + public function getStudyDesign() + { + return $this->container['study_design']; + } + + /** + * Sets study_design + * @param string $study_design Example: This study is based on data donated by one QuantiModo user. Thus, the study design is consistent with an n=1 observational natural experiment. + * @return $this + */ + public function setStudyDesign($study_design) + { + $this->container['study_design'] = $study_design; + + return $this; + } + + /** + * Gets study_limitations + * @return string + */ + public function getStudyLimitations() + { + return $this->container['study_limitations']; + } + + /** + * Sets study_limitations + * @param string $study_limitations Example: As with any human experiment, it was impossible to control for all potentially confounding variables. Correlation does not necessarily imply correlation. We can never know for sure if one factor is definitely the cause of an outcome. However, lack of correlation definitely implies the lack of a causal relationship. Hence, we can with great confidence rule out non-existent relationships. For instance, if we discover no relationship between mood and an antidepressant this information is just as or even more valuable than the discovery that there is a relationship.

We can also take advantage of several characteristics of time series data from many subjects to infer the likelihood of a causal relationship if we do find a correlational relationship. The criteria for causation are a group of minimal conditions necessary to provide adequate evidence of a causal relationship between an incidence and a possible consequence. The list of the criteria is as follows:
1. Strength (effect size): A small association does not mean that there is not a causal effect, though the larger the association, the more likely that it is causal.
2. Consistency (reproducibility): Consistent findings observed by different persons in different places with different samples strengthens the likelihood of an effect.
3. Specificity: Causation is likely if a very specific population at a specific site and disease with no other likely explanation. The more specific an association between a factor and an effect is, the bigger the probability of a causal relationship.
4. Temporality: The effect has to occur after the cause (and if there is an expected delay between the cause and expected effect, then the effect must occur after that delay).
5. Biological gradient: Greater exposure should generally lead to greater incidence of the effect. However, in some cases, the mere presence of the factor can trigger the effect. In other cases, an inverse proportion is observed: greater exposure leads to lower incidence.
6. Plausibility: A plausible mechanism between cause and effect is helpful.
7. Coherence: Coherence between epidemiological and laboratory findings increases the likelihood of an effect.
8. Experiment: \"Occasionally it is possible to appeal to experimental evidence\".
9. Analogy: The effect of similar factors may be considered.

The confidence in a causal relationship is bolstered by the fact that time-precedence was taken into account in all calculations. Furthermore, in accordance with the law of large numbers (LLN), the predictive power and accuracy of these results will continually grow over time. 1011 paired data points were used in this analysis. Assuming that the relationship is merely coincidental, as the participant independently modifies their Sleep Duration values, the observed strength of the relationship will decline until it is below the threshold of significance. To it another way, in the case that we do find a spurious correlation, suggesting that banana intake improves mood for instance, one will likely increase their banana intake. Due to the fact that this correlation is spurious, it is unlikely that you will see a continued and persistent corresponding increase in mood. So over time, the spurious correlation will naturally dissipate.Furthermore, it will be very enlightening to aggregate this data with the data from other participants with similar genetic, diseasomic, environmentomic, and demographic profiles. + * @return $this + */ + public function setStudyLimitations($study_limitations) + { + $this->container['study_limitations'] = $study_limitations; + + return $this; + } + + /** + * Gets study_link_dynamic + * @return string + */ + public function getStudyLinkDynamic() + { + return $this->container['study_link_dynamic']; + } + + /** + * Sets study_link_dynamic + * @param string $study_link_dynamic Example: https://local.quantimo.do/ionic/Modo/www/index.html#/app/study?causeVariableName=Sleep%20Duration&effectVariableName=Overall%20Mood&userId=230 + * @return $this + */ + public function setStudyLinkDynamic($study_link_dynamic) + { + $this->container['study_link_dynamic'] = $study_link_dynamic; + + return $this; + } + + /** + * Gets study_link_email + * @return string + */ + public function getStudyLinkEmail() + { + return $this->container['study_link_email']; + } + + /** + * Sets study_link_email + * @param string $study_link_email Example: mailto:?subject=N1%20Study%3A%20Sleep%20Duration%20Predicts%20Lower%20Overall%20Mood&body=Check%20out%20my%20study%20at%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Duration%26effectVariableName%3DOverall%2520Mood%26userId%3D230%0A%0AHave%20a%20great%20day! + * @return $this + */ + public function setStudyLinkEmail($study_link_email) + { + $this->container['study_link_email'] = $study_link_email; + + return $this; + } + + /** + * Gets study_link_facebook + * @return string + */ + public function getStudyLinkFacebook() + { + return $this->container['study_link_facebook']; + } + + /** + * Sets study_link_facebook + * @param string $study_link_facebook Example: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Duration%26effectVariableName%3DOverall%2520Mood%26userId%3D230 + * @return $this + */ + public function setStudyLinkFacebook($study_link_facebook) + { + $this->container['study_link_facebook'] = $study_link_facebook; + + return $this; + } + + /** + * Gets study_link_google + * @return string + */ + public function getStudyLinkGoogle() + { + return $this->container['study_link_google']; + } + + /** + * Sets study_link_google + * @param string $study_link_google Example: https://plus.google.com/share?url=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Duration%26effectVariableName%3DOverall%2520Mood%26userId%3D230 + * @return $this + */ + public function setStudyLinkGoogle($study_link_google) + { + $this->container['study_link_google'] = $study_link_google; + + return $this; + } + + /** + * Gets study_link_static + * @return string + */ + public function getStudyLinkStatic() + { + return $this->container['study_link_static']; + } + + /** + * Sets study_link_static + * @param string $study_link_static Example: https://local.quantimo.do/api/v2/study?causeVariableName=Sleep%20Duration&effectVariableName=Overall%20Mood&userId=230 + * @return $this + */ + public function setStudyLinkStatic($study_link_static) + { + $this->container['study_link_static'] = $study_link_static; + + return $this; + } + + /** + * Gets study_link_twitter + * @return string + */ + public function getStudyLinkTwitter() + { + return $this->container['study_link_twitter']; + } + + /** + * Sets study_link_twitter + * @param string $study_link_twitter Example: https://twitter.com/home?status=Sleep%20Duration%20Predicts%20Lower%20Overall%20Mood%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Duration%26effectVariableName%3DOverall%2520Mood%26userId%3D230%20%40quantimodo + * @return $this + */ + public function setStudyLinkTwitter($study_link_twitter) + { + $this->container['study_link_twitter'] = $study_link_twitter; + + return $this; + } + + /** + * Gets study_objective + * @return string + */ + public function getStudyObjective() + { + return $this->container['study_objective']; + } + + /** + * Sets study_objective + * @param string $study_objective Example: The objective of this study is to determine the nature of the relationship (if any) between the Sleep Duration and the Overall Mood. Additionally, we attempt to determine the Sleep Duration values most likely to produce optimal Overall Mood values. + * @return $this + */ + public function setStudyObjective($study_objective) + { + $this->container['study_objective'] = $study_objective; + + return $this; + } + + /** + * Gets study_results + * @return string + */ + public function getStudyResults() + { + return $this->container['study_results']; + } + + /** + * Sets study_results + * @param string $study_results Example: This analysis suggests that higher Sleep Duration (Sleep) generally predicts lower Overall Mood (p = 0). Overall Mood is, on average, 3.54% higher after around 6.79 Sleep Duration. After an onset delay of 168 hours, Overall Mood is, on average, 3.25% lower than its average over the 168 hours following around 7.54 Sleep Duration. 1011 data points were used in this analysis. The value for Sleep Duration changed 1010 times, effectively running 505 separate natural experiments. The top quartile outcome values are preceded by an average 6.79 h of Sleep Duration. The bottom quartile outcome values are preceded by an average 7.54 h of Sleep Duration. Forward Pearson Correlation Coefficient was -0.173 (p=0, 95% CI -0.228 to -0.118 onset delay = 0 hours, duration of action = 168 hours) . The Reverse Pearson Correlation Coefficient was 0 (P=0, 95% CI -0.055 to 0.055, onset delay = -0 hours, duration of action = -168 hours). When the Sleep Duration value is closer to 6.79 h than 7.54 h, the Overall Mood value which follows is, on average, 3.54% percent higher than its typical value. When the Sleep Duration value is closer to 7.54 h than 6.79 h, the Overall Mood value which follows is 0% lower than its typical value. Overall Mood is 2.62/5 (4% lower) on average after days with around 8.8 h Sleep Duration Overall Mood is 2.82/5 (3% higher) on average after days with around 5.93 h Sleep Duration + * @return $this + */ + public function setStudyResults($study_results) + { + $this->container['study_results'] = $study_results; + + return $this; + } + + /** + * Gets study_title + * @return string + */ + public function getStudyTitle() + { + return $this->container['study_title']; + } + + /** + * Sets study_title + * @param string $study_title Example: N1 Study: Sleep Duration Predicts Lower Overall Mood + * @return $this + */ + public function setStudyTitle($study_title) + { + $this->container['study_title'] = $study_title; + + return $this; + } + + /** + * Gets timestamp + * @return int + */ + public function getTimestamp() + { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * @param int $timestamp Example: 1502255174 + * @return $this + */ + public function setTimestamp($timestamp) + { + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets t_value + * @return double + */ + public function getTValue() + { + return $this->container['t_value']; + } + + /** + * Sets t_value + * @param double $t_value Example: 5.525102310162 + * @return $this + */ + public function setTValue($t_value) + { + $this->container['t_value'] = $t_value; + + return $this; + } + + /** + * Gets user_id + * @return int + */ + public function getUserId() + { + return $this->container['user_id']; + } + + /** + * Sets user_id + * @param int $user_id Example: 230 + * @return $this + */ + public function setUserId($user_id) + { + $this->container['user_id'] = $user_id; + + return $this; + } + + /** + * Gets value_predicting_high_outcome + * @return double + */ + public function getValuePredictingHighOutcome() + { + return $this->container['value_predicting_high_outcome']; + } + + /** + * Sets value_predicting_high_outcome + * @param double $value_predicting_high_outcome Example: 6.79 + * @return $this + */ + public function setValuePredictingHighOutcome($value_predicting_high_outcome) + { + $this->container['value_predicting_high_outcome'] = $value_predicting_high_outcome; + + return $this; + } + + /** + * Gets value_predicting_high_outcome_explanation + * @return string + */ + public function getValuePredictingHighOutcomeExplanation() + { + return $this->container['value_predicting_high_outcome_explanation']; + } + + /** + * Sets value_predicting_high_outcome_explanation + * @param string $value_predicting_high_outcome_explanation Example: Overall Mood, on average, 3.54% higher after around 6.79 h Sleep Duration + * @return $this + */ + public function setValuePredictingHighOutcomeExplanation($value_predicting_high_outcome_explanation) + { + $this->container['value_predicting_high_outcome_explanation'] = $value_predicting_high_outcome_explanation; + + return $this; + } + + /** + * Gets value_predicting_low_outcome + * @return double + */ + public function getValuePredictingLowOutcome() + { + return $this->container['value_predicting_low_outcome']; + } + + /** + * Sets value_predicting_low_outcome + * @param double $value_predicting_low_outcome Example: 7.54 + * @return $this + */ + public function setValuePredictingLowOutcome($value_predicting_low_outcome) + { + $this->container['value_predicting_low_outcome'] = $value_predicting_low_outcome; + + return $this; + } + + /** + * Gets value_predicting_low_outcome_explanation + * @return string + */ + public function getValuePredictingLowOutcomeExplanation() + { + return $this->container['value_predicting_low_outcome_explanation']; + } + + /** + * Sets value_predicting_low_outcome_explanation + * @param string $value_predicting_low_outcome_explanation Example: Overall Mood, on average, 3.25% lower after around 7.54 h Sleep Duration + * @return $this + */ + public function setValuePredictingLowOutcomeExplanation($value_predicting_low_outcome_explanation) + { + $this->container['value_predicting_low_outcome_explanation'] = $value_predicting_low_outcome_explanation; + + return $this; + } + + /** + * Gets vote_statistical_significance + * @return double + */ + public function getVoteStatisticalSignificance() + { + return $this->container['vote_statistical_significance']; + } + + /** + * Sets vote_statistical_significance + * @param double $vote_statistical_significance Example: 0.83333333333333 + * @return $this + */ + public function setVoteStatisticalSignificance($vote_statistical_significance) + { + $this->container['vote_statistical_significance'] = $vote_statistical_significance; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/UserTag.php b/lib/Model/UserTag.php index 99e6fb7..4512613 100644 --- a/lib/Model/UserTag.php +++ b/lib/Model/UserTag.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,9 +54,19 @@ class UserTag implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ + 'conversion_factor' => 'float', 'tagged_variable_id' => 'int', - 'tag_variable_id' => 'int', - 'conversion_factor' => 'float' + 'tag_variable_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'conversion_factor' => null, + 'tagged_variable_id' => null, + 'tag_variable_id' => null ]; public static function swaggerTypes() @@ -64,14 +74,19 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ + 'conversion_factor' => 'conversionFactor', 'tagged_variable_id' => 'taggedVariableId', - 'tag_variable_id' => 'tagVariableId', - 'conversion_factor' => 'conversionFactor' + 'tag_variable_id' => 'tagVariableId' ]; @@ -80,9 +95,9 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ + 'conversion_factor' => 'setConversionFactor', 'tagged_variable_id' => 'setTaggedVariableId', - 'tag_variable_id' => 'setTagVariableId', - 'conversion_factor' => 'setConversionFactor' + 'tag_variable_id' => 'setTagVariableId' ]; @@ -91,9 +106,9 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ + 'conversion_factor' => 'getConversionFactor', 'tagged_variable_id' => 'getTaggedVariableId', - 'tag_variable_id' => 'getTagVariableId', - 'conversion_factor' => 'getConversionFactor' + 'tag_variable_id' => 'getTagVariableId' ]; public static function attributeMap() @@ -127,9 +142,9 @@ public static function getters() */ public function __construct(array $data = null) { + $this->container['conversion_factor'] = isset($data['conversion_factor']) ? $data['conversion_factor'] : null; $this->container['tagged_variable_id'] = isset($data['tagged_variable_id']) ? $data['tagged_variable_id'] : null; $this->container['tag_variable_id'] = isset($data['tag_variable_id']) ? $data['tag_variable_id'] : null; - $this->container['conversion_factor'] = isset($data['conversion_factor']) ? $data['conversion_factor'] : null; } /** @@ -141,15 +156,15 @@ public function listInvalidProperties() { $invalid_properties = []; + if ($this->container['conversion_factor'] === null) { + $invalid_properties[] = "'conversion_factor' can't be null"; + } if ($this->container['tagged_variable_id'] === null) { $invalid_properties[] = "'tagged_variable_id' can't be null"; } if ($this->container['tag_variable_id'] === null) { $invalid_properties[] = "'tag_variable_id' can't be null"; } - if ($this->container['conversion_factor'] === null) { - $invalid_properties[] = "'conversion_factor' can't be null"; - } return $invalid_properties; } @@ -162,19 +177,40 @@ public function listInvalidProperties() public function valid() { - if ($this->container['tagged_variable_id'] === null) { + if ($this->container['conversion_factor'] === null) { return false; } - if ($this->container['tag_variable_id'] === null) { + if ($this->container['tagged_variable_id'] === null) { return false; } - if ($this->container['conversion_factor'] === null) { + if ($this->container['tag_variable_id'] === null) { return false; } return true; } + /** + * Gets conversion_factor + * @return float + */ + public function getConversionFactor() + { + return $this->container['conversion_factor']; + } + + /** + * Sets conversion_factor + * @param float $conversion_factor Number by which we multiply the tagged variable value to obtain the tag variable (ingredient) value + * @return $this + */ + public function setConversionFactor($conversion_factor) + { + $this->container['conversion_factor'] = $conversion_factor; + + return $this; + } + /** * Gets tagged_variable_id * @return int @@ -216,27 +252,6 @@ public function setTagVariableId($tag_variable_id) return $this; } - - /** - * Gets conversion_factor - * @return float - */ - public function getConversionFactor() - { - return $this->container['conversion_factor']; - } - - /** - * Sets conversion_factor - * @param float $conversion_factor Number by which we multiply the tagged variable value to obtain the tag variable (ingredient) value - * @return $this - */ - public function setConversionFactor($conversion_factor) - { - $this->container['conversion_factor'] = $conversion_factor; - - return $this; - } /** * Returns true if offset exists. False otherwise. * @param integer $offset Offset diff --git a/lib/Model/UserTokenFailedResponse.php b/lib/Model/UserTokenFailedResponse.php deleted file mode 100644 index bc60183..0000000 --- a/lib/Model/UserTokenFailedResponse.php +++ /dev/null @@ -1,299 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * UserTokenFailedResponse Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserTokenFailedResponse implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'UserTokenFailedResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'code' => 'int', - 'message' => 'string', - 'success' => 'bool' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'code' => 'code', - 'message' => 'message', - 'success' => 'success' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'code' => 'setCode', - 'message' => 'setMessage', - 'success' => 'setSuccess' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'code' => 'getCode', - 'message' => 'getMessage', - 'success' => 'getSuccess' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - $this->container['success'] = isset($data['success']) ? $data['success'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['code'] === null) { - $invalid_properties[] = "'code' can't be null"; - } - if ($this->container['message'] === null) { - $invalid_properties[] = "'message' can't be null"; - } - if ($this->container['success'] === null) { - $invalid_properties[] = "'success' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['code'] === null) { - return false; - } - if ($this->container['message'] === null) { - return false; - } - if ($this->container['success'] === null) { - return false; - } - return true; - } - - - /** - * Gets code - * @return int - */ - public function getCode() - { - return $this->container['code']; - } - - /** - * Sets code - * @param int $code Status code - * @return $this - */ - public function setCode($code) - { - $this->container['code'] = $code; - - return $this; - } - - /** - * Gets message - * @return string - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * @param string $message Message - * @return $this - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets success - * @return bool - */ - public function getSuccess() - { - return $this->container['success']; - } - - /** - * Sets success - * @param bool $success - * @return $this - */ - public function setSuccess($success) - { - $this->container['success'] = $success; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/UserTokenRequest.php b/lib/Model/UserTokenRequest.php deleted file mode 100644 index f103580..0000000 --- a/lib/Model/UserTokenRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * UserTokenRequest Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserTokenRequest implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'UserTokenRequest'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'user' => '\QuantiModo\Client\Model\UserTokenRequestInnerUserField', - 'organization_access_token' => 'string' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'user' => 'user', - 'organization_access_token' => 'organizationAccessToken' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'user' => 'setUser', - 'organization_access_token' => 'setOrganizationAccessToken' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'user' => 'getUser', - 'organization_access_token' => 'getOrganizationAccessToken' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['user'] = isset($data['user']) ? $data['user'] : null; - $this->container['organization_access_token'] = isset($data['organization_access_token']) ? $data['organization_access_token'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['organization_access_token'] === null) { - $invalid_properties[] = "'organization_access_token' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['organization_access_token'] === null) { - return false; - } - return true; - } - - - /** - * Gets user - * @return \QuantiModo\Client\Model\UserTokenRequestInnerUserField - */ - public function getUser() - { - return $this->container['user']; - } - - /** - * Sets user - * @param \QuantiModo\Client\Model\UserTokenRequestInnerUserField $user - * @return $this - */ - public function setUser($user) - { - $this->container['user'] = $user; - - return $this; - } - - /** - * Gets organization_access_token - * @return string - */ - public function getOrganizationAccessToken() - { - return $this->container['organization_access_token']; - } - - /** - * Sets organization_access_token - * @param string $organization_access_token Organization Access token - * @return $this - */ - public function setOrganizationAccessToken($organization_access_token) - { - $this->container['organization_access_token'] = $organization_access_token; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/UserTokenRequestInnerUserField.php b/lib/Model/UserTokenRequestInnerUserField.php deleted file mode 100644 index ed9f249..0000000 --- a/lib/Model/UserTokenRequestInnerUserField.php +++ /dev/null @@ -1,229 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * UserTokenRequestInnerUserField Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserTokenRequestInnerUserField implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'UserTokenRequestInnerUserField'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'id' => 'int' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - return true; - } - - - /** - * Gets id - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * @param int $id WordPress user ID - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/UserTokenSuccessfulResponse.php b/lib/Model/UserTokenSuccessfulResponse.php deleted file mode 100644 index d33de89..0000000 --- a/lib/Model/UserTokenSuccessfulResponse.php +++ /dev/null @@ -1,299 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * UserTokenSuccessfulResponse Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserTokenSuccessfulResponse implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'UserTokenSuccessfulResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'code' => 'int', - 'message' => 'string', - 'user' => '\QuantiModo\Client\Model\UserTokenSuccessfulResponseInnerUserField' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'code' => 'code', - 'message' => 'message', - 'user' => 'user' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'code' => 'setCode', - 'message' => 'setMessage', - 'user' => 'setUser' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'code' => 'getCode', - 'message' => 'getMessage', - 'user' => 'getUser' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - $this->container['user'] = isset($data['user']) ? $data['user'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['code'] === null) { - $invalid_properties[] = "'code' can't be null"; - } - if ($this->container['message'] === null) { - $invalid_properties[] = "'message' can't be null"; - } - if ($this->container['user'] === null) { - $invalid_properties[] = "'user' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['code'] === null) { - return false; - } - if ($this->container['message'] === null) { - return false; - } - if ($this->container['user'] === null) { - return false; - } - return true; - } - - - /** - * Gets code - * @return int - */ - public function getCode() - { - return $this->container['code']; - } - - /** - * Sets code - * @param int $code Status code - * @return $this - */ - public function setCode($code) - { - $this->container['code'] = $code; - - return $this; - } - - /** - * Gets message - * @return string - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * @param string $message Message - * @return $this - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets user - * @return \QuantiModo\Client\Model\UserTokenSuccessfulResponseInnerUserField - */ - public function getUser() - { - return $this->container['user']; - } - - /** - * Sets user - * @param \QuantiModo\Client\Model\UserTokenSuccessfulResponseInnerUserField $user - * @return $this - */ - public function setUser($user) - { - $this->container['user'] = $user; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/UserTokenSuccessfulResponseInnerUserField.php b/lib/Model/UserTokenSuccessfulResponseInnerUserField.php deleted file mode 100644 index 96765e7..0000000 --- a/lib/Model/UserTokenSuccessfulResponseInnerUserField.php +++ /dev/null @@ -1,267 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * UserTokenSuccessfulResponseInnerUserField Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserTokenSuccessfulResponseInnerUserField implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'UserTokenSuccessfulResponseInnerUserField'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'id' => 'int', - 'access_token' => 'string' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'access_token' => 'access_token' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'access_token' => 'setAccessToken' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'access_token' => 'getAccessToken' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['access_token'] = isset($data['access_token']) ? $data['access_token'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['id'] === null) { - $invalid_properties[] = "'id' can't be null"; - } - if ($this->container['access_token'] === null) { - $invalid_properties[] = "'access_token' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['id'] === null) { - return false; - } - if ($this->container['access_token'] === null) { - return false; - } - return true; - } - - - /** - * Gets id - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * @param int $id WordPress user ID - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets access_token - * @return string - */ - public function getAccessToken() - { - return $this->container['access_token']; - } - - /** - * Sets access_token - * @param string $access_token User token - * @return $this - */ - public function setAccessToken($access_token) - { - $this->container['access_token'] = $access_token; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/UserVariable.php b/lib/Model/UserVariable.php index e7d13d3..178930e 100644 --- a/lib/Model/UserVariable.php +++ b/lib/Model/UserVariable.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,62 +54,305 @@ class UserVariable implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'parent_id' => 'int', - 'user_id' => 'int', + 'alias' => 'string', + 'available_units' => '\QuantiModo\Client\Model\Unit[]', + 'cause_only' => 'bool', + 'charts' => 'object', + 'charts_link_dynamic' => 'string', + 'charts_link_email' => 'string', + 'charts_link_facebook' => 'string', + 'charts_link_google' => 'string', + 'charts_link_static' => 'string', + 'charts_link_twitter' => 'string', + 'child_user_tag_variables' => '\QuantiModo\Client\Model\UserVariableArray', 'client_id' => 'string', - 'variable_id' => 'int', - 'default_unit_id' => 'int', - 'minimum_allowed_value' => 'float', - 'maximum_allowed_value' => 'float', - 'filling_value' => 'float', - 'join_with' => 'int', - 'onset_delay' => 'int', + 'combination_operation' => 'string', + 'common_alias' => 'string', + 'common_tagged_variables' => '\QuantiModo\Client\Model\CommonVariableArray', + 'common_tag_variables' => '\QuantiModo\Client\Model\CommonVariableArray', + 'common_variable_most_common_connector_id' => 'int', + 'common_variable_updated_at' => '\DateTime', + 'created_at' => '\DateTime', + 'unit_abbreviated_name' => 'string', + 'unit_category_id' => 'int', + 'unit_category_name' => 'string', + 'unit_id' => 'int', + 'unit_name' => 'string', + 'description' => 'string', 'duration_of_action' => 'int', - 'variable_category_id' => 'int', - 'updated' => 'int', - 'public' => 'int', - 'cause_only' => 'bool', + 'duration_of_action_in_hours' => 'int', + 'earliest_filling_time' => 'int', + 'earliest_measurement_time' => 'int', + 'earliest_source_time' => 'int', + 'error_message' => 'string', + 'experiment_end_time' => '\DateTime', + 'experiment_end_time_seconds' => 'int', + 'experiment_end_time_string' => '\DateTime', + 'experiment_start_time' => '\DateTime', + 'experiment_start_time_seconds' => 'int', + 'experiment_start_time_string' => '\DateTime', 'filling_type' => 'string', - 'number_of_measurements' => 'int', - 'number_of_processed_measurements' => 'int', - 'measurements_at_last_analysis' => 'int', - 'last_unit_id' => 'int', + 'filling_value' => 'float', + 'icon_icon' => 'string', + 'highcharts' => '\QuantiModo\Client\Model\HighchartArray', + 'id' => 'int', + 'image_url' => 'string', + 'informational_url' => 'string', + 'ingredient_of_user_tag_variables' => '\QuantiModo\Client\Model\UserVariableArray', + 'ingredient_user_tag_variables' => '\QuantiModo\Client\Model\UserVariableArray', + 'input_type' => 'string', + 'ion_icon' => 'string', + 'joined_user_tag_variables' => '\QuantiModo\Client\Model\UserVariableArray', + 'join_with' => 'int', + 'kurtosis' => 'float', 'last_original_unit_id' => 'int', - 'last_value' => 'float', 'last_original_value' => 'int', - 'number_of_correlations' => 'int', - 'status' => 'string', - 'error_message' => 'string', + 'last_processed_daily_value' => 'double', 'last_successful_update_time' => '\DateTime', - 'standard_deviation' => 'float', - 'variance' => 'float', - 'minimum_recorded_value' => 'float', + 'last_unit_id' => 'int', + 'last_value' => 'float', + 'latest_filling_time' => 'int', + 'latest_measurement_time' => 'int', + 'latest_source_time' => 'int', + 'latest_user_measurement_time' => 'int', + 'latitude' => 'float', + 'location' => 'string', + 'longitude' => 'float', + 'manual_tracking' => 'bool', + 'maximum_allowed_value' => 'float', 'maximum_recorded_daily_value' => 'float', + 'maximum_recorded_value' => 'double', 'mean' => 'float', + 'measurements_at_last_analysis' => 'int', 'median' => 'float', + 'minimum_allowed_value' => 'float', + 'minimum_recorded_value' => 'float', + 'most_common_connector_id' => 'int', + 'most_common_original_unit_id' => 'int', 'most_common_unit_id' => 'int', 'most_common_value' => 'float', - 'number_of_unique_daily_values' => 'float', + 'name' => 'string', + 'number_of_aggregate_correlations_as_cause' => 'int', + 'number_of_aggregate_correlations_as_effect' => 'int', 'number_of_changes' => 'int', + 'number_of_correlations' => 'int', + 'number_of_measurements' => 'int', + 'number_of_processed_daily_measurements' => 'int', + 'number_of_raw_measurements' => 'int', + 'number_of_tracking_reminders' => 'int', + 'number_of_unique_daily_values' => 'float', + 'number_of_unique_values' => 'int', + 'number_of_user_correlations_as_cause' => 'int', + 'number_of_user_correlations_as_effect' => 'int', + 'number_of_user_variables' => 'int', + 'onset_delay' => 'int', + 'onset_delay_in_hours' => 'double', + 'outcome' => 'bool', + 'outcome_of_interest' => 'int', + 'parent' => 'string', + 'parent_id' => 'int', + 'parent_user_tag_variables' => '\QuantiModo\Client\Model\UserVariableArray', + 'png_path' => 'string', + 'png_url' => 'string', + 'predictor_of_interest' => 'int', + 'price' => 'double', + 'product_url' => 'string', + 'public' => 'int', + 'raw_measurements_at_last_analysis' => 'int', + 'second_most_common_value' => 'double', + 'second_to_last_value' => 'double', + 'share_user_measurements' => 'bool', 'skewness' => 'float', + 'sources' => 'string', + 'standard_deviation' => 'float', + 'standard_deviation' => 'double', + 'status' => 'string', + 'subtitle' => 'string', + 'svg_url' => 'string', + 'third_most_common_value' => 'double', + 'third_to_last_value' => 'double', + 'unit' => '\QuantiModo\Client\Model\Unit', + 'updated' => 'int', + 'updated_at' => '\DateTime', + 'updated_time' => '\DateTime', + 'user_id' => 'int', + 'user_tagged_variables' => '\QuantiModo\Client\Model\UserVariableArray', + 'user_tag_variables' => '\QuantiModo\Client\Model\UserVariableArray', + 'user_variable_unit_abbreviated_name' => 'string', + 'user_variable_unit_category_id' => 'int', + 'user_variable_unit_category_name' => 'string', + 'user_variable_unit_id' => 'int', + 'user_variable_unit_name' => 'string', + 'user_variable_filling_value' => 'double', + 'user_variable_most_common_connector_id' => 'int', + 'user_variable_updated_at' => '\DateTime', + 'user_variable_valence' => 'string', + 'user_variable_variable_category_id' => 'int', + 'user_variable_variable_category_name' => 'string', + 'user_variable_wikipedia_title' => 'string', + 'valence' => 'string', + 'variable_category' => '\QuantiModo\Client\Model\VariableCategory', + 'variable_category_id' => 'int', + 'variable_category_image_url' => 'string', + 'variable_category_name' => 'string', + 'variable_filling_value' => 'double', + 'variable_id' => 'int', + 'variable_name' => 'string', + 'variance' => 'float', + 'wikipedia_title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'alias' => null, + 'available_units' => null, + 'cause_only' => null, + 'charts' => null, + 'charts_link_dynamic' => null, + 'charts_link_email' => null, + 'charts_link_facebook' => null, + 'charts_link_google' => null, + 'charts_link_static' => null, + 'charts_link_twitter' => null, + 'child_user_tag_variables' => null, + 'client_id' => null, + 'combination_operation' => null, + 'common_alias' => null, + 'common_tagged_variables' => null, + 'common_tag_variables' => null, + 'common_variable_most_common_connector_id' => null, + 'common_variable_updated_at' => 'date-time', + 'created_at' => 'date-time', + 'unit_abbreviated_name' => null, + 'unit_category_id' => null, + 'unit_category_name' => null, + 'unit_id' => 'int32', + 'unit_name' => null, + 'description' => null, + 'duration_of_action' => 'int32', + 'duration_of_action_in_hours' => null, + 'earliest_filling_time' => 'int32', + 'earliest_measurement_time' => 'int32', + 'earliest_source_time' => 'int32', + 'error_message' => null, + 'experiment_end_time' => 'date-time', + 'experiment_end_time_seconds' => null, + 'experiment_end_time_string' => 'date-time', + 'experiment_start_time' => 'date-time', + 'experiment_start_time_seconds' => null, + 'experiment_start_time_string' => 'date-time', + 'filling_type' => null, + 'filling_value' => 'float', + 'icon_icon' => null, + 'highcharts' => null, + 'id' => null, + 'image_url' => null, + 'informational_url' => null, + 'ingredient_of_user_tag_variables' => null, + 'ingredient_user_tag_variables' => null, + 'input_type' => null, + 'ion_icon' => null, + 'joined_user_tag_variables' => null, + 'join_with' => 'int32', 'kurtosis' => 'float', + 'last_original_unit_id' => 'int32', + 'last_original_value' => 'int32', + 'last_processed_daily_value' => 'double', + 'last_successful_update_time' => 'date-time', + 'last_unit_id' => 'int32', + 'last_value' => 'float', + 'latest_filling_time' => 'int32', + 'latest_measurement_time' => 'int32', + 'latest_source_time' => 'int32', + 'latest_user_measurement_time' => null, 'latitude' => 'float', + 'location' => null, 'longitude' => 'float', - 'location' => 'string', - 'experiment_start_time' => '\DateTime', - 'experiment_end_time' => '\DateTime', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'outcome' => 'bool', - 'sources' => 'string', - 'earliest_source_time' => 'int', - 'latest_source_time' => 'int', - 'earliest_measurement_time' => 'int', - 'latest_measurement_time' => 'int', - 'earliest_filling_time' => 'int', - 'latest_filling_time' => 'int', - 'image_url' => 'string', - 'ion_icon' => 'string' + 'manual_tracking' => null, + 'maximum_allowed_value' => 'float', + 'maximum_recorded_daily_value' => 'float', + 'maximum_recorded_value' => 'double', + 'mean' => 'float', + 'measurements_at_last_analysis' => 'int32', + 'median' => 'float', + 'minimum_allowed_value' => 'float', + 'minimum_recorded_value' => 'float', + 'most_common_connector_id' => null, + 'most_common_original_unit_id' => null, + 'most_common_unit_id' => 'int32', + 'most_common_value' => 'float', + 'name' => null, + 'number_of_aggregate_correlations_as_cause' => null, + 'number_of_aggregate_correlations_as_effect' => null, + 'number_of_changes' => 'int32', + 'number_of_correlations' => 'int32', + 'number_of_measurements' => 'int32', + 'number_of_processed_daily_measurements' => 'int32', + 'number_of_raw_measurements' => null, + 'number_of_tracking_reminders' => null, + 'number_of_unique_daily_values' => 'float', + 'number_of_unique_values' => null, + 'number_of_user_correlations_as_cause' => null, + 'number_of_user_correlations_as_effect' => null, + 'number_of_user_variables' => null, + 'onset_delay' => 'int32', + 'onset_delay_in_hours' => 'double', + 'outcome' => null, + 'outcome_of_interest' => null, + 'parent' => null, + 'parent_id' => 'int32', + 'parent_user_tag_variables' => null, + 'png_path' => null, + 'png_url' => null, + 'predictor_of_interest' => null, + 'price' => 'double', + 'product_url' => null, + 'public' => 'int32', + 'raw_measurements_at_last_analysis' => null, + 'second_most_common_value' => 'double', + 'second_to_last_value' => 'double', + 'share_user_measurements' => null, + 'skewness' => 'float', + 'sources' => null, + 'standard_deviation' => 'float', + 'standard_deviation' => 'double', + 'status' => null, + 'subtitle' => null, + 'svg_url' => null, + 'third_most_common_value' => 'double', + 'third_to_last_value' => 'double', + 'unit' => null, + 'updated' => 'int32', + 'updated_at' => 'date-time', + 'updated_time' => 'date-time', + 'user_id' => 'int32', + 'user_tagged_variables' => null, + 'user_tag_variables' => null, + 'user_variable_unit_abbreviated_name' => null, + 'user_variable_unit_category_id' => null, + 'user_variable_unit_category_name' => null, + 'user_variable_unit_id' => null, + 'user_variable_unit_name' => null, + 'user_variable_filling_value' => 'double', + 'user_variable_most_common_connector_id' => null, + 'user_variable_updated_at' => 'date-time', + 'user_variable_valence' => null, + 'user_variable_variable_category_id' => null, + 'user_variable_variable_category_name' => null, + 'user_variable_wikipedia_title' => null, + 'valence' => null, + 'variable_category' => null, + 'variable_category_id' => 'int32', + 'variable_category_image_url' => null, + 'variable_category_name' => null, + 'variable_filling_value' => 'double', + 'variable_id' => 'int32', + 'variable_name' => null, + 'variance' => 'float', + 'wikipedia_title' => null ]; public static function swaggerTypes() @@ -117,67 +360,162 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'parent_id' => 'parentId', - 'user_id' => 'userId', + 'alias' => 'alias', + 'available_units' => 'availableUnits', + 'cause_only' => 'causeOnly', + 'charts' => 'charts', + 'charts_link_dynamic' => 'chartsLinkDynamic', + 'charts_link_email' => 'chartsLinkEmail', + 'charts_link_facebook' => 'chartsLinkFacebook', + 'charts_link_google' => 'chartsLinkGoogle', + 'charts_link_static' => 'chartsLinkStatic', + 'charts_link_twitter' => 'chartsLinkTwitter', + 'child_user_tag_variables' => 'childUserTagVariables', 'client_id' => 'clientId', - 'variable_id' => 'variableId', - 'default_unit_id' => 'defaultUnitId', - 'minimum_allowed_value' => 'minimumAllowedValue', - 'maximum_allowed_value' => 'maximumAllowedValue', - 'filling_value' => 'fillingValue', - 'join_with' => 'joinWith', - 'onset_delay' => 'onsetDelay', + 'combination_operation' => 'combinationOperation', + 'common_alias' => 'commonAlias', + 'common_tagged_variables' => 'commonTaggedVariables', + 'common_tag_variables' => 'commonTagVariables', + 'common_variable_most_common_connector_id' => 'commonVariableMostCommonConnectorId', + 'common_variable_updated_at' => 'commonVariableUpdatedAt', + 'created_at' => 'createdAt', + 'unit_abbreviated_name' => 'unitAbbreviatedName', + 'unit_category_id' => 'unitCategoryId', + 'unit_category_name' => 'unitCategoryName', + 'unit_id' => 'unitId', + 'unit_name' => 'unitName', + 'description' => 'description', 'duration_of_action' => 'durationOfAction', - 'variable_category_id' => 'variableCategoryId', - 'updated' => 'updated', - 'public' => 'public', - 'cause_only' => 'causeOnly', + 'duration_of_action_in_hours' => 'durationOfActionInHours', + 'earliest_filling_time' => 'earliestFillingTime', + 'earliest_measurement_time' => 'earliestMeasurementTime', + 'earliest_source_time' => 'earliestSourceTime', + 'error_message' => 'errorMessage', + 'experiment_end_time' => 'experimentEndTime', + 'experiment_end_time_seconds' => 'experimentEndTimeSeconds', + 'experiment_end_time_string' => 'experimentEndTimeString', + 'experiment_start_time' => 'experimentStartTime', + 'experiment_start_time_seconds' => 'experimentStartTimeSeconds', + 'experiment_start_time_string' => 'experimentStartTimeString', 'filling_type' => 'fillingType', - 'number_of_measurements' => 'numberOfMeasurements', - 'number_of_processed_measurements' => 'numberOfProcessedMeasurements', - 'measurements_at_last_analysis' => 'measurementsAtLastAnalysis', - 'last_unit_id' => 'lastUnitId', + 'filling_value' => 'fillingValue', + 'icon_icon' => 'iconIcon', + 'highcharts' => 'highcharts', + 'id' => 'id', + 'image_url' => 'imageUrl', + 'informational_url' => 'informationalUrl', + 'ingredient_of_user_tag_variables' => 'ingredientOfUserTagVariables', + 'ingredient_user_tag_variables' => 'ingredientUserTagVariables', + 'input_type' => 'inputType', + 'ion_icon' => 'ionIcon', + 'joined_user_tag_variables' => 'joinedUserTagVariables', + 'join_with' => 'joinWith', + 'kurtosis' => 'kurtosis', 'last_original_unit_id' => 'lastOriginalUnitId', - 'last_value' => 'lastValue', 'last_original_value' => 'lastOriginalValue', - 'number_of_correlations' => 'numberOfCorrelations', - 'status' => 'status', - 'error_message' => 'errorMessage', + 'last_processed_daily_value' => 'lastProcessedDailyValue', 'last_successful_update_time' => 'lastSuccessfulUpdateTime', - 'standard_deviation' => 'standard_deviation', - 'variance' => 'variance', - 'minimum_recorded_value' => 'minimumRecordedValue', + 'last_unit_id' => 'lastUnitId', + 'last_value' => 'lastValue', + 'latest_filling_time' => 'latestFillingTime', + 'latest_measurement_time' => 'latestMeasurementTime', + 'latest_source_time' => 'latestSourceTime', + 'latest_user_measurement_time' => 'latestUserMeasurementTime', + 'latitude' => 'latitude', + 'location' => 'location', + 'longitude' => 'longitude', + 'manual_tracking' => 'manualTracking', + 'maximum_allowed_value' => 'maximumAllowedValue', 'maximum_recorded_daily_value' => 'maximumRecordedDailyValue', + 'maximum_recorded_value' => 'maximumRecordedValue', 'mean' => 'mean', + 'measurements_at_last_analysis' => 'measurementsAtLastAnalysis', 'median' => 'median', + 'minimum_allowed_value' => 'minimumAllowedValue', + 'minimum_recorded_value' => 'minimumRecordedValue', + 'most_common_connector_id' => 'mostCommonConnectorId', + 'most_common_original_unit_id' => 'mostCommonOriginalUnitId', 'most_common_unit_id' => 'mostCommonUnitId', 'most_common_value' => 'mostCommonValue', - 'number_of_unique_daily_values' => 'numberOfUniqueDailyValues', + 'name' => 'name', + 'number_of_aggregate_correlations_as_cause' => 'numberOfAggregateCorrelationsAsCause', + 'number_of_aggregate_correlations_as_effect' => 'numberOfAggregateCorrelationsAsEffect', 'number_of_changes' => 'numberOfChanges', - 'skewness' => 'skewness', - 'kurtosis' => 'kurtosis', - 'latitude' => 'latitude', - 'longitude' => 'longitude', - 'location' => 'location', - 'experiment_start_time' => 'experimentStartTime', - 'experiment_end_time' => 'experimentEndTime', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', + 'number_of_correlations' => 'numberOfCorrelations', + 'number_of_measurements' => 'numberOfMeasurements', + 'number_of_processed_daily_measurements' => 'numberOfProcessedDailyMeasurements', + 'number_of_raw_measurements' => 'numberOfRawMeasurements', + 'number_of_tracking_reminders' => 'numberOfTrackingReminders', + 'number_of_unique_daily_values' => 'numberOfUniqueDailyValues', + 'number_of_unique_values' => 'numberOfUniqueValues', + 'number_of_user_correlations_as_cause' => 'numberOfUserCorrelationsAsCause', + 'number_of_user_correlations_as_effect' => 'numberOfUserCorrelationsAsEffect', + 'number_of_user_variables' => 'numberOfUserVariables', + 'onset_delay' => 'onsetDelay', + 'onset_delay_in_hours' => 'onsetDelayInHours', 'outcome' => 'outcome', + 'outcome_of_interest' => 'outcomeOfInterest', + 'parent' => 'parent', + 'parent_id' => 'parentId', + 'parent_user_tag_variables' => 'parentUserTagVariables', + 'png_path' => 'pngPath', + 'png_url' => 'pngUrl', + 'predictor_of_interest' => 'predictorOfInterest', + 'price' => 'price', + 'product_url' => 'productUrl', + 'public' => 'public', + 'raw_measurements_at_last_analysis' => 'rawMeasurementsAtLastAnalysis', + 'second_most_common_value' => 'secondMostCommonValue', + 'second_to_last_value' => 'secondToLastValue', + 'share_user_measurements' => 'shareUserMeasurements', + 'skewness' => 'skewness', 'sources' => 'sources', - 'earliest_source_time' => 'earliestSourceTime', - 'latest_source_time' => 'latestSourceTime', - 'earliest_measurement_time' => 'earliestMeasurementTime', - 'latest_measurement_time' => 'latestMeasurementTime', - 'earliest_filling_time' => 'earliestFillingTime', - 'latest_filling_time' => 'latestFillingTime', - 'image_url' => 'imageUrl', - 'ion_icon' => 'ionIcon' + 'standard_deviation' => 'standard_deviation', + 'standard_deviation' => 'standardDeviation', + 'status' => 'status', + 'subtitle' => 'subtitle', + 'svg_url' => 'svgUrl', + 'third_most_common_value' => 'thirdMostCommonValue', + 'third_to_last_value' => 'thirdToLastValue', + 'unit' => 'unit', + 'updated' => 'updated', + 'updated_at' => 'updatedAt', + 'updated_time' => 'updatedTime', + 'user_id' => 'userId', + 'user_tagged_variables' => 'userTaggedVariables', + 'user_tag_variables' => 'userTagVariables', + 'user_variable_unit_abbreviated_name' => 'userVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'userVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'userVariableUnitCategoryName', + 'user_variable_unit_id' => 'userVariableUnitId', + 'user_variable_unit_name' => 'userVariableUnitName', + 'user_variable_filling_value' => 'userVariableFillingValue', + 'user_variable_most_common_connector_id' => 'userVariableMostCommonConnectorId', + 'user_variable_updated_at' => 'userVariableUpdatedAt', + 'user_variable_valence' => 'userVariableValence', + 'user_variable_variable_category_id' => 'userVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'userVariableVariableCategoryName', + 'user_variable_wikipedia_title' => 'userVariableWikipediaTitle', + 'valence' => 'valence', + 'variable_category' => 'variableCategory', + 'variable_category_id' => 'variableCategoryId', + 'variable_category_image_url' => 'variableCategoryImageUrl', + 'variable_category_name' => 'variableCategoryName', + 'variable_filling_value' => 'variableFillingValue', + 'variable_id' => 'variableId', + 'variable_name' => 'variableName', + 'variance' => 'variance', + 'wikipedia_title' => 'wikipediaTitle' ]; @@ -186,62 +524,152 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'parent_id' => 'setParentId', - 'user_id' => 'setUserId', + 'alias' => 'setAlias', + 'available_units' => 'setAvailableUnits', + 'cause_only' => 'setCauseOnly', + 'charts' => 'setCharts', + 'charts_link_dynamic' => 'setChartsLinkDynamic', + 'charts_link_email' => 'setChartsLinkEmail', + 'charts_link_facebook' => 'setChartsLinkFacebook', + 'charts_link_google' => 'setChartsLinkGoogle', + 'charts_link_static' => 'setChartsLinkStatic', + 'charts_link_twitter' => 'setChartsLinkTwitter', + 'child_user_tag_variables' => 'setChildUserTagVariables', 'client_id' => 'setClientId', - 'variable_id' => 'setVariableId', - 'default_unit_id' => 'setDefaultUnitId', - 'minimum_allowed_value' => 'setMinimumAllowedValue', - 'maximum_allowed_value' => 'setMaximumAllowedValue', - 'filling_value' => 'setFillingValue', - 'join_with' => 'setJoinWith', - 'onset_delay' => 'setOnsetDelay', + 'combination_operation' => 'setCombinationOperation', + 'common_alias' => 'setCommonAlias', + 'common_tagged_variables' => 'setCommonTaggedVariables', + 'common_tag_variables' => 'setCommonTagVariables', + 'common_variable_most_common_connector_id' => 'setCommonVariableMostCommonConnectorId', + 'common_variable_updated_at' => 'setCommonVariableUpdatedAt', + 'created_at' => 'setCreatedAt', + 'unit_abbreviated_name' => 'setUnitAbbreviatedName', + 'unit_category_id' => 'setUnitCategoryId', + 'unit_category_name' => 'setUnitCategoryName', + 'unit_id' => 'setUnitId', + 'unit_name' => 'setUnitName', + 'description' => 'setDescription', 'duration_of_action' => 'setDurationOfAction', - 'variable_category_id' => 'setVariableCategoryId', - 'updated' => 'setUpdated', - 'public' => 'setPublic', - 'cause_only' => 'setCauseOnly', + 'duration_of_action_in_hours' => 'setDurationOfActionInHours', + 'earliest_filling_time' => 'setEarliestFillingTime', + 'earliest_measurement_time' => 'setEarliestMeasurementTime', + 'earliest_source_time' => 'setEarliestSourceTime', + 'error_message' => 'setErrorMessage', + 'experiment_end_time' => 'setExperimentEndTime', + 'experiment_end_time_seconds' => 'setExperimentEndTimeSeconds', + 'experiment_end_time_string' => 'setExperimentEndTimeString', + 'experiment_start_time' => 'setExperimentStartTime', + 'experiment_start_time_seconds' => 'setExperimentStartTimeSeconds', + 'experiment_start_time_string' => 'setExperimentStartTimeString', 'filling_type' => 'setFillingType', - 'number_of_measurements' => 'setNumberOfMeasurements', - 'number_of_processed_measurements' => 'setNumberOfProcessedMeasurements', - 'measurements_at_last_analysis' => 'setMeasurementsAtLastAnalysis', - 'last_unit_id' => 'setLastUnitId', + 'filling_value' => 'setFillingValue', + 'icon_icon' => 'setIconIcon', + 'highcharts' => 'setHighcharts', + 'id' => 'setId', + 'image_url' => 'setImageUrl', + 'informational_url' => 'setInformationalUrl', + 'ingredient_of_user_tag_variables' => 'setIngredientOfUserTagVariables', + 'ingredient_user_tag_variables' => 'setIngredientUserTagVariables', + 'input_type' => 'setInputType', + 'ion_icon' => 'setIonIcon', + 'joined_user_tag_variables' => 'setJoinedUserTagVariables', + 'join_with' => 'setJoinWith', + 'kurtosis' => 'setKurtosis', 'last_original_unit_id' => 'setLastOriginalUnitId', - 'last_value' => 'setLastValue', 'last_original_value' => 'setLastOriginalValue', - 'number_of_correlations' => 'setNumberOfCorrelations', - 'status' => 'setStatus', - 'error_message' => 'setErrorMessage', + 'last_processed_daily_value' => 'setLastProcessedDailyValue', 'last_successful_update_time' => 'setLastSuccessfulUpdateTime', - 'standard_deviation' => 'setStandardDeviation', - 'variance' => 'setVariance', - 'minimum_recorded_value' => 'setMinimumRecordedValue', + 'last_unit_id' => 'setLastUnitId', + 'last_value' => 'setLastValue', + 'latest_filling_time' => 'setLatestFillingTime', + 'latest_measurement_time' => 'setLatestMeasurementTime', + 'latest_source_time' => 'setLatestSourceTime', + 'latest_user_measurement_time' => 'setLatestUserMeasurementTime', + 'latitude' => 'setLatitude', + 'location' => 'setLocation', + 'longitude' => 'setLongitude', + 'manual_tracking' => 'setManualTracking', + 'maximum_allowed_value' => 'setMaximumAllowedValue', 'maximum_recorded_daily_value' => 'setMaximumRecordedDailyValue', + 'maximum_recorded_value' => 'setMaximumRecordedValue', 'mean' => 'setMean', + 'measurements_at_last_analysis' => 'setMeasurementsAtLastAnalysis', 'median' => 'setMedian', + 'minimum_allowed_value' => 'setMinimumAllowedValue', + 'minimum_recorded_value' => 'setMinimumRecordedValue', + 'most_common_connector_id' => 'setMostCommonConnectorId', + 'most_common_original_unit_id' => 'setMostCommonOriginalUnitId', 'most_common_unit_id' => 'setMostCommonUnitId', 'most_common_value' => 'setMostCommonValue', - 'number_of_unique_daily_values' => 'setNumberOfUniqueDailyValues', + 'name' => 'setName', + 'number_of_aggregate_correlations_as_cause' => 'setNumberOfAggregateCorrelationsAsCause', + 'number_of_aggregate_correlations_as_effect' => 'setNumberOfAggregateCorrelationsAsEffect', 'number_of_changes' => 'setNumberOfChanges', - 'skewness' => 'setSkewness', - 'kurtosis' => 'setKurtosis', - 'latitude' => 'setLatitude', - 'longitude' => 'setLongitude', - 'location' => 'setLocation', - 'experiment_start_time' => 'setExperimentStartTime', - 'experiment_end_time' => 'setExperimentEndTime', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', + 'number_of_correlations' => 'setNumberOfCorrelations', + 'number_of_measurements' => 'setNumberOfMeasurements', + 'number_of_processed_daily_measurements' => 'setNumberOfProcessedDailyMeasurements', + 'number_of_raw_measurements' => 'setNumberOfRawMeasurements', + 'number_of_tracking_reminders' => 'setNumberOfTrackingReminders', + 'number_of_unique_daily_values' => 'setNumberOfUniqueDailyValues', + 'number_of_unique_values' => 'setNumberOfUniqueValues', + 'number_of_user_correlations_as_cause' => 'setNumberOfUserCorrelationsAsCause', + 'number_of_user_correlations_as_effect' => 'setNumberOfUserCorrelationsAsEffect', + 'number_of_user_variables' => 'setNumberOfUserVariables', + 'onset_delay' => 'setOnsetDelay', + 'onset_delay_in_hours' => 'setOnsetDelayInHours', 'outcome' => 'setOutcome', + 'outcome_of_interest' => 'setOutcomeOfInterest', + 'parent' => 'setParent', + 'parent_id' => 'setParentId', + 'parent_user_tag_variables' => 'setParentUserTagVariables', + 'png_path' => 'setPngPath', + 'png_url' => 'setPngUrl', + 'predictor_of_interest' => 'setPredictorOfInterest', + 'price' => 'setPrice', + 'product_url' => 'setProductUrl', + 'public' => 'setPublic', + 'raw_measurements_at_last_analysis' => 'setRawMeasurementsAtLastAnalysis', + 'second_most_common_value' => 'setSecondMostCommonValue', + 'second_to_last_value' => 'setSecondToLastValue', + 'share_user_measurements' => 'setShareUserMeasurements', + 'skewness' => 'setSkewness', 'sources' => 'setSources', - 'earliest_source_time' => 'setEarliestSourceTime', - 'latest_source_time' => 'setLatestSourceTime', - 'earliest_measurement_time' => 'setEarliestMeasurementTime', - 'latest_measurement_time' => 'setLatestMeasurementTime', - 'earliest_filling_time' => 'setEarliestFillingTime', - 'latest_filling_time' => 'setLatestFillingTime', - 'image_url' => 'setImageUrl', - 'ion_icon' => 'setIonIcon' + 'standard_deviation' => 'setStandardDeviation', + 'standard_deviation' => 'setStandardDeviation', + 'status' => 'setStatus', + 'subtitle' => 'setSubtitle', + 'svg_url' => 'setSvgUrl', + 'third_most_common_value' => 'setThirdMostCommonValue', + 'third_to_last_value' => 'setThirdToLastValue', + 'unit' => 'setUnit', + 'updated' => 'setUpdated', + 'updated_at' => 'setUpdatedAt', + 'updated_time' => 'setUpdatedTime', + 'user_id' => 'setUserId', + 'user_tagged_variables' => 'setUserTaggedVariables', + 'user_tag_variables' => 'setUserTagVariables', + 'user_variable_unit_abbreviated_name' => 'setUserVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'setUserVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'setUserVariableUnitCategoryName', + 'user_variable_unit_id' => 'setUserVariableUnitId', + 'user_variable_unit_name' => 'setUserVariableUnitName', + 'user_variable_filling_value' => 'setUserVariableFillingValue', + 'user_variable_most_common_connector_id' => 'setUserVariableMostCommonConnectorId', + 'user_variable_updated_at' => 'setUserVariableUpdatedAt', + 'user_variable_valence' => 'setUserVariableValence', + 'user_variable_variable_category_id' => 'setUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'setUserVariableVariableCategoryName', + 'user_variable_wikipedia_title' => 'setUserVariableWikipediaTitle', + 'valence' => 'setValence', + 'variable_category' => 'setVariableCategory', + 'variable_category_id' => 'setVariableCategoryId', + 'variable_category_image_url' => 'setVariableCategoryImageUrl', + 'variable_category_name' => 'setVariableCategoryName', + 'variable_filling_value' => 'setVariableFillingValue', + 'variable_id' => 'setVariableId', + 'variable_name' => 'setVariableName', + 'variance' => 'setVariance', + 'wikipedia_title' => 'setWikipediaTitle' ]; @@ -250,62 +678,152 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'parent_id' => 'getParentId', - 'user_id' => 'getUserId', + 'alias' => 'getAlias', + 'available_units' => 'getAvailableUnits', + 'cause_only' => 'getCauseOnly', + 'charts' => 'getCharts', + 'charts_link_dynamic' => 'getChartsLinkDynamic', + 'charts_link_email' => 'getChartsLinkEmail', + 'charts_link_facebook' => 'getChartsLinkFacebook', + 'charts_link_google' => 'getChartsLinkGoogle', + 'charts_link_static' => 'getChartsLinkStatic', + 'charts_link_twitter' => 'getChartsLinkTwitter', + 'child_user_tag_variables' => 'getChildUserTagVariables', 'client_id' => 'getClientId', - 'variable_id' => 'getVariableId', - 'default_unit_id' => 'getDefaultUnitId', - 'minimum_allowed_value' => 'getMinimumAllowedValue', - 'maximum_allowed_value' => 'getMaximumAllowedValue', - 'filling_value' => 'getFillingValue', - 'join_with' => 'getJoinWith', - 'onset_delay' => 'getOnsetDelay', + 'combination_operation' => 'getCombinationOperation', + 'common_alias' => 'getCommonAlias', + 'common_tagged_variables' => 'getCommonTaggedVariables', + 'common_tag_variables' => 'getCommonTagVariables', + 'common_variable_most_common_connector_id' => 'getCommonVariableMostCommonConnectorId', + 'common_variable_updated_at' => 'getCommonVariableUpdatedAt', + 'created_at' => 'getCreatedAt', + 'unit_abbreviated_name' => 'getUnitAbbreviatedName', + 'unit_category_id' => 'getUnitCategoryId', + 'unit_category_name' => 'getUnitCategoryName', + 'unit_id' => 'getUnitId', + 'unit_name' => 'getUnitName', + 'description' => 'getDescription', 'duration_of_action' => 'getDurationOfAction', - 'variable_category_id' => 'getVariableCategoryId', - 'updated' => 'getUpdated', - 'public' => 'getPublic', - 'cause_only' => 'getCauseOnly', + 'duration_of_action_in_hours' => 'getDurationOfActionInHours', + 'earliest_filling_time' => 'getEarliestFillingTime', + 'earliest_measurement_time' => 'getEarliestMeasurementTime', + 'earliest_source_time' => 'getEarliestSourceTime', + 'error_message' => 'getErrorMessage', + 'experiment_end_time' => 'getExperimentEndTime', + 'experiment_end_time_seconds' => 'getExperimentEndTimeSeconds', + 'experiment_end_time_string' => 'getExperimentEndTimeString', + 'experiment_start_time' => 'getExperimentStartTime', + 'experiment_start_time_seconds' => 'getExperimentStartTimeSeconds', + 'experiment_start_time_string' => 'getExperimentStartTimeString', 'filling_type' => 'getFillingType', - 'number_of_measurements' => 'getNumberOfMeasurements', - 'number_of_processed_measurements' => 'getNumberOfProcessedMeasurements', - 'measurements_at_last_analysis' => 'getMeasurementsAtLastAnalysis', - 'last_unit_id' => 'getLastUnitId', + 'filling_value' => 'getFillingValue', + 'icon_icon' => 'getIconIcon', + 'highcharts' => 'getHighcharts', + 'id' => 'getId', + 'image_url' => 'getImageUrl', + 'informational_url' => 'getInformationalUrl', + 'ingredient_of_user_tag_variables' => 'getIngredientOfUserTagVariables', + 'ingredient_user_tag_variables' => 'getIngredientUserTagVariables', + 'input_type' => 'getInputType', + 'ion_icon' => 'getIonIcon', + 'joined_user_tag_variables' => 'getJoinedUserTagVariables', + 'join_with' => 'getJoinWith', + 'kurtosis' => 'getKurtosis', 'last_original_unit_id' => 'getLastOriginalUnitId', - 'last_value' => 'getLastValue', 'last_original_value' => 'getLastOriginalValue', - 'number_of_correlations' => 'getNumberOfCorrelations', - 'status' => 'getStatus', - 'error_message' => 'getErrorMessage', + 'last_processed_daily_value' => 'getLastProcessedDailyValue', 'last_successful_update_time' => 'getLastSuccessfulUpdateTime', - 'standard_deviation' => 'getStandardDeviation', - 'variance' => 'getVariance', - 'minimum_recorded_value' => 'getMinimumRecordedValue', + 'last_unit_id' => 'getLastUnitId', + 'last_value' => 'getLastValue', + 'latest_filling_time' => 'getLatestFillingTime', + 'latest_measurement_time' => 'getLatestMeasurementTime', + 'latest_source_time' => 'getLatestSourceTime', + 'latest_user_measurement_time' => 'getLatestUserMeasurementTime', + 'latitude' => 'getLatitude', + 'location' => 'getLocation', + 'longitude' => 'getLongitude', + 'manual_tracking' => 'getManualTracking', + 'maximum_allowed_value' => 'getMaximumAllowedValue', 'maximum_recorded_daily_value' => 'getMaximumRecordedDailyValue', + 'maximum_recorded_value' => 'getMaximumRecordedValue', 'mean' => 'getMean', + 'measurements_at_last_analysis' => 'getMeasurementsAtLastAnalysis', 'median' => 'getMedian', + 'minimum_allowed_value' => 'getMinimumAllowedValue', + 'minimum_recorded_value' => 'getMinimumRecordedValue', + 'most_common_connector_id' => 'getMostCommonConnectorId', + 'most_common_original_unit_id' => 'getMostCommonOriginalUnitId', 'most_common_unit_id' => 'getMostCommonUnitId', 'most_common_value' => 'getMostCommonValue', - 'number_of_unique_daily_values' => 'getNumberOfUniqueDailyValues', + 'name' => 'getName', + 'number_of_aggregate_correlations_as_cause' => 'getNumberOfAggregateCorrelationsAsCause', + 'number_of_aggregate_correlations_as_effect' => 'getNumberOfAggregateCorrelationsAsEffect', 'number_of_changes' => 'getNumberOfChanges', - 'skewness' => 'getSkewness', - 'kurtosis' => 'getKurtosis', - 'latitude' => 'getLatitude', - 'longitude' => 'getLongitude', - 'location' => 'getLocation', - 'experiment_start_time' => 'getExperimentStartTime', - 'experiment_end_time' => 'getExperimentEndTime', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', + 'number_of_correlations' => 'getNumberOfCorrelations', + 'number_of_measurements' => 'getNumberOfMeasurements', + 'number_of_processed_daily_measurements' => 'getNumberOfProcessedDailyMeasurements', + 'number_of_raw_measurements' => 'getNumberOfRawMeasurements', + 'number_of_tracking_reminders' => 'getNumberOfTrackingReminders', + 'number_of_unique_daily_values' => 'getNumberOfUniqueDailyValues', + 'number_of_unique_values' => 'getNumberOfUniqueValues', + 'number_of_user_correlations_as_cause' => 'getNumberOfUserCorrelationsAsCause', + 'number_of_user_correlations_as_effect' => 'getNumberOfUserCorrelationsAsEffect', + 'number_of_user_variables' => 'getNumberOfUserVariables', + 'onset_delay' => 'getOnsetDelay', + 'onset_delay_in_hours' => 'getOnsetDelayInHours', 'outcome' => 'getOutcome', + 'outcome_of_interest' => 'getOutcomeOfInterest', + 'parent' => 'getParent', + 'parent_id' => 'getParentId', + 'parent_user_tag_variables' => 'getParentUserTagVariables', + 'png_path' => 'getPngPath', + 'png_url' => 'getPngUrl', + 'predictor_of_interest' => 'getPredictorOfInterest', + 'price' => 'getPrice', + 'product_url' => 'getProductUrl', + 'public' => 'getPublic', + 'raw_measurements_at_last_analysis' => 'getRawMeasurementsAtLastAnalysis', + 'second_most_common_value' => 'getSecondMostCommonValue', + 'second_to_last_value' => 'getSecondToLastValue', + 'share_user_measurements' => 'getShareUserMeasurements', + 'skewness' => 'getSkewness', 'sources' => 'getSources', - 'earliest_source_time' => 'getEarliestSourceTime', - 'latest_source_time' => 'getLatestSourceTime', - 'earliest_measurement_time' => 'getEarliestMeasurementTime', - 'latest_measurement_time' => 'getLatestMeasurementTime', - 'earliest_filling_time' => 'getEarliestFillingTime', - 'latest_filling_time' => 'getLatestFillingTime', - 'image_url' => 'getImageUrl', - 'ion_icon' => 'getIonIcon' + 'standard_deviation' => 'getStandardDeviation', + 'standard_deviation' => 'getStandardDeviation', + 'status' => 'getStatus', + 'subtitle' => 'getSubtitle', + 'svg_url' => 'getSvgUrl', + 'third_most_common_value' => 'getThirdMostCommonValue', + 'third_to_last_value' => 'getThirdToLastValue', + 'unit' => 'getUnit', + 'updated' => 'getUpdated', + 'updated_at' => 'getUpdatedAt', + 'updated_time' => 'getUpdatedTime', + 'user_id' => 'getUserId', + 'user_tagged_variables' => 'getUserTaggedVariables', + 'user_tag_variables' => 'getUserTagVariables', + 'user_variable_unit_abbreviated_name' => 'getUserVariableUnitAbbreviatedName', + 'user_variable_unit_category_id' => 'getUserVariableUnitCategoryId', + 'user_variable_unit_category_name' => 'getUserVariableUnitCategoryName', + 'user_variable_unit_id' => 'getUserVariableUnitId', + 'user_variable_unit_name' => 'getUserVariableUnitName', + 'user_variable_filling_value' => 'getUserVariableFillingValue', + 'user_variable_most_common_connector_id' => 'getUserVariableMostCommonConnectorId', + 'user_variable_updated_at' => 'getUserVariableUpdatedAt', + 'user_variable_valence' => 'getUserVariableValence', + 'user_variable_variable_category_id' => 'getUserVariableVariableCategoryId', + 'user_variable_variable_category_name' => 'getUserVariableVariableCategoryName', + 'user_variable_wikipedia_title' => 'getUserVariableWikipediaTitle', + 'valence' => 'getValence', + 'variable_category' => 'getVariableCategory', + 'variable_category_id' => 'getVariableCategoryId', + 'variable_category_image_url' => 'getVariableCategoryImageUrl', + 'variable_category_name' => 'getVariableCategoryName', + 'variable_filling_value' => 'getVariableFillingValue', + 'variable_id' => 'getVariableId', + 'variable_name' => 'getVariableName', + 'variance' => 'getVariance', + 'wikipedia_title' => 'getWikipediaTitle' ]; public static function attributeMap() @@ -339,62 +857,152 @@ public static function getters() */ public function __construct(array $data = null) { - $this->container['parent_id'] = isset($data['parent_id']) ? $data['parent_id'] : null; - $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; + $this->container['alias'] = isset($data['alias']) ? $data['alias'] : null; + $this->container['available_units'] = isset($data['available_units']) ? $data['available_units'] : null; + $this->container['cause_only'] = isset($data['cause_only']) ? $data['cause_only'] : null; + $this->container['charts'] = isset($data['charts']) ? $data['charts'] : null; + $this->container['charts_link_dynamic'] = isset($data['charts_link_dynamic']) ? $data['charts_link_dynamic'] : null; + $this->container['charts_link_email'] = isset($data['charts_link_email']) ? $data['charts_link_email'] : null; + $this->container['charts_link_facebook'] = isset($data['charts_link_facebook']) ? $data['charts_link_facebook'] : null; + $this->container['charts_link_google'] = isset($data['charts_link_google']) ? $data['charts_link_google'] : null; + $this->container['charts_link_static'] = isset($data['charts_link_static']) ? $data['charts_link_static'] : null; + $this->container['charts_link_twitter'] = isset($data['charts_link_twitter']) ? $data['charts_link_twitter'] : null; + $this->container['child_user_tag_variables'] = isset($data['child_user_tag_variables']) ? $data['child_user_tag_variables'] : null; $this->container['client_id'] = isset($data['client_id']) ? $data['client_id'] : null; - $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; - $this->container['default_unit_id'] = isset($data['default_unit_id']) ? $data['default_unit_id'] : null; - $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; - $this->container['maximum_allowed_value'] = isset($data['maximum_allowed_value']) ? $data['maximum_allowed_value'] : null; - $this->container['filling_value'] = isset($data['filling_value']) ? $data['filling_value'] : null; - $this->container['join_with'] = isset($data['join_with']) ? $data['join_with'] : null; - $this->container['onset_delay'] = isset($data['onset_delay']) ? $data['onset_delay'] : null; + $this->container['combination_operation'] = isset($data['combination_operation']) ? $data['combination_operation'] : null; + $this->container['common_alias'] = isset($data['common_alias']) ? $data['common_alias'] : null; + $this->container['common_tagged_variables'] = isset($data['common_tagged_variables']) ? $data['common_tagged_variables'] : null; + $this->container['common_tag_variables'] = isset($data['common_tag_variables']) ? $data['common_tag_variables'] : null; + $this->container['common_variable_most_common_connector_id'] = isset($data['common_variable_most_common_connector_id']) ? $data['common_variable_most_common_connector_id'] : null; + $this->container['common_variable_updated_at'] = isset($data['common_variable_updated_at']) ? $data['common_variable_updated_at'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['unit_abbreviated_name'] = isset($data['unit_abbreviated_name']) ? $data['unit_abbreviated_name'] : null; + $this->container['unit_category_id'] = isset($data['unit_category_id']) ? $data['unit_category_id'] : null; + $this->container['unit_category_name'] = isset($data['unit_category_name']) ? $data['unit_category_name'] : null; + $this->container['unit_id'] = isset($data['unit_id']) ? $data['unit_id'] : null; + $this->container['unit_name'] = isset($data['unit_name']) ? $data['unit_name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; $this->container['duration_of_action'] = isset($data['duration_of_action']) ? $data['duration_of_action'] : null; - $this->container['variable_category_id'] = isset($data['variable_category_id']) ? $data['variable_category_id'] : null; - $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; - $this->container['public'] = isset($data['public']) ? $data['public'] : null; - $this->container['cause_only'] = isset($data['cause_only']) ? $data['cause_only'] : null; + $this->container['duration_of_action_in_hours'] = isset($data['duration_of_action_in_hours']) ? $data['duration_of_action_in_hours'] : null; + $this->container['earliest_filling_time'] = isset($data['earliest_filling_time']) ? $data['earliest_filling_time'] : null; + $this->container['earliest_measurement_time'] = isset($data['earliest_measurement_time']) ? $data['earliest_measurement_time'] : null; + $this->container['earliest_source_time'] = isset($data['earliest_source_time']) ? $data['earliest_source_time'] : null; + $this->container['error_message'] = isset($data['error_message']) ? $data['error_message'] : null; + $this->container['experiment_end_time'] = isset($data['experiment_end_time']) ? $data['experiment_end_time'] : null; + $this->container['experiment_end_time_seconds'] = isset($data['experiment_end_time_seconds']) ? $data['experiment_end_time_seconds'] : null; + $this->container['experiment_end_time_string'] = isset($data['experiment_end_time_string']) ? $data['experiment_end_time_string'] : null; + $this->container['experiment_start_time'] = isset($data['experiment_start_time']) ? $data['experiment_start_time'] : null; + $this->container['experiment_start_time_seconds'] = isset($data['experiment_start_time_seconds']) ? $data['experiment_start_time_seconds'] : null; + $this->container['experiment_start_time_string'] = isset($data['experiment_start_time_string']) ? $data['experiment_start_time_string'] : null; $this->container['filling_type'] = isset($data['filling_type']) ? $data['filling_type'] : null; - $this->container['number_of_measurements'] = isset($data['number_of_measurements']) ? $data['number_of_measurements'] : null; - $this->container['number_of_processed_measurements'] = isset($data['number_of_processed_measurements']) ? $data['number_of_processed_measurements'] : null; - $this->container['measurements_at_last_analysis'] = isset($data['measurements_at_last_analysis']) ? $data['measurements_at_last_analysis'] : null; - $this->container['last_unit_id'] = isset($data['last_unit_id']) ? $data['last_unit_id'] : null; + $this->container['filling_value'] = isset($data['filling_value']) ? $data['filling_value'] : null; + $this->container['icon_icon'] = isset($data['icon_icon']) ? $data['icon_icon'] : null; + $this->container['highcharts'] = isset($data['highcharts']) ? $data['highcharts'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['image_url'] = isset($data['image_url']) ? $data['image_url'] : null; + $this->container['informational_url'] = isset($data['informational_url']) ? $data['informational_url'] : null; + $this->container['ingredient_of_user_tag_variables'] = isset($data['ingredient_of_user_tag_variables']) ? $data['ingredient_of_user_tag_variables'] : null; + $this->container['ingredient_user_tag_variables'] = isset($data['ingredient_user_tag_variables']) ? $data['ingredient_user_tag_variables'] : null; + $this->container['input_type'] = isset($data['input_type']) ? $data['input_type'] : null; + $this->container['ion_icon'] = isset($data['ion_icon']) ? $data['ion_icon'] : null; + $this->container['joined_user_tag_variables'] = isset($data['joined_user_tag_variables']) ? $data['joined_user_tag_variables'] : null; + $this->container['join_with'] = isset($data['join_with']) ? $data['join_with'] : null; + $this->container['kurtosis'] = isset($data['kurtosis']) ? $data['kurtosis'] : null; $this->container['last_original_unit_id'] = isset($data['last_original_unit_id']) ? $data['last_original_unit_id'] : null; - $this->container['last_value'] = isset($data['last_value']) ? $data['last_value'] : null; $this->container['last_original_value'] = isset($data['last_original_value']) ? $data['last_original_value'] : null; - $this->container['number_of_correlations'] = isset($data['number_of_correlations']) ? $data['number_of_correlations'] : null; - $this->container['status'] = isset($data['status']) ? $data['status'] : null; - $this->container['error_message'] = isset($data['error_message']) ? $data['error_message'] : null; + $this->container['last_processed_daily_value'] = isset($data['last_processed_daily_value']) ? $data['last_processed_daily_value'] : null; $this->container['last_successful_update_time'] = isset($data['last_successful_update_time']) ? $data['last_successful_update_time'] : null; - $this->container['standard_deviation'] = isset($data['standard_deviation']) ? $data['standard_deviation'] : null; - $this->container['variance'] = isset($data['variance']) ? $data['variance'] : null; - $this->container['minimum_recorded_value'] = isset($data['minimum_recorded_value']) ? $data['minimum_recorded_value'] : null; + $this->container['last_unit_id'] = isset($data['last_unit_id']) ? $data['last_unit_id'] : null; + $this->container['last_value'] = isset($data['last_value']) ? $data['last_value'] : null; + $this->container['latest_filling_time'] = isset($data['latest_filling_time']) ? $data['latest_filling_time'] : null; + $this->container['latest_measurement_time'] = isset($data['latest_measurement_time']) ? $data['latest_measurement_time'] : null; + $this->container['latest_source_time'] = isset($data['latest_source_time']) ? $data['latest_source_time'] : null; + $this->container['latest_user_measurement_time'] = isset($data['latest_user_measurement_time']) ? $data['latest_user_measurement_time'] : null; + $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; + $this->container['location'] = isset($data['location']) ? $data['location'] : null; + $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; + $this->container['manual_tracking'] = isset($data['manual_tracking']) ? $data['manual_tracking'] : null; + $this->container['maximum_allowed_value'] = isset($data['maximum_allowed_value']) ? $data['maximum_allowed_value'] : null; $this->container['maximum_recorded_daily_value'] = isset($data['maximum_recorded_daily_value']) ? $data['maximum_recorded_daily_value'] : null; + $this->container['maximum_recorded_value'] = isset($data['maximum_recorded_value']) ? $data['maximum_recorded_value'] : null; $this->container['mean'] = isset($data['mean']) ? $data['mean'] : null; + $this->container['measurements_at_last_analysis'] = isset($data['measurements_at_last_analysis']) ? $data['measurements_at_last_analysis'] : null; $this->container['median'] = isset($data['median']) ? $data['median'] : null; + $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; + $this->container['minimum_recorded_value'] = isset($data['minimum_recorded_value']) ? $data['minimum_recorded_value'] : null; + $this->container['most_common_connector_id'] = isset($data['most_common_connector_id']) ? $data['most_common_connector_id'] : null; + $this->container['most_common_original_unit_id'] = isset($data['most_common_original_unit_id']) ? $data['most_common_original_unit_id'] : null; $this->container['most_common_unit_id'] = isset($data['most_common_unit_id']) ? $data['most_common_unit_id'] : null; $this->container['most_common_value'] = isset($data['most_common_value']) ? $data['most_common_value'] : null; - $this->container['number_of_unique_daily_values'] = isset($data['number_of_unique_daily_values']) ? $data['number_of_unique_daily_values'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['number_of_aggregate_correlations_as_cause'] = isset($data['number_of_aggregate_correlations_as_cause']) ? $data['number_of_aggregate_correlations_as_cause'] : null; + $this->container['number_of_aggregate_correlations_as_effect'] = isset($data['number_of_aggregate_correlations_as_effect']) ? $data['number_of_aggregate_correlations_as_effect'] : null; $this->container['number_of_changes'] = isset($data['number_of_changes']) ? $data['number_of_changes'] : null; - $this->container['skewness'] = isset($data['skewness']) ? $data['skewness'] : null; - $this->container['kurtosis'] = isset($data['kurtosis']) ? $data['kurtosis'] : null; - $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; - $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; - $this->container['location'] = isset($data['location']) ? $data['location'] : null; - $this->container['experiment_start_time'] = isset($data['experiment_start_time']) ? $data['experiment_start_time'] : null; - $this->container['experiment_end_time'] = isset($data['experiment_end_time']) ? $data['experiment_end_time'] : null; - $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; - $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; + $this->container['number_of_correlations'] = isset($data['number_of_correlations']) ? $data['number_of_correlations'] : null; + $this->container['number_of_measurements'] = isset($data['number_of_measurements']) ? $data['number_of_measurements'] : null; + $this->container['number_of_processed_daily_measurements'] = isset($data['number_of_processed_daily_measurements']) ? $data['number_of_processed_daily_measurements'] : null; + $this->container['number_of_raw_measurements'] = isset($data['number_of_raw_measurements']) ? $data['number_of_raw_measurements'] : null; + $this->container['number_of_tracking_reminders'] = isset($data['number_of_tracking_reminders']) ? $data['number_of_tracking_reminders'] : null; + $this->container['number_of_unique_daily_values'] = isset($data['number_of_unique_daily_values']) ? $data['number_of_unique_daily_values'] : null; + $this->container['number_of_unique_values'] = isset($data['number_of_unique_values']) ? $data['number_of_unique_values'] : null; + $this->container['number_of_user_correlations_as_cause'] = isset($data['number_of_user_correlations_as_cause']) ? $data['number_of_user_correlations_as_cause'] : null; + $this->container['number_of_user_correlations_as_effect'] = isset($data['number_of_user_correlations_as_effect']) ? $data['number_of_user_correlations_as_effect'] : null; + $this->container['number_of_user_variables'] = isset($data['number_of_user_variables']) ? $data['number_of_user_variables'] : null; + $this->container['onset_delay'] = isset($data['onset_delay']) ? $data['onset_delay'] : null; + $this->container['onset_delay_in_hours'] = isset($data['onset_delay_in_hours']) ? $data['onset_delay_in_hours'] : null; $this->container['outcome'] = isset($data['outcome']) ? $data['outcome'] : null; + $this->container['outcome_of_interest'] = isset($data['outcome_of_interest']) ? $data['outcome_of_interest'] : null; + $this->container['parent'] = isset($data['parent']) ? $data['parent'] : null; + $this->container['parent_id'] = isset($data['parent_id']) ? $data['parent_id'] : null; + $this->container['parent_user_tag_variables'] = isset($data['parent_user_tag_variables']) ? $data['parent_user_tag_variables'] : null; + $this->container['png_path'] = isset($data['png_path']) ? $data['png_path'] : null; + $this->container['png_url'] = isset($data['png_url']) ? $data['png_url'] : null; + $this->container['predictor_of_interest'] = isset($data['predictor_of_interest']) ? $data['predictor_of_interest'] : null; + $this->container['price'] = isset($data['price']) ? $data['price'] : null; + $this->container['product_url'] = isset($data['product_url']) ? $data['product_url'] : null; + $this->container['public'] = isset($data['public']) ? $data['public'] : null; + $this->container['raw_measurements_at_last_analysis'] = isset($data['raw_measurements_at_last_analysis']) ? $data['raw_measurements_at_last_analysis'] : null; + $this->container['second_most_common_value'] = isset($data['second_most_common_value']) ? $data['second_most_common_value'] : null; + $this->container['second_to_last_value'] = isset($data['second_to_last_value']) ? $data['second_to_last_value'] : null; + $this->container['share_user_measurements'] = isset($data['share_user_measurements']) ? $data['share_user_measurements'] : null; + $this->container['skewness'] = isset($data['skewness']) ? $data['skewness'] : null; $this->container['sources'] = isset($data['sources']) ? $data['sources'] : null; - $this->container['earliest_source_time'] = isset($data['earliest_source_time']) ? $data['earliest_source_time'] : null; - $this->container['latest_source_time'] = isset($data['latest_source_time']) ? $data['latest_source_time'] : null; - $this->container['earliest_measurement_time'] = isset($data['earliest_measurement_time']) ? $data['earliest_measurement_time'] : null; - $this->container['latest_measurement_time'] = isset($data['latest_measurement_time']) ? $data['latest_measurement_time'] : null; - $this->container['earliest_filling_time'] = isset($data['earliest_filling_time']) ? $data['earliest_filling_time'] : null; - $this->container['latest_filling_time'] = isset($data['latest_filling_time']) ? $data['latest_filling_time'] : null; - $this->container['image_url'] = isset($data['image_url']) ? $data['image_url'] : null; - $this->container['ion_icon'] = isset($data['ion_icon']) ? $data['ion_icon'] : null; + $this->container['standard_deviation'] = isset($data['standard_deviation']) ? $data['standard_deviation'] : null; + $this->container['standard_deviation'] = isset($data['standard_deviation']) ? $data['standard_deviation'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['subtitle'] = isset($data['subtitle']) ? $data['subtitle'] : null; + $this->container['svg_url'] = isset($data['svg_url']) ? $data['svg_url'] : null; + $this->container['third_most_common_value'] = isset($data['third_most_common_value']) ? $data['third_most_common_value'] : null; + $this->container['third_to_last_value'] = isset($data['third_to_last_value']) ? $data['third_to_last_value'] : null; + $this->container['unit'] = isset($data['unit']) ? $data['unit'] : null; + $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; + $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; + $this->container['updated_time'] = isset($data['updated_time']) ? $data['updated_time'] : null; + $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; + $this->container['user_tagged_variables'] = isset($data['user_tagged_variables']) ? $data['user_tagged_variables'] : null; + $this->container['user_tag_variables'] = isset($data['user_tag_variables']) ? $data['user_tag_variables'] : null; + $this->container['user_variable_unit_abbreviated_name'] = isset($data['user_variable_unit_abbreviated_name']) ? $data['user_variable_unit_abbreviated_name'] : null; + $this->container['user_variable_unit_category_id'] = isset($data['user_variable_unit_category_id']) ? $data['user_variable_unit_category_id'] : null; + $this->container['user_variable_unit_category_name'] = isset($data['user_variable_unit_category_name']) ? $data['user_variable_unit_category_name'] : null; + $this->container['user_variable_unit_id'] = isset($data['user_variable_unit_id']) ? $data['user_variable_unit_id'] : null; + $this->container['user_variable_unit_name'] = isset($data['user_variable_unit_name']) ? $data['user_variable_unit_name'] : null; + $this->container['user_variable_filling_value'] = isset($data['user_variable_filling_value']) ? $data['user_variable_filling_value'] : null; + $this->container['user_variable_most_common_connector_id'] = isset($data['user_variable_most_common_connector_id']) ? $data['user_variable_most_common_connector_id'] : null; + $this->container['user_variable_updated_at'] = isset($data['user_variable_updated_at']) ? $data['user_variable_updated_at'] : null; + $this->container['user_variable_valence'] = isset($data['user_variable_valence']) ? $data['user_variable_valence'] : null; + $this->container['user_variable_variable_category_id'] = isset($data['user_variable_variable_category_id']) ? $data['user_variable_variable_category_id'] : null; + $this->container['user_variable_variable_category_name'] = isset($data['user_variable_variable_category_name']) ? $data['user_variable_variable_category_name'] : null; + $this->container['user_variable_wikipedia_title'] = isset($data['user_variable_wikipedia_title']) ? $data['user_variable_wikipedia_title'] : null; + $this->container['valence'] = isset($data['valence']) ? $data['valence'] : null; + $this->container['variable_category'] = isset($data['variable_category']) ? $data['variable_category'] : null; + $this->container['variable_category_id'] = isset($data['variable_category_id']) ? $data['variable_category_id'] : null; + $this->container['variable_category_image_url'] = isset($data['variable_category_image_url']) ? $data['variable_category_image_url'] : null; + $this->container['variable_category_name'] = isset($data['variable_category_name']) ? $data['variable_category_name'] : null; + $this->container['variable_filling_value'] = isset($data['variable_filling_value']) ? $data['variable_filling_value'] : null; + $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; + $this->container['variable_name'] = isset($data['variable_name']) ? $data['variable_name'] : null; + $this->container['variance'] = isset($data['variance']) ? $data['variance'] : null; + $this->container['wikipedia_title'] = isset($data['wikipedia_title']) ? $data['wikipedia_title'] : null; } /** @@ -406,6 +1014,63 @@ public function listInvalidProperties() { $invalid_properties = []; + if ($this->container['alias'] === null) { + $invalid_properties[] = "'alias' can't be null"; + } + if ($this->container['available_units'] === null) { + $invalid_properties[] = "'available_units' can't be null"; + } + if ($this->container['child_user_tag_variables'] === null) { + $invalid_properties[] = "'child_user_tag_variables' can't be null"; + } + if ($this->container['common_tagged_variables'] === null) { + $invalid_properties[] = "'common_tagged_variables' can't be null"; + } + if ($this->container['common_tag_variables'] === null) { + $invalid_properties[] = "'common_tag_variables' can't be null"; + } + if ($this->container['informational_url'] === null) { + $invalid_properties[] = "'informational_url' can't be null"; + } + if ($this->container['ingredient_of_user_tag_variables'] === null) { + $invalid_properties[] = "'ingredient_of_user_tag_variables' can't be null"; + } + if ($this->container['ingredient_user_tag_variables'] === null) { + $invalid_properties[] = "'ingredient_user_tag_variables' can't be null"; + } + if ($this->container['joined_user_tag_variables'] === null) { + $invalid_properties[] = "'joined_user_tag_variables' can't be null"; + } + if ($this->container['parent'] === null) { + $invalid_properties[] = "'parent' can't be null"; + } + if ($this->container['parent_user_tag_variables'] === null) { + $invalid_properties[] = "'parent_user_tag_variables' can't be null"; + } + if ($this->container['price'] === null) { + $invalid_properties[] = "'price' can't be null"; + } + if ($this->container['product_url'] === null) { + $invalid_properties[] = "'product_url' can't be null"; + } + if ($this->container['user_tagged_variables'] === null) { + $invalid_properties[] = "'user_tagged_variables' can't be null"; + } + if ($this->container['user_tag_variables'] === null) { + $invalid_properties[] = "'user_tag_variables' can't be null"; + } + if ($this->container['user_variable_valence'] === null) { + $invalid_properties[] = "'user_variable_valence' can't be null"; + } + if ($this->container['user_variable_wikipedia_title'] === null) { + $invalid_properties[] = "'user_variable_wikipedia_title' can't be null"; + } + if ($this->container['variable_id'] === null) { + $invalid_properties[] = "'variable_id' can't be null"; + } + if ($this->container['wikipedia_title'] === null) { + $invalid_properties[] = "'wikipedia_title' can't be null"; + } return $invalid_properties; } @@ -418,279 +1083,2226 @@ public function listInvalidProperties() public function valid() { + if ($this->container['alias'] === null) { + return false; + } + if ($this->container['available_units'] === null) { + return false; + } + if ($this->container['child_user_tag_variables'] === null) { + return false; + } + if ($this->container['common_tagged_variables'] === null) { + return false; + } + if ($this->container['common_tag_variables'] === null) { + return false; + } + if ($this->container['informational_url'] === null) { + return false; + } + if ($this->container['ingredient_of_user_tag_variables'] === null) { + return false; + } + if ($this->container['ingredient_user_tag_variables'] === null) { + return false; + } + if ($this->container['joined_user_tag_variables'] === null) { + return false; + } + if ($this->container['parent'] === null) { + return false; + } + if ($this->container['parent_user_tag_variables'] === null) { + return false; + } + if ($this->container['price'] === null) { + return false; + } + if ($this->container['product_url'] === null) { + return false; + } + if ($this->container['user_tagged_variables'] === null) { + return false; + } + if ($this->container['user_tag_variables'] === null) { + return false; + } + if ($this->container['user_variable_valence'] === null) { + return false; + } + if ($this->container['user_variable_wikipedia_title'] === null) { + return false; + } + if ($this->container['variable_id'] === null) { + return false; + } + if ($this->container['wikipedia_title'] === null) { + return false; + } return true; } /** - * Gets parent_id - * @return int + * Gets alias + * @return string */ - public function getParentId() + public function getAlias() { - return $this->container['parent_id']; + return $this->container['alias']; } /** - * Sets parent_id - * @param int $parent_id ID of the parent variable if this variable has any parent + * Sets alias + * @param string $alias Example: * @return $this */ - public function setParentId($parent_id) + public function setAlias($alias) { - $this->container['parent_id'] = $parent_id; + $this->container['alias'] = $alias; return $this; } /** - * Gets user_id - * @return int + * Gets available_units + * @return \QuantiModo\Client\Model\Unit[] */ - public function getUserId() + public function getAvailableUnits() { - return $this->container['user_id']; + return $this->container['available_units']; } /** - * Sets user_id - * @param int $user_id User ID + * Sets available_units + * @param \QuantiModo\Client\Model\Unit[] $available_units * @return $this */ - public function setUserId($user_id) + public function setAvailableUnits($available_units) { - $this->container['user_id'] = $user_id; + $this->container['available_units'] = $available_units; return $this; } /** - * Gets client_id + * Gets cause_only + * @return bool + */ + public function getCauseOnly() + { + return $this->container['cause_only']; + } + + /** + * Sets cause_only + * @param bool $cause_only A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + * @return $this + */ + public function setCauseOnly($cause_only) + { + $this->container['cause_only'] = $cause_only; + + return $this; + } + + /** + * Gets charts + * @return object + */ + public function getCharts() + { + return $this->container['charts']; + } + + /** + * Sets charts + * @param object $charts Highcharts configs you can use if you add highcharts.js to your page + * @return $this + */ + public function setCharts($charts) + { + $this->container['charts'] = $charts; + + return $this; + } + + /** + * Gets charts_link_dynamic * @return string */ - public function getClientId() + public function getChartsLinkDynamic() { - return $this->container['client_id']; + return $this->container['charts_link_dynamic']; } /** - * Sets client_id - * @param string $client_id client_id + * Sets charts_link_dynamic + * @param string $charts_link_dynamic Example: https://local.quantimo.do/ionic/Modo/www/#/app/charts/Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29?variableName=Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29&userId=230&pngUrl=https%3A%2F%2Fapp.quantimo.do%2Fionic%2FModo%2Fwww%2Fimg%2Fvariable_categories%2Ftreatments.png + * @return $this + */ + public function setChartsLinkDynamic($charts_link_dynamic) + { + $this->container['charts_link_dynamic'] = $charts_link_dynamic; + + return $this; + } + + /** + * Gets charts_link_email + * @return string + */ + public function getChartsLinkEmail() + { + return $this->container['charts_link_email']; + } + + /** + * Sets charts_link_email + * @param string $charts_link_email Example: mailto:?subject=Check%20out%20my%20Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29%20data%21&body=See%20my%20Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29%20history%20at%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DTrader%2520Joes%2520Bedtime%2520Tea%2520%252F%2520Sleepytime%2520Tea%2520%2528any%2520Brand%2529%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png%0A%0AHave%20a%20great%20day! + * @return $this + */ + public function setChartsLinkEmail($charts_link_email) + { + $this->container['charts_link_email'] = $charts_link_email; + + return $this; + } + + /** + * Gets charts_link_facebook + * @return string + */ + public function getChartsLinkFacebook() + { + return $this->container['charts_link_facebook']; + } + + /** + * Sets charts_link_facebook + * @param string $charts_link_facebook Example: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DTrader%2520Joes%2520Bedtime%2520Tea%2520%252F%2520Sleepytime%2520Tea%2520%2528any%2520Brand%2529%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png + * @return $this + */ + public function setChartsLinkFacebook($charts_link_facebook) + { + $this->container['charts_link_facebook'] = $charts_link_facebook; + + return $this; + } + + /** + * Gets charts_link_google + * @return string + */ + public function getChartsLinkGoogle() + { + return $this->container['charts_link_google']; + } + + /** + * Sets charts_link_google + * @param string $charts_link_google Example: https://plus.google.com/share?url=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DTrader%2520Joes%2520Bedtime%2520Tea%2520%252F%2520Sleepytime%2520Tea%2520%2528any%2520Brand%2529%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png + * @return $this + */ + public function setChartsLinkGoogle($charts_link_google) + { + $this->container['charts_link_google'] = $charts_link_google; + + return $this; + } + + /** + * Gets charts_link_static + * @return string + */ + public function getChartsLinkStatic() + { + return $this->container['charts_link_static']; + } + + /** + * Sets charts_link_static + * @param string $charts_link_static Example: https://local.quantimo.do/api/v2/charts?variableName=Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29&userId=230&pngUrl=https%3A%2F%2Fapp.quantimo.do%2Fionic%2FModo%2Fwww%2Fimg%2Fvariable_categories%2Ftreatments.png + * @return $this + */ + public function setChartsLinkStatic($charts_link_static) + { + $this->container['charts_link_static'] = $charts_link_static; + + return $this; + } + + /** + * Gets charts_link_twitter + * @return string + */ + public function getChartsLinkTwitter() + { + return $this->container['charts_link_twitter']; + } + + /** + * Sets charts_link_twitter + * @param string $charts_link_twitter Example: https://twitter.com/home?status=Check%20out%20my%20Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29%20data%21%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DTrader%2520Joes%2520Bedtime%2520Tea%2520%252F%2520Sleepytime%2520Tea%2520%2528any%2520Brand%2529%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png%20%40quantimodo + * @return $this + */ + public function setChartsLinkTwitter($charts_link_twitter) + { + $this->container['charts_link_twitter'] = $charts_link_twitter; + + return $this; + } + + /** + * Gets child_user_tag_variables + * @return \QuantiModo\Client\Model\UserVariableArray + */ + public function getChildUserTagVariables() + { + return $this->container['child_user_tag_variables']; + } + + /** + * Sets child_user_tag_variables + * @param \QuantiModo\Client\Model\UserVariableArray $child_user_tag_variables + * @return $this + */ + public function setChildUserTagVariables($child_user_tag_variables) + { + $this->container['child_user_tag_variables'] = $child_user_tag_variables; + + return $this; + } + + /** + * Gets client_id + * @return string + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * @param string $client_id clientId + * @return $this + */ + public function setClientId($client_id) + { + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets combination_operation + * @return string + */ + public function getCombinationOperation() + { + return $this->container['combination_operation']; + } + + /** + * Sets combination_operation + * @param string $combination_operation Example: MEAN + * @return $this + */ + public function setCombinationOperation($combination_operation) + { + $this->container['combination_operation'] = $combination_operation; + + return $this; + } + + /** + * Gets common_alias + * @return string + */ + public function getCommonAlias() + { + return $this->container['common_alias']; + } + + /** + * Sets common_alias + * @param string $common_alias Example: Anxiety / Nervousness + * @return $this + */ + public function setCommonAlias($common_alias) + { + $this->container['common_alias'] = $common_alias; + + return $this; + } + + /** + * Gets common_tagged_variables + * @return \QuantiModo\Client\Model\CommonVariableArray + */ + public function getCommonTaggedVariables() + { + return $this->container['common_tagged_variables']; + } + + /** + * Sets common_tagged_variables + * @param \QuantiModo\Client\Model\CommonVariableArray $common_tagged_variables + * @return $this + */ + public function setCommonTaggedVariables($common_tagged_variables) + { + $this->container['common_tagged_variables'] = $common_tagged_variables; + + return $this; + } + + /** + * Gets common_tag_variables + * @return \QuantiModo\Client\Model\CommonVariableArray + */ + public function getCommonTagVariables() + { + return $this->container['common_tag_variables']; + } + + /** + * Sets common_tag_variables + * @param \QuantiModo\Client\Model\CommonVariableArray $common_tag_variables + * @return $this + */ + public function setCommonTagVariables($common_tag_variables) + { + $this->container['common_tag_variables'] = $common_tag_variables; + + return $this; + } + + /** + * Gets common_variable_most_common_connector_id + * @return int + */ + public function getCommonVariableMostCommonConnectorId() + { + return $this->container['common_variable_most_common_connector_id']; + } + + /** + * Sets common_variable_most_common_connector_id + * @param int $common_variable_most_common_connector_id Example: 51 + * @return $this + */ + public function setCommonVariableMostCommonConnectorId($common_variable_most_common_connector_id) + { + $this->container['common_variable_most_common_connector_id'] = $common_variable_most_common_connector_id; + + return $this; + } + + /** + * Gets common_variable_updated_at + * @return \DateTime + */ + public function getCommonVariableUpdatedAt() + { + return $this->container['common_variable_updated_at']; + } + + /** + * Sets common_variable_updated_at + * @param \DateTime $common_variable_updated_at Example: 2017-02-07 23:43:39 + * @return $this + */ + public function setCommonVariableUpdatedAt($common_variable_updated_at) + { + $this->container['common_variable_updated_at'] = $common_variable_updated_at; + + return $this; + } + + /** + * Gets created_at + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * @param \DateTime $created_at When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format + * @return $this + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets unit_abbreviated_name + * @return string + */ + public function getUnitAbbreviatedName() + { + return $this->container['unit_abbreviated_name']; + } + + /** + * Sets unit_abbreviated_name + * @param string $unit_abbreviated_name Example: count + * @return $this + */ + public function setUnitAbbreviatedName($unit_abbreviated_name) + { + $this->container['unit_abbreviated_name'] = $unit_abbreviated_name; + + return $this; + } + + /** + * Gets unit_category_id + * @return int + */ + public function getUnitCategoryId() + { + return $this->container['unit_category_id']; + } + + /** + * Sets unit_category_id + * @param int $unit_category_id Example: 6 + * @return $this + */ + public function setUnitCategoryId($unit_category_id) + { + $this->container['unit_category_id'] = $unit_category_id; + + return $this; + } + + /** + * Gets unit_category_name + * @return string + */ + public function getUnitCategoryName() + { + return $this->container['unit_category_name']; + } + + /** + * Sets unit_category_name + * @param string $unit_category_name Example: Miscellany + * @return $this + */ + public function setUnitCategoryName($unit_category_name) + { + $this->container['unit_category_name'] = $unit_category_name; + + return $this; + } + + /** + * Gets unit_id + * @return int + */ + public function getUnitId() + { + return $this->container['unit_id']; + } + + /** + * Sets unit_id + * @param int $unit_id ID of unit to use for this variable + * @return $this + */ + public function setUnitId($unit_id) + { + $this->container['unit_id'] = $unit_id; + + return $this; + } + + /** + * Gets unit_name + * @return string + */ + public function getUnitName() + { + return $this->container['unit_name']; + } + + /** + * Sets unit_name + * @param string $unit_name Example: Count + * @return $this + */ + public function setUnitName($unit_name) + { + $this->container['unit_name'] = $unit_name; + + return $this; + } + + /** + * Gets description + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * @param string $description Example: negative + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets duration_of_action + * @return int + */ + public function getDurationOfAction() + { + return $this->container['duration_of_action']; + } + + /** + * Sets duration_of_action + * @param int $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. + * @return $this + */ + public function setDurationOfAction($duration_of_action) + { + $this->container['duration_of_action'] = $duration_of_action; + + return $this; + } + + /** + * Gets duration_of_action_in_hours + * @return int + */ + public function getDurationOfActionInHours() + { + return $this->container['duration_of_action_in_hours']; + } + + /** + * Sets duration_of_action_in_hours + * @param int $duration_of_action_in_hours Example: 168 + * @return $this + */ + public function setDurationOfActionInHours($duration_of_action_in_hours) + { + $this->container['duration_of_action_in_hours'] = $duration_of_action_in_hours; + + return $this; + } + + /** + * Gets earliest_filling_time + * @return int + */ + public function getEarliestFillingTime() + { + return $this->container['earliest_filling_time']; + } + + /** + * Sets earliest_filling_time + * @param int $earliest_filling_time Earliest filling time + * @return $this + */ + public function setEarliestFillingTime($earliest_filling_time) + { + $this->container['earliest_filling_time'] = $earliest_filling_time; + + return $this; + } + + /** + * Gets earliest_measurement_time + * @return int + */ + public function getEarliestMeasurementTime() + { + return $this->container['earliest_measurement_time']; + } + + /** + * Sets earliest_measurement_time + * @param int $earliest_measurement_time Earliest measurement time + * @return $this + */ + public function setEarliestMeasurementTime($earliest_measurement_time) + { + $this->container['earliest_measurement_time'] = $earliest_measurement_time; + + return $this; + } + + /** + * Gets earliest_source_time + * @return int + */ + public function getEarliestSourceTime() + { + return $this->container['earliest_source_time']; + } + + /** + * Sets earliest_source_time + * @param int $earliest_source_time Earliest source time + * @return $this + */ + public function setEarliestSourceTime($earliest_source_time) + { + $this->container['earliest_source_time'] = $earliest_source_time; + + return $this; + } + + /** + * Gets error_message + * @return string + */ + public function getErrorMessage() + { + return $this->container['error_message']; + } + + /** + * Sets error_message + * @param string $error_message error_message + * @return $this + */ + public function setErrorMessage($error_message) + { + $this->container['error_message'] = $error_message; + + return $this; + } + + /** + * Gets experiment_end_time + * @return \DateTime + */ + public function getExperimentEndTime() + { + return $this->container['experiment_end_time']; + } + + /** + * Sets experiment_end_time + * @param \DateTime $experiment_end_time Latest measurement start_time to be used in analysis. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format + * @return $this + */ + public function setExperimentEndTime($experiment_end_time) + { + $this->container['experiment_end_time'] = $experiment_end_time; + + return $this; + } + + /** + * Gets experiment_end_time_seconds + * @return int + */ + public function getExperimentEndTimeSeconds() + { + return $this->container['experiment_end_time_seconds']; + } + + /** + * Sets experiment_end_time_seconds + * @param int $experiment_end_time_seconds Example: 1893477600 + * @return $this + */ + public function setExperimentEndTimeSeconds($experiment_end_time_seconds) + { + $this->container['experiment_end_time_seconds'] = $experiment_end_time_seconds; + + return $this; + } + + /** + * Gets experiment_end_time_string + * @return \DateTime + */ + public function getExperimentEndTimeString() + { + return $this->container['experiment_end_time_string']; + } + + /** + * Sets experiment_end_time_string + * @param \DateTime $experiment_end_time_string Example: 2030-01-01 06:00:00 + * @return $this + */ + public function setExperimentEndTimeString($experiment_end_time_string) + { + $this->container['experiment_end_time_string'] = $experiment_end_time_string; + + return $this; + } + + /** + * Gets experiment_start_time + * @return \DateTime + */ + public function getExperimentStartTime() + { + return $this->container['experiment_start_time']; + } + + /** + * Sets experiment_start_time + * @param \DateTime $experiment_start_time Earliest measurement start_time to be used in analysis. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format + * @return $this + */ + public function setExperimentStartTime($experiment_start_time) + { + $this->container['experiment_start_time'] = $experiment_start_time; + + return $this; + } + + /** + * Gets experiment_start_time_seconds + * @return int + */ + public function getExperimentStartTimeSeconds() + { + return $this->container['experiment_start_time_seconds']; + } + + /** + * Sets experiment_start_time_seconds + * @param int $experiment_start_time_seconds Example: 1269307902 + * @return $this + */ + public function setExperimentStartTimeSeconds($experiment_start_time_seconds) + { + $this->container['experiment_start_time_seconds'] = $experiment_start_time_seconds; + + return $this; + } + + /** + * Gets experiment_start_time_string + * @return \DateTime + */ + public function getExperimentStartTimeString() + { + return $this->container['experiment_start_time_string']; + } + + /** + * Sets experiment_start_time_string + * @param \DateTime $experiment_start_time_string Example: 2010-03-23 01:31:42 + * @return $this + */ + public function setExperimentStartTimeString($experiment_start_time_string) + { + $this->container['experiment_start_time_string'] = $experiment_start_time_string; + + return $this; + } + + /** + * Gets filling_type + * @return string + */ + public function getFillingType() + { + return $this->container['filling_type']; + } + + /** + * Sets filling_type + * @param string $filling_type 0 -> No filling, 1 -> Use filling-value + * @return $this + */ + public function setFillingType($filling_type) + { + $this->container['filling_type'] = $filling_type; + + return $this; + } + + /** + * Gets filling_value + * @return float + */ + public function getFillingValue() + { + return $this->container['filling_value']; + } + + /** + * Sets filling_value + * @param float $filling_value When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. + * @return $this + */ + public function setFillingValue($filling_value) + { + $this->container['filling_value'] = $filling_value; + + return $this; + } + + /** + * Gets icon_icon + * @return string + */ + public function getIconIcon() + { + return $this->container['icon_icon']; + } + + /** + * Sets icon_icon + * @param string $icon_icon Example: ion-sad-outline + * @return $this + */ + public function setIconIcon($icon_icon) + { + $this->container['icon_icon'] = $icon_icon; + + return $this; + } + + /** + * Gets highcharts + * @return \QuantiModo\Client\Model\HighchartArray + */ + public function getHighcharts() + { + return $this->container['highcharts']; + } + + /** + * Sets highcharts + * @param \QuantiModo\Client\Model\HighchartArray $highcharts + * @return $this + */ + public function setHighcharts($highcharts) + { + $this->container['highcharts'] = $highcharts; + + return $this; + } + + /** + * Gets id + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param int $id Example: 95614 + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets image_url + * @return string + */ + public function getImageUrl() + { + return $this->container['image_url']; + } + + /** + * Sets image_url + * @param string $image_url + * @return $this + */ + public function setImageUrl($image_url) + { + $this->container['image_url'] = $image_url; + + return $this; + } + + /** + * Gets informational_url + * @return string + */ + public function getInformationalUrl() + { + return $this->container['informational_url']; + } + + /** + * Sets informational_url + * @param string $informational_url Example: + * @return $this + */ + public function setInformationalUrl($informational_url) + { + $this->container['informational_url'] = $informational_url; + + return $this; + } + + /** + * Gets ingredient_of_user_tag_variables + * @return \QuantiModo\Client\Model\UserVariableArray + */ + public function getIngredientOfUserTagVariables() + { + return $this->container['ingredient_of_user_tag_variables']; + } + + /** + * Sets ingredient_of_user_tag_variables + * @param \QuantiModo\Client\Model\UserVariableArray $ingredient_of_user_tag_variables + * @return $this + */ + public function setIngredientOfUserTagVariables($ingredient_of_user_tag_variables) + { + $this->container['ingredient_of_user_tag_variables'] = $ingredient_of_user_tag_variables; + + return $this; + } + + /** + * Gets ingredient_user_tag_variables + * @return \QuantiModo\Client\Model\UserVariableArray + */ + public function getIngredientUserTagVariables() + { + return $this->container['ingredient_user_tag_variables']; + } + + /** + * Sets ingredient_user_tag_variables + * @param \QuantiModo\Client\Model\UserVariableArray $ingredient_user_tag_variables + * @return $this + */ + public function setIngredientUserTagVariables($ingredient_user_tag_variables) + { + $this->container['ingredient_user_tag_variables'] = $ingredient_user_tag_variables; + + return $this; + } + + /** + * Gets input_type + * @return string + */ + public function getInputType() + { + return $this->container['input_type']; + } + + /** + * Sets input_type + * @param string $input_type Example: value + * @return $this + */ + public function setInputType($input_type) + { + $this->container['input_type'] = $input_type; + + return $this; + } + + /** + * Gets ion_icon + * @return string + */ + public function getIonIcon() + { + return $this->container['ion_icon']; + } + + /** + * Sets ion_icon + * @param string $ion_icon + * @return $this + */ + public function setIonIcon($ion_icon) + { + $this->container['ion_icon'] = $ion_icon; + + return $this; + } + + /** + * Gets joined_user_tag_variables + * @return \QuantiModo\Client\Model\UserVariableArray + */ + public function getJoinedUserTagVariables() + { + return $this->container['joined_user_tag_variables']; + } + + /** + * Sets joined_user_tag_variables + * @param \QuantiModo\Client\Model\UserVariableArray $joined_user_tag_variables + * @return $this + */ + public function setJoinedUserTagVariables($joined_user_tag_variables) + { + $this->container['joined_user_tag_variables'] = $joined_user_tag_variables; + + return $this; + } + + /** + * Gets join_with + * @return int + */ + public function getJoinWith() + { + return $this->container['join_with']; + } + + /** + * Sets join_with + * @param int $join_with The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + * @return $this + */ + public function setJoinWith($join_with) + { + $this->container['join_with'] = $join_with; + + return $this; + } + + /** + * Gets kurtosis + * @return float + */ + public function getKurtosis() + { + return $this->container['kurtosis']; + } + + /** + * Sets kurtosis + * @param float $kurtosis Kurtosis + * @return $this + */ + public function setKurtosis($kurtosis) + { + $this->container['kurtosis'] = $kurtosis; + + return $this; + } + + /** + * Gets last_original_unit_id + * @return int + */ + public function getLastOriginalUnitId() + { + return $this->container['last_original_unit_id']; + } + + /** + * Sets last_original_unit_id + * @param int $last_original_unit_id ID of last original Unit + * @return $this + */ + public function setLastOriginalUnitId($last_original_unit_id) + { + $this->container['last_original_unit_id'] = $last_original_unit_id; + + return $this; + } + + /** + * Gets last_original_value + * @return int + */ + public function getLastOriginalValue() + { + return $this->container['last_original_value']; + } + + /** + * Sets last_original_value + * @param int $last_original_value Last original value which is stored + * @return $this + */ + public function setLastOriginalValue($last_original_value) + { + $this->container['last_original_value'] = $last_original_value; + + return $this; + } + + /** + * Gets last_processed_daily_value + * @return double + */ + public function getLastProcessedDailyValue() + { + return $this->container['last_processed_daily_value']; + } + + /** + * Sets last_processed_daily_value + * @param double $last_processed_daily_value Example: 500 + * @return $this + */ + public function setLastProcessedDailyValue($last_processed_daily_value) + { + $this->container['last_processed_daily_value'] = $last_processed_daily_value; + + return $this; + } + + /** + * Gets last_successful_update_time + * @return \DateTime + */ + public function getLastSuccessfulUpdateTime() + { + return $this->container['last_successful_update_time']; + } + + /** + * Sets last_successful_update_time + * @param \DateTime $last_successful_update_time When this variable or its settings were last updated + * @return $this + */ + public function setLastSuccessfulUpdateTime($last_successful_update_time) + { + $this->container['last_successful_update_time'] = $last_successful_update_time; + + return $this; + } + + /** + * Gets last_unit_id + * @return int + */ + public function getLastUnitId() + { + return $this->container['last_unit_id']; + } + + /** + * Sets last_unit_id + * @param int $last_unit_id ID of last Unit + * @return $this + */ + public function setLastUnitId($last_unit_id) + { + $this->container['last_unit_id'] = $last_unit_id; + + return $this; + } + + /** + * Gets last_value + * @return float + */ + public function getLastValue() + { + return $this->container['last_value']; + } + + /** + * Sets last_value + * @param float $last_value Last Value + * @return $this + */ + public function setLastValue($last_value) + { + $this->container['last_value'] = $last_value; + + return $this; + } + + /** + * Gets latest_filling_time + * @return int + */ + public function getLatestFillingTime() + { + return $this->container['latest_filling_time']; + } + + /** + * Sets latest_filling_time + * @param int $latest_filling_time Latest filling time + * @return $this + */ + public function setLatestFillingTime($latest_filling_time) + { + $this->container['latest_filling_time'] = $latest_filling_time; + + return $this; + } + + /** + * Gets latest_measurement_time + * @return int + */ + public function getLatestMeasurementTime() + { + return $this->container['latest_measurement_time']; + } + + /** + * Sets latest_measurement_time + * @param int $latest_measurement_time Latest measurement time + * @return $this + */ + public function setLatestMeasurementTime($latest_measurement_time) + { + $this->container['latest_measurement_time'] = $latest_measurement_time; + + return $this; + } + + /** + * Gets latest_source_time + * @return int + */ + public function getLatestSourceTime() + { + return $this->container['latest_source_time']; + } + + /** + * Sets latest_source_time + * @param int $latest_source_time Latest source time + * @return $this + */ + public function setLatestSourceTime($latest_source_time) + { + $this->container['latest_source_time'] = $latest_source_time; + + return $this; + } + + /** + * Gets latest_user_measurement_time + * @return int + */ + public function getLatestUserMeasurementTime() + { + return $this->container['latest_user_measurement_time']; + } + + /** + * Sets latest_user_measurement_time + * @param int $latest_user_measurement_time Example: 1501383600 + * @return $this + */ + public function setLatestUserMeasurementTime($latest_user_measurement_time) + { + $this->container['latest_user_measurement_time'] = $latest_user_measurement_time; + + return $this; + } + + /** + * Gets latitude + * @return float + */ + public function getLatitude() + { + return $this->container['latitude']; + } + + /** + * Sets latitude + * @param float $latitude Latitude + * @return $this + */ + public function setLatitude($latitude) + { + $this->container['latitude'] = $latitude; + + return $this; + } + + /** + * Gets location + * @return string + */ + public function getLocation() + { + return $this->container['location']; + } + + /** + * Sets location + * @param string $location Location + * @return $this + */ + public function setLocation($location) + { + $this->container['location'] = $location; + + return $this; + } + + /** + * Gets longitude + * @return float + */ + public function getLongitude() + { + return $this->container['longitude']; + } + + /** + * Sets longitude + * @param float $longitude Longitude + * @return $this + */ + public function setLongitude($longitude) + { + $this->container['longitude'] = $longitude; + + return $this; + } + + /** + * Gets manual_tracking + * @return bool + */ + public function getManualTracking() + { + return $this->container['manual_tracking']; + } + + /** + * Sets manual_tracking + * @param bool $manual_tracking Example: 1 + * @return $this + */ + public function setManualTracking($manual_tracking) + { + $this->container['manual_tracking'] = $manual_tracking; + + return $this; + } + + /** + * Gets maximum_allowed_value + * @return float + */ + public function getMaximumAllowedValue() + { + return $this->container['maximum_allowed_value']; + } + + /** + * Sets maximum_allowed_value + * @param float $maximum_allowed_value The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. + * @return $this + */ + public function setMaximumAllowedValue($maximum_allowed_value) + { + $this->container['maximum_allowed_value'] = $maximum_allowed_value; + + return $this; + } + + /** + * Gets maximum_recorded_daily_value + * @return float + */ + public function getMaximumRecordedDailyValue() + { + return $this->container['maximum_recorded_daily_value']; + } + + /** + * Sets maximum_recorded_daily_value + * @param float $maximum_recorded_daily_value Maximum recorded daily value of this variable + * @return $this + */ + public function setMaximumRecordedDailyValue($maximum_recorded_daily_value) + { + $this->container['maximum_recorded_daily_value'] = $maximum_recorded_daily_value; + + return $this; + } + + /** + * Gets maximum_recorded_value + * @return double + */ + public function getMaximumRecordedValue() + { + return $this->container['maximum_recorded_value']; + } + + /** + * Sets maximum_recorded_value + * @param double $maximum_recorded_value Example: 1 + * @return $this + */ + public function setMaximumRecordedValue($maximum_recorded_value) + { + $this->container['maximum_recorded_value'] = $maximum_recorded_value; + + return $this; + } + + /** + * Gets mean + * @return float + */ + public function getMean() + { + return $this->container['mean']; + } + + /** + * Sets mean + * @param float $mean Mean + * @return $this + */ + public function setMean($mean) + { + $this->container['mean'] = $mean; + + return $this; + } + + /** + * Gets measurements_at_last_analysis + * @return int + */ + public function getMeasurementsAtLastAnalysis() + { + return $this->container['measurements_at_last_analysis']; + } + + /** + * Sets measurements_at_last_analysis + * @param int $measurements_at_last_analysis Number of measurements at last analysis + * @return $this + */ + public function setMeasurementsAtLastAnalysis($measurements_at_last_analysis) + { + $this->container['measurements_at_last_analysis'] = $measurements_at_last_analysis; + + return $this; + } + + /** + * Gets median + * @return float + */ + public function getMedian() + { + return $this->container['median']; + } + + /** + * Sets median + * @param float $median Median + * @return $this + */ + public function setMedian($median) + { + $this->container['median'] = $median; + + return $this; + } + + /** + * Gets minimum_allowed_value + * @return float + */ + public function getMinimumAllowedValue() + { + return $this->container['minimum_allowed_value']; + } + + /** + * Sets minimum_allowed_value + * @param float $minimum_allowed_value The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. + * @return $this + */ + public function setMinimumAllowedValue($minimum_allowed_value) + { + $this->container['minimum_allowed_value'] = $minimum_allowed_value; + + return $this; + } + + /** + * Gets minimum_recorded_value + * @return float + */ + public function getMinimumRecordedValue() + { + return $this->container['minimum_recorded_value']; + } + + /** + * Sets minimum_recorded_value + * @param float $minimum_recorded_value Minimum recorded value of this variable + * @return $this + */ + public function setMinimumRecordedValue($minimum_recorded_value) + { + $this->container['minimum_recorded_value'] = $minimum_recorded_value; + + return $this; + } + + /** + * Gets most_common_connector_id + * @return int + */ + public function getMostCommonConnectorId() + { + return $this->container['most_common_connector_id']; + } + + /** + * Sets most_common_connector_id + * @param int $most_common_connector_id Example: 51 + * @return $this + */ + public function setMostCommonConnectorId($most_common_connector_id) + { + $this->container['most_common_connector_id'] = $most_common_connector_id; + + return $this; + } + + /** + * Gets most_common_original_unit_id + * @return int + */ + public function getMostCommonOriginalUnitId() + { + return $this->container['most_common_original_unit_id']; + } + + /** + * Sets most_common_original_unit_id + * @param int $most_common_original_unit_id Example: 23 + * @return $this + */ + public function setMostCommonOriginalUnitId($most_common_original_unit_id) + { + $this->container['most_common_original_unit_id'] = $most_common_original_unit_id; + + return $this; + } + + /** + * Gets most_common_unit_id + * @return int + */ + public function getMostCommonUnitId() + { + return $this->container['most_common_unit_id']; + } + + /** + * Sets most_common_unit_id + * @param int $most_common_unit_id Most common Unit ID + * @return $this + */ + public function setMostCommonUnitId($most_common_unit_id) + { + $this->container['most_common_unit_id'] = $most_common_unit_id; + + return $this; + } + + /** + * Gets most_common_value + * @return float + */ + public function getMostCommonValue() + { + return $this->container['most_common_value']; + } + + /** + * Sets most_common_value + * @param float $most_common_value Most common value + * @return $this + */ + public function setMostCommonValue($most_common_value) + { + $this->container['most_common_value'] = $most_common_value; + + return $this; + } + + /** + * Gets name + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * @param string $name Example: Trader Joes Bedtime Tea / Sleepytime Tea (any Brand) + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets number_of_aggregate_correlations_as_cause + * @return int + */ + public function getNumberOfAggregateCorrelationsAsCause() + { + return $this->container['number_of_aggregate_correlations_as_cause']; + } + + /** + * Sets number_of_aggregate_correlations_as_cause + * @param int $number_of_aggregate_correlations_as_cause Example: 1 + * @return $this + */ + public function setNumberOfAggregateCorrelationsAsCause($number_of_aggregate_correlations_as_cause) + { + $this->container['number_of_aggregate_correlations_as_cause'] = $number_of_aggregate_correlations_as_cause; + + return $this; + } + + /** + * Gets number_of_aggregate_correlations_as_effect + * @return int + */ + public function getNumberOfAggregateCorrelationsAsEffect() + { + return $this->container['number_of_aggregate_correlations_as_effect']; + } + + /** + * Sets number_of_aggregate_correlations_as_effect + * @param int $number_of_aggregate_correlations_as_effect Example: 310 + * @return $this + */ + public function setNumberOfAggregateCorrelationsAsEffect($number_of_aggregate_correlations_as_effect) + { + $this->container['number_of_aggregate_correlations_as_effect'] = $number_of_aggregate_correlations_as_effect; + + return $this; + } + + /** + * Gets number_of_changes + * @return int + */ + public function getNumberOfChanges() + { + return $this->container['number_of_changes']; + } + + /** + * Sets number_of_changes + * @param int $number_of_changes Number of changes + * @return $this + */ + public function setNumberOfChanges($number_of_changes) + { + $this->container['number_of_changes'] = $number_of_changes; + + return $this; + } + + /** + * Gets number_of_correlations + * @return int + */ + public function getNumberOfCorrelations() + { + return $this->container['number_of_correlations']; + } + + /** + * Sets number_of_correlations + * @param int $number_of_correlations Number of correlations for this variable + * @return $this + */ + public function setNumberOfCorrelations($number_of_correlations) + { + $this->container['number_of_correlations'] = $number_of_correlations; + + return $this; + } + + /** + * Gets number_of_measurements + * @return int + */ + public function getNumberOfMeasurements() + { + return $this->container['number_of_measurements']; + } + + /** + * Sets number_of_measurements + * @param int $number_of_measurements Number of measurements + * @return $this + */ + public function setNumberOfMeasurements($number_of_measurements) + { + $this->container['number_of_measurements'] = $number_of_measurements; + + return $this; + } + + /** + * Gets number_of_processed_daily_measurements + * @return int + */ + public function getNumberOfProcessedDailyMeasurements() + { + return $this->container['number_of_processed_daily_measurements']; + } + + /** + * Sets number_of_processed_daily_measurements + * @param int $number_of_processed_daily_measurements Number of processed measurements + * @return $this + */ + public function setNumberOfProcessedDailyMeasurements($number_of_processed_daily_measurements) + { + $this->container['number_of_processed_daily_measurements'] = $number_of_processed_daily_measurements; + + return $this; + } + + /** + * Gets number_of_raw_measurements + * @return int + */ + public function getNumberOfRawMeasurements() + { + return $this->container['number_of_raw_measurements']; + } + + /** + * Sets number_of_raw_measurements + * @param int $number_of_raw_measurements Example: 295 + * @return $this + */ + public function setNumberOfRawMeasurements($number_of_raw_measurements) + { + $this->container['number_of_raw_measurements'] = $number_of_raw_measurements; + + return $this; + } + + /** + * Gets number_of_tracking_reminders + * @return int + */ + public function getNumberOfTrackingReminders() + { + return $this->container['number_of_tracking_reminders']; + } + + /** + * Sets number_of_tracking_reminders + * @param int $number_of_tracking_reminders Example: 1 + * @return $this + */ + public function setNumberOfTrackingReminders($number_of_tracking_reminders) + { + $this->container['number_of_tracking_reminders'] = $number_of_tracking_reminders; + + return $this; + } + + /** + * Gets number_of_unique_daily_values + * @return float + */ + public function getNumberOfUniqueDailyValues() + { + return $this->container['number_of_unique_daily_values']; + } + + /** + * Sets number_of_unique_daily_values + * @param float $number_of_unique_daily_values Number of unique daily values + * @return $this + */ + public function setNumberOfUniqueDailyValues($number_of_unique_daily_values) + { + $this->container['number_of_unique_daily_values'] = $number_of_unique_daily_values; + + return $this; + } + + /** + * Gets number_of_unique_values + * @return int + */ + public function getNumberOfUniqueValues() + { + return $this->container['number_of_unique_values']; + } + + /** + * Sets number_of_unique_values + * @param int $number_of_unique_values Example: 2 + * @return $this + */ + public function setNumberOfUniqueValues($number_of_unique_values) + { + $this->container['number_of_unique_values'] = $number_of_unique_values; + + return $this; + } + + /** + * Gets number_of_user_correlations_as_cause + * @return int + */ + public function getNumberOfUserCorrelationsAsCause() + { + return $this->container['number_of_user_correlations_as_cause']; + } + + /** + * Sets number_of_user_correlations_as_cause + * @param int $number_of_user_correlations_as_cause Example: 115 + * @return $this + */ + public function setNumberOfUserCorrelationsAsCause($number_of_user_correlations_as_cause) + { + $this->container['number_of_user_correlations_as_cause'] = $number_of_user_correlations_as_cause; + + return $this; + } + + /** + * Gets number_of_user_correlations_as_effect + * @return int + */ + public function getNumberOfUserCorrelationsAsEffect() + { + return $this->container['number_of_user_correlations_as_effect']; + } + + /** + * Sets number_of_user_correlations_as_effect + * @param int $number_of_user_correlations_as_effect Example: 29014 + * @return $this + */ + public function setNumberOfUserCorrelationsAsEffect($number_of_user_correlations_as_effect) + { + $this->container['number_of_user_correlations_as_effect'] = $number_of_user_correlations_as_effect; + + return $this; + } + + /** + * Gets number_of_user_variables + * @return int + */ + public function getNumberOfUserVariables() + { + return $this->container['number_of_user_variables']; + } + + /** + * Sets number_of_user_variables + * @param int $number_of_user_variables Example: 2 + * @return $this + */ + public function setNumberOfUserVariables($number_of_user_variables) + { + $this->container['number_of_user_variables'] = $number_of_user_variables; + + return $this; + } + + /** + * Gets onset_delay + * @return int + */ + public function getOnsetDelay() + { + return $this->container['onset_delay']; + } + + /** + * Sets onset_delay + * @param int $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. + * @return $this + */ + public function setOnsetDelay($onset_delay) + { + $this->container['onset_delay'] = $onset_delay; + + return $this; + } + + /** + * Gets onset_delay_in_hours + * @return double + */ + public function getOnsetDelayInHours() + { + return $this->container['onset_delay_in_hours']; + } + + /** + * Sets onset_delay_in_hours + * @param double $onset_delay_in_hours Example: 0.5 * @return $this */ - public function setClientId($client_id) + public function setOnsetDelayInHours($onset_delay_in_hours) { - $this->container['client_id'] = $client_id; + $this->container['onset_delay_in_hours'] = $onset_delay_in_hours; return $this; } /** - * Gets variable_id - * @return int + * Gets outcome + * @return bool */ - public function getVariableId() + public function getOutcome() { - return $this->container['variable_id']; + return $this->container['outcome']; } /** - * Sets variable_id - * @param int $variable_id ID of variable + * Sets outcome + * @param bool $outcome Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables * @return $this */ - public function setVariableId($variable_id) + public function setOutcome($outcome) { - $this->container['variable_id'] = $variable_id; + $this->container['outcome'] = $outcome; return $this; } /** - * Gets default_unit_id + * Gets outcome_of_interest * @return int */ - public function getDefaultUnitId() + public function getOutcomeOfInterest() { - return $this->container['default_unit_id']; + return $this->container['outcome_of_interest']; } /** - * Sets default_unit_id - * @param int $default_unit_id ID of unit to use for this variable + * Sets outcome_of_interest + * @param int $outcome_of_interest Example: 1 * @return $this */ - public function setDefaultUnitId($default_unit_id) + public function setOutcomeOfInterest($outcome_of_interest) { - $this->container['default_unit_id'] = $default_unit_id; + $this->container['outcome_of_interest'] = $outcome_of_interest; return $this; } /** - * Gets minimum_allowed_value - * @return float + * Gets parent + * @return string */ - public function getMinimumAllowedValue() + public function getParent() { - return $this->container['minimum_allowed_value']; + return $this->container['parent']; } /** - * Sets minimum_allowed_value - * @param float $minimum_allowed_value The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. + * Sets parent + * @param string $parent Example: * @return $this */ - public function setMinimumAllowedValue($minimum_allowed_value) + public function setParent($parent) { - $this->container['minimum_allowed_value'] = $minimum_allowed_value; + $this->container['parent'] = $parent; return $this; } /** - * Gets maximum_allowed_value - * @return float + * Gets parent_id + * @return int */ - public function getMaximumAllowedValue() + public function getParentId() { - return $this->container['maximum_allowed_value']; + return $this->container['parent_id']; } /** - * Sets maximum_allowed_value - * @param float $maximum_allowed_value The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. + * Sets parent_id + * @param int $parent_id ID of the parent variable if this variable has any parent * @return $this */ - public function setMaximumAllowedValue($maximum_allowed_value) + public function setParentId($parent_id) { - $this->container['maximum_allowed_value'] = $maximum_allowed_value; + $this->container['parent_id'] = $parent_id; return $this; } /** - * Gets filling_value - * @return float + * Gets parent_user_tag_variables + * @return \QuantiModo\Client\Model\UserVariableArray */ - public function getFillingValue() + public function getParentUserTagVariables() { - return $this->container['filling_value']; + return $this->container['parent_user_tag_variables']; } /** - * Sets filling_value - * @param float $filling_value When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. + * Sets parent_user_tag_variables + * @param \QuantiModo\Client\Model\UserVariableArray $parent_user_tag_variables * @return $this */ - public function setFillingValue($filling_value) + public function setParentUserTagVariables($parent_user_tag_variables) { - $this->container['filling_value'] = $filling_value; + $this->container['parent_user_tag_variables'] = $parent_user_tag_variables; return $this; } /** - * Gets join_with - * @return int + * Gets png_path + * @return string */ - public function getJoinWith() + public function getPngPath() { - return $this->container['join_with']; + return $this->container['png_path']; } /** - * Sets join_with - * @param int $join_with The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + * Sets png_path + * @param string $png_path Example: img/variable_categories/treatments.png * @return $this */ - public function setJoinWith($join_with) + public function setPngPath($png_path) { - $this->container['join_with'] = $join_with; + $this->container['png_path'] = $png_path; return $this; } /** - * Gets onset_delay - * @return int + * Gets png_url + * @return string */ - public function getOnsetDelay() + public function getPngUrl() { - return $this->container['onset_delay']; + return $this->container['png_url']; } /** - * Sets onset_delay - * @param int $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. + * Sets png_url + * @param string $png_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/treatments.png * @return $this */ - public function setOnsetDelay($onset_delay) + public function setPngUrl($png_url) { - $this->container['onset_delay'] = $onset_delay; + $this->container['png_url'] = $png_url; return $this; } /** - * Gets duration_of_action + * Gets predictor_of_interest * @return int */ - public function getDurationOfAction() + public function getPredictorOfInterest() { - return $this->container['duration_of_action']; + return $this->container['predictor_of_interest']; } /** - * Sets duration_of_action - * @param int $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. + * Sets predictor_of_interest + * @param int $predictor_of_interest Example: 0 * @return $this */ - public function setDurationOfAction($duration_of_action) + public function setPredictorOfInterest($predictor_of_interest) { - $this->container['duration_of_action'] = $duration_of_action; + $this->container['predictor_of_interest'] = $predictor_of_interest; return $this; } /** - * Gets variable_category_id - * @return int + * Gets price + * @return double */ - public function getVariableCategoryId() + public function getPrice() { - return $this->container['variable_category_id']; + return $this->container['price']; } /** - * Sets variable_category_id - * @param int $variable_category_id ID of variable category + * Sets price + * @param double $price Example: 95.4 * @return $this */ - public function setVariableCategoryId($variable_category_id) + public function setPrice($price) { - $this->container['variable_category_id'] = $variable_category_id; + $this->container['price'] = $price; return $this; } /** - * Gets updated - * @return int + * Gets product_url + * @return string */ - public function getUpdated() + public function getProductUrl() { - return $this->container['updated']; + return $this->container['product_url']; } /** - * Sets updated - * @param int $updated updated + * Sets product_url + * @param string $product_url Example: * @return $this */ - public function setUpdated($updated) + public function setProductUrl($product_url) { - $this->container['updated'] = $updated; + $this->container['product_url'] = $product_url; return $this; } @@ -717,883 +3329,883 @@ public function setPublic($public) } /** - * Gets cause_only - * @return bool + * Gets raw_measurements_at_last_analysis + * @return int */ - public function getCauseOnly() + public function getRawMeasurementsAtLastAnalysis() { - return $this->container['cause_only']; + return $this->container['raw_measurements_at_last_analysis']; } /** - * Sets cause_only - * @param bool $cause_only A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + * Sets raw_measurements_at_last_analysis + * @param int $raw_measurements_at_last_analysis Example: 131 * @return $this */ - public function setCauseOnly($cause_only) + public function setRawMeasurementsAtLastAnalysis($raw_measurements_at_last_analysis) { - $this->container['cause_only'] = $cause_only; + $this->container['raw_measurements_at_last_analysis'] = $raw_measurements_at_last_analysis; return $this; } /** - * Gets filling_type - * @return string + * Gets second_most_common_value + * @return double */ - public function getFillingType() + public function getSecondMostCommonValue() { - return $this->container['filling_type']; + return $this->container['second_most_common_value']; } /** - * Sets filling_type - * @param string $filling_type 0 -> No filling, 1 -> Use filling-value + * Sets second_most_common_value + * @param double $second_most_common_value Example: 1 * @return $this */ - public function setFillingType($filling_type) + public function setSecondMostCommonValue($second_most_common_value) { - $this->container['filling_type'] = $filling_type; + $this->container['second_most_common_value'] = $second_most_common_value; return $this; } /** - * Gets number_of_measurements - * @return int + * Gets second_to_last_value + * @return double */ - public function getNumberOfMeasurements() + public function getSecondToLastValue() { - return $this->container['number_of_measurements']; + return $this->container['second_to_last_value']; } /** - * Sets number_of_measurements - * @param int $number_of_measurements Number of measurements + * Sets second_to_last_value + * @param double $second_to_last_value Example: 250 * @return $this */ - public function setNumberOfMeasurements($number_of_measurements) + public function setSecondToLastValue($second_to_last_value) { - $this->container['number_of_measurements'] = $number_of_measurements; + $this->container['second_to_last_value'] = $second_to_last_value; return $this; } /** - * Gets number_of_processed_measurements - * @return int + * Gets share_user_measurements + * @return bool */ - public function getNumberOfProcessedMeasurements() + public function getShareUserMeasurements() { - return $this->container['number_of_processed_measurements']; + return $this->container['share_user_measurements']; } /** - * Sets number_of_processed_measurements - * @param int $number_of_processed_measurements Number of processed measurements + * Sets share_user_measurements + * @param bool $share_user_measurements Example: 1 * @return $this */ - public function setNumberOfProcessedMeasurements($number_of_processed_measurements) + public function setShareUserMeasurements($share_user_measurements) { - $this->container['number_of_processed_measurements'] = $number_of_processed_measurements; + $this->container['share_user_measurements'] = $share_user_measurements; return $this; } /** - * Gets measurements_at_last_analysis - * @return int + * Gets skewness + * @return float */ - public function getMeasurementsAtLastAnalysis() + public function getSkewness() { - return $this->container['measurements_at_last_analysis']; + return $this->container['skewness']; } /** - * Sets measurements_at_last_analysis - * @param int $measurements_at_last_analysis Number of measurements at last analysis + * Sets skewness + * @param float $skewness Skewness * @return $this */ - public function setMeasurementsAtLastAnalysis($measurements_at_last_analysis) + public function setSkewness($skewness) { - $this->container['measurements_at_last_analysis'] = $measurements_at_last_analysis; + $this->container['skewness'] = $skewness; return $this; } /** - * Gets last_unit_id - * @return int + * Gets sources + * @return string */ - public function getLastUnitId() + public function getSources() { - return $this->container['last_unit_id']; + return $this->container['sources']; } /** - * Sets last_unit_id - * @param int $last_unit_id ID of last Unit + * Sets sources + * @param string $sources Comma-separated list of source names to limit variables to those sources * @return $this */ - public function setLastUnitId($last_unit_id) + public function setSources($sources) { - $this->container['last_unit_id'] = $last_unit_id; + $this->container['sources'] = $sources; return $this; } /** - * Gets last_original_unit_id - * @return int + * Gets standard_deviation + * @return float */ - public function getLastOriginalUnitId() + public function getStandardDeviation() { - return $this->container['last_original_unit_id']; + return $this->container['standard_deviation']; } /** - * Sets last_original_unit_id - * @param int $last_original_unit_id ID of last original Unit + * Sets standard_deviation + * @param float $standard_deviation Standard deviation * @return $this */ - public function setLastOriginalUnitId($last_original_unit_id) + public function setStandardDeviation($standard_deviation) { - $this->container['last_original_unit_id'] = $last_original_unit_id; + $this->container['standard_deviation'] = $standard_deviation; return $this; } /** - * Gets last_value - * @return float + * Gets standard_deviation + * @return double */ - public function getLastValue() + public function getStandardDeviation() { - return $this->container['last_value']; + return $this->container['standard_deviation']; } /** - * Sets last_value - * @param float $last_value Last Value + * Sets standard_deviation + * @param double $standard_deviation Example: 0.46483219855434 * @return $this */ - public function setLastValue($last_value) + public function setStandardDeviation($standard_deviation) { - $this->container['last_value'] = $last_value; + $this->container['standard_deviation'] = $standard_deviation; return $this; } /** - * Gets last_original_value - * @return int + * Gets status + * @return string */ - public function getLastOriginalValue() + public function getStatus() { - return $this->container['last_original_value']; + return $this->container['status']; } /** - * Sets last_original_value - * @param int $last_original_value Last original value which is stored + * Sets status + * @param string $status status * @return $this */ - public function setLastOriginalValue($last_original_value) + public function setStatus($status) { - $this->container['last_original_value'] = $last_original_value; + $this->container['status'] = $status; return $this; } /** - * Gets number_of_correlations - * @return int + * Gets subtitle + * @return string */ - public function getNumberOfCorrelations() + public function getSubtitle() { - return $this->container['number_of_correlations']; + return $this->container['subtitle']; } /** - * Sets number_of_correlations - * @param int $number_of_correlations Number of correlations for this variable + * Sets subtitle + * @param string $subtitle Based on sort filter and can be shown beneath variable name on search list * @return $this */ - public function setNumberOfCorrelations($number_of_correlations) + public function setSubtitle($subtitle) { - $this->container['number_of_correlations'] = $number_of_correlations; + $this->container['subtitle'] = $subtitle; return $this; } /** - * Gets status + * Gets svg_url * @return string */ - public function getStatus() + public function getSvgUrl() { - return $this->container['status']; + return $this->container['svg_url']; } /** - * Sets status - * @param string $status status + * Sets svg_url + * @param string $svg_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/treatments.svg * @return $this */ - public function setStatus($status) + public function setSvgUrl($svg_url) { - $this->container['status'] = $status; + $this->container['svg_url'] = $svg_url; return $this; } /** - * Gets error_message - * @return string + * Gets third_most_common_value + * @return double */ - public function getErrorMessage() + public function getThirdMostCommonValue() { - return $this->container['error_message']; + return $this->container['third_most_common_value']; } /** - * Sets error_message - * @param string $error_message error_message + * Sets third_most_common_value + * @param double $third_most_common_value Example: 6 * @return $this */ - public function setErrorMessage($error_message) + public function setThirdMostCommonValue($third_most_common_value) { - $this->container['error_message'] = $error_message; + $this->container['third_most_common_value'] = $third_most_common_value; return $this; } /** - * Gets last_successful_update_time - * @return \DateTime + * Gets third_to_last_value + * @return double */ - public function getLastSuccessfulUpdateTime() + public function getThirdToLastValue() { - return $this->container['last_successful_update_time']; + return $this->container['third_to_last_value']; } /** - * Sets last_successful_update_time - * @param \DateTime $last_successful_update_time When this variable or its settings were last updated + * Sets third_to_last_value + * @param double $third_to_last_value Example: 250 * @return $this */ - public function setLastSuccessfulUpdateTime($last_successful_update_time) + public function setThirdToLastValue($third_to_last_value) { - $this->container['last_successful_update_time'] = $last_successful_update_time; + $this->container['third_to_last_value'] = $third_to_last_value; return $this; } /** - * Gets standard_deviation - * @return float + * Gets unit + * @return \QuantiModo\Client\Model\Unit */ - public function getStandardDeviation() + public function getUnit() { - return $this->container['standard_deviation']; + return $this->container['unit']; } /** - * Sets standard_deviation - * @param float $standard_deviation Standard deviation + * Sets unit + * @param \QuantiModo\Client\Model\Unit $unit * @return $this */ - public function setStandardDeviation($standard_deviation) + public function setUnit($unit) { - $this->container['standard_deviation'] = $standard_deviation; + $this->container['unit'] = $unit; return $this; } /** - * Gets variance - * @return float + * Gets updated + * @return int */ - public function getVariance() + public function getUpdated() { - return $this->container['variance']; + return $this->container['updated']; } /** - * Sets variance - * @param float $variance Variance + * Sets updated + * @param int $updated updated * @return $this */ - public function setVariance($variance) + public function setUpdated($updated) { - $this->container['variance'] = $variance; + $this->container['updated'] = $updated; return $this; } /** - * Gets minimum_recorded_value - * @return float + * Gets updated_at + * @return \DateTime */ - public function getMinimumRecordedValue() + public function getUpdatedAt() { - return $this->container['minimum_recorded_value']; + return $this->container['updated_at']; } /** - * Sets minimum_recorded_value - * @param float $minimum_recorded_value Minimum recorded value of this variable + * Sets updated_at + * @param \DateTime $updated_at When the record in the database was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format * @return $this */ - public function setMinimumRecordedValue($minimum_recorded_value) + public function setUpdatedAt($updated_at) { - $this->container['minimum_recorded_value'] = $minimum_recorded_value; + $this->container['updated_at'] = $updated_at; return $this; } /** - * Gets maximum_recorded_daily_value - * @return float + * Gets updated_time + * @return \DateTime */ - public function getMaximumRecordedDailyValue() + public function getUpdatedTime() { - return $this->container['maximum_recorded_daily_value']; + return $this->container['updated_time']; } /** - * Sets maximum_recorded_daily_value - * @param float $maximum_recorded_daily_value Maximum recorded daily value of this variable + * Sets updated_time + * @param \DateTime $updated_time Example: 2017-07-30 14:58:26 * @return $this */ - public function setMaximumRecordedDailyValue($maximum_recorded_daily_value) + public function setUpdatedTime($updated_time) { - $this->container['maximum_recorded_daily_value'] = $maximum_recorded_daily_value; + $this->container['updated_time'] = $updated_time; return $this; } /** - * Gets mean - * @return float + * Gets user_id + * @return int */ - public function getMean() + public function getUserId() { - return $this->container['mean']; + return $this->container['user_id']; } /** - * Sets mean - * @param float $mean Mean + * Sets user_id + * @param int $user_id User ID * @return $this */ - public function setMean($mean) + public function setUserId($user_id) { - $this->container['mean'] = $mean; + $this->container['user_id'] = $user_id; return $this; } /** - * Gets median - * @return float + * Gets user_tagged_variables + * @return \QuantiModo\Client\Model\UserVariableArray */ - public function getMedian() + public function getUserTaggedVariables() { - return $this->container['median']; + return $this->container['user_tagged_variables']; } /** - * Sets median - * @param float $median Median + * Sets user_tagged_variables + * @param \QuantiModo\Client\Model\UserVariableArray $user_tagged_variables * @return $this */ - public function setMedian($median) + public function setUserTaggedVariables($user_tagged_variables) { - $this->container['median'] = $median; + $this->container['user_tagged_variables'] = $user_tagged_variables; return $this; } /** - * Gets most_common_unit_id - * @return int + * Gets user_tag_variables + * @return \QuantiModo\Client\Model\UserVariableArray */ - public function getMostCommonUnitId() + public function getUserTagVariables() { - return $this->container['most_common_unit_id']; + return $this->container['user_tag_variables']; } /** - * Sets most_common_unit_id - * @param int $most_common_unit_id Most common Unit ID + * Sets user_tag_variables + * @param \QuantiModo\Client\Model\UserVariableArray $user_tag_variables * @return $this */ - public function setMostCommonUnitId($most_common_unit_id) + public function setUserTagVariables($user_tag_variables) { - $this->container['most_common_unit_id'] = $most_common_unit_id; + $this->container['user_tag_variables'] = $user_tag_variables; return $this; } /** - * Gets most_common_value - * @return float + * Gets user_variable_unit_abbreviated_name + * @return string */ - public function getMostCommonValue() + public function getUserVariableUnitAbbreviatedName() { - return $this->container['most_common_value']; + return $this->container['user_variable_unit_abbreviated_name']; } /** - * Sets most_common_value - * @param float $most_common_value Most common value + * Sets user_variable_unit_abbreviated_name + * @param string $user_variable_unit_abbreviated_name Example: count * @return $this */ - public function setMostCommonValue($most_common_value) + public function setUserVariableUnitAbbreviatedName($user_variable_unit_abbreviated_name) { - $this->container['most_common_value'] = $most_common_value; + $this->container['user_variable_unit_abbreviated_name'] = $user_variable_unit_abbreviated_name; return $this; } /** - * Gets number_of_unique_daily_values - * @return float + * Gets user_variable_unit_category_id + * @return int */ - public function getNumberOfUniqueDailyValues() + public function getUserVariableUnitCategoryId() { - return $this->container['number_of_unique_daily_values']; + return $this->container['user_variable_unit_category_id']; } /** - * Sets number_of_unique_daily_values - * @param float $number_of_unique_daily_values Number of unique daily values + * Sets user_variable_unit_category_id + * @param int $user_variable_unit_category_id Example: 6 * @return $this */ - public function setNumberOfUniqueDailyValues($number_of_unique_daily_values) + public function setUserVariableUnitCategoryId($user_variable_unit_category_id) { - $this->container['number_of_unique_daily_values'] = $number_of_unique_daily_values; + $this->container['user_variable_unit_category_id'] = $user_variable_unit_category_id; return $this; } /** - * Gets number_of_changes - * @return int + * Gets user_variable_unit_category_name + * @return string */ - public function getNumberOfChanges() + public function getUserVariableUnitCategoryName() { - return $this->container['number_of_changes']; + return $this->container['user_variable_unit_category_name']; } /** - * Sets number_of_changes - * @param int $number_of_changes Number of changes + * Sets user_variable_unit_category_name + * @param string $user_variable_unit_category_name Example: Miscellany * @return $this */ - public function setNumberOfChanges($number_of_changes) + public function setUserVariableUnitCategoryName($user_variable_unit_category_name) { - $this->container['number_of_changes'] = $number_of_changes; + $this->container['user_variable_unit_category_name'] = $user_variable_unit_category_name; return $this; } /** - * Gets skewness - * @return float + * Gets user_variable_unit_id + * @return int */ - public function getSkewness() + public function getUserVariableUnitId() { - return $this->container['skewness']; + return $this->container['user_variable_unit_id']; } /** - * Sets skewness - * @param float $skewness Skewness + * Sets user_variable_unit_id + * @param int $user_variable_unit_id Example: 23 * @return $this */ - public function setSkewness($skewness) + public function setUserVariableUnitId($user_variable_unit_id) { - $this->container['skewness'] = $skewness; + $this->container['user_variable_unit_id'] = $user_variable_unit_id; return $this; } /** - * Gets kurtosis - * @return float + * Gets user_variable_unit_name + * @return string */ - public function getKurtosis() + public function getUserVariableUnitName() { - return $this->container['kurtosis']; + return $this->container['user_variable_unit_name']; } /** - * Sets kurtosis - * @param float $kurtosis Kurtosis + * Sets user_variable_unit_name + * @param string $user_variable_unit_name Example: Count * @return $this */ - public function setKurtosis($kurtosis) + public function setUserVariableUnitName($user_variable_unit_name) { - $this->container['kurtosis'] = $kurtosis; + $this->container['user_variable_unit_name'] = $user_variable_unit_name; return $this; } /** - * Gets latitude - * @return float + * Gets user_variable_filling_value + * @return double */ - public function getLatitude() + public function getUserVariableFillingValue() { - return $this->container['latitude']; + return $this->container['user_variable_filling_value']; } /** - * Sets latitude - * @param float $latitude Latitude + * Sets user_variable_filling_value + * @param double $user_variable_filling_value Example: -1 * @return $this */ - public function setLatitude($latitude) + public function setUserVariableFillingValue($user_variable_filling_value) { - $this->container['latitude'] = $latitude; + $this->container['user_variable_filling_value'] = $user_variable_filling_value; return $this; } /** - * Gets longitude - * @return float + * Gets user_variable_most_common_connector_id + * @return int */ - public function getLongitude() + public function getUserVariableMostCommonConnectorId() { - return $this->container['longitude']; + return $this->container['user_variable_most_common_connector_id']; } /** - * Sets longitude - * @param float $longitude Longitude + * Sets user_variable_most_common_connector_id + * @param int $user_variable_most_common_connector_id Example: 51 * @return $this */ - public function setLongitude($longitude) + public function setUserVariableMostCommonConnectorId($user_variable_most_common_connector_id) { - $this->container['longitude'] = $longitude; + $this->container['user_variable_most_common_connector_id'] = $user_variable_most_common_connector_id; return $this; } /** - * Gets location - * @return string + * Gets user_variable_updated_at + * @return \DateTime */ - public function getLocation() + public function getUserVariableUpdatedAt() { - return $this->container['location']; + return $this->container['user_variable_updated_at']; } /** - * Sets location - * @param string $location Location + * Sets user_variable_updated_at + * @param \DateTime $user_variable_updated_at Example: 2017-07-30 14:58:26 * @return $this */ - public function setLocation($location) + public function setUserVariableUpdatedAt($user_variable_updated_at) { - $this->container['location'] = $location; + $this->container['user_variable_updated_at'] = $user_variable_updated_at; return $this; } /** - * Gets experiment_start_time - * @return \DateTime + * Gets user_variable_valence + * @return string */ - public function getExperimentStartTime() + public function getUserVariableValence() { - return $this->container['experiment_start_time']; + return $this->container['user_variable_valence']; } /** - * Sets experiment_start_time - * @param \DateTime $experiment_start_time Earliest measurement start_time to be used in analysis. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format + * Sets user_variable_valence + * @param string $user_variable_valence Example: * @return $this */ - public function setExperimentStartTime($experiment_start_time) + public function setUserVariableValence($user_variable_valence) { - $this->container['experiment_start_time'] = $experiment_start_time; + $this->container['user_variable_valence'] = $user_variable_valence; return $this; } /** - * Gets experiment_end_time - * @return \DateTime + * Gets user_variable_variable_category_id + * @return int */ - public function getExperimentEndTime() + public function getUserVariableVariableCategoryId() { - return $this->container['experiment_end_time']; + return $this->container['user_variable_variable_category_id']; } /** - * Sets experiment_end_time - * @param \DateTime $experiment_end_time Latest measurement start_time to be used in analysis. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format + * Sets user_variable_variable_category_id + * @param int $user_variable_variable_category_id Example: 13 * @return $this */ - public function setExperimentEndTime($experiment_end_time) + public function setUserVariableVariableCategoryId($user_variable_variable_category_id) { - $this->container['experiment_end_time'] = $experiment_end_time; + $this->container['user_variable_variable_category_id'] = $user_variable_variable_category_id; return $this; } /** - * Gets created_at - * @return \DateTime + * Gets user_variable_variable_category_name + * @return string */ - public function getCreatedAt() + public function getUserVariableVariableCategoryName() { - return $this->container['created_at']; + return $this->container['user_variable_variable_category_name']; } /** - * Sets created_at - * @param \DateTime $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format + * Sets user_variable_variable_category_name + * @param string $user_variable_variable_category_name Example: Treatments * @return $this */ - public function setCreatedAt($created_at) + public function setUserVariableVariableCategoryName($user_variable_variable_category_name) { - $this->container['created_at'] = $created_at; + $this->container['user_variable_variable_category_name'] = $user_variable_variable_category_name; return $this; } /** - * Gets updated_at - * @return \DateTime + * Gets user_variable_wikipedia_title + * @return string */ - public function getUpdatedAt() + public function getUserVariableWikipediaTitle() { - return $this->container['updated_at']; + return $this->container['user_variable_wikipedia_title']; } /** - * Sets updated_at - * @param \DateTime $updated_at When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format + * Sets user_variable_wikipedia_title + * @param string $user_variable_wikipedia_title Example: * @return $this */ - public function setUpdatedAt($updated_at) + public function setUserVariableWikipediaTitle($user_variable_wikipedia_title) { - $this->container['updated_at'] = $updated_at; + $this->container['user_variable_wikipedia_title'] = $user_variable_wikipedia_title; return $this; } /** - * Gets outcome - * @return bool + * Gets valence + * @return string */ - public function getOutcome() + public function getValence() { - return $this->container['outcome']; + return $this->container['valence']; } /** - * Sets outcome - * @param bool $outcome Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + * Sets valence + * @param string $valence Example: negative * @return $this */ - public function setOutcome($outcome) + public function setValence($valence) { - $this->container['outcome'] = $outcome; + $this->container['valence'] = $valence; return $this; } /** - * Gets sources - * @return string + * Gets variable_category + * @return \QuantiModo\Client\Model\VariableCategory */ - public function getSources() + public function getVariableCategory() { - return $this->container['sources']; + return $this->container['variable_category']; } /** - * Sets sources - * @param string $sources Comma-separated list of source names to limit variables to those sources + * Sets variable_category + * @param \QuantiModo\Client\Model\VariableCategory $variable_category * @return $this */ - public function setSources($sources) + public function setVariableCategory($variable_category) { - $this->container['sources'] = $sources; + $this->container['variable_category'] = $variable_category; return $this; } /** - * Gets earliest_source_time + * Gets variable_category_id * @return int */ - public function getEarliestSourceTime() + public function getVariableCategoryId() { - return $this->container['earliest_source_time']; + return $this->container['variable_category_id']; } /** - * Sets earliest_source_time - * @param int $earliest_source_time Earliest source time + * Sets variable_category_id + * @param int $variable_category_id ID of variable category * @return $this */ - public function setEarliestSourceTime($earliest_source_time) + public function setVariableCategoryId($variable_category_id) { - $this->container['earliest_source_time'] = $earliest_source_time; + $this->container['variable_category_id'] = $variable_category_id; return $this; } /** - * Gets latest_source_time - * @return int + * Gets variable_category_image_url + * @return string */ - public function getLatestSourceTime() + public function getVariableCategoryImageUrl() { - return $this->container['latest_source_time']; + return $this->container['variable_category_image_url']; } /** - * Sets latest_source_time - * @param int $latest_source_time Latest source time + * Sets variable_category_image_url + * @param string $variable_category_image_url Example: https://maxcdn.icons8.com/Color/PNG/96/Healthcare/pill-96.png * @return $this */ - public function setLatestSourceTime($latest_source_time) + public function setVariableCategoryImageUrl($variable_category_image_url) { - $this->container['latest_source_time'] = $latest_source_time; + $this->container['variable_category_image_url'] = $variable_category_image_url; return $this; } /** - * Gets earliest_measurement_time - * @return int + * Gets variable_category_name + * @return string */ - public function getEarliestMeasurementTime() + public function getVariableCategoryName() { - return $this->container['earliest_measurement_time']; + return $this->container['variable_category_name']; } /** - * Sets earliest_measurement_time - * @param int $earliest_measurement_time Earliest measurement time + * Sets variable_category_name + * @param string $variable_category_name Example: Treatments * @return $this */ - public function setEarliestMeasurementTime($earliest_measurement_time) + public function setVariableCategoryName($variable_category_name) { - $this->container['earliest_measurement_time'] = $earliest_measurement_time; + $this->container['variable_category_name'] = $variable_category_name; return $this; } /** - * Gets latest_measurement_time - * @return int + * Gets variable_filling_value + * @return double */ - public function getLatestMeasurementTime() + public function getVariableFillingValue() { - return $this->container['latest_measurement_time']; + return $this->container['variable_filling_value']; } /** - * Sets latest_measurement_time - * @param int $latest_measurement_time Latest measurement time + * Sets variable_filling_value + * @param double $variable_filling_value Example: -1 * @return $this */ - public function setLatestMeasurementTime($latest_measurement_time) + public function setVariableFillingValue($variable_filling_value) { - $this->container['latest_measurement_time'] = $latest_measurement_time; + $this->container['variable_filling_value'] = $variable_filling_value; return $this; } /** - * Gets earliest_filling_time + * Gets variable_id * @return int */ - public function getEarliestFillingTime() + public function getVariableId() { - return $this->container['earliest_filling_time']; + return $this->container['variable_id']; } /** - * Sets earliest_filling_time - * @param int $earliest_filling_time Earliest filling time + * Sets variable_id + * @param int $variable_id ID of variable * @return $this */ - public function setEarliestFillingTime($earliest_filling_time) + public function setVariableId($variable_id) { - $this->container['earliest_filling_time'] = $earliest_filling_time; + $this->container['variable_id'] = $variable_id; return $this; } /** - * Gets latest_filling_time - * @return int + * Gets variable_name + * @return string */ - public function getLatestFillingTime() + public function getVariableName() { - return $this->container['latest_filling_time']; + return $this->container['variable_name']; } /** - * Sets latest_filling_time - * @param int $latest_filling_time Latest filling time + * Sets variable_name + * @param string $variable_name Example: Trader Joes Bedtime Tea / Sleepytime Tea (any Brand) * @return $this */ - public function setLatestFillingTime($latest_filling_time) + public function setVariableName($variable_name) { - $this->container['latest_filling_time'] = $latest_filling_time; + $this->container['variable_name'] = $variable_name; return $this; } /** - * Gets image_url - * @return string + * Gets variance + * @return float */ - public function getImageUrl() + public function getVariance() { - return $this->container['image_url']; + return $this->container['variance']; } /** - * Sets image_url - * @param string $image_url + * Sets variance + * @param float $variance Variance * @return $this */ - public function setImageUrl($image_url) + public function setVariance($variance) { - $this->container['image_url'] = $image_url; + $this->container['variance'] = $variance; return $this; } /** - * Gets ion_icon + * Gets wikipedia_title * @return string */ - public function getIonIcon() + public function getWikipediaTitle() { - return $this->container['ion_icon']; + return $this->container['wikipedia_title']; } /** - * Sets ion_icon - * @param string $ion_icon + * Sets wikipedia_title + * @param string $wikipedia_title Example: * @return $this */ - public function setIonIcon($ion_icon) + public function setWikipediaTitle($wikipedia_title) { - $this->container['ion_icon'] = $ion_icon; + $this->container['wikipedia_title'] = $wikipedia_title; return $this; } diff --git a/lib/Model/UserVariableArray.php b/lib/Model/UserVariableArray.php new file mode 100644 index 0000000..36c4804 --- /dev/null +++ b/lib/Model/UserVariableArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/UserVariableDelete.php b/lib/Model/UserVariableDelete.php index 0d34621..ce8a008 100644 --- a/lib/Model/UserVariableDelete.php +++ b/lib/Model/UserVariableDelete.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -57,11 +57,24 @@ class UserVariableDelete implements ArrayAccess 'variable_id' => 'int' ]; + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'variable_id' => null + ]; + public static function swaggerTypes() { return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] diff --git a/lib/Model/UserVariableRelationship.php b/lib/Model/UserVariableRelationship.php deleted file mode 100644 index 18fae0e..0000000 --- a/lib/Model/UserVariableRelationship.php +++ /dev/null @@ -1,717 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * UserVariableRelationship Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserVariableRelationship implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'UserVariableRelationship'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'id' => 'int', - 'confidence_level' => 'string', - 'confidence_score' => 'float', - 'direction' => 'string', - 'duration_of_action' => 'int', - 'error_message' => 'string', - 'onset_delay' => 'int', - 'outcome_variable_id' => 'int', - 'predictor_variable_id' => 'int', - 'predictor_unit_id' => 'int', - 'sinn_rank' => 'float', - 'strength_level' => 'string', - 'strength_score' => 'float', - 'user_id' => 'int', - 'vote' => 'string', - 'value_predicting_high_outcome' => 'float', - 'value_predicting_low_outcome' => 'float' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'confidence_level' => 'confidence_level', - 'confidence_score' => 'confidence_score', - 'direction' => 'direction', - 'duration_of_action' => 'duration_of_action', - 'error_message' => 'error_message', - 'onset_delay' => 'onset_delay', - 'outcome_variable_id' => 'outcome_variable_id', - 'predictor_variable_id' => 'predictor_variable_id', - 'predictor_unit_id' => 'predictor_unit_id', - 'sinn_rank' => 'sinn_rank', - 'strength_level' => 'strength_level', - 'strength_score' => 'strength_score', - 'user_id' => 'user_id', - 'vote' => 'vote', - 'value_predicting_high_outcome' => 'value_predicting_high_outcome', - 'value_predicting_low_outcome' => 'value_predicting_low_outcome' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'confidence_level' => 'setConfidenceLevel', - 'confidence_score' => 'setConfidenceScore', - 'direction' => 'setDirection', - 'duration_of_action' => 'setDurationOfAction', - 'error_message' => 'setErrorMessage', - 'onset_delay' => 'setOnsetDelay', - 'outcome_variable_id' => 'setOutcomeVariableId', - 'predictor_variable_id' => 'setPredictorVariableId', - 'predictor_unit_id' => 'setPredictorUnitId', - 'sinn_rank' => 'setSinnRank', - 'strength_level' => 'setStrengthLevel', - 'strength_score' => 'setStrengthScore', - 'user_id' => 'setUserId', - 'vote' => 'setVote', - 'value_predicting_high_outcome' => 'setValuePredictingHighOutcome', - 'value_predicting_low_outcome' => 'setValuePredictingLowOutcome' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'confidence_level' => 'getConfidenceLevel', - 'confidence_score' => 'getConfidenceScore', - 'direction' => 'getDirection', - 'duration_of_action' => 'getDurationOfAction', - 'error_message' => 'getErrorMessage', - 'onset_delay' => 'getOnsetDelay', - 'outcome_variable_id' => 'getOutcomeVariableId', - 'predictor_variable_id' => 'getPredictorVariableId', - 'predictor_unit_id' => 'getPredictorUnitId', - 'sinn_rank' => 'getSinnRank', - 'strength_level' => 'getStrengthLevel', - 'strength_score' => 'getStrengthScore', - 'user_id' => 'getUserId', - 'vote' => 'getVote', - 'value_predicting_high_outcome' => 'getValuePredictingHighOutcome', - 'value_predicting_low_outcome' => 'getValuePredictingLowOutcome' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['confidence_level'] = isset($data['confidence_level']) ? $data['confidence_level'] : null; - $this->container['confidence_score'] = isset($data['confidence_score']) ? $data['confidence_score'] : null; - $this->container['direction'] = isset($data['direction']) ? $data['direction'] : null; - $this->container['duration_of_action'] = isset($data['duration_of_action']) ? $data['duration_of_action'] : null; - $this->container['error_message'] = isset($data['error_message']) ? $data['error_message'] : null; - $this->container['onset_delay'] = isset($data['onset_delay']) ? $data['onset_delay'] : null; - $this->container['outcome_variable_id'] = isset($data['outcome_variable_id']) ? $data['outcome_variable_id'] : null; - $this->container['predictor_variable_id'] = isset($data['predictor_variable_id']) ? $data['predictor_variable_id'] : null; - $this->container['predictor_unit_id'] = isset($data['predictor_unit_id']) ? $data['predictor_unit_id'] : null; - $this->container['sinn_rank'] = isset($data['sinn_rank']) ? $data['sinn_rank'] : null; - $this->container['strength_level'] = isset($data['strength_level']) ? $data['strength_level'] : null; - $this->container['strength_score'] = isset($data['strength_score']) ? $data['strength_score'] : null; - $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; - $this->container['vote'] = isset($data['vote']) ? $data['vote'] : null; - $this->container['value_predicting_high_outcome'] = isset($data['value_predicting_high_outcome']) ? $data['value_predicting_high_outcome'] : null; - $this->container['value_predicting_low_outcome'] = isset($data['value_predicting_low_outcome']) ? $data['value_predicting_low_outcome'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['confidence_level'] === null) { - $invalid_properties[] = "'confidence_level' can't be null"; - } - if ($this->container['confidence_score'] === null) { - $invalid_properties[] = "'confidence_score' can't be null"; - } - if ($this->container['direction'] === null) { - $invalid_properties[] = "'direction' can't be null"; - } - if ($this->container['duration_of_action'] === null) { - $invalid_properties[] = "'duration_of_action' can't be null"; - } - if ($this->container['outcome_variable_id'] === null) { - $invalid_properties[] = "'outcome_variable_id' can't be null"; - } - if ($this->container['predictor_variable_id'] === null) { - $invalid_properties[] = "'predictor_variable_id' can't be null"; - } - if ($this->container['predictor_unit_id'] === null) { - $invalid_properties[] = "'predictor_unit_id' can't be null"; - } - if ($this->container['sinn_rank'] === null) { - $invalid_properties[] = "'sinn_rank' can't be null"; - } - if ($this->container['strength_level'] === null) { - $invalid_properties[] = "'strength_level' can't be null"; - } - if ($this->container['strength_score'] === null) { - $invalid_properties[] = "'strength_score' can't be null"; - } - if ($this->container['value_predicting_high_outcome'] === null) { - $invalid_properties[] = "'value_predicting_high_outcome' can't be null"; - } - if ($this->container['value_predicting_low_outcome'] === null) { - $invalid_properties[] = "'value_predicting_low_outcome' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['confidence_level'] === null) { - return false; - } - if ($this->container['confidence_score'] === null) { - return false; - } - if ($this->container['direction'] === null) { - return false; - } - if ($this->container['duration_of_action'] === null) { - return false; - } - if ($this->container['outcome_variable_id'] === null) { - return false; - } - if ($this->container['predictor_variable_id'] === null) { - return false; - } - if ($this->container['predictor_unit_id'] === null) { - return false; - } - if ($this->container['sinn_rank'] === null) { - return false; - } - if ($this->container['strength_level'] === null) { - return false; - } - if ($this->container['strength_score'] === null) { - return false; - } - if ($this->container['value_predicting_high_outcome'] === null) { - return false; - } - if ($this->container['value_predicting_low_outcome'] === null) { - return false; - } - return true; - } - - - /** - * Gets id - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * @param int $id id - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets confidence_level - * @return string - */ - public function getConfidenceLevel() - { - return $this->container['confidence_level']; - } - - /** - * Sets confidence_level - * @param string $confidence_level Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors - * @return $this - */ - public function setConfidenceLevel($confidence_level) - { - $this->container['confidence_level'] = $confidence_level; - - return $this; - } - - /** - * Gets confidence_score - * @return float - */ - public function getConfidenceScore() - { - return $this->container['confidence_score']; - } - - /** - * Sets confidence_score - * @param float $confidence_score A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors - * @return $this - */ - public function setConfidenceScore($confidence_score) - { - $this->container['confidence_score'] = $confidence_score; - - return $this; - } - - /** - * Gets direction - * @return string - */ - public function getDirection() - { - return $this->container['direction']; - } - - /** - * Sets direction - * @param string $direction Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. - * @return $this - */ - public function setDirection($direction) - { - $this->container['direction'] = $direction; - - return $this; - } - - /** - * Gets duration_of_action - * @return int - */ - public function getDurationOfAction() - { - return $this->container['duration_of_action']; - } - - /** - * Sets duration_of_action - * @param int $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. - * @return $this - */ - public function setDurationOfAction($duration_of_action) - { - $this->container['duration_of_action'] = $duration_of_action; - - return $this; - } - - /** - * Gets error_message - * @return string - */ - public function getErrorMessage() - { - return $this->container['error_message']; - } - - /** - * Sets error_message - * @param string $error_message error_message - * @return $this - */ - public function setErrorMessage($error_message) - { - $this->container['error_message'] = $error_message; - - return $this; - } - - /** - * Gets onset_delay - * @return int - */ - public function getOnsetDelay() - { - return $this->container['onset_delay']; - } - - /** - * Sets onset_delay - * @param int $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. - * @return $this - */ - public function setOnsetDelay($onset_delay) - { - $this->container['onset_delay'] = $onset_delay; - - return $this; - } - - /** - * Gets outcome_variable_id - * @return int - */ - public function getOutcomeVariableId() - { - return $this->container['outcome_variable_id']; - } - - /** - * Sets outcome_variable_id - * @param int $outcome_variable_id Variable ID for the outcome variable - * @return $this - */ - public function setOutcomeVariableId($outcome_variable_id) - { - $this->container['outcome_variable_id'] = $outcome_variable_id; - - return $this; - } - - /** - * Gets predictor_variable_id - * @return int - */ - public function getPredictorVariableId() - { - return $this->container['predictor_variable_id']; - } - - /** - * Sets predictor_variable_id - * @param int $predictor_variable_id Variable ID for the predictor variable - * @return $this - */ - public function setPredictorVariableId($predictor_variable_id) - { - $this->container['predictor_variable_id'] = $predictor_variable_id; - - return $this; - } - - /** - * Gets predictor_unit_id - * @return int - */ - public function getPredictorUnitId() - { - return $this->container['predictor_unit_id']; - } - - /** - * Sets predictor_unit_id - * @param int $predictor_unit_id ID for default unit of the predictor variable - * @return $this - */ - public function setPredictorUnitId($predictor_unit_id) - { - $this->container['predictor_unit_id'] = $predictor_unit_id; - - return $this; - } - - /** - * Gets sinn_rank - * @return float - */ - public function getSinnRank() - { - return $this->container['sinn_rank']; - } - - /** - * Sets sinn_rank - * @param float $sinn_rank A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. - * @return $this - */ - public function setSinnRank($sinn_rank) - { - $this->container['sinn_rank'] = $sinn_rank; - - return $this; - } - - /** - * Gets strength_level - * @return string - */ - public function getStrengthLevel() - { - return $this->container['strength_level']; - } - - /** - * Sets strength_level - * @param string $strength_level Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. - * @return $this - */ - public function setStrengthLevel($strength_level) - { - $this->container['strength_level'] = $strength_level; - - return $this; - } - - /** - * Gets strength_score - * @return float - */ - public function getStrengthScore() - { - return $this->container['strength_score']; - } - - /** - * Sets strength_score - * @param float $strength_score A value represented to the size of the effect which the predictor appears to have on the outcome. - * @return $this - */ - public function setStrengthScore($strength_score) - { - $this->container['strength_score'] = $strength_score; - - return $this; - } - - /** - * Gets user_id - * @return int - */ - public function getUserId() - { - return $this->container['user_id']; - } - - /** - * Sets user_id - * @param int $user_id user_id - * @return $this - */ - public function setUserId($user_id) - { - $this->container['user_id'] = $user_id; - - return $this; - } - - /** - * Gets vote - * @return string - */ - public function getVote() - { - return $this->container['vote']; - } - - /** - * Sets vote - * @param string $vote vote - * @return $this - */ - public function setVote($vote) - { - $this->container['vote'] = $vote; - - return $this; - } - - /** - * Gets value_predicting_high_outcome - * @return float - */ - public function getValuePredictingHighOutcome() - { - return $this->container['value_predicting_high_outcome']; - } - - /** - * Sets value_predicting_high_outcome - * @param float $value_predicting_high_outcome Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value - * @return $this - */ - public function setValuePredictingHighOutcome($value_predicting_high_outcome) - { - $this->container['value_predicting_high_outcome'] = $value_predicting_high_outcome; - - return $this; - } - - /** - * Gets value_predicting_low_outcome - * @return float - */ - public function getValuePredictingLowOutcome() - { - return $this->container['value_predicting_low_outcome']; - } - - /** - * Sets value_predicting_low_outcome - * @param float $value_predicting_low_outcome Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value - * @return $this - */ - public function setValuePredictingLowOutcome($value_predicting_low_outcome) - { - $this->container['value_predicting_low_outcome'] = $value_predicting_low_outcome; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/UserVariables.php b/lib/Model/UserVariables.php deleted file mode 100644 index a52f2b1..0000000 --- a/lib/Model/UserVariables.php +++ /dev/null @@ -1,501 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * UserVariables Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserVariables implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'UserVariables'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'user' => 'int', - 'variable_id' => 'int', - 'duration_of_action' => 'int', - 'filling_value' => 'int', - 'join_with' => 'string', - 'maximum_allowed_value' => 'float', - 'minimum_allowed_value' => 'float', - 'onset_delay' => 'int', - 'experiment_start_time' => 'string', - 'experiment_end_time' => 'string', - 'alias' => 'string' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'user' => 'user', - 'variable_id' => 'variableId', - 'duration_of_action' => 'durationOfAction', - 'filling_value' => 'fillingValue', - 'join_with' => 'joinWith', - 'maximum_allowed_value' => 'maximumAllowedValue', - 'minimum_allowed_value' => 'minimumAllowedValue', - 'onset_delay' => 'onsetDelay', - 'experiment_start_time' => 'experimentStartTime', - 'experiment_end_time' => 'experimentEndTime', - 'alias' => 'alias' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'user' => 'setUser', - 'variable_id' => 'setVariableId', - 'duration_of_action' => 'setDurationOfAction', - 'filling_value' => 'setFillingValue', - 'join_with' => 'setJoinWith', - 'maximum_allowed_value' => 'setMaximumAllowedValue', - 'minimum_allowed_value' => 'setMinimumAllowedValue', - 'onset_delay' => 'setOnsetDelay', - 'experiment_start_time' => 'setExperimentStartTime', - 'experiment_end_time' => 'setExperimentEndTime', - 'alias' => 'setAlias' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'user' => 'getUser', - 'variable_id' => 'getVariableId', - 'duration_of_action' => 'getDurationOfAction', - 'filling_value' => 'getFillingValue', - 'join_with' => 'getJoinWith', - 'maximum_allowed_value' => 'getMaximumAllowedValue', - 'minimum_allowed_value' => 'getMinimumAllowedValue', - 'onset_delay' => 'getOnsetDelay', - 'experiment_start_time' => 'getExperimentStartTime', - 'experiment_end_time' => 'getExperimentEndTime', - 'alias' => 'getAlias' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['user'] = isset($data['user']) ? $data['user'] : null; - $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; - $this->container['duration_of_action'] = isset($data['duration_of_action']) ? $data['duration_of_action'] : null; - $this->container['filling_value'] = isset($data['filling_value']) ? $data['filling_value'] : null; - $this->container['join_with'] = isset($data['join_with']) ? $data['join_with'] : null; - $this->container['maximum_allowed_value'] = isset($data['maximum_allowed_value']) ? $data['maximum_allowed_value'] : null; - $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; - $this->container['onset_delay'] = isset($data['onset_delay']) ? $data['onset_delay'] : null; - $this->container['experiment_start_time'] = isset($data['experiment_start_time']) ? $data['experiment_start_time'] : null; - $this->container['experiment_end_time'] = isset($data['experiment_end_time']) ? $data['experiment_end_time'] : null; - $this->container['alias'] = isset($data['alias']) ? $data['alias'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['user'] === null) { - $invalid_properties[] = "'user' can't be null"; - } - if ($this->container['variable_id'] === null) { - $invalid_properties[] = "'variable_id' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['user'] === null) { - return false; - } - if ($this->container['variable_id'] === null) { - return false; - } - return true; - } - - - /** - * Gets user - * @return int - */ - public function getUser() - { - return $this->container['user']; - } - - /** - * Sets user - * @param int $user User ID - * @return $this - */ - public function setUser($user) - { - $this->container['user'] = $user; - - return $this; - } - - /** - * Gets variable_id - * @return int - */ - public function getVariableId() - { - return $this->container['variable_id']; - } - - /** - * Sets variable_id - * @param int $variable_id Common variable id - * @return $this - */ - public function setVariableId($variable_id) - { - $this->container['variable_id'] = $variable_id; - - return $this; - } - - /** - * Gets duration_of_action - * @return int - */ - public function getDurationOfAction() - { - return $this->container['duration_of_action']; - } - - /** - * Sets duration_of_action - * @param int $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. - * @return $this - */ - public function setDurationOfAction($duration_of_action) - { - $this->container['duration_of_action'] = $duration_of_action; - - return $this; - } - - /** - * Gets filling_value - * @return int - */ - public function getFillingValue() - { - return $this->container['filling_value']; - } - - /** - * Sets filling_value - * @param int $filling_value When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. - * @return $this - */ - public function setFillingValue($filling_value) - { - $this->container['filling_value'] = $filling_value; - - return $this; - } - - /** - * Gets join_with - * @return string - */ - public function getJoinWith() - { - return $this->container['join_with']; - } - - /** - * Sets join_with - * @param string $join_with joinWith - * @return $this - */ - public function setJoinWith($join_with) - { - $this->container['join_with'] = $join_with; - - return $this; - } - - /** - * Gets maximum_allowed_value - * @return float - */ - public function getMaximumAllowedValue() - { - return $this->container['maximum_allowed_value']; - } - - /** - * Sets maximum_allowed_value - * @param float $maximum_allowed_value The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. - * @return $this - */ - public function setMaximumAllowedValue($maximum_allowed_value) - { - $this->container['maximum_allowed_value'] = $maximum_allowed_value; - - return $this; - } - - /** - * Gets minimum_allowed_value - * @return float - */ - public function getMinimumAllowedValue() - { - return $this->container['minimum_allowed_value']; - } - - /** - * Sets minimum_allowed_value - * @param float $minimum_allowed_value The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. - * @return $this - */ - public function setMinimumAllowedValue($minimum_allowed_value) - { - $this->container['minimum_allowed_value'] = $minimum_allowed_value; - - return $this; - } - - /** - * Gets onset_delay - * @return int - */ - public function getOnsetDelay() - { - return $this->container['onset_delay']; - } - - /** - * Sets onset_delay - * @param int $onset_delay onsetDelay - * @return $this - */ - public function setOnsetDelay($onset_delay) - { - $this->container['onset_delay'] = $onset_delay; - - return $this; - } - - /** - * Gets experiment_start_time - * @return string - */ - public function getExperimentStartTime() - { - return $this->container['experiment_start_time']; - } - - /** - * Sets experiment_start_time - * @param string $experiment_start_time Earliest measurement startTime that should be used in analysis. For instance, the date when you started tracking something. Helpful in determining when to start 0 filling since we can assume the absence of a treatment measurement, for instance, indicates that the treatment was not applied rathter than simply not recorded. Uses ISO string format - * @return $this - */ - public function setExperimentStartTime($experiment_start_time) - { - $this->container['experiment_start_time'] = $experiment_start_time; - - return $this; - } - - /** - * Gets experiment_end_time - * @return string - */ - public function getExperimentEndTime() - { - return $this->container['experiment_end_time']; - } - - /** - * Sets experiment_end_time - * @param string $experiment_end_time Latest measurement startTime that should be used in analysis. For instance, the date when you stopped tracking something. Helpful in determining when to stop 0 filling since we can assume the absence of a treatment measurement, for instance, indicates that the treatment was not applied rathter than simply not recorded. Uses ISO string format - * @return $this - */ - public function setExperimentEndTime($experiment_end_time) - { - $this->container['experiment_end_time'] = $experiment_end_time; - - return $this; - } - - /** - * Gets alias - * @return string - */ - public function getAlias() - { - return $this->container['alias']; - } - - /** - * Sets alias - * @param string $alias User-defined display alias for variable name - * @return $this - */ - public function setAlias($alias) - { - $this->container['alias'] = $alias; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/ValueObject.php b/lib/Model/ValueObject.php deleted file mode 100644 index b072598..0000000 --- a/lib/Model/ValueObject.php +++ /dev/null @@ -1,293 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * ValueObject Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class ValueObject implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'ValueObject'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'timestamp' => 'int', - 'value' => 'double', - 'note' => 'string' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'timestamp' => 'timestamp', - 'value' => 'value', - 'note' => 'note' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'timestamp' => 'setTimestamp', - 'value' => 'setValue', - 'note' => 'setNote' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'timestamp' => 'getTimestamp', - 'value' => 'getValue', - 'note' => 'getNote' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['value'] = isset($data['value']) ? $data['value'] : null; - $this->container['note'] = isset($data['note']) ? $data['note'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['timestamp'] === null) { - $invalid_properties[] = "'timestamp' can't be null"; - } - if ($this->container['value'] === null) { - $invalid_properties[] = "'value' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['timestamp'] === null) { - return false; - } - if ($this->container['value'] === null) { - return false; - } - return true; - } - - - /** - * Gets timestamp - * @return int - */ - public function getTimestamp() - { - return $this->container['timestamp']; - } - - /** - * Sets timestamp - * @param int $timestamp Timestamp for the measurement event in epoch time (unixtime) - * @return $this - */ - public function setTimestamp($timestamp) - { - $this->container['timestamp'] = $timestamp; - - return $this; - } - - /** - * Gets value - * @return double - */ - public function getValue() - { - return $this->container['value']; - } - - /** - * Sets value - * @param double $value Measurement value - * @return $this - */ - public function setValue($value) - { - $this->container['value'] = $value; - - return $this; - } - - /** - * Gets note - * @return string - */ - public function getNote() - { - return $this->container['note']; - } - - /** - * Sets note - * @param string $note Optional note to include with the measurement - * @return $this - */ - public function setNote($note) - { - $this->container['note'] = $note; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/Variable.php b/lib/Model/Variable.php deleted file mode 100644 index 2fa5e8e..0000000 --- a/lib/Model/Variable.php +++ /dev/null @@ -1,1236 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * Variable Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class Variable implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'Variable'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'id' => 'int', - 'name' => 'string', - 'original_name' => 'string', - 'category' => 'string', - 'abbreviated_unit_name' => 'string', - 'abbreviated_unit_id' => 'int', - 'sources' => 'string', - 'minimum_allowed_value' => 'double', - 'maximum_allowed_value' => 'double', - 'combination_operation' => 'string', - 'filling_value' => 'double', - 'join_with' => 'string', - 'joined_variables' => '\QuantiModo\Client\Model\Variable[]', - 'parent' => 'int', - 'sub_variables' => '\QuantiModo\Client\Model\Variable[]', - 'onset_delay' => 'int', - 'duration_of_action' => 'int', - 'earliest_measurement_time' => 'int', - 'latest_measurement_time' => 'int', - 'updated' => 'int', - 'cause_only' => 'int', - 'number_of_correlations' => 'int', - 'outcome' => 'int', - 'raw_measurements_at_last_analysis' => 'int', - 'number_of_raw_measurements' => 'int', - 'last_unit' => 'string', - 'last_value' => 'int', - 'most_common_value' => 'int', - 'most_common_unit' => 'string', - 'last_source' => 'int', - 'image_url' => 'string', - 'ion_icon' => 'string' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'name' => 'name', - 'original_name' => 'originalName', - 'category' => 'category', - 'abbreviated_unit_name' => 'abbreviatedUnitName', - 'abbreviated_unit_id' => 'abbreviatedUnitId', - 'sources' => 'sources', - 'minimum_allowed_value' => 'minimumAllowedValue', - 'maximum_allowed_value' => 'maximumAllowedValue', - 'combination_operation' => 'combinationOperation', - 'filling_value' => 'fillingValue', - 'join_with' => 'joinWith', - 'joined_variables' => 'joinedVariables', - 'parent' => 'parent', - 'sub_variables' => 'subVariables', - 'onset_delay' => 'onsetDelay', - 'duration_of_action' => 'durationOfAction', - 'earliest_measurement_time' => 'earliestMeasurementTime', - 'latest_measurement_time' => 'latestMeasurementTime', - 'updated' => 'updated', - 'cause_only' => 'causeOnly', - 'number_of_correlations' => 'numberOfCorrelations', - 'outcome' => 'outcome', - 'raw_measurements_at_last_analysis' => 'rawMeasurementsAtLastAnalysis', - 'number_of_raw_measurements' => 'numberOfRawMeasurements', - 'last_unit' => 'lastUnit', - 'last_value' => 'lastValue', - 'most_common_value' => 'mostCommonValue', - 'most_common_unit' => 'mostCommonUnit', - 'last_source' => 'lastSource', - 'image_url' => 'imageUrl', - 'ion_icon' => 'ionIcon' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'name' => 'setName', - 'original_name' => 'setOriginalName', - 'category' => 'setCategory', - 'abbreviated_unit_name' => 'setAbbreviatedUnitName', - 'abbreviated_unit_id' => 'setAbbreviatedUnitId', - 'sources' => 'setSources', - 'minimum_allowed_value' => 'setMinimumAllowedValue', - 'maximum_allowed_value' => 'setMaximumAllowedValue', - 'combination_operation' => 'setCombinationOperation', - 'filling_value' => 'setFillingValue', - 'join_with' => 'setJoinWith', - 'joined_variables' => 'setJoinedVariables', - 'parent' => 'setParent', - 'sub_variables' => 'setSubVariables', - 'onset_delay' => 'setOnsetDelay', - 'duration_of_action' => 'setDurationOfAction', - 'earliest_measurement_time' => 'setEarliestMeasurementTime', - 'latest_measurement_time' => 'setLatestMeasurementTime', - 'updated' => 'setUpdated', - 'cause_only' => 'setCauseOnly', - 'number_of_correlations' => 'setNumberOfCorrelations', - 'outcome' => 'setOutcome', - 'raw_measurements_at_last_analysis' => 'setRawMeasurementsAtLastAnalysis', - 'number_of_raw_measurements' => 'setNumberOfRawMeasurements', - 'last_unit' => 'setLastUnit', - 'last_value' => 'setLastValue', - 'most_common_value' => 'setMostCommonValue', - 'most_common_unit' => 'setMostCommonUnit', - 'last_source' => 'setLastSource', - 'image_url' => 'setImageUrl', - 'ion_icon' => 'setIonIcon' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'name' => 'getName', - 'original_name' => 'getOriginalName', - 'category' => 'getCategory', - 'abbreviated_unit_name' => 'getAbbreviatedUnitName', - 'abbreviated_unit_id' => 'getAbbreviatedUnitId', - 'sources' => 'getSources', - 'minimum_allowed_value' => 'getMinimumAllowedValue', - 'maximum_allowed_value' => 'getMaximumAllowedValue', - 'combination_operation' => 'getCombinationOperation', - 'filling_value' => 'getFillingValue', - 'join_with' => 'getJoinWith', - 'joined_variables' => 'getJoinedVariables', - 'parent' => 'getParent', - 'sub_variables' => 'getSubVariables', - 'onset_delay' => 'getOnsetDelay', - 'duration_of_action' => 'getDurationOfAction', - 'earliest_measurement_time' => 'getEarliestMeasurementTime', - 'latest_measurement_time' => 'getLatestMeasurementTime', - 'updated' => 'getUpdated', - 'cause_only' => 'getCauseOnly', - 'number_of_correlations' => 'getNumberOfCorrelations', - 'outcome' => 'getOutcome', - 'raw_measurements_at_last_analysis' => 'getRawMeasurementsAtLastAnalysis', - 'number_of_raw_measurements' => 'getNumberOfRawMeasurements', - 'last_unit' => 'getLastUnit', - 'last_value' => 'getLastValue', - 'most_common_value' => 'getMostCommonValue', - 'most_common_unit' => 'getMostCommonUnit', - 'last_source' => 'getLastSource', - 'image_url' => 'getImageUrl', - 'ion_icon' => 'getIonIcon' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - const COMBINATION_OPERATION_MEAN = 'MEAN'; - const COMBINATION_OPERATION_SUM = 'SUM'; - - - - /** - * Gets allowable values of the enum - * @return string[] - */ - public function getCombinationOperationAllowableValues() - { - return [ - self::COMBINATION_OPERATION_MEAN, - self::COMBINATION_OPERATION_SUM, - ]; - } - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['original_name'] = isset($data['original_name']) ? $data['original_name'] : null; - $this->container['category'] = isset($data['category']) ? $data['category'] : null; - $this->container['abbreviated_unit_name'] = isset($data['abbreviated_unit_name']) ? $data['abbreviated_unit_name'] : null; - $this->container['abbreviated_unit_id'] = isset($data['abbreviated_unit_id']) ? $data['abbreviated_unit_id'] : null; - $this->container['sources'] = isset($data['sources']) ? $data['sources'] : null; - $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; - $this->container['maximum_allowed_value'] = isset($data['maximum_allowed_value']) ? $data['maximum_allowed_value'] : null; - $this->container['combination_operation'] = isset($data['combination_operation']) ? $data['combination_operation'] : null; - $this->container['filling_value'] = isset($data['filling_value']) ? $data['filling_value'] : null; - $this->container['join_with'] = isset($data['join_with']) ? $data['join_with'] : null; - $this->container['joined_variables'] = isset($data['joined_variables']) ? $data['joined_variables'] : null; - $this->container['parent'] = isset($data['parent']) ? $data['parent'] : null; - $this->container['sub_variables'] = isset($data['sub_variables']) ? $data['sub_variables'] : null; - $this->container['onset_delay'] = isset($data['onset_delay']) ? $data['onset_delay'] : null; - $this->container['duration_of_action'] = isset($data['duration_of_action']) ? $data['duration_of_action'] : null; - $this->container['earliest_measurement_time'] = isset($data['earliest_measurement_time']) ? $data['earliest_measurement_time'] : null; - $this->container['latest_measurement_time'] = isset($data['latest_measurement_time']) ? $data['latest_measurement_time'] : null; - $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; - $this->container['cause_only'] = isset($data['cause_only']) ? $data['cause_only'] : null; - $this->container['number_of_correlations'] = isset($data['number_of_correlations']) ? $data['number_of_correlations'] : null; - $this->container['outcome'] = isset($data['outcome']) ? $data['outcome'] : null; - $this->container['raw_measurements_at_last_analysis'] = isset($data['raw_measurements_at_last_analysis']) ? $data['raw_measurements_at_last_analysis'] : null; - $this->container['number_of_raw_measurements'] = isset($data['number_of_raw_measurements']) ? $data['number_of_raw_measurements'] : null; - $this->container['last_unit'] = isset($data['last_unit']) ? $data['last_unit'] : null; - $this->container['last_value'] = isset($data['last_value']) ? $data['last_value'] : null; - $this->container['most_common_value'] = isset($data['most_common_value']) ? $data['most_common_value'] : null; - $this->container['most_common_unit'] = isset($data['most_common_unit']) ? $data['most_common_unit'] : null; - $this->container['last_source'] = isset($data['last_source']) ? $data['last_source'] : null; - $this->container['image_url'] = isset($data['image_url']) ? $data['image_url'] : null; - $this->container['ion_icon'] = isset($data['ion_icon']) ? $data['ion_icon'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['name'] === null) { - $invalid_properties[] = "'name' can't be null"; - } - if ($this->container['original_name'] === null) { - $invalid_properties[] = "'original_name' can't be null"; - } - if ($this->container['category'] === null) { - $invalid_properties[] = "'category' can't be null"; - } - if ($this->container['abbreviated_unit_name'] === null) { - $invalid_properties[] = "'abbreviated_unit_name' can't be null"; - } - if ($this->container['abbreviated_unit_id'] === null) { - $invalid_properties[] = "'abbreviated_unit_id' can't be null"; - } - if ($this->container['sources'] === null) { - $invalid_properties[] = "'sources' can't be null"; - } - if ($this->container['minimum_allowed_value'] === null) { - $invalid_properties[] = "'minimum_allowed_value' can't be null"; - } - if ($this->container['maximum_allowed_value'] === null) { - $invalid_properties[] = "'maximum_allowed_value' can't be null"; - } - if ($this->container['combination_operation'] === null) { - $invalid_properties[] = "'combination_operation' can't be null"; - } - $allowed_values = ["MEAN", "SUM"]; - if (!in_array($this->container['combination_operation'], $allowed_values)) { - $invalid_properties[] = "invalid value for 'combination_operation', must be one of 'MEAN', 'SUM'."; - } - - if ($this->container['filling_value'] === null) { - $invalid_properties[] = "'filling_value' can't be null"; - } - if ($this->container['join_with'] === null) { - $invalid_properties[] = "'join_with' can't be null"; - } - if ($this->container['joined_variables'] === null) { - $invalid_properties[] = "'joined_variables' can't be null"; - } - if ($this->container['parent'] === null) { - $invalid_properties[] = "'parent' can't be null"; - } - if ($this->container['sub_variables'] === null) { - $invalid_properties[] = "'sub_variables' can't be null"; - } - if ($this->container['onset_delay'] === null) { - $invalid_properties[] = "'onset_delay' can't be null"; - } - if ($this->container['duration_of_action'] === null) { - $invalid_properties[] = "'duration_of_action' can't be null"; - } - if ($this->container['earliest_measurement_time'] === null) { - $invalid_properties[] = "'earliest_measurement_time' can't be null"; - } - if ($this->container['latest_measurement_time'] === null) { - $invalid_properties[] = "'latest_measurement_time' can't be null"; - } - if ($this->container['updated'] === null) { - $invalid_properties[] = "'updated' can't be null"; - } - if ($this->container['cause_only'] === null) { - $invalid_properties[] = "'cause_only' can't be null"; - } - if ($this->container['number_of_correlations'] === null) { - $invalid_properties[] = "'number_of_correlations' can't be null"; - } - if ($this->container['outcome'] === null) { - $invalid_properties[] = "'outcome' can't be null"; - } - if ($this->container['raw_measurements_at_last_analysis'] === null) { - $invalid_properties[] = "'raw_measurements_at_last_analysis' can't be null"; - } - if ($this->container['number_of_raw_measurements'] === null) { - $invalid_properties[] = "'number_of_raw_measurements' can't be null"; - } - if ($this->container['last_unit'] === null) { - $invalid_properties[] = "'last_unit' can't be null"; - } - if ($this->container['last_value'] === null) { - $invalid_properties[] = "'last_value' can't be null"; - } - if ($this->container['most_common_value'] === null) { - $invalid_properties[] = "'most_common_value' can't be null"; - } - if ($this->container['most_common_unit'] === null) { - $invalid_properties[] = "'most_common_unit' can't be null"; - } - if ($this->container['last_source'] === null) { - $invalid_properties[] = "'last_source' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['name'] === null) { - return false; - } - if ($this->container['original_name'] === null) { - return false; - } - if ($this->container['category'] === null) { - return false; - } - if ($this->container['abbreviated_unit_name'] === null) { - return false; - } - if ($this->container['abbreviated_unit_id'] === null) { - return false; - } - if ($this->container['sources'] === null) { - return false; - } - if ($this->container['minimum_allowed_value'] === null) { - return false; - } - if ($this->container['maximum_allowed_value'] === null) { - return false; - } - if ($this->container['combination_operation'] === null) { - return false; - } - $allowed_values = ["MEAN", "SUM"]; - if (!in_array($this->container['combination_operation'], $allowed_values)) { - return false; - } - if ($this->container['filling_value'] === null) { - return false; - } - if ($this->container['join_with'] === null) { - return false; - } - if ($this->container['joined_variables'] === null) { - return false; - } - if ($this->container['parent'] === null) { - return false; - } - if ($this->container['sub_variables'] === null) { - return false; - } - if ($this->container['onset_delay'] === null) { - return false; - } - if ($this->container['duration_of_action'] === null) { - return false; - } - if ($this->container['earliest_measurement_time'] === null) { - return false; - } - if ($this->container['latest_measurement_time'] === null) { - return false; - } - if ($this->container['updated'] === null) { - return false; - } - if ($this->container['cause_only'] === null) { - return false; - } - if ($this->container['number_of_correlations'] === null) { - return false; - } - if ($this->container['outcome'] === null) { - return false; - } - if ($this->container['raw_measurements_at_last_analysis'] === null) { - return false; - } - if ($this->container['number_of_raw_measurements'] === null) { - return false; - } - if ($this->container['last_unit'] === null) { - return false; - } - if ($this->container['last_value'] === null) { - return false; - } - if ($this->container['most_common_value'] === null) { - return false; - } - if ($this->container['most_common_unit'] === null) { - return false; - } - if ($this->container['last_source'] === null) { - return false; - } - return true; - } - - - /** - * Gets id - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * @param int $id Variable ID - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets name - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * @param string $name User-defined variable display name. - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets original_name - * @return string - */ - public function getOriginalName() - { - return $this->container['original_name']; - } - - /** - * Sets original_name - * @param string $original_name Name used when the variable was originally created in the `variables` table. - * @return $this - */ - public function setOriginalName($original_name) - { - $this->container['original_name'] = $original_name; - - return $this; - } - - /** - * Gets category - * @return string - */ - public function getCategory() - { - return $this->container['category']; - } - - /** - * Sets category - * @param string $category Variable category like Mood, Sleep, Physical Activity, Treatment, Symptom, etc. - * @return $this - */ - public function setCategory($category) - { - $this->container['category'] = $category; - - return $this; - } - - /** - * Gets abbreviated_unit_name - * @return string - */ - public function getAbbreviatedUnitName() - { - return $this->container['abbreviated_unit_name']; - } - - /** - * Sets abbreviated_unit_name - * @param string $abbreviated_unit_name Abbreviated name of the default unit for the variable - * @return $this - */ - public function setAbbreviatedUnitName($abbreviated_unit_name) - { - $this->container['abbreviated_unit_name'] = $abbreviated_unit_name; - - return $this; - } - - /** - * Gets abbreviated_unit_id - * @return int - */ - public function getAbbreviatedUnitId() - { - return $this->container['abbreviated_unit_id']; - } - - /** - * Sets abbreviated_unit_id - * @param int $abbreviated_unit_id Id of the default unit for the variable - * @return $this - */ - public function setAbbreviatedUnitId($abbreviated_unit_id) - { - $this->container['abbreviated_unit_id'] = $abbreviated_unit_id; - - return $this; - } - - /** - * Gets sources - * @return string - */ - public function getSources() - { - return $this->container['sources']; - } - - /** - * Sets sources - * @param string $sources Comma-separated list of source names to limit variables to those sources - * @return $this - */ - public function setSources($sources) - { - $this->container['sources'] = $sources; - - return $this; - } - - /** - * Gets minimum_allowed_value - * @return double - */ - public function getMinimumAllowedValue() - { - return $this->container['minimum_allowed_value']; - } - - /** - * Sets minimum_allowed_value - * @param double $minimum_allowed_value The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. - * @return $this - */ - public function setMinimumAllowedValue($minimum_allowed_value) - { - $this->container['minimum_allowed_value'] = $minimum_allowed_value; - - return $this; - } - - /** - * Gets maximum_allowed_value - * @return double - */ - public function getMaximumAllowedValue() - { - return $this->container['maximum_allowed_value']; - } - - /** - * Sets maximum_allowed_value - * @param double $maximum_allowed_value The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. - * @return $this - */ - public function setMaximumAllowedValue($maximum_allowed_value) - { - $this->container['maximum_allowed_value'] = $maximum_allowed_value; - - return $this; - } - - /** - * Gets combination_operation - * @return string - */ - public function getCombinationOperation() - { - return $this->container['combination_operation']; - } - - /** - * Sets combination_operation - * @param string $combination_operation Way to aggregate measurements over time. Options are \"MEAN\" or \"SUM\". SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED. - * @return $this - */ - public function setCombinationOperation($combination_operation) - { - $allowed_values = array('MEAN', 'SUM'); - if ((!in_array($combination_operation, $allowed_values))) { - throw new \InvalidArgumentException("Invalid value for 'combination_operation', must be one of 'MEAN', 'SUM'"); - } - $this->container['combination_operation'] = $combination_operation; - - return $this; - } - - /** - * Gets filling_value - * @return double - */ - public function getFillingValue() - { - return $this->container['filling_value']; - } - - /** - * Sets filling_value - * @param double $filling_value When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven't taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. - * @return $this - */ - public function setFillingValue($filling_value) - { - $this->container['filling_value'] = $filling_value; - - return $this; - } - - /** - * Gets join_with - * @return string - */ - public function getJoinWith() - { - return $this->container['join_with']; - } - - /** - * Sets join_with - * @param string $join_with The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables. - * @return $this - */ - public function setJoinWith($join_with) - { - $this->container['join_with'] = $join_with; - - return $this; - } - - /** - * Gets joined_variables - * @return \QuantiModo\Client\Model\Variable[] - */ - public function getJoinedVariables() - { - return $this->container['joined_variables']; - } - - /** - * Sets joined_variables - * @param \QuantiModo\Client\Model\Variable[] $joined_variables Array of Variables that are joined with this Variable - * @return $this - */ - public function setJoinedVariables($joined_variables) - { - $this->container['joined_variables'] = $joined_variables; - - return $this; - } - - /** - * Gets parent - * @return int - */ - public function getParent() - { - return $this->container['parent']; - } - - /** - * Sets parent - * @param int $parent Id of the parent variable if this variable has any parent - * @return $this - */ - public function setParent($parent) - { - $this->container['parent'] = $parent; - - return $this; - } - - /** - * Gets sub_variables - * @return \QuantiModo\Client\Model\Variable[] - */ - public function getSubVariables() - { - return $this->container['sub_variables']; - } - - /** - * Sets sub_variables - * @param \QuantiModo\Client\Model\Variable[] $sub_variables Array of Variables that are sub variables to this Variable - * @return $this - */ - public function setSubVariables($sub_variables) - { - $this->container['sub_variables'] = $sub_variables; - - return $this; - } - - /** - * Gets onset_delay - * @return int - */ - public function getOnsetDelay() - { - return $this->container['onset_delay']; - } - - /** - * Sets onset_delay - * @param int $onset_delay The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the “onset delay”. For example, the “onset delay” between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. - * @return $this - */ - public function setOnsetDelay($onset_delay) - { - $this->container['onset_delay'] = $onset_delay; - - return $this; - } - - /** - * Gets duration_of_action - * @return int - */ - public function getDurationOfAction() - { - return $this->container['duration_of_action']; - } - - /** - * Sets duration_of_action - * @param int $duration_of_action The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable’s value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. - * @return $this - */ - public function setDurationOfAction($duration_of_action) - { - $this->container['duration_of_action'] = $duration_of_action; - - return $this; - } - - /** - * Gets earliest_measurement_time - * @return int - */ - public function getEarliestMeasurementTime() - { - return $this->container['earliest_measurement_time']; - } - - /** - * Sets earliest_measurement_time - * @param int $earliest_measurement_time Earliest measurement time - * @return $this - */ - public function setEarliestMeasurementTime($earliest_measurement_time) - { - $this->container['earliest_measurement_time'] = $earliest_measurement_time; - - return $this; - } - - /** - * Gets latest_measurement_time - * @return int - */ - public function getLatestMeasurementTime() - { - return $this->container['latest_measurement_time']; - } - - /** - * Sets latest_measurement_time - * @param int $latest_measurement_time Latest measurement time - * @return $this - */ - public function setLatestMeasurementTime($latest_measurement_time) - { - $this->container['latest_measurement_time'] = $latest_measurement_time; - - return $this; - } - - /** - * Gets updated - * @return int - */ - public function getUpdated() - { - return $this->container['updated']; - } - - /** - * Sets updated - * @param int $updated When this variable or its settings were last updated - * @return $this - */ - public function setUpdated($updated) - { - $this->container['updated'] = $updated; - - return $this; - } - - /** - * Gets cause_only - * @return int - */ - public function getCauseOnly() - { - return $this->container['cause_only']; - } - - /** - * Sets cause_only - * @param int $cause_only A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user. - * @return $this - */ - public function setCauseOnly($cause_only) - { - $this->container['cause_only'] = $cause_only; - - return $this; - } - - /** - * Gets number_of_correlations - * @return int - */ - public function getNumberOfCorrelations() - { - return $this->container['number_of_correlations']; - } - - /** - * Sets number_of_correlations - * @param int $number_of_correlations Number of correlations - * @return $this - */ - public function setNumberOfCorrelations($number_of_correlations) - { - $this->container['number_of_correlations'] = $number_of_correlations; - - return $this; - } - - /** - * Gets outcome - * @return int - */ - public function getOutcome() - { - return $this->container['outcome']; - } - - /** - * Sets outcome - * @param int $outcome Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. - * @return $this - */ - public function setOutcome($outcome) - { - $this->container['outcome'] = $outcome; - - return $this; - } - - /** - * Gets raw_measurements_at_last_analysis - * @return int - */ - public function getRawMeasurementsAtLastAnalysis() - { - return $this->container['raw_measurements_at_last_analysis']; - } - - /** - * Sets raw_measurements_at_last_analysis - * @param int $raw_measurements_at_last_analysis The number of measurements that a given user had for this variable the last time a correlation calculation was performed. Generally correlation values are only updated once the current number of measurements for a variable is more than 10% greater than the rawMeasurementsAtLastAnalysis. This avoids a computationally-demanding recalculation when there's not enough new data to make a significant difference in the correlation. - * @return $this - */ - public function setRawMeasurementsAtLastAnalysis($raw_measurements_at_last_analysis) - { - $this->container['raw_measurements_at_last_analysis'] = $raw_measurements_at_last_analysis; - - return $this; - } - - /** - * Gets number_of_raw_measurements - * @return int - */ - public function getNumberOfRawMeasurements() - { - return $this->container['number_of_raw_measurements']; - } - - /** - * Sets number_of_raw_measurements - * @param int $number_of_raw_measurements Number of measurements - * @return $this - */ - public function setNumberOfRawMeasurements($number_of_raw_measurements) - { - $this->container['number_of_raw_measurements'] = $number_of_raw_measurements; - - return $this; - } - - /** - * Gets last_unit - * @return string - */ - public function getLastUnit() - { - return $this->container['last_unit']; - } - - /** - * Sets last_unit - * @param string $last_unit Last unit - * @return $this - */ - public function setLastUnit($last_unit) - { - $this->container['last_unit'] = $last_unit; - - return $this; - } - - /** - * Gets last_value - * @return int - */ - public function getLastValue() - { - return $this->container['last_value']; - } - - /** - * Sets last_value - * @param int $last_value Last value - * @return $this - */ - public function setLastValue($last_value) - { - $this->container['last_value'] = $last_value; - - return $this; - } - - /** - * Gets most_common_value - * @return int - */ - public function getMostCommonValue() - { - return $this->container['most_common_value']; - } - - /** - * Sets most_common_value - * @param int $most_common_value Most common value - * @return $this - */ - public function setMostCommonValue($most_common_value) - { - $this->container['most_common_value'] = $most_common_value; - - return $this; - } - - /** - * Gets most_common_unit - * @return string - */ - public function getMostCommonUnit() - { - return $this->container['most_common_unit']; - } - - /** - * Sets most_common_unit - * @param string $most_common_unit Most common unit - * @return $this - */ - public function setMostCommonUnit($most_common_unit) - { - $this->container['most_common_unit'] = $most_common_unit; - - return $this; - } - - /** - * Gets last_source - * @return int - */ - public function getLastSource() - { - return $this->container['last_source']; - } - - /** - * Sets last_source - * @param int $last_source Last source - * @return $this - */ - public function setLastSource($last_source) - { - $this->container['last_source'] = $last_source; - - return $this; - } - - /** - * Gets image_url - * @return string - */ - public function getImageUrl() - { - return $this->container['image_url']; - } - - /** - * Sets image_url - * @param string $image_url - * @return $this - */ - public function setImageUrl($image_url) - { - $this->container['image_url'] = $image_url; - - return $this; - } - - /** - * Gets ion_icon - * @return string - */ - public function getIonIcon() - { - return $this->container['ion_icon']; - } - - /** - * Sets ion_icon - * @param string $ion_icon - * @return $this - */ - public function setIonIcon($ion_icon) - { - $this->container['ion_icon'] = $ion_icon; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/VariableCategory.php b/lib/Model/VariableCategory.php index c79423a..a5f83b1 100644 --- a/lib/Model/VariableCategory.php +++ b/lib/Model/VariableCategory.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,7 +54,71 @@ class VariableCategory implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'name' => 'string' + 'app_type' => 'string', + 'cause_only' => 'bool', + 'combination_operation' => 'string', + 'created_time' => '\DateTime', + 'unit_abbreviated_name' => 'string', + 'unit_id' => 'int', + 'duration_of_action' => 'int', + 'filling_value' => 'int', + 'help_text' => 'string', + 'id' => 'int', + 'image_url' => 'string', + 'ion_icon' => 'string', + 'manual_tracking' => 'bool', + 'maximum_allowed_value' => 'string', + 'measurement_synonym_singular_lowercase' => 'string', + 'minimum_allowed_value' => 'string', + 'more_info' => 'string', + 'name' => 'string', + 'onset_delay' => 'int', + 'outcome' => 'bool', + 'png_path' => 'string', + 'png_url' => 'string', + 'public' => 'bool', + 'svg_path' => 'string', + 'svg_url' => 'string', + 'updated' => 'int', + 'updated_time' => '\DateTime', + 'variable_category_name' => 'string', + 'variable_category_name_singular' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'app_type' => null, + 'cause_only' => null, + 'combination_operation' => null, + 'created_time' => 'date-time', + 'unit_abbreviated_name' => null, + 'unit_id' => null, + 'duration_of_action' => null, + 'filling_value' => null, + 'help_text' => null, + 'id' => null, + 'image_url' => null, + 'ion_icon' => null, + 'manual_tracking' => null, + 'maximum_allowed_value' => null, + 'measurement_synonym_singular_lowercase' => null, + 'minimum_allowed_value' => null, + 'more_info' => null, + 'name' => null, + 'onset_delay' => null, + 'outcome' => null, + 'png_path' => null, + 'png_url' => null, + 'public' => null, + 'svg_path' => null, + 'svg_url' => null, + 'updated' => null, + 'updated_time' => 'date-time', + 'variable_category_name' => null, + 'variable_category_name_singular' => null ]; public static function swaggerTypes() @@ -62,12 +126,45 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'name' => 'name' + 'app_type' => 'appType', + 'cause_only' => 'causeOnly', + 'combination_operation' => 'combinationOperation', + 'created_time' => 'createdTime', + 'unit_abbreviated_name' => 'unitAbbreviatedName', + 'unit_id' => 'unitId', + 'duration_of_action' => 'durationOfAction', + 'filling_value' => 'fillingValue', + 'help_text' => 'helpText', + 'id' => 'id', + 'image_url' => 'imageUrl', + 'ion_icon' => 'ionIcon', + 'manual_tracking' => 'manualTracking', + 'maximum_allowed_value' => 'maximumAllowedValue', + 'measurement_synonym_singular_lowercase' => 'measurementSynonymSingularLowercase', + 'minimum_allowed_value' => 'minimumAllowedValue', + 'more_info' => 'moreInfo', + 'name' => 'name', + 'onset_delay' => 'onsetDelay', + 'outcome' => 'outcome', + 'png_path' => 'pngPath', + 'png_url' => 'pngUrl', + 'public' => 'public', + 'svg_path' => 'svgPath', + 'svg_url' => 'svgUrl', + 'updated' => 'updated', + 'updated_time' => 'updatedTime', + 'variable_category_name' => 'variableCategoryName', + 'variable_category_name_singular' => 'variableCategoryNameSingular' ]; @@ -76,7 +173,35 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'name' => 'setName' + 'app_type' => 'setAppType', + 'cause_only' => 'setCauseOnly', + 'combination_operation' => 'setCombinationOperation', + 'created_time' => 'setCreatedTime', + 'unit_abbreviated_name' => 'setUnitAbbreviatedName', + 'unit_id' => 'setUnitId', + 'duration_of_action' => 'setDurationOfAction', + 'filling_value' => 'setFillingValue', + 'help_text' => 'setHelpText', + 'id' => 'setId', + 'image_url' => 'setImageUrl', + 'ion_icon' => 'setIonIcon', + 'manual_tracking' => 'setManualTracking', + 'maximum_allowed_value' => 'setMaximumAllowedValue', + 'measurement_synonym_singular_lowercase' => 'setMeasurementSynonymSingularLowercase', + 'minimum_allowed_value' => 'setMinimumAllowedValue', + 'more_info' => 'setMoreInfo', + 'name' => 'setName', + 'onset_delay' => 'setOnsetDelay', + 'outcome' => 'setOutcome', + 'png_path' => 'setPngPath', + 'png_url' => 'setPngUrl', + 'public' => 'setPublic', + 'svg_path' => 'setSvgPath', + 'svg_url' => 'setSvgUrl', + 'updated' => 'setUpdated', + 'updated_time' => 'setUpdatedTime', + 'variable_category_name' => 'setVariableCategoryName', + 'variable_category_name_singular' => 'setVariableCategoryNameSingular' ]; @@ -85,7 +210,35 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'name' => 'getName' + 'app_type' => 'getAppType', + 'cause_only' => 'getCauseOnly', + 'combination_operation' => 'getCombinationOperation', + 'created_time' => 'getCreatedTime', + 'unit_abbreviated_name' => 'getUnitAbbreviatedName', + 'unit_id' => 'getUnitId', + 'duration_of_action' => 'getDurationOfAction', + 'filling_value' => 'getFillingValue', + 'help_text' => 'getHelpText', + 'id' => 'getId', + 'image_url' => 'getImageUrl', + 'ion_icon' => 'getIonIcon', + 'manual_tracking' => 'getManualTracking', + 'maximum_allowed_value' => 'getMaximumAllowedValue', + 'measurement_synonym_singular_lowercase' => 'getMeasurementSynonymSingularLowercase', + 'minimum_allowed_value' => 'getMinimumAllowedValue', + 'more_info' => 'getMoreInfo', + 'name' => 'getName', + 'onset_delay' => 'getOnsetDelay', + 'outcome' => 'getOutcome', + 'png_path' => 'getPngPath', + 'png_url' => 'getPngUrl', + 'public' => 'getPublic', + 'svg_path' => 'getSvgPath', + 'svg_url' => 'getSvgUrl', + 'updated' => 'getUpdated', + 'updated_time' => 'getUpdatedTime', + 'variable_category_name' => 'getVariableCategoryName', + 'variable_category_name_singular' => 'getVariableCategoryNameSingular' ]; public static function attributeMap() @@ -119,7 +272,35 @@ public static function getters() */ public function __construct(array $data = null) { + $this->container['app_type'] = isset($data['app_type']) ? $data['app_type'] : null; + $this->container['cause_only'] = isset($data['cause_only']) ? $data['cause_only'] : null; + $this->container['combination_operation'] = isset($data['combination_operation']) ? $data['combination_operation'] : null; + $this->container['created_time'] = isset($data['created_time']) ? $data['created_time'] : null; + $this->container['unit_abbreviated_name'] = isset($data['unit_abbreviated_name']) ? $data['unit_abbreviated_name'] : null; + $this->container['unit_id'] = isset($data['unit_id']) ? $data['unit_id'] : null; + $this->container['duration_of_action'] = isset($data['duration_of_action']) ? $data['duration_of_action'] : null; + $this->container['filling_value'] = isset($data['filling_value']) ? $data['filling_value'] : null; + $this->container['help_text'] = isset($data['help_text']) ? $data['help_text'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['image_url'] = isset($data['image_url']) ? $data['image_url'] : null; + $this->container['ion_icon'] = isset($data['ion_icon']) ? $data['ion_icon'] : null; + $this->container['manual_tracking'] = isset($data['manual_tracking']) ? $data['manual_tracking'] : null; + $this->container['maximum_allowed_value'] = isset($data['maximum_allowed_value']) ? $data['maximum_allowed_value'] : null; + $this->container['measurement_synonym_singular_lowercase'] = isset($data['measurement_synonym_singular_lowercase']) ? $data['measurement_synonym_singular_lowercase'] : null; + $this->container['minimum_allowed_value'] = isset($data['minimum_allowed_value']) ? $data['minimum_allowed_value'] : null; + $this->container['more_info'] = isset($data['more_info']) ? $data['more_info'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['onset_delay'] = isset($data['onset_delay']) ? $data['onset_delay'] : null; + $this->container['outcome'] = isset($data['outcome']) ? $data['outcome'] : null; + $this->container['png_path'] = isset($data['png_path']) ? $data['png_path'] : null; + $this->container['png_url'] = isset($data['png_url']) ? $data['png_url'] : null; + $this->container['public'] = isset($data['public']) ? $data['public'] : null; + $this->container['svg_path'] = isset($data['svg_path']) ? $data['svg_path'] : null; + $this->container['svg_url'] = isset($data['svg_url']) ? $data['svg_url'] : null; + $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; + $this->container['updated_time'] = isset($data['updated_time']) ? $data['updated_time'] : null; + $this->container['variable_category_name'] = isset($data['variable_category_name']) ? $data['variable_category_name'] : null; + $this->container['variable_category_name_singular'] = isset($data['variable_category_name_singular']) ? $data['variable_category_name_singular'] : null; } /** @@ -153,6 +334,363 @@ public function valid() } + /** + * Gets app_type + * @return string + */ + public function getAppType() + { + return $this->container['app_type']; + } + + /** + * Sets app_type + * @param string $app_type Example: mood + * @return $this + */ + public function setAppType($app_type) + { + $this->container['app_type'] = $app_type; + + return $this; + } + + /** + * Gets cause_only + * @return bool + */ + public function getCauseOnly() + { + return $this->container['cause_only']; + } + + /** + * Sets cause_only + * @param bool $cause_only Example: false + * @return $this + */ + public function setCauseOnly($cause_only) + { + $this->container['cause_only'] = $cause_only; + + return $this; + } + + /** + * Gets combination_operation + * @return string + */ + public function getCombinationOperation() + { + return $this->container['combination_operation']; + } + + /** + * Sets combination_operation + * @param string $combination_operation Example: MEAN + * @return $this + */ + public function setCombinationOperation($combination_operation) + { + $this->container['combination_operation'] = $combination_operation; + + return $this; + } + + /** + * Gets created_time + * @return \DateTime + */ + public function getCreatedTime() + { + return $this->container['created_time']; + } + + /** + * Sets created_time + * @param \DateTime $created_time Example: + * @return $this + */ + public function setCreatedTime($created_time) + { + $this->container['created_time'] = $created_time; + + return $this; + } + + /** + * Gets unit_abbreviated_name + * @return string + */ + public function getUnitAbbreviatedName() + { + return $this->container['unit_abbreviated_name']; + } + + /** + * Sets unit_abbreviated_name + * @param string $unit_abbreviated_name Example: /5 + * @return $this + */ + public function setUnitAbbreviatedName($unit_abbreviated_name) + { + $this->container['unit_abbreviated_name'] = $unit_abbreviated_name; + + return $this; + } + + /** + * Gets unit_id + * @return int + */ + public function getUnitId() + { + return $this->container['unit_id']; + } + + /** + * Sets unit_id + * @param int $unit_id Example: 10 + * @return $this + */ + public function setUnitId($unit_id) + { + $this->container['unit_id'] = $unit_id; + + return $this; + } + + /** + * Gets duration_of_action + * @return int + */ + public function getDurationOfAction() + { + return $this->container['duration_of_action']; + } + + /** + * Sets duration_of_action + * @param int $duration_of_action Example: 86400 + * @return $this + */ + public function setDurationOfAction($duration_of_action) + { + $this->container['duration_of_action'] = $duration_of_action; + + return $this; + } + + /** + * Gets filling_value + * @return int + */ + public function getFillingValue() + { + return $this->container['filling_value']; + } + + /** + * Sets filling_value + * @param int $filling_value Example: -1 + * @return $this + */ + public function setFillingValue($filling_value) + { + $this->container['filling_value'] = $filling_value; + + return $this; + } + + /** + * Gets help_text + * @return string + */ + public function getHelpText() + { + return $this->container['help_text']; + } + + /** + * Sets help_text + * @param string $help_text Example: What emotion do you want to rate? + * @return $this + */ + public function setHelpText($help_text) + { + $this->container['help_text'] = $help_text; + + return $this; + } + + /** + * Gets id + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param int $id Example: 1 + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets image_url + * @return string + */ + public function getImageUrl() + { + return $this->container['image_url']; + } + + /** + * Sets image_url + * @param string $image_url Example: https://maxcdn.icons8.com/Color/PNG/96/Cinema/theatre_mask-96.png + * @return $this + */ + public function setImageUrl($image_url) + { + $this->container['image_url'] = $image_url; + + return $this; + } + + /** + * Gets ion_icon + * @return string + */ + public function getIonIcon() + { + return $this->container['ion_icon']; + } + + /** + * Sets ion_icon + * @param string $ion_icon Example: ion-happy-outline + * @return $this + */ + public function setIonIcon($ion_icon) + { + $this->container['ion_icon'] = $ion_icon; + + return $this; + } + + /** + * Gets manual_tracking + * @return bool + */ + public function getManualTracking() + { + return $this->container['manual_tracking']; + } + + /** + * Sets manual_tracking + * @param bool $manual_tracking Example: true + * @return $this + */ + public function setManualTracking($manual_tracking) + { + $this->container['manual_tracking'] = $manual_tracking; + + return $this; + } + + /** + * Gets maximum_allowed_value + * @return string + */ + public function getMaximumAllowedValue() + { + return $this->container['maximum_allowed_value']; + } + + /** + * Sets maximum_allowed_value + * @param string $maximum_allowed_value Example: + * @return $this + */ + public function setMaximumAllowedValue($maximum_allowed_value) + { + $this->container['maximum_allowed_value'] = $maximum_allowed_value; + + return $this; + } + + /** + * Gets measurement_synonym_singular_lowercase + * @return string + */ + public function getMeasurementSynonymSingularLowercase() + { + return $this->container['measurement_synonym_singular_lowercase']; + } + + /** + * Sets measurement_synonym_singular_lowercase + * @param string $measurement_synonym_singular_lowercase Example: rating + * @return $this + */ + public function setMeasurementSynonymSingularLowercase($measurement_synonym_singular_lowercase) + { + $this->container['measurement_synonym_singular_lowercase'] = $measurement_synonym_singular_lowercase; + + return $this; + } + + /** + * Gets minimum_allowed_value + * @return string + */ + public function getMinimumAllowedValue() + { + return $this->container['minimum_allowed_value']; + } + + /** + * Sets minimum_allowed_value + * @param string $minimum_allowed_value Example: + * @return $this + */ + public function setMinimumAllowedValue($minimum_allowed_value) + { + $this->container['minimum_allowed_value'] = $minimum_allowed_value; + + return $this; + } + + /** + * Gets more_info + * @return string + */ + public function getMoreInfo() + { + return $this->container['more_info']; + } + + /** + * Sets more_info + * @param string $more_info Example: Do you have any emotions that fluctuate regularly? If so, add them so I can try to determine which factors are influencing them. + * @return $this + */ + public function setMoreInfo($more_info) + { + $this->container['more_info'] = $more_info; + + return $this; + } + /** * Gets name * @return string @@ -173,6 +711,237 @@ public function setName($name) return $this; } + + /** + * Gets onset_delay + * @return int + */ + public function getOnsetDelay() + { + return $this->container['onset_delay']; + } + + /** + * Sets onset_delay + * @param int $onset_delay Example: 0 + * @return $this + */ + public function setOnsetDelay($onset_delay) + { + $this->container['onset_delay'] = $onset_delay; + + return $this; + } + + /** + * Gets outcome + * @return bool + */ + public function getOutcome() + { + return $this->container['outcome']; + } + + /** + * Sets outcome + * @param bool $outcome Example: true + * @return $this + */ + public function setOutcome($outcome) + { + $this->container['outcome'] = $outcome; + + return $this; + } + + /** + * Gets png_path + * @return string + */ + public function getPngPath() + { + return $this->container['png_path']; + } + + /** + * Sets png_path + * @param string $png_path Example: img/variable_categories/emotions.png + * @return $this + */ + public function setPngPath($png_path) + { + $this->container['png_path'] = $png_path; + + return $this; + } + + /** + * Gets png_url + * @return string + */ + public function getPngUrl() + { + return $this->container['png_url']; + } + + /** + * Sets png_url + * @param string $png_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.png + * @return $this + */ + public function setPngUrl($png_url) + { + $this->container['png_url'] = $png_url; + + return $this; + } + + /** + * Gets public + * @return bool + */ + public function getPublic() + { + return $this->container['public']; + } + + /** + * Sets public + * @param bool $public Example: true + * @return $this + */ + public function setPublic($public) + { + $this->container['public'] = $public; + + return $this; + } + + /** + * Gets svg_path + * @return string + */ + public function getSvgPath() + { + return $this->container['svg_path']; + } + + /** + * Sets svg_path + * @param string $svg_path Example: img/variable_categories/emotions.svg + * @return $this + */ + public function setSvgPath($svg_path) + { + $this->container['svg_path'] = $svg_path; + + return $this; + } + + /** + * Gets svg_url + * @return string + */ + public function getSvgUrl() + { + return $this->container['svg_url']; + } + + /** + * Sets svg_url + * @param string $svg_url Example: https://app.quantimo.do/ionic/Modo/www/img/variable_categories/emotions.svg + * @return $this + */ + public function setSvgUrl($svg_url) + { + $this->container['svg_url'] = $svg_url; + + return $this; + } + + /** + * Gets updated + * @return int + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * @param int $updated Example: 1 + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets updated_time + * @return \DateTime + */ + public function getUpdatedTime() + { + return $this->container['updated_time']; + } + + /** + * Sets updated_time + * @param \DateTime $updated_time Example: + * @return $this + */ + public function setUpdatedTime($updated_time) + { + $this->container['updated_time'] = $updated_time; + + return $this; + } + + /** + * Gets variable_category_name + * @return string + */ + public function getVariableCategoryName() + { + return $this->container['variable_category_name']; + } + + /** + * Sets variable_category_name + * @param string $variable_category_name Example: Emotions + * @return $this + */ + public function setVariableCategoryName($variable_category_name) + { + $this->container['variable_category_name'] = $variable_category_name; + + return $this; + } + + /** + * Gets variable_category_name_singular + * @return string + */ + public function getVariableCategoryNameSingular() + { + return $this->container['variable_category_name_singular']; + } + + /** + * Sets variable_category_name_singular + * @param string $variable_category_name_singular Example: Emotion + * @return $this + */ + public function setVariableCategoryNameSingular($variable_category_name_singular) + { + $this->container['variable_category_name_singular'] = $variable_category_name_singular; + + return $this; + } /** * Returns true if offset exists. False otherwise. * @param integer $offset Offset diff --git a/lib/Model/VariableCategoryArray.php b/lib/Model/VariableCategoryArray.php new file mode 100644 index 0000000..a0dbf36 --- /dev/null +++ b/lib/Model/VariableCategoryArray.php @@ -0,0 +1,223 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/VariableNew.php b/lib/Model/VariableNew.php deleted file mode 100644 index 0a14ac6..0000000 --- a/lib/Model/VariableNew.php +++ /dev/null @@ -1,390 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * VariableNew Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class VariableNew implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'VariableNew'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'name' => 'string', - 'category' => 'string', - 'unit' => 'string', - 'combination_operation' => 'string', - 'parent' => 'string' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'category' => 'category', - 'unit' => 'unit', - 'combination_operation' => 'combinationOperation', - 'parent' => 'parent' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'category' => 'setCategory', - 'unit' => 'setUnit', - 'combination_operation' => 'setCombinationOperation', - 'parent' => 'setParent' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'category' => 'getCategory', - 'unit' => 'getUnit', - 'combination_operation' => 'getCombinationOperation', - 'parent' => 'getParent' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - const COMBINATION_OPERATION_MEAN = 'MEAN'; - const COMBINATION_OPERATION_SUM = 'SUM'; - - - - /** - * Gets allowable values of the enum - * @return string[] - */ - public function getCombinationOperationAllowableValues() - { - return [ - self::COMBINATION_OPERATION_MEAN, - self::COMBINATION_OPERATION_SUM, - ]; - } - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['category'] = isset($data['category']) ? $data['category'] : null; - $this->container['unit'] = isset($data['unit']) ? $data['unit'] : null; - $this->container['combination_operation'] = isset($data['combination_operation']) ? $data['combination_operation'] : null; - $this->container['parent'] = isset($data['parent']) ? $data['parent'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['name'] === null) { - $invalid_properties[] = "'name' can't be null"; - } - if ($this->container['category'] === null) { - $invalid_properties[] = "'category' can't be null"; - } - if ($this->container['unit'] === null) { - $invalid_properties[] = "'unit' can't be null"; - } - if ($this->container['combination_operation'] === null) { - $invalid_properties[] = "'combination_operation' can't be null"; - } - $allowed_values = ["MEAN", "SUM"]; - if (!in_array($this->container['combination_operation'], $allowed_values)) { - $invalid_properties[] = "invalid value for 'combination_operation', must be one of 'MEAN', 'SUM'."; - } - - if ($this->container['parent'] === null) { - $invalid_properties[] = "'parent' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['name'] === null) { - return false; - } - if ($this->container['category'] === null) { - return false; - } - if ($this->container['unit'] === null) { - return false; - } - if ($this->container['combination_operation'] === null) { - return false; - } - $allowed_values = ["MEAN", "SUM"]; - if (!in_array($this->container['combination_operation'], $allowed_values)) { - return false; - } - if ($this->container['parent'] === null) { - return false; - } - return true; - } - - - /** - * Gets name - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * @param string $name User-defined variable display name. - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets category - * @return string - */ - public function getCategory() - { - return $this->container['category']; - } - - /** - * Sets category - * @param string $category Variable category like Mood, Sleep, Physical Activity, Treatment, Symptom, etc. - * @return $this - */ - public function setCategory($category) - { - $this->container['category'] = $category; - - return $this; - } - - /** - * Gets unit - * @return string - */ - public function getUnit() - { - return $this->container['unit']; - } - - /** - * Sets unit - * @param string $unit Abbreviated name of the default unit for the variable - * @return $this - */ - public function setUnit($unit) - { - $this->container['unit'] = $unit; - - return $this; - } - - /** - * Gets combination_operation - * @return string - */ - public function getCombinationOperation() - { - return $this->container['combination_operation']; - } - - /** - * Sets combination_operation - * @param string $combination_operation Way to aggregate measurements over time. Options are \"MEAN\" or \"SUM\". SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED. - * @return $this - */ - public function setCombinationOperation($combination_operation) - { - $allowed_values = array('MEAN', 'SUM'); - if ((!in_array($combination_operation, $allowed_values))) { - throw new \InvalidArgumentException("Invalid value for 'combination_operation', must be one of 'MEAN', 'SUM'"); - } - $this->container['combination_operation'] = $combination_operation; - - return $this; - } - - /** - * Gets parent - * @return string - */ - public function getParent() - { - return $this->container['parent']; - } - - /** - * Sets parent - * @param string $parent Parent - * @return $this - */ - public function setParent($parent) - { - $this->container['parent'] = $parent; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/VariableUserSource.php b/lib/Model/VariableUserSource.php deleted file mode 100644 index 13af95e..0000000 --- a/lib/Model/VariableUserSource.php +++ /dev/null @@ -1,441 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * VariableUserSource Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class VariableUserSource implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'VariableUserSource'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - 'user_id' => 'int', - 'variable_id' => 'int', - 'source_name' => 'string', - 'timestamp' => 'int', - 'earliest_measurement_time' => 'int', - 'latest_measurement_time' => 'int', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime' - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - 'user_id' => 'user_id', - 'variable_id' => 'variable_id', - 'source_name' => 'source_name', - 'timestamp' => 'timestamp', - 'earliest_measurement_time' => 'earliest_measurement_time', - 'latest_measurement_time' => 'latest_measurement_time', - 'created_at' => 'created_at', - 'updated_at' => 'updated_at' - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - 'user_id' => 'setUserId', - 'variable_id' => 'setVariableId', - 'source_name' => 'setSourceName', - 'timestamp' => 'setTimestamp', - 'earliest_measurement_time' => 'setEarliestMeasurementTime', - 'latest_measurement_time' => 'setLatestMeasurementTime', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt' - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - 'user_id' => 'getUserId', - 'variable_id' => 'getVariableId', - 'source_name' => 'getSourceName', - 'timestamp' => 'getTimestamp', - 'earliest_measurement_time' => 'getEarliestMeasurementTime', - 'latest_measurement_time' => 'getLatestMeasurementTime', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt' - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; - $this->container['variable_id'] = isset($data['variable_id']) ? $data['variable_id'] : null; - $this->container['source_name'] = isset($data['source_name']) ? $data['source_name'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['earliest_measurement_time'] = isset($data['earliest_measurement_time']) ? $data['earliest_measurement_time'] : null; - $this->container['latest_measurement_time'] = isset($data['latest_measurement_time']) ? $data['latest_measurement_time'] : null; - $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; - $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = []; - - if ($this->container['variable_id'] === null) { - $invalid_properties[] = "'variable_id' can't be null"; - } - if ($this->container['source_name'] === null) { - $invalid_properties[] = "'source_name' can't be null"; - } - if ($this->container['timestamp'] === null) { - $invalid_properties[] = "'timestamp' can't be null"; - } - if ($this->container['earliest_measurement_time'] === null) { - $invalid_properties[] = "'earliest_measurement_time' can't be null"; - } - if ($this->container['latest_measurement_time'] === null) { - $invalid_properties[] = "'latest_measurement_time' can't be null"; - } - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - - if ($this->container['variable_id'] === null) { - return false; - } - if ($this->container['source_name'] === null) { - return false; - } - if ($this->container['timestamp'] === null) { - return false; - } - if ($this->container['earliest_measurement_time'] === null) { - return false; - } - if ($this->container['latest_measurement_time'] === null) { - return false; - } - return true; - } - - - /** - * Gets user_id - * @return int - */ - public function getUserId() - { - return $this->container['user_id']; - } - - /** - * Sets user_id - * @param int $user_id ID of User - * @return $this - */ - public function setUserId($user_id) - { - $this->container['user_id'] = $user_id; - - return $this; - } - - /** - * Gets variable_id - * @return int - */ - public function getVariableId() - { - return $this->container['variable_id']; - } - - /** - * Sets variable_id - * @param int $variable_id ID of variable - * @return $this - */ - public function setVariableId($variable_id) - { - $this->container['variable_id'] = $variable_id; - - return $this; - } - - /** - * Gets source_name - * @return string - */ - public function getSourceName() - { - return $this->container['source_name']; - } - - /** - * Sets source_name - * @param string $source_name source - * @return $this - */ - public function setSourceName($source_name) - { - $this->container['source_name'] = $source_name; - - return $this; - } - - /** - * Gets timestamp - * @return int - */ - public function getTimestamp() - { - return $this->container['timestamp']; - } - - /** - * Sets timestamp - * @param int $timestamp Time that this measurement occurred Uses epoch minute (epoch time divided by 60) - * @return $this - */ - public function setTimestamp($timestamp) - { - $this->container['timestamp'] = $timestamp; - - return $this; - } - - /** - * Gets earliest_measurement_time - * @return int - */ - public function getEarliestMeasurementTime() - { - return $this->container['earliest_measurement_time']; - } - - /** - * Sets earliest_measurement_time - * @param int $earliest_measurement_time Earliest measurement time - * @return $this - */ - public function setEarliestMeasurementTime($earliest_measurement_time) - { - $this->container['earliest_measurement_time'] = $earliest_measurement_time; - - return $this; - } - - /** - * Gets latest_measurement_time - * @return int - */ - public function getLatestMeasurementTime() - { - return $this->container['latest_measurement_time']; - } - - /** - * Sets latest_measurement_time - * @param int $latest_measurement_time Latest measurement time - * @return $this - */ - public function setLatestMeasurementTime($latest_measurement_time) - { - $this->container['latest_measurement_time'] = $latest_measurement_time; - - return $this; - } - - /** - * Gets created_at - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * @param \DateTime $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format - * @return $this - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * @return \DateTime - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * @param \DateTime $updated_at When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format - * @return $this - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/VariablesNew.php b/lib/Model/VariablesNew.php deleted file mode 100644 index adafe88..0000000 --- a/lib/Model/VariablesNew.php +++ /dev/null @@ -1,211 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace QuantiModo\Client\Model; - -use \ArrayAccess; - -/** - * VariablesNew Class Doc Comment - * - * @category Class - * @description New variables - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class VariablesNew implements ArrayAccess -{ - const DISCRIMINATOR = null; - - /** - * The original name of the model. - * @var string - */ - protected static $swaggerModelName = 'VariablesNew'; - - /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ - protected static $swaggerTypes = [ - - ]; - - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ - protected static $attributeMap = [ - - ]; - - - /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ - protected static $setters = [ - - ]; - - - /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ - protected static $getters = [ - - ]; - - public static function attributeMap() - { - return self::$attributeMap; - } - - public static function setters() - { - return self::$setters; - } - - public static function getters() - { - return self::$getters; - } - - - - - - /** - * Associative array for storing property values - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * @param mixed[] $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - } - - /** - * show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalid_properties = parent::listInvalidProperties(); - - return $invalid_properties; - } - - /** - * validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - if (!parent::valid()) { - return false; - } - - return true; - } - - /** - * Returns true if offset exists. False otherwise. - * @param integer $offset Offset - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * @param integer $offset Offset - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * @param integer $offset Offset - * @param mixed $value Value to be set - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * @param integer $offset Offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); - } - - return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/Vote.php b/lib/Model/Vote.php index ac338d5..51d82f2 100644 --- a/lib/Model/Vote.php +++ b/lib/Model/Vote.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -54,14 +54,29 @@ class Vote implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'id' => 'int', + 'cause_variable_id' => 'int', 'client_id' => 'string', - 'user_id' => 'int', - 'cause_id' => 'int', - 'effect_id' => 'int', - 'value' => 'int', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime' + 'effect_variable_id' => 'int', + 'id' => 'int', + 'updated_at' => '\DateTime', + 'user_id' => 'int', + 'value' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'cause_variable_id' => null, + 'client_id' => null, + 'created_at' => 'date-time', + 'effect_variable_id' => null, + 'id' => 'int32', + 'updated_at' => 'date-time', + 'user_id' => 'int32', + 'value' => null ]; public static function swaggerTypes() @@ -69,19 +84,24 @@ public static function swaggerTypes() return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', + 'cause_variable_id' => 'causeVariableId', 'client_id' => 'clientId', - 'user_id' => 'userId', - 'cause_id' => 'causeId', - 'effect_id' => 'effectId', - 'value' => 'value', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt' + 'effect_variable_id' => 'effectVariableId', + 'id' => 'id', + 'updated_at' => 'updatedAt', + 'user_id' => 'userId', + 'value' => 'value' ]; @@ -90,14 +110,14 @@ public static function swaggerTypes() * @var string[] */ protected static $setters = [ - 'id' => 'setId', + 'cause_variable_id' => 'setCauseVariableId', 'client_id' => 'setClientId', - 'user_id' => 'setUserId', - 'cause_id' => 'setCauseId', - 'effect_id' => 'setEffectId', - 'value' => 'setValue', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt' + 'effect_variable_id' => 'setEffectVariableId', + 'id' => 'setId', + 'updated_at' => 'setUpdatedAt', + 'user_id' => 'setUserId', + 'value' => 'setValue' ]; @@ -106,14 +126,14 @@ public static function swaggerTypes() * @var string[] */ protected static $getters = [ - 'id' => 'getId', + 'cause_variable_id' => 'getCauseVariableId', 'client_id' => 'getClientId', - 'user_id' => 'getUserId', - 'cause_id' => 'getCauseId', - 'effect_id' => 'getEffectId', - 'value' => 'getValue', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt' + 'effect_variable_id' => 'getEffectVariableId', + 'id' => 'getId', + 'updated_at' => 'getUpdatedAt', + 'user_id' => 'getUserId', + 'value' => 'getValue' ]; public static function attributeMap() @@ -147,14 +167,14 @@ public static function getters() */ public function __construct(array $data = null) { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['cause_variable_id'] = isset($data['cause_variable_id']) ? $data['cause_variable_id'] : null; $this->container['client_id'] = isset($data['client_id']) ? $data['client_id'] : null; - $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; - $this->container['cause_id'] = isset($data['cause_id']) ? $data['cause_id'] : null; - $this->container['effect_id'] = isset($data['effect_id']) ? $data['effect_id'] : null; - $this->container['value'] = isset($data['value']) ? $data['value'] : null; $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['effect_variable_id'] = isset($data['effect_variable_id']) ? $data['effect_variable_id'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; + $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; } /** @@ -166,6 +186,18 @@ public function listInvalidProperties() { $invalid_properties = []; + if ($this->container['cause_variable_id'] === null) { + $invalid_properties[] = "'cause_variable_id' can't be null"; + } + if ($this->container['client_id'] === null) { + $invalid_properties[] = "'client_id' can't be null"; + } + if ($this->container['effect_variable_id'] === null) { + $invalid_properties[] = "'effect_variable_id' can't be null"; + } + if ($this->container['user_id'] === null) { + $invalid_properties[] = "'user_id' can't be null"; + } if ($this->container['value'] === null) { $invalid_properties[] = "'value' can't be null"; } @@ -181,6 +213,18 @@ public function listInvalidProperties() public function valid() { + if ($this->container['cause_variable_id'] === null) { + return false; + } + if ($this->container['client_id'] === null) { + return false; + } + if ($this->container['effect_variable_id'] === null) { + return false; + } + if ($this->container['user_id'] === null) { + return false; + } if ($this->container['value'] === null) { return false; } @@ -189,22 +233,22 @@ public function valid() /** - * Gets id + * Gets cause_variable_id * @return int */ - public function getId() + public function getCauseVariableId() { - return $this->container['id']; + return $this->container['cause_variable_id']; } /** - * Sets id - * @param int $id id + * Sets cause_variable_id + * @param int $cause_variable_id Cause variable id * @return $this */ - public function setId($id) + public function setCauseVariableId($cause_variable_id) { - $this->container['id'] = $id; + $this->container['cause_variable_id'] = $cause_variable_id; return $this; } @@ -220,7 +264,7 @@ public function getClientId() /** * Sets client_id - * @param string $client_id client_id + * @param string $client_id clientId * @return $this */ public function setClientId($client_id) @@ -231,127 +275,127 @@ public function setClientId($client_id) } /** - * Gets user_id - * @return int + * Gets created_at + * @return \DateTime */ - public function getUserId() + public function getCreatedAt() { - return $this->container['user_id']; + return $this->container['created_at']; } /** - * Sets user_id - * @param int $user_id ID of User + * Sets created_at + * @param \DateTime $created_at When the record was first created. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format * @return $this */ - public function setUserId($user_id) + public function setCreatedAt($created_at) { - $this->container['user_id'] = $user_id; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets cause_id + * Gets effect_variable_id * @return int */ - public function getCauseId() + public function getEffectVariableId() { - return $this->container['cause_id']; + return $this->container['effect_variable_id']; } /** - * Sets cause_id - * @param int $cause_id ID of the predictor variable + * Sets effect_variable_id + * @param int $effect_variable_id Effect variable id * @return $this */ - public function setCauseId($cause_id) + public function setEffectVariableId($effect_variable_id) { - $this->container['cause_id'] = $cause_id; + $this->container['effect_variable_id'] = $effect_variable_id; return $this; } /** - * Gets effect_id + * Gets id * @return int */ - public function getEffectId() + public function getId() { - return $this->container['effect_id']; + return $this->container['id']; } /** - * Sets effect_id - * @param int $effect_id ID of effect variable + * Sets id + * @param int $id id * @return $this */ - public function setEffectId($effect_id) + public function setId($id) { - $this->container['effect_id'] = $effect_id; + $this->container['id'] = $id; return $this; } /** - * Gets value - * @return int + * Gets updated_at + * @return \DateTime */ - public function getValue() + public function getUpdatedAt() { - return $this->container['value']; + return $this->container['updated_at']; } /** - * Sets value - * @param int $value Value of Vote + * Sets updated_at + * @param \DateTime $updated_at When the record in the database was last updated. Use UTC ISO 8601 `YYYY-MM-DDThh:mm:ss` datetime format * @return $this */ - public function setValue($value) + public function setUpdatedAt($updated_at) { - $this->container['value'] = $value; + $this->container['updated_at'] = $updated_at; return $this; } /** - * Gets created_at - * @return \DateTime + * Gets user_id + * @return int */ - public function getCreatedAt() + public function getUserId() { - return $this->container['created_at']; + return $this->container['user_id']; } /** - * Sets created_at - * @param \DateTime $created_at When the record was first created. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format + * Sets user_id + * @param int $user_id ID of User * @return $this */ - public function setCreatedAt($created_at) + public function setUserId($user_id) { - $this->container['created_at'] = $created_at; + $this->container['user_id'] = $user_id; return $this; } /** - * Gets updated_at - * @return \DateTime + * Gets value + * @return bool */ - public function getUpdatedAt() + public function getValue() { - return $this->container['updated_at']; + return $this->container['value']; } /** - * Sets updated_at - * @param \DateTime $updated_at When the record in the database was last updated. Use UTC ISO 8601 \"YYYY-MM-DDThh:mm:ss\" datetime format + * Sets value + * @param bool $value Vote: 0 (for implausible) or 1 (for plausible) * @return $this */ - public function setUpdatedAt($updated_at) + public function setValue($value) { - $this->container['updated_at'] = $updated_at; + $this->container['value'] = $value; return $this; } diff --git a/lib/Model/VoteDelete.php b/lib/Model/VoteDelete.php index 00ae031..af7499d 100644 --- a/lib/Model/VoteDelete.php +++ b/lib/Model/VoteDelete.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -58,11 +58,25 @@ class VoteDelete implements ArrayAccess 'effect' => 'string' ]; + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'cause' => null, + 'effect' => null + ]; + public static function swaggerTypes() { return self::$swaggerTypes; } + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] diff --git a/lib/Model/XAxi.php b/lib/Model/XAxi.php new file mode 100644 index 0000000..4bedd13 --- /dev/null +++ b/lib/Model/XAxi.php @@ -0,0 +1,413 @@ + 'string[]', + 'end_on_tick' => 'bool', + 'show_last_label' => 'bool', + 'start_on_tick' => 'bool', + 'text' => 'string', + 'title' => '\QuantiModo\Client\Model\Title' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'categories' => null, + 'end_on_tick' => null, + 'show_last_label' => null, + 'start_on_tick' => null, + 'text' => null, + 'title' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'categories' => 'categories', + 'end_on_tick' => 'endOnTick', + 'show_last_label' => 'showLastLabel', + 'start_on_tick' => 'startOnTick', + 'text' => 'text', + 'title' => 'title' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'categories' => 'setCategories', + 'end_on_tick' => 'setEndOnTick', + 'show_last_label' => 'setShowLastLabel', + 'start_on_tick' => 'setStartOnTick', + 'text' => 'setText', + 'title' => 'setTitle' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'categories' => 'getCategories', + 'end_on_tick' => 'getEndOnTick', + 'show_last_label' => 'getShowLastLabel', + 'start_on_tick' => 'getStartOnTick', + 'text' => 'getText', + 'title' => 'getTitle' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['categories'] = isset($data['categories']) ? $data['categories'] : null; + $this->container['end_on_tick'] = isset($data['end_on_tick']) ? $data['end_on_tick'] : null; + $this->container['show_last_label'] = isset($data['show_last_label']) ? $data['show_last_label'] : null; + $this->container['start_on_tick'] = isset($data['start_on_tick']) ? $data['start_on_tick'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['categories'] === null) { + $invalid_properties[] = "'categories' can't be null"; + } + if ($this->container['end_on_tick'] === null) { + $invalid_properties[] = "'end_on_tick' can't be null"; + } + if ($this->container['show_last_label'] === null) { + $invalid_properties[] = "'show_last_label' can't be null"; + } + if ($this->container['start_on_tick'] === null) { + $invalid_properties[] = "'start_on_tick' can't be null"; + } + if ($this->container['text'] === null) { + $invalid_properties[] = "'text' can't be null"; + } + if ($this->container['title'] === null) { + $invalid_properties[] = "'title' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['categories'] === null) { + return false; + } + if ($this->container['end_on_tick'] === null) { + return false; + } + if ($this->container['show_last_label'] === null) { + return false; + } + if ($this->container['start_on_tick'] === null) { + return false; + } + if ($this->container['text'] === null) { + return false; + } + if ($this->container['title'] === null) { + return false; + } + return true; + } + + + /** + * Gets categories + * @return string[] + */ + public function getCategories() + { + return $this->container['categories']; + } + + /** + * Sets categories + * @param string[] $categories + * @return $this + */ + public function setCategories($categories) + { + $this->container['categories'] = $categories; + + return $this; + } + + /** + * Gets end_on_tick + * @return bool + */ + public function getEndOnTick() + { + return $this->container['end_on_tick']; + } + + /** + * Sets end_on_tick + * @param bool $end_on_tick Example: true + * @return $this + */ + public function setEndOnTick($end_on_tick) + { + $this->container['end_on_tick'] = $end_on_tick; + + return $this; + } + + /** + * Gets show_last_label + * @return bool + */ + public function getShowLastLabel() + { + return $this->container['show_last_label']; + } + + /** + * Sets show_last_label + * @param bool $show_last_label Example: true + * @return $this + */ + public function setShowLastLabel($show_last_label) + { + $this->container['show_last_label'] = $show_last_label; + + return $this; + } + + /** + * Gets start_on_tick + * @return bool + */ + public function getStartOnTick() + { + return $this->container['start_on_tick']; + } + + /** + * Sets start_on_tick + * @param bool $start_on_tick Example: true + * @return $this + */ + public function setStartOnTick($start_on_tick) + { + $this->container['start_on_tick'] = $start_on_tick; + + return $this; + } + + /** + * Gets text + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * @param string $text Example: Date + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets title + * @return \QuantiModo\Client\Model\Title + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * @param \QuantiModo\Client\Model\Title $title + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/YAxi.php b/lib/Model/YAxi.php new file mode 100644 index 0000000..b681eee --- /dev/null +++ b/lib/Model/YAxi.php @@ -0,0 +1,380 @@ + 'int', + 'max' => 'double', + 'min' => 'double', + 'opposite' => 'bool', + 'title' => '\QuantiModo\Client\Model\Title' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'line_width' => null, + 'max' => 'double', + 'min' => 'double', + 'opposite' => null, + 'title' => null + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'line_width' => 'lineWidth', + 'max' => 'max', + 'min' => 'min', + 'opposite' => 'opposite', + 'title' => 'title' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'line_width' => 'setLineWidth', + 'max' => 'setMax', + 'min' => 'setMin', + 'opposite' => 'setOpposite', + 'title' => 'setTitle' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'line_width' => 'getLineWidth', + 'max' => 'getMax', + 'min' => 'getMin', + 'opposite' => 'getOpposite', + 'title' => 'getTitle' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['line_width'] = isset($data['line_width']) ? $data['line_width'] : null; + $this->container['max'] = isset($data['max']) ? $data['max'] : null; + $this->container['min'] = isset($data['min']) ? $data['min'] : null; + $this->container['opposite'] = isset($data['opposite']) ? $data['opposite'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['line_width'] === null) { + $invalid_properties[] = "'line_width' can't be null"; + } + if ($this->container['max'] === null) { + $invalid_properties[] = "'max' can't be null"; + } + if ($this->container['min'] === null) { + $invalid_properties[] = "'min' can't be null"; + } + if ($this->container['opposite'] === null) { + $invalid_properties[] = "'opposite' can't be null"; + } + if ($this->container['title'] === null) { + $invalid_properties[] = "'title' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['line_width'] === null) { + return false; + } + if ($this->container['max'] === null) { + return false; + } + if ($this->container['min'] === null) { + return false; + } + if ($this->container['opposite'] === null) { + return false; + } + if ($this->container['title'] === null) { + return false; + } + return true; + } + + + /** + * Gets line_width + * @return int + */ + public function getLineWidth() + { + return $this->container['line_width']; + } + + /** + * Sets line_width + * @param int $line_width Example: 1 + * @return $this + */ + public function setLineWidth($line_width) + { + $this->container['line_width'] = $line_width; + + return $this; + } + + /** + * Gets max + * @return double + */ + public function getMax() + { + return $this->container['max']; + } + + /** + * Sets max + * @param double $max Example: 372.68 + * @return $this + */ + public function setMax($max) + { + $this->container['max'] = $max; + + return $this; + } + + /** + * Gets min + * @return double + */ + public function getMin() + { + return $this->container['min']; + } + + /** + * Sets min + * @param double $min Example: -2.68 + * @return $this + */ + public function setMin($min) + { + $this->container['min'] = $min; + + return $this; + } + + /** + * Gets opposite + * @return bool + */ + public function getOpposite() + { + return $this->container['opposite']; + } + + /** + * Sets opposite + * @param bool $opposite Example: true + * @return $this + */ + public function setOpposite($opposite) + { + $this->container['opposite'] = $opposite; + + return $this; + } + + /** + * Gets title + * @return \QuantiModo\Client\Model\Title + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * @param \QuantiModo\Client\Model\Title $title + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\QuantiModo\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 87b80ac..e598565 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -42,16 +42,18 @@ class ObjectSerializer /** * Serialize data * - * @param mixed $data the data to serialize + * @param mixed $data the data to serialize + * @param string $type the SwaggerType of the data + * @param string $format the format of the Swagger type of the data * * @return string|object serialized form of $data */ - public static function sanitizeForSerialization($data) + public static function sanitizeForSerialization($data, $type = null, $format = null) { if (is_scalar($data) || null === $data) { return $data; } elseif ($data instanceof \DateTime) { - return $data->format(\DateTime::ATOM); + return ($format === 'date') ? $data->format('Y-m-d') : $data->format(\DateTime::ATOM); } elseif (is_array($data)) { foreach ($data as $property => $value) { $data[$property] = self::sanitizeForSerialization($value); @@ -59,16 +61,17 @@ public static function sanitizeForSerialization($data) return $data; } elseif (is_object($data)) { $values = []; + $formats = $data::swaggerFormats(); foreach ($data::swaggerTypes() as $property => $swaggerType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if (method_exists($swaggerType, 'getAllowableEnumValues') + if ($value !== null && method_exists($swaggerType, 'getAllowableEnumValues') && !in_array($value, $swaggerType::getAllowableEnumValues())) { $imploded = implode("', '", $swaggerType::getAllowableEnumValues()); throw new \InvalidArgumentException("Invalid value for enum '$swaggerType', must be one of: '$imploded'"); } if ($value !== null) { - $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value); + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $swaggerType, $formats[$property]); } } return (object)$values; @@ -85,7 +88,7 @@ public static function sanitizeForSerialization($data) * * @return string the sanitized filename */ - public function sanitizeFilename($filename) + public static function sanitizeFilename($filename) { if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { return $match[1]; @@ -264,7 +267,7 @@ public static function deserialize($data, $class, $httpHeaders = null) // determine file name if (array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . sanitizeFilename($match[1]); + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . self::sanitizeFilename($match[1]); } else { $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); } diff --git a/test/Api/AnalyticsApiTest.php b/test/Api/AnalyticsApiTest.php new file mode 100644 index 0000000..ff7c825 --- /dev/null +++ b/test/Api/AnalyticsApiTest.php @@ -0,0 +1,144 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the endpoint. - */ - -namespace QuantiModo\Client; - -use \QuantiModo\Client\Configuration; -use \QuantiModo\Client\ApiClient; -use \QuantiModo\Client\ApiException; -use \QuantiModo\Client\ObjectSerializer; - -/** - * ApplicationEndpointsApiTest Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class ApplicationEndpointsApiTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test cases - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test case for v2ApplicationConnectionsGet - * - * Get all Connections. - * - */ - public function testV2ApplicationConnectionsGet() - { - - } - - /** - * Test case for v2ApplicationCredentialsGet - * - * Get all Credentials. - * - */ - public function testV2ApplicationCredentialsGet() - { - - } - - /** - * Test case for v2ApplicationMeasurementsGet - * - * Get measurements for all users using your application. - * - */ - public function testV2ApplicationMeasurementsGet() - { - - } - - /** - * Test case for v2ApplicationTrackingRemindersGet - * - * Get tracking reminders. - * - */ - public function testV2ApplicationTrackingRemindersGet() - { - - } - - /** - * Test case for v2ApplicationUpdatesGet - * - * Get all Updates. - * - */ - public function testV2ApplicationUpdatesGet() - { - - } - - /** - * Test case for v2ApplicationUserVariableRelationshipsGet - * - * Get all UserVariableRelationships. - * - */ - public function testV2ApplicationUserVariableRelationshipsGet() - { - - } - - /** - * Test case for v2ApplicationUserVariablesGet - * - * Get all UserVariables. - * - */ - public function testV2ApplicationUserVariablesGet() - { - - } - - /** - * Test case for v2ApplicationVariableUserSourcesGet - * - * Get all VariableUserSources. - * - */ - public function testV2ApplicationVariableUserSourcesGet() - { - - } - - /** - * Test case for v2ApplicationVotesGet - * - * Get all Votes. - * - */ - public function testV2ApplicationVotesGet() - { - - } - -} diff --git a/test/Api/AuthenticationApiTest.php b/test/Api/AuthenticationApiTest.php index e913fa8..f713d8f 100644 --- a/test/Api/AuthenticationApiTest.php +++ b/test/Api/AuthenticationApiTest.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -49,7 +49,6 @@ class AuthenticationApiTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -57,7 +56,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -65,7 +63,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -73,62 +70,35 @@ public function tearDown() */ public static function tearDownAfterClass() { - - } - - /** - * Test case for v2AuthSocialAuthorizeCodeGet - * - * Second Step in Social Authentication flow with JWT Token. - * - */ - public function testV2AuthSocialAuthorizeCodeGet() - { - - } - - /** - * Test case for v2AuthSocialAuthorizeTokenGet - * - * Native Social Authentication. - * - */ - public function testV2AuthSocialAuthorizeTokenGet() - { - } /** - * Test case for v2AuthSocialLoginGet + * Test case for getAccessToken * - * First Setp in Social Authentication flow with JWT Token. + * Get a user access token. * */ - public function testV2AuthSocialLoginGet() + public function testGetAccessToken() { - } /** - * Test case for v2Oauth2AccessTokenGet + * Test case for getOauthAuthorizationCode * - * Get a user access token. + * Request Authorization Code. * */ - public function testV2Oauth2AccessTokenGet() + public function testGetOauthAuthorizationCode() { - } /** - * Test case for v2OauthAuthorizeGet + * Test case for postGoogleIdToken * - * Request Authorization Code. + * Post GoogleIdToken. * */ - public function testV2OauthAuthorizeGet() + public function testPostGoogleIdToken() { - } - } diff --git a/test/Api/ConnectorsApiTest.php b/test/Api/ConnectorsApiTest.php index e01c982..044dab7 100644 --- a/test/Api/ConnectorsApiTest.php +++ b/test/Api/ConnectorsApiTest.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -49,7 +49,6 @@ class ConnectorsApiTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -57,7 +56,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -65,7 +63,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -73,106 +70,65 @@ public function tearDown() */ public static function tearDownAfterClass() { - - } - - /** - * Test case for v1ConnectJsGet - * - * Get embeddable connect javascript. - * - */ - public function testV1ConnectJsGet() - { - - } - - /** - * Test case for v1ConnectMobileGet - * - * Mobile connect page. - * - */ - public function testV1ConnectMobileGet() - { - } /** - * Test case for v1ConnectorsConnectorConnectGet + * Test case for connectConnector * * Obtain a token from 3rd party data source. * */ - public function testV1ConnectorsConnectorConnectGet() + public function testConnectConnector() { - } /** - * Test case for v1ConnectorsConnectorConnectInstructionsGet + * Test case for disconnectConnector * - * Connection Instructions. + * Delete stored connection info. * */ - public function testV1ConnectorsConnectorConnectInstructionsGet() + public function testDisconnectConnector() { - } /** - * Test case for v1ConnectorsConnectorConnectParameterGet + * Test case for getConnectors * - * Connect Parameter. + * List of Connectors. * */ - public function testV1ConnectorsConnectorConnectParameterGet() + public function testGetConnectors() { - } /** - * Test case for v1ConnectorsConnectorDisconnectGet + * Test case for getIntegrationJs * - * Delete stored connection info. + * Get embeddable connect javascript. * */ - public function testV1ConnectorsConnectorDisconnectGet() + public function testGetIntegrationJs() { - } /** - * Test case for v1ConnectorsConnectorInfoGet + * Test case for getMobileConnectPage * - * Get connector info for user. + * Mobile connect page. * */ - public function testV1ConnectorsConnectorInfoGet() + public function testGetMobileConnectPage() { - } /** - * Test case for v1ConnectorsConnectorUpdateGet + * Test case for updateConnector * * Sync with data source. * */ - public function testV1ConnectorsConnectorUpdateGet() + public function testUpdateConnector() { - } - - /** - * Test case for v1ConnectorsListGet - * - * List of Connectors. - * - */ - public function testV1ConnectorsListGet() - { - - } - } diff --git a/test/Api/CorrelationsApiTest.php b/test/Api/CorrelationsApiTest.php deleted file mode 100644 index a5e75fa..0000000 --- a/test/Api/CorrelationsApiTest.php +++ /dev/null @@ -1,211 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the endpoint. - */ - -namespace QuantiModo\Client; - -use \QuantiModo\Client\Configuration; -use \QuantiModo\Client\ApiClient; -use \QuantiModo\Client\ApiException; -use \QuantiModo\Client\ObjectSerializer; - -/** - * CorrelationsApiTest Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class CorrelationsApiTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test cases - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test case for v1AggregatedCorrelationsGet - * - * Get aggregated correlations. - * - */ - public function testV1AggregatedCorrelationsGet() - { - - } - - /** - * Test case for v1AggregatedCorrelationsPost - * - * Store or Update a Correlation. - * - */ - public function testV1AggregatedCorrelationsPost() - { - - } - - /** - * Test case for v1CorrelationsGet - * - * Get correlations. - * - */ - public function testV1CorrelationsGet() - { - - } - - /** - * Test case for v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet - * - * Search user correlations for a given cause. - * - */ - public function testV1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameCausesGet() - { - - } - - /** - * Test case for v1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet - * - * Search user correlations for a given cause. - * - */ - public function testV1OrganizationsOrganizationIdUsersUserIdVariablesVariableNameEffectsGet() - { - - } - - /** - * Test case for v1PublicCorrelationsSearchSearchGet - * - * Get average correlations for variables containing search term. - * - */ - public function testV1PublicCorrelationsSearchSearchGet() - { - - } - - /** - * Test case for v1VariablesVariableNameCausesGet - * - * Search user correlations for a given effect. - * - */ - public function testV1VariablesVariableNameCausesGet() - { - - } - - /** - * Test case for v1VariablesVariableNameEffectsGet - * - * Search user correlations for a given cause. - * - */ - public function testV1VariablesVariableNameEffectsGet() - { - - } - - /** - * Test case for v1VariablesVariableNamePublicCausesGet - * - * Search public correlations for a given effect. - * - */ - public function testV1VariablesVariableNamePublicCausesGet() - { - - } - - /** - * Test case for v1VariablesVariableNamePublicEffectsGet - * - * Search public correlations for a given cause. - * - */ - public function testV1VariablesVariableNamePublicEffectsGet() - { - - } - - /** - * Test case for v1VotesDeletePost - * - * Delete vote. - * - */ - public function testV1VotesDeletePost() - { - - } - - /** - * Test case for v1VotesPost - * - * Post or update vote. - * - */ - public function testV1VotesPost() - { - - } - -} diff --git a/test/Api/MeasurementsApiTest.php b/test/Api/MeasurementsApiTest.php index 7688513..1a03dd1 100644 --- a/test/Api/MeasurementsApiTest.php +++ b/test/Api/MeasurementsApiTest.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -49,7 +49,6 @@ class MeasurementsApiTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -57,7 +56,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -65,7 +63,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -73,172 +70,65 @@ public function tearDown() */ public static function tearDownAfterClass() { - - } - - /** - * Test case for v1MeasurementSourcesGet - * - * Get measurement sources. - * - */ - public function testV1MeasurementSourcesGet() - { - - } - - /** - * Test case for v1MeasurementSourcesPost - * - * Add a data source. - * - */ - public function testV1MeasurementSourcesPost() - { - - } - - /** - * Test case for v1MeasurementsDailyGet - * - * Get daily measurements for this user. - * - */ - public function testV1MeasurementsDailyGet() - { - } /** - * Test case for v1MeasurementsDeletePost + * Test case for deleteMeasurement * * Delete a measurement. * */ - public function testV1MeasurementsDeletePost() + public function testDeleteMeasurement() { - } /** - * Test case for v1MeasurementsGet + * Test case for getMeasurements * * Get measurements for this user. * */ - public function testV1MeasurementsGet() - { - - } - - /** - * Test case for v1MeasurementsPost - * - * Post a new set or update existing measurements to the database. - * - */ - public function testV1MeasurementsPost() + public function testGetMeasurements() { - } /** - * Test case for v1MeasurementsRangeGet + * Test case for getPairs * - * Get measurements range for this user. + * Get pairs of measurements for correlational analysis. * */ - public function testV1MeasurementsRangeGet() + public function testGetPairs() { - } /** - * Test case for v1MeasurementsUpdatePost - * - * Update a measurement. - * - */ - public function testV1MeasurementsUpdatePost() - { - - } - - /** - * Test case for v2MeasurementsCsvGet - * - * Get Measurements CSV. - * - */ - public function testV2MeasurementsCsvGet() - { - - } - - /** - * Test case for v2MeasurementsIdDelete - * - * Delete Measurement. - * - */ - public function testV2MeasurementsIdDelete() - { - - } - - /** - * Test case for v2MeasurementsIdGet - * - * Get Measurement. - * - */ - public function testV2MeasurementsIdGet() - { - - } - - /** - * Test case for v2MeasurementsIdPut - * - * Update Measurement. - * - */ - public function testV2MeasurementsIdPut() - { - - } - - /** - * Test case for v2MeasurementsRequestCsvPost + * Test case for measurementExportRequest * * Post Request for Measurements CSV. * */ - public function testV2MeasurementsRequestCsvPost() + public function testMeasurementExportRequest() { - } /** - * Test case for v2MeasurementsRequestPdfPost + * Test case for postMeasurements * - * Post Request for Measurements PDF. + * Post a new set or update existing measurements to the database. * */ - public function testV2MeasurementsRequestPdfPost() + public function testPostMeasurements() { - } /** - * Test case for v2MeasurementsRequestXlsPost + * Test case for v3MeasurementsUpdatePost * - * Post Request for Measurements XLS. + * Update a measurement. * */ - public function testV2MeasurementsRequestXlsPost() + public function testV3MeasurementsUpdatePost() { - } - } diff --git a/test/Api/NotificationsApiTest.php b/test/Api/NotificationsApiTest.php new file mode 100644 index 0000000..fd7f580 --- /dev/null +++ b/test/Api/NotificationsApiTest.php @@ -0,0 +1,94 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the endpoint. - */ - -namespace QuantiModo\Client; - -use \QuantiModo\Client\Configuration; -use \QuantiModo\Client\ApiClient; -use \QuantiModo\Client\ApiException; -use \QuantiModo\Client\ObjectSerializer; - -/** - * OrganizationsApiTest Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class OrganizationsApiTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test cases - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test case for v1OrganizationsOrganizationIdUsersPost - * - * Get user tokens for existing users, create new users. - * - */ - public function testV1OrganizationsOrganizationIdUsersPost() - { - - } - -} diff --git a/test/Api/PairsApiTest.php b/test/Api/PairsApiTest.php deleted file mode 100644 index 0da07ca..0000000 --- a/test/Api/PairsApiTest.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the endpoint. - */ - -namespace QuantiModo\Client; - -use \QuantiModo\Client\Configuration; -use \QuantiModo\Client\ApiClient; -use \QuantiModo\Client\ApiException; -use \QuantiModo\Client\ObjectSerializer; - -/** - * PairsApiTest Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class PairsApiTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test cases - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test case for v1PairsCsvGet - * - * Get pairs. - * - */ - public function testV1PairsCsvGet() - { - - } - - /** - * Test case for v1PairsGet - * - * Get pairs. - * - */ - public function testV1PairsGet() - { - - } - -} diff --git a/test/Api/RemindersApiTest.php b/test/Api/RemindersApiTest.php index dcc4906..afc0e9a 100644 --- a/test/Api/RemindersApiTest.php +++ b/test/Api/RemindersApiTest.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -49,7 +49,6 @@ class RemindersApiTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -57,7 +56,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -65,7 +63,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -73,84 +70,55 @@ public function tearDown() */ public static function tearDownAfterClass() { - - } - - /** - * Test case for v1TrackingReminderNotificationsGet - * - * Get specific pending tracking reminders. - * - */ - public function testV1TrackingReminderNotificationsGet() - { - - } - - /** - * Test case for v1TrackingReminderNotificationsSkipPost - * - * Skip a pending tracking reminder. - * - */ - public function testV1TrackingReminderNotificationsSkipPost() - { - } /** - * Test case for v1TrackingReminderNotificationsSnoozePost + * Test case for deleteTrackingReminder * - * Snooze a pending tracking reminder. + * Delete tracking reminder. * */ - public function testV1TrackingReminderNotificationsSnoozePost() + public function testDeleteTrackingReminder() { - } /** - * Test case for v1TrackingReminderNotificationsTrackPost + * Test case for getTrackingReminderNotifications * - * Track a pending tracking reminder. + * Get specific tracking reminder notifications. * */ - public function testV1TrackingReminderNotificationsTrackPost() + public function testGetTrackingReminderNotifications() { - } /** - * Test case for v1TrackingRemindersDeletePost + * Test case for getTrackingReminders * - * Delete tracking reminder. + * Get repeating tracking reminder settings. * */ - public function testV1TrackingRemindersDeletePost() + public function testGetTrackingReminders() { - } /** - * Test case for v1TrackingRemindersGet + * Test case for postTrackingReminderNotifications * - * Get repeating tracking reminder settings. + * Snooze, skip, or track a tracking reminder notification. * */ - public function testV1TrackingRemindersGet() + public function testPostTrackingReminderNotifications() { - } /** - * Test case for v1TrackingRemindersPost + * Test case for postTrackingReminders * * Store a Tracking Reminder. * */ - public function testV1TrackingRemindersPost() + public function testPostTrackingReminders() { - } - } diff --git a/test/Api/StudyApiTest.php b/test/Api/StudyApiTest.php new file mode 100644 index 0000000..f25e71b --- /dev/null +++ b/test/Api/StudyApiTest.php @@ -0,0 +1,84 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the endpoint. - */ - -namespace QuantiModo\Client; - -use \QuantiModo\Client\Configuration; -use \QuantiModo\Client\ApiClient; -use \QuantiModo\Client\ApiException; -use \QuantiModo\Client\ObjectSerializer; - -/** - * TagsApiTest Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class TagsApiTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test cases - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test case for v1UserTagsDeletePost - * - * Delete user tag or ingredient. - * - */ - public function testV1UserTagsDeletePost() - { - - } - - /** - * Test case for v1UserTagsPost - * - * Post or update user tags or ingredients. - * - */ - public function testV1UserTagsPost() - { - - } - -} diff --git a/test/Api/UnitsApiTest.php b/test/Api/UnitsApiTest.php index af4262c..c02387f 100644 --- a/test/Api/UnitsApiTest.php +++ b/test/Api/UnitsApiTest.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -49,7 +49,6 @@ class UnitsApiTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -57,7 +56,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -65,7 +63,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -73,40 +70,25 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** - * Test case for v1UnitCategoriesGet + * Test case for getUnitCategories * * Get unit categories. * */ - public function testV1UnitCategoriesGet() + public function testGetUnitCategories() { - } /** - * Test case for v1UnitsGet + * Test case for getUnits * - * Get all available units. + * Get units. * */ - public function testV1UnitsGet() + public function testGetUnits() { - } - - /** - * Test case for v1UnitsVariableGet - * - * Units for Variable. - * - */ - public function testV1UnitsVariableGet() - { - - } - } diff --git a/test/Api/UserApiTest.php b/test/Api/UserApiTest.php index a249fec..fd6727e 100644 --- a/test/Api/UserApiTest.php +++ b/test/Api/UserApiTest.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -49,7 +49,6 @@ class UserApiTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -57,7 +56,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -65,7 +63,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -73,29 +70,25 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** - * Test case for v1OrganizationsOrganizationIdUsersPost + * Test case for getUser * - * Get user tokens for existing users, create new users. + * Get user info. * */ - public function testV1OrganizationsOrganizationIdUsersPost() + public function testGetUser() { - } /** - * Test case for v1UserMeGet + * Test case for postUserSettings * - * Get all available units for variableGet authenticated user. + * Post UserSettings. * */ - public function testV1UserMeGet() + public function testPostUserSettings() { - } - } diff --git a/test/Api/VariablesApiTest.php b/test/Api/VariablesApiTest.php index 3c903b6..ee8a63e 100644 --- a/test/Api/VariablesApiTest.php +++ b/test/Api/VariablesApiTest.php @@ -10,11 +10,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -49,7 +49,6 @@ class VariablesApiTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -57,7 +56,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -65,7 +63,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -73,117 +70,85 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** - * Test case for v1PublicVariablesGet + * Test case for deleteUserTag * - * Get public variables. + * Delete user tag or ingredient. * */ - public function testV1PublicVariablesGet() + public function testDeleteUserTag() { - } /** - * Test case for v1PublicVariablesSearchSearchGet - * - * Get top 5 PUBLIC variables with the most correlations. - * - */ - public function testV1PublicVariablesSearchSearchGet() - { - - } - - /** - * Test case for v1UserVariablesDeletePost + * Test case for deleteUserVariable * * Delete All Measurements For Variable. * */ - public function testV1UserVariablesDeletePost() + public function testDeleteUserVariable() { - } /** - * Test case for v1UserVariablesPost + * Test case for getCommonVariables * - * Update User Settings for a Variable. + * Get common variables with aggregated instead of user-specific data. * */ - public function testV1UserVariablesPost() + public function testGetCommonVariables() { - } /** - * Test case for v1UserVariablesResetPost + * Test case for getUserVariables * - * Reset user settings for a variable to defaults. + * Get variables along with related user-specific analysis settings and statistics. * */ - public function testV1UserVariablesResetPost() + public function testGetUserVariables() { - } /** - * Test case for v1VariableCategoriesGet + * Test case for getVariableCategories * * Variable categories. * */ - public function testV1VariableCategoriesGet() - { - - } - - /** - * Test case for v1VariablesGet - * - * Get variables with user's settings. - * - */ - public function testV1VariablesGet() + public function testGetVariableCategories() { - } /** - * Test case for v1VariablesPost + * Test case for postUserTags * - * Create Variables. + * Post or update user tags or ingredients. * */ - public function testV1VariablesPost() + public function testPostUserTags() { - } /** - * Test case for v1VariablesSearchSearchGet + * Test case for postUserVariables * - * Get variables by search query. + * Update User Settings for a Variable. * */ - public function testV1VariablesSearchSearchGet() + public function testPostUserVariables() { - } /** - * Test case for v1VariablesVariableNameGet + * Test case for resetUserVariableSettings * - * Get info about a variable. + * Reset user settings for a variable to defaults. * */ - public function testV1VariablesVariableNameGet() + public function testResetUserVariableSettings() { - } - } diff --git a/test/Api/VotesApiTest.php b/test/Api/VotesApiTest.php deleted file mode 100644 index 0e40f70..0000000 --- a/test/Api/VotesApiTest.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the endpoint. - */ - -namespace QuantiModo\Client; - -use \QuantiModo\Client\Configuration; -use \QuantiModo\Client\ApiClient; -use \QuantiModo\Client\ApiException; -use \QuantiModo\Client\ObjectSerializer; - -/** - * VotesApiTest Class Doc Comment - * - * @category Class - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class VotesApiTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test cases - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test case for v1VotesDeletePost - * - * Delete vote. - * - */ - public function testV1VotesDeletePost() - { - - } - - /** - * Test case for v1VotesPost - * - * Post or update vote. - * - */ - public function testV1VotesPost() - { - - } - -} diff --git a/test/Model/AnimationTest.php b/test/Model/AnimationTest.php new file mode 100644 index 0000000..102c94b --- /dev/null +++ b/test/Model/AnimationTest.php @@ -0,0 +1,86 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class CommonResponseTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,15 +75,13 @@ public static function tearDownAfterClass() */ public function testCommonResponse() { - } /** - * Test attribute "status" + * Test attribute "data" */ - public function testPropertyStatus() + public function testPropertyData() { - } /** @@ -95,7 +89,13 @@ public function testPropertyStatus() */ public function testPropertyMessage() { + } + /** + * Test attribute "status" + */ + public function testPropertyStatus() + { } /** @@ -103,7 +103,5 @@ public function testPropertyMessage() */ public function testPropertySuccess() { - } - } diff --git a/test/Model/CommonVariableArrayTest.php b/test/Model/CommonVariableArrayTest.php new file mode 100644 index 0000000..5a483cf --- /dev/null +++ b/test/Model/CommonVariableArrayTest.php @@ -0,0 +1,79 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * ConnectionTest Class Doc Comment - * - * @category Class */ -// * @description Connection -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class ConnectionTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "Connection" - */ - public function testConnection() - { - - } - - /** - * Test attribute "id" - */ - public function testPropertyId() - { - - } - - /** - * Test attribute "user_id" - */ - public function testPropertyUserId() - { - - } - - /** - * Test attribute "connector_id" - */ - public function testPropertyConnectorId() - { - - } - - /** - * Test attribute "connect_status" - */ - public function testPropertyConnectStatus() - { - - } - - /** - * Test attribute "connect_error" - */ - public function testPropertyConnectError() - { - - } - - /** - * Test attribute "update_requested_at" - */ - public function testPropertyUpdateRequestedAt() - { - - } - - /** - * Test attribute "update_status" - */ - public function testPropertyUpdateStatus() - { - - } - - /** - * Test attribute "update_error" - */ - public function testPropertyUpdateError() - { - - } - - /** - * Test attribute "last_successful_updated_at" - */ - public function testPropertyLastSuccessfulUpdatedAt() - { - - } - - /** - * Test attribute "created_at" - */ - public function testPropertyCreatedAt() - { - - } - - /** - * Test attribute "updated_at" - */ - public function testPropertyUpdatedAt() - { - - } - -} diff --git a/test/Model/ConnectorArrayTest.php b/test/Model/ConnectorArrayTest.php new file mode 100644 index 0000000..f4edaab --- /dev/null +++ b/test/Model/ConnectorArrayTest.php @@ -0,0 +1,79 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * ConnectorInfoHistoryItemTest Class Doc Comment - * - * @category Class */ -// * @description ConnectorInfoHistoryItem -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class ConnectorInfoHistoryItemTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "ConnectorInfoHistoryItem" - */ - public function testConnectorInfoHistoryItem() - { - - } - - /** - * Test attribute "number_of_measurements" - */ - public function testPropertyNumberOfMeasurements() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "message" - */ - public function testPropertyMessage() - { - - } - - /** - * Test attribute "created_at" - */ - public function testPropertyCreatedAt() - { - - } - -} diff --git a/test/Model/ConnectorInfoTest.php b/test/Model/ConnectorInfoTest.php deleted file mode 100644 index f93cc55..0000000 --- a/test/Model/ConnectorInfoTest.php +++ /dev/null @@ -1,117 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * ConnectorInfoTest Class Doc Comment - * - * @category Class */ -// * @description ConnectorInfo -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class ConnectorInfoTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "ConnectorInfo" - */ - public function testConnectorInfo() - { - - } - - /** - * Test attribute "id" - */ - public function testPropertyId() - { - - } - - /** - * Test attribute "connected" - */ - public function testPropertyConnected() - { - - } - - /** - * Test attribute "error" - */ - public function testPropertyError() - { - - } - - /** - * Test attribute "history" - */ - public function testPropertyHistory() - { - - } - -} diff --git a/test/Model/ConnectorInstructionTest.php b/test/Model/ConnectorInstructionTest.php index 2662bf5..b715b3f 100644 --- a/test/Model/ConnectorInstructionTest.php +++ b/test/Model/ConnectorInstructionTest.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class ConnectorInstructionTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,23 +75,20 @@ public static function tearDownAfterClass() */ public function testConnectorInstruction() { - } /** - * Test attribute "url" + * Test attribute "parameters" */ - public function testPropertyUrl() + public function testPropertyParameters() { - } /** - * Test attribute "parameters" + * Test attribute "url" */ - public function testPropertyParameters() + public function testPropertyUrl() { - } /** @@ -103,7 +96,5 @@ public function testPropertyParameters() */ public function testPropertyUsePopup() { - } - } diff --git a/test/Model/ConnectorTest.php b/test/Model/ConnectorTest.php index d0f0551..90562fd 100644 --- a/test/Model/ConnectorTest.php +++ b/test/Model/ConnectorTest.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class ConnectorTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,23 +75,83 @@ public static function tearDownAfterClass() */ public function testConnector() { + } + /** + * Test attribute "affiliate" + */ + public function testPropertyAffiliate() + { } /** - * Test attribute "id" + * Test attribute "buttons" */ - public function testPropertyId() + public function testPropertyButtons() { + } + /** + * Test attribute "client_id" + */ + public function testPropertyClientId() + { } /** - * Test attribute "name" + * Test attribute "connected" */ - public function testPropertyName() + public function testPropertyConnected() { + } + /** + * Test attribute "connect_error" + */ + public function testPropertyConnectError() + { + } + + /** + * Test attribute "connect_instructions" + */ + public function testPropertyConnectInstructions() + { + } + + /** + * Test attribute "connector_client_id" + */ + public function testPropertyConnectorClientId() + { + } + + /** + * Test attribute "connector_id" + */ + public function testPropertyConnectorId() + { + } + + /** + * Test attribute "connect_status" + */ + public function testPropertyConnectStatus() + { + } + + /** + * Test attribute "created_at" + */ + public function testPropertyCreatedAt() + { + } + + /** + * Test attribute "default_variable_category_name" + */ + public function testPropertyDefaultVariableCategoryName() + { } /** @@ -103,7 +159,27 @@ public function testPropertyName() */ public function testPropertyDisplayName() { + } + /** + * Test attribute "enabled" + */ + public function testPropertyEnabled() + { + } + + /** + * Test attribute "get_it_url" + */ + public function testPropertyGetItUrl() + { + } + + /** + * Test attribute "id" + */ + public function testPropertyId() + { } /** @@ -111,39 +187,76 @@ public function testPropertyDisplayName() */ public function testPropertyImage() { + } + /** + * Test attribute "image_html" + */ + public function testPropertyImageHtml() + { } /** - * Test attribute "get_it_url" + * Test attribute "last_successful_updated_at" */ - public function testPropertyGetItUrl() + public function testPropertyLastSuccessfulUpdatedAt() { + } + /** + * Test attribute "last_update" + */ + public function testPropertyLastUpdate() + { } /** - * Test attribute "connected" + * Test attribute "linked_display_name_html" */ - public function testPropertyConnected() + public function testPropertyLinkedDisplayNameHtml() { + } + /** + * Test attribute "long_description" + */ + public function testPropertyLongDescription() + { } /** - * Test attribute "connect_instructions" + * Test attribute "message" */ - public function testPropertyConnectInstructions() + public function testPropertyMessage() { + } + /** + * Test attribute "name" + */ + public function testPropertyName() + { } /** - * Test attribute "last_update" + * Test attribute "oauth" */ - public function testPropertyLastUpdate() + public function testPropertyOauth() { + } + + /** + * Test attribute "scopes" + */ + public function testPropertyScopes() + { + } + /** + * Test attribute "short_description" + */ + public function testPropertyShortDescription() + { } /** @@ -151,15 +264,33 @@ public function testPropertyLastUpdate() */ public function testPropertyTotalMeasurementsInLastUpdate() { + } + /** + * Test attribute "updated_at" + */ + public function testPropertyUpdatedAt() + { } /** - * Test attribute "no_data_yet" + * Test attribute "update_requested_at" */ - public function testPropertyNoDataYet() + public function testPropertyUpdateRequestedAt() { + } + /** + * Test attribute "update_status" + */ + public function testPropertyUpdateStatus() + { } + /** + * Test attribute "user_id" + */ + public function testPropertyUserId() + { + } } diff --git a/test/Model/ConversionStepTest.php b/test/Model/ConversionStepTest.php index 5569fce..b992e0d 100644 --- a/test/Model/ConversionStepTest.php +++ b/test/Model/ConversionStepTest.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class ConversionStepTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,7 +75,6 @@ public static function tearDownAfterClass() */ public function testConversionStep() { - } /** @@ -87,7 +82,6 @@ public function testConversionStep() */ public function testPropertyOperation() { - } /** @@ -95,7 +89,5 @@ public function testPropertyOperation() */ public function testPropertyValue() { - } - } diff --git a/test/Model/CorrelationArrayTest.php b/test/Model/CorrelationArrayTest.php new file mode 100644 index 0000000..3d06614 --- /dev/null +++ b/test/Model/CorrelationArrayTest.php @@ -0,0 +1,79 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class CorrelationTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,23 +75,20 @@ public static function tearDownAfterClass() */ public function testCorrelation() { - } /** - * Test attribute "average_daily_low_cause" + * Test attribute "average_daily_high_cause" */ - public function testPropertyAverageDailyLowCause() + public function testPropertyAverageDailyHighCause() { - } /** - * Test attribute "average_daily_high_cause" + * Test attribute "average_daily_low_cause" */ - public function testPropertyAverageDailyHighCause() + public function testPropertyAverageDailyLowCause() { - } /** @@ -103,7 +96,6 @@ public function testPropertyAverageDailyHighCause() */ public function testPropertyAverageEffect() { - } /** @@ -111,7 +103,13 @@ public function testPropertyAverageEffect() */ public function testPropertyAverageEffectFollowingHighCause() { + } + /** + * Test attribute "average_effect_following_high_cause_explanation" + */ + public function testPropertyAverageEffectFollowingHighCauseExplanation() + { } /** @@ -119,23 +117,27 @@ public function testPropertyAverageEffectFollowingHighCause() */ public function testPropertyAverageEffectFollowingLowCause() { - } /** - * Test attribute "average_effect_following_high_cause_explanation" + * Test attribute "average_effect_following_low_cause_explanation" */ - public function testPropertyAverageEffectFollowingHighCauseExplanation() + public function testPropertyAverageEffectFollowingLowCauseExplanation() { - } /** - * Test attribute "average_effect_following_low_cause_explanation" + * Test attribute "average_forward_pearson_correlation_over_onset_delays" */ - public function testPropertyAverageEffectFollowingLowCauseExplanation() + public function testPropertyAverageForwardPearsonCorrelationOverOnsetDelays() { + } + /** + * Test attribute "average_reverse_pearson_correlation_over_onset_delays" + */ + public function testPropertyAverageReversePearsonCorrelationOverOnsetDelays() + { } /** @@ -143,23 +145,34 @@ public function testPropertyAverageEffectFollowingLowCauseExplanation() */ public function testPropertyAverageVote() { - } /** - * Test attribute "causality_factor" + * Test attribute "cause_changes" */ - public function testPropertyCausalityFactor() + public function testPropertyCauseChanges() { + } + /** + * Test attribute "cause_data_source" + */ + public function testPropertyCauseDataSource() + { } /** - * Test attribute "cause" + * Test attribute "cause_user_variable_share_user_measurements" */ - public function testPropertyCause() + public function testPropertyCauseUserVariableShareUserMeasurements() { + } + /** + * Test attribute "cause_variable_category_id" + */ + public function testPropertyCauseVariableCategoryId() + { } /** @@ -167,23 +180,41 @@ public function testPropertyCause() */ public function testPropertyCauseVariableCategoryName() { + } + /** + * Test attribute "cause_variable_combination_operation" + */ + public function testPropertyCauseVariableCombinationOperation() + { } /** - * Test attribute "cause_changes" + * Test attribute "cause_variable_unit_abbreviated_name" */ - public function testPropertyCauseChanges() + public function testPropertyCauseVariableUnitAbbreviatedName() { + } + /** + * Test attribute "cause_variable_unit_id" + */ + public function testPropertyCauseVariableUnitId() + { } /** - * Test attribute "cause_combination_operation" + * Test attribute "cause_variable_unit_name" */ - public function testPropertyCauseCombinationOperation() + public function testPropertyCauseVariableUnitName() { + } + /** + * Test attribute "cause_variable_id" + */ + public function testPropertyCauseVariableId() + { } /** @@ -191,7 +222,6 @@ public function testPropertyCauseCombinationOperation() */ public function testPropertyCauseVariableImageUrl() { - } /** @@ -199,39 +229,34 @@ public function testPropertyCauseVariableImageUrl() */ public function testPropertyCauseVariableIonIcon() { - } /** - * Test attribute "cause_unit" + * Test attribute "cause_variable_most_common_connector_id" */ - public function testPropertyCauseUnit() + public function testPropertyCauseVariableMostCommonConnectorId() { - } /** - * Test attribute "cause_unit_id" + * Test attribute "cause_variable_name" */ - public function testPropertyCauseUnitId() + public function testPropertyCauseVariableName() { - } /** - * Test attribute "cause_variable_id" + * Test attribute "confidence_interval" */ - public function testPropertyCauseVariableId() + public function testPropertyConfidenceInterval() { - } /** - * Test attribute "cause_variable_name" + * Test attribute "confidence_level" */ - public function testPropertyCauseVariableName() + public function testPropertyConfidenceLevel() { - } /** @@ -239,7 +264,13 @@ public function testPropertyCauseVariableName() */ public function testPropertyCorrelationCoefficient() { + } + /** + * Test attribute "correlation_is_contradictory_to_optimal_values" + */ + public function testPropertyCorrelationIsContradictoryToOptimalValues() + { } /** @@ -247,7 +278,13 @@ public function testPropertyCorrelationCoefficient() */ public function testPropertyCreatedAt() { + } + /** + * Test attribute "critical_t_value" + */ + public function testPropertyCriticalTValue() + { } /** @@ -255,7 +292,6 @@ public function testPropertyCreatedAt() */ public function testPropertyDataAnalysis() { - } /** @@ -263,47 +299,55 @@ public function testPropertyDataAnalysis() */ public function testPropertyDataSources() { - } /** - * Test attribute "duration_of_action" + * Test attribute "data_sources_paragraph_for_cause" */ - public function testPropertyDurationOfAction() + public function testPropertyDataSourcesParagraphForCause() { - } /** - * Test attribute "effect" + * Test attribute "data_sources_paragraph_for_effect" */ - public function testPropertyEffect() + public function testPropertyDataSourcesParagraphForEffect() { - } /** - * Test attribute "effect_variable_category_name" + * Test attribute "direction" */ - public function testPropertyEffectVariableCategoryName() + public function testPropertyDirection() { - } /** - * Test attribute "effect_variable_image_url" + * Test attribute "duration_of_action" */ - public function testPropertyEffectVariableImageUrl() + public function testPropertyDurationOfAction() { + } + /** + * Test attribute "duration_of_action_in_hours" + */ + public function testPropertyDurationOfActionInHours() + { } /** - * Test attribute "effect_variable_ion_icon" + * Test attribute "effect_changes" */ - public function testPropertyEffectVariableIonIcon() + public function testPropertyEffectChanges() { + } + /** + * Test attribute "effect_data_source" + */ + public function testPropertyEffectDataSource() + { } /** @@ -311,295 +355,929 @@ public function testPropertyEffectVariableIonIcon() */ public function testPropertyEffectSize() { - } /** - * Test attribute "effect_variable_id" + * Test attribute "effect_unit" */ - public function testPropertyEffectVariableId() + public function testPropertyEffectUnit() { - } /** - * Test attribute "effect_variable_name" + * Test attribute "effect_user_variable_share_user_measurements" */ - public function testPropertyEffectVariableName() + public function testPropertyEffectUserVariableShareUserMeasurements() { - } /** - * Test attribute "gauge_image" + * Test attribute "effect_variable_category_id" */ - public function testPropertyGaugeImage() + public function testPropertyEffectVariableCategoryId() { - } /** - * Test attribute "image_url" + * Test attribute "effect_variable_category_name" */ - public function testPropertyImageUrl() + public function testPropertyEffectVariableCategoryName() { - } /** - * Test attribute "number_of_pairs" + * Test attribute "effect_variable_combination_operation" */ - public function testPropertyNumberOfPairs() + public function testPropertyEffectVariableCombinationOperation() { - } /** - * Test attribute "original_effect" + * Test attribute "effect_variable_common_alias" */ - public function testPropertyOriginalEffect() + public function testPropertyEffectVariableCommonAlias() { - } /** - * Test attribute "onset_delay" + * Test attribute "effect_variable_unit_abbreviated_name" */ - public function testPropertyOnsetDelay() + public function testPropertyEffectVariableUnitAbbreviatedName() { - } /** - * Test attribute "optimal_pearson_product" + * Test attribute "effect_variable_unit_id" */ - public function testPropertyOptimalPearsonProduct() + public function testPropertyEffectVariableUnitId() { - } /** - * Test attribute "original_cause" + * Test attribute "effect_variable_unit_name" */ - public function testPropertyOriginalCause() + public function testPropertyEffectVariableUnitName() { - } /** - * Test attribute "outcome_data_sources" + * Test attribute "effect_variable_id" */ - public function testPropertyOutcomeDataSources() + public function testPropertyEffectVariableId() { - } /** - * Test attribute "predictor_explanation" + * Test attribute "effect_variable_image_url" */ - public function testPropertyPredictorExplanation() + public function testPropertyEffectVariableImageUrl() { - } /** - * Test attribute "principal_investigator" + * Test attribute "effect_variable_ion_icon" */ - public function testPropertyPrincipalInvestigator() + public function testPropertyEffectVariableIonIcon() { - } /** - * Test attribute "qm_score" + * Test attribute "effect_variable_most_common_connector_id" */ - public function testPropertyQmScore() + public function testPropertyEffectVariableMostCommonConnectorId() { - } /** - * Test attribute "reverse_correlation" + * Test attribute "effect_variable_name" */ - public function testPropertyReverseCorrelation() + public function testPropertyEffectVariableName() { - } /** - * Test attribute "significance_explanation" + * Test attribute "experiment_end_time" */ - public function testPropertySignificanceExplanation() + public function testPropertyExperimentEndTime() { - } /** - * Test attribute "statistical_significance" + * Test attribute "experiment_start_time" */ - public function testPropertyStatisticalSignificance() + public function testPropertyExperimentStartTime() { - } /** - * Test attribute "strength_level" + * Test attribute "forward_spearman_correlation_coefficient" */ - public function testPropertyStrengthLevel() + public function testPropertyForwardSpearmanCorrelationCoefficient() { - } /** - * Test attribute "study_abstract" + * Test attribute "gauge_image" */ - public function testPropertyStudyAbstract() + public function testPropertyGaugeImage() { - } /** - * Test attribute "study_background" + * Test attribute "gauge_image_square" */ - public function testPropertyStudyBackground() + public function testPropertyGaugeImageSquare() { - } /** - * Test attribute "study_design" + * Test attribute "image_url" */ - public function testPropertyStudyDesign() + public function testPropertyImageUrl() { - } /** - * Test attribute "study_limitations" + * Test attribute "instructions_for_cause" */ - public function testPropertyStudyLimitations() + public function testPropertyInstructionsForCause() { - } /** - * Test attribute "study_link_dynamic" + * Test attribute "instructions_for_effect" */ - public function testPropertyStudyLinkDynamic() + public function testPropertyInstructionsForEffect() { - } /** - * Test attribute "study_link_facebook" + * Test attribute "number_of_pairs" */ - public function testPropertyStudyLinkFacebook() + public function testPropertyNumberOfPairs() { - } /** - * Test attribute "study_link_google" + * Test attribute "onset_delay" */ - public function testPropertyStudyLinkGoogle() + public function testPropertyOnsetDelay() { - } /** - * Test attribute "study_link_twitter" + * Test attribute "onset_delay_in_hours" */ - public function testPropertyStudyLinkTwitter() + public function testPropertyOnsetDelayInHours() { - } /** - * Test attribute "study_link_static" + * Test attribute "onset_delay_with_strongest_pearson_correlation" */ - public function testPropertyStudyLinkStatic() + public function testPropertyOnsetDelayWithStrongestPearsonCorrelation() { - } /** - * Test attribute "study_objective" + * Test attribute "onset_delay_with_strongest_pearson_correlation_in_hours" */ - public function testPropertyStudyObjective() + public function testPropertyOnsetDelayWithStrongestPearsonCorrelationInHours() { - } /** - * Test attribute "study_results" + * Test attribute "optimal_pearson_product" */ - public function testPropertyStudyResults() + public function testPropertyOptimalPearsonProduct() { - } /** - * Test attribute "study_title" + * Test attribute "outcome_filling_value" */ - public function testPropertyStudyTitle() + public function testPropertyOutcomeFillingValue() { - } /** - * Test attribute "timestamp" + * Test attribute "outcome_maximum_allowed_value" */ - public function testPropertyTimestamp() + public function testPropertyOutcomeMaximumAllowedValue() { + } + /** + * Test attribute "outcome_minimum_allowed_value" + */ + public function testPropertyOutcomeMinimumAllowedValue() + { } /** - * Test attribute "updated_at" + * Test attribute "pearson_correlation_with_no_onset_delay" */ - public function testPropertyUpdatedAt() + public function testPropertyPearsonCorrelationWithNoOnsetDelay() { + } + /** + * Test attribute "predictive_pearson_correlation" + */ + public function testPropertyPredictivePearsonCorrelation() + { } /** - * Test attribute "user_vote" + * Test attribute "predictive_pearson_correlation_coefficient" */ - public function testPropertyUserVote() + public function testPropertyPredictivePearsonCorrelationCoefficient() { + } + /** + * Test attribute "predictor_data_sources" + */ + public function testPropertyPredictorDataSources() + { } /** - * Test attribute "value_predicting_high_outcome" + * Test attribute "predictor_explanation" */ - public function testPropertyValuePredictingHighOutcome() + public function testPropertyPredictorExplanation() { + } + /** + * Test attribute "predictor_filling_value" + */ + public function testPropertyPredictorFillingValue() + { } /** - * Test attribute "value_predicting_high_outcome_explanation" + * Test attribute "predictor_maximum_allowed_value" */ - public function testPropertyValuePredictingHighOutcomeExplanation() + public function testPropertyPredictorMaximumAllowedValue() { + } + /** + * Test attribute "predictor_minimum_allowed_value" + */ + public function testPropertyPredictorMinimumAllowedValue() + { } /** - * Test attribute "value_predicting_low_outcome" + * Test attribute "predicts_high_effect_change" */ - public function testPropertyValuePredictingLowOutcome() + public function testPropertyPredictsHighEffectChange() { + } + /** + * Test attribute "predicts_high_effect_change_sentence_fragment" + */ + public function testPropertyPredictsHighEffectChangeSentenceFragment() + { } /** - * Test attribute "value_predicting_low_outcome_explanation" + * Test attribute "predicts_low_effect_change" */ - public function testPropertyValuePredictingLowOutcomeExplanation() + public function testPropertyPredictsLowEffectChange() { + } + /** + * Test attribute "predicts_low_effect_change_sentence_fragment" + */ + public function testPropertyPredictsLowEffectChangeSentenceFragment() + { } + /** + * Test attribute "p_value" + */ + public function testPropertyPValue() + { + } + + /** + * Test attribute "qm_score" + */ + public function testPropertyQmScore() + { + } + + /** + * Test attribute "reverse_pearson_correlation_coefficient" + */ + public function testPropertyReversePearsonCorrelationCoefficient() + { + } + + /** + * Test attribute "share_user_measurements" + */ + public function testPropertyShareUserMeasurements() + { + } + + /** + * Test attribute "significance_explanation" + */ + public function testPropertySignificanceExplanation() + { + } + + /** + * Test attribute "significant_difference" + */ + public function testPropertySignificantDifference() + { + } + + /** + * Test attribute "statistical_significance" + */ + public function testPropertyStatisticalSignificance() + { + } + + /** + * Test attribute "strength_level" + */ + public function testPropertyStrengthLevel() + { + } + + /** + * Test attribute "strongest_pearson_correlation_coefficient" + */ + public function testPropertyStrongestPearsonCorrelationCoefficient() + { + } + + /** + * Test attribute "study_abstract" + */ + public function testPropertyStudyAbstract() + { + } + + /** + * Test attribute "study_design" + */ + public function testPropertyStudyDesign() + { + } + + /** + * Test attribute "study_limitations" + */ + public function testPropertyStudyLimitations() + { + } + + /** + * Test attribute "study_link_dynamic" + */ + public function testPropertyStudyLinkDynamic() + { + } + + /** + * Test attribute "study_link_email" + */ + public function testPropertyStudyLinkEmail() + { + } + + /** + * Test attribute "study_link_facebook" + */ + public function testPropertyStudyLinkFacebook() + { + } + + /** + * Test attribute "study_link_google" + */ + public function testPropertyStudyLinkGoogle() + { + } + + /** + * Test attribute "study_link_static" + */ + public function testPropertyStudyLinkStatic() + { + } + + /** + * Test attribute "study_link_twitter" + */ + public function testPropertyStudyLinkTwitter() + { + } + + /** + * Test attribute "study_objective" + */ + public function testPropertyStudyObjective() + { + } + + /** + * Test attribute "study_results" + */ + public function testPropertyStudyResults() + { + } + + /** + * Test attribute "study_title" + */ + public function testPropertyStudyTitle() + { + } + + /** + * Test attribute "timestamp" + */ + public function testPropertyTimestamp() + { + } + + /** + * Test attribute "t_value" + */ + public function testPropertyTValue() + { + } + + /** + * Test attribute "updated_at" + */ + public function testPropertyUpdatedAt() + { + } + + /** + * Test attribute "user_id" + */ + public function testPropertyUserId() + { + } + + /** + * Test attribute "user_vote" + */ + public function testPropertyUserVote() + { + } + + /** + * Test attribute "value_predicting_high_outcome" + */ + public function testPropertyValuePredictingHighOutcome() + { + } + + /** + * Test attribute "value_predicting_high_outcome_explanation" + */ + public function testPropertyValuePredictingHighOutcomeExplanation() + { + } + + /** + * Test attribute "value_predicting_low_outcome" + */ + public function testPropertyValuePredictingLowOutcome() + { + } + + /** + * Test attribute "value_predicting_low_outcome_explanation" + */ + public function testPropertyValuePredictingLowOutcomeExplanation() + { + } + + /** + * Test attribute "causality_factor" + */ + public function testPropertyCausalityFactor() + { + } + + /** + * Test attribute "outcome_data_sources" + */ + public function testPropertyOutcomeDataSources() + { + } + + /** + * Test attribute "principal_investigator" + */ + public function testPropertyPrincipalInvestigator() + { + } + + /** + * Test attribute "reverse_correlation" + */ + public function testPropertyReverseCorrelation() + { + } + + /** + * Test attribute "study_background" + */ + public function testPropertyStudyBackground() + { + } + + /** + * Test attribute "study_invitation" + */ + public function testPropertyStudyInvitation() + { + } + + /** + * Test attribute "study_question" + */ + public function testPropertyStudyQuestion() + { + } + + /** + * Test attribute "all_pairs_significance" + */ + public function testPropertyAllPairsSignificance() + { + } + + /** + * Test attribute "average_pearson_correlation_coefficient_over_onset_delays" + */ + public function testPropertyAveragePearsonCorrelationCoefficientOverOnsetDelays() + { + } + + /** + * Test attribute "calculation_start_time" + */ + public function testPropertyCalculationStartTime() + { + } + + /** + * Test attribute "cause_changes_statistical_significance" + */ + public function testPropertyCauseChangesStatisticalSignificance() + { + } + + /** + * Test attribute "cause_number_of_processed_daily_measurements" + */ + public function testPropertyCauseNumberOfProcessedDailyMeasurements() + { + } + + /** + * Test attribute "cause_number_of_raw_measurements" + */ + public function testPropertyCauseNumberOfRawMeasurements() + { + } + + /** + * Test attribute "cause_value_spread" + */ + public function testPropertyCauseValueSpread() + { + } + + /** + * Test attribute "correlations_over_durations_of_action" + */ + public function testPropertyCorrelationsOverDurationsOfAction() + { + } + + /** + * Test attribute "correlations_over_durations_of_action_chart_config" + */ + public function testPropertyCorrelationsOverDurationsOfActionChartConfig() + { + } + + /** + * Test attribute "correlations_over_onset_delays_chart_config" + */ + public function testPropertyCorrelationsOverOnsetDelaysChartConfig() + { + } + + /** + * Test attribute "data_points" + */ + public function testPropertyDataPoints() + { + } + + /** + * Test attribute "degrees_of_freedom" + */ + public function testPropertyDegreesOfFreedom() + { + } + + /** + * Test attribute "distance_from_middle_to_be_hight_low_effect" + */ + public function testPropertyDistanceFromMiddleToBeHightLowEffect() + { + } + + /** + * Test attribute "effect_number_of_processed_daily_measurements" + */ + public function testPropertyEffectNumberOfProcessedDailyMeasurements() + { + } + + /** + * Test attribute "effect_number_of_raw_measurements" + */ + public function testPropertyEffectNumberOfRawMeasurements() + { + } + + /** + * Test attribute "effect_value_spread" + */ + public function testPropertyEffectValueSpread() + { + } + + /** + * Test attribute "error" + */ + public function testPropertyError() + { + } + + /** + * Test attribute "maximum_cause_value" + */ + public function testPropertyMaximumCauseValue() + { + } + + /** + * Test attribute "maximum_effect_value" + */ + public function testPropertyMaximumEffectValue() + { + } + + /** + * Test attribute "median_of_lower_half_of_effect_measurements" + */ + public function testPropertyMedianOfLowerHalfOfEffectMeasurements() + { + } + + /** + * Test attribute "median_of_upper_half_of_effect_measurements" + */ + public function testPropertyMedianOfUpperHalfOfEffectMeasurements() + { + } + + /** + * Test attribute "minimum_cause_value" + */ + public function testPropertyMinimumCauseValue() + { + } + + /** + * Test attribute "minimum_effect_value" + */ + public function testPropertyMinimumEffectValue() + { + } + + /** + * Test attribute "minimum_probability" + */ + public function testPropertyMinimumProbability() + { + } + + /** + * Test attribute "number_of_cause_changes_for_optimal_values" + */ + public function testPropertyNumberOfCauseChangesForOptimalValues() + { + } + + /** + * Test attribute "number_of_days" + */ + public function testPropertyNumberOfDays() + { + } + + /** + * Test attribute "number_of_days_significance" + */ + public function testPropertyNumberOfDaysSignificance() + { + } + + /** + * Test attribute "number_of_effect_changes_for_optimal_values" + */ + public function testPropertyNumberOfEffectChangesForOptimalValues() + { + } + + /** + * Test attribute "number_of_high_effect_pairs" + */ + public function testPropertyNumberOfHighEffectPairs() + { + } + + /** + * Test attribute "number_of_low_effect_pairs" + */ + public function testPropertyNumberOfLowEffectPairs() + { + } + + /** + * Test attribute "number_of_samples" + */ + public function testPropertyNumberOfSamples() + { + } + + /** + * Test attribute "number_of_unique_cause_values_for_optimal_values" + */ + public function testPropertyNumberOfUniqueCauseValuesForOptimalValues() + { + } + + /** + * Test attribute "number_of_unique_effect_values_for_optimal_values" + */ + public function testPropertyNumberOfUniqueEffectValuesForOptimalValues() + { + } + + /** + * Test attribute "number_of_users" + */ + public function testPropertyNumberOfUsers() + { + } + + /** + * Test attribute "optimal_change_spread" + */ + public function testPropertyOptimalChangeSpread() + { + } + + /** + * Test attribute "optimal_change_spread_significance" + */ + public function testPropertyOptimalChangeSpreadSignificance() + { + } + + /** + * Test attribute "pairs_over_time_chart_config" + */ + public function testPropertyPairsOverTimeChartConfig() + { + } + + /** + * Test attribute "per_day_sentence_fragment" + */ + public function testPropertyPerDaySentenceFragment() + { + } + + /** + * Test attribute "raw_cause_measurement_significance" + */ + public function testPropertyRawCauseMeasurementSignificance() + { + } + + /** + * Test attribute "raw_effect_measurement_significance" + */ + public function testPropertyRawEffectMeasurementSignificance() + { + } + + /** + * Test attribute "reverse_pairs_count" + */ + public function testPropertyReversePairsCount() + { + } + + /** + * Test attribute "vote_statistical_significance" + */ + public function testPropertyVoteStatisticalSignificance() + { + } + + /** + * Test attribute "aggregate_qm_score" + */ + public function testPropertyAggregateQmScore() + { + } + + /** + * Test attribute "cause_unit" + */ + public function testPropertyCauseUnit() + { + } + + /** + * Test attribute "cause_variable_common_alias" + */ + public function testPropertyCauseVariableCommonAlias() + { + } + + /** + * Test attribute "cause_variable_informational_url" + */ + public function testPropertyCauseVariableInformationalUrl() + { + } + + /** + * Test attribute "cause_variable_product_url" + */ + public function testPropertyCauseVariableProductUrl() + { + } + + /** + * Test attribute "effect_variable_informational_url" + */ + public function testPropertyEffectVariableInformationalUrl() + { + } + + /** + * Test attribute "effect_variable_product_url" + */ + public function testPropertyEffectVariableProductUrl() + { + } + + /** + * Test attribute "forward_pearson_correlation_coefficient" + */ + public function testPropertyForwardPearsonCorrelationCoefficient() + { + } + + /** + * Test attribute "number_of_correlations" + */ + public function testPropertyNumberOfCorrelations() + { + } + + /** + * Test attribute "vote" + */ + public function testPropertyVote() + { + } } diff --git a/test/Model/CredentialTest.php b/test/Model/CredentialTest.php deleted file mode 100644 index 8c12de9..0000000 --- a/test/Model/CredentialTest.php +++ /dev/null @@ -1,133 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * CredentialTest Class Doc Comment - * - * @category Class */ -// * @description Credential -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class CredentialTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "Credential" - */ - public function testCredential() - { - - } - - /** - * Test attribute "user_id" - */ - public function testPropertyUserId() - { - - } - - /** - * Test attribute "connector_id" - */ - public function testPropertyConnectorId() - { - - } - - /** - * Test attribute "attr_key" - */ - public function testPropertyAttrKey() - { - - } - - /** - * Test attribute "attr_value" - */ - public function testPropertyAttrValue() - { - - } - - /** - * Test attribute "created_at" - */ - public function testPropertyCreatedAt() - { - - } - - /** - * Test attribute "updated_at" - */ - public function testPropertyUpdatedAt() - { - - } - -} diff --git a/test/Model/CreditTest.php b/test/Model/CreditTest.php new file mode 100644 index 0000000..790ffd8 --- /dev/null +++ b/test/Model/CreditTest.php @@ -0,0 +1,86 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * HumanTimeTest Class Doc Comment - * - * @category Class */ -// * @description HumanTime -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class HumanTimeTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "HumanTime" - */ - public function testHumanTime() - { - - } - - /** - * Test attribute "date" - */ - public function testPropertyDate() - { - - } - - /** - * Test attribute "timezone_type" - */ - public function testPropertyTimezoneType() - { - - } - - /** - * Test attribute "timezone" - */ - public function testPropertyTimezone() - { - - } - -} diff --git a/test/Model/ImageTest.php b/test/Model/ImageTest.php new file mode 100644 index 0000000..d5b2c92 --- /dev/null +++ b/test/Model/ImageTest.php @@ -0,0 +1,100 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * InlineResponse20010Test Class Doc Comment - * - * @category Class */ -// * @description InlineResponse20010 -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse20010Test extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "InlineResponse20010" - */ - public function testInlineResponse20010() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "data" - */ - public function testPropertyData() - { - - } - -} diff --git a/test/Model/InlineResponse20011Test.php b/test/Model/InlineResponse20011Test.php deleted file mode 100644 index ad9c493..0000000 --- a/test/Model/InlineResponse20011Test.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * InlineResponse20011Test Class Doc Comment - * - * @category Class */ -// * @description InlineResponse20011 -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse20011Test extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "InlineResponse20011" - */ - public function testInlineResponse20011() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "data" - */ - public function testPropertyData() - { - - } - -} diff --git a/test/Model/InlineResponse20012Test.php b/test/Model/InlineResponse20012Test.php deleted file mode 100644 index e7ec4e3..0000000 --- a/test/Model/InlineResponse20012Test.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * InlineResponse20012Test Class Doc Comment - * - * @category Class */ -// * @description InlineResponse20012 -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse20012Test extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "InlineResponse20012" - */ - public function testInlineResponse20012() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "data" - */ - public function testPropertyData() - { - - } - -} diff --git a/test/Model/InlineResponse2001Test.php b/test/Model/InlineResponse2001Test.php deleted file mode 100644 index 24c1e32..0000000 --- a/test/Model/InlineResponse2001Test.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * InlineResponse2001Test Class Doc Comment - * - * @category Class */ -// * @description InlineResponse2001 -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2001Test extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "InlineResponse2001" - */ - public function testInlineResponse2001() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "data" - */ - public function testPropertyData() - { - - } - -} diff --git a/test/Model/InlineResponse2002Test.php b/test/Model/InlineResponse2002Test.php deleted file mode 100644 index 3362a02..0000000 --- a/test/Model/InlineResponse2002Test.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * InlineResponse2002Test Class Doc Comment - * - * @category Class */ -// * @description InlineResponse2002 -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2002Test extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "InlineResponse2002" - */ - public function testInlineResponse2002() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "data" - */ - public function testPropertyData() - { - - } - -} diff --git a/test/Model/InlineResponse2003Test.php b/test/Model/InlineResponse2003Test.php deleted file mode 100644 index 5c8d20f..0000000 --- a/test/Model/InlineResponse2003Test.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * InlineResponse2003Test Class Doc Comment - * - * @category Class */ -// * @description InlineResponse2003 -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2003Test extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "InlineResponse2003" - */ - public function testInlineResponse2003() - { - - } - - /** - * Test attribute "data" - */ - public function testPropertyData() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - -} diff --git a/test/Model/InlineResponse2004Test.php b/test/Model/InlineResponse2004Test.php deleted file mode 100644 index fad573e..0000000 --- a/test/Model/InlineResponse2004Test.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * InlineResponse2004Test Class Doc Comment - * - * @category Class */ -// * @description InlineResponse2004 -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2004Test extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "InlineResponse2004" - */ - public function testInlineResponse2004() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "data" - */ - public function testPropertyData() - { - - } - -} diff --git a/test/Model/InlineResponse2005Test.php b/test/Model/InlineResponse2005Test.php deleted file mode 100644 index ba6cf7f..0000000 --- a/test/Model/InlineResponse2005Test.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * InlineResponse2005Test Class Doc Comment - * - * @category Class */ -// * @description InlineResponse2005 -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2005Test extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "InlineResponse2005" - */ - public function testInlineResponse2005() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "data" - */ - public function testPropertyData() - { - - } - -} diff --git a/test/Model/InlineResponse2006Test.php b/test/Model/InlineResponse2006Test.php deleted file mode 100644 index 895d960..0000000 --- a/test/Model/InlineResponse2006Test.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * InlineResponse2006Test Class Doc Comment - * - * @category Class */ -// * @description InlineResponse2006 -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2006Test extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "InlineResponse2006" - */ - public function testInlineResponse2006() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "data" - */ - public function testPropertyData() - { - - } - -} diff --git a/test/Model/InlineResponse2007Test.php b/test/Model/InlineResponse2007Test.php deleted file mode 100644 index 4602530..0000000 --- a/test/Model/InlineResponse2007Test.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * InlineResponse2007Test Class Doc Comment - * - * @category Class */ -// * @description InlineResponse2007 -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2007Test extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "InlineResponse2007" - */ - public function testInlineResponse2007() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "data" - */ - public function testPropertyData() - { - - } - -} diff --git a/test/Model/InlineResponse2008Test.php b/test/Model/InlineResponse2008Test.php deleted file mode 100644 index 036cb10..0000000 --- a/test/Model/InlineResponse2008Test.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * InlineResponse2008Test Class Doc Comment - * - * @category Class */ -// * @description InlineResponse2008 -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2008Test extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "InlineResponse2008" - */ - public function testInlineResponse2008() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "data" - */ - public function testPropertyData() - { - - } - -} diff --git a/test/Model/InlineResponse2009Test.php b/test/Model/InlineResponse2009Test.php deleted file mode 100644 index 0707c51..0000000 --- a/test/Model/InlineResponse2009Test.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * InlineResponse2009Test Class Doc Comment - * - * @category Class */ -// * @description InlineResponse2009 -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse2009Test extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "InlineResponse2009" - */ - public function testInlineResponse2009() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "data" - */ - public function testPropertyData() - { - - } - -} diff --git a/test/Model/InlineResponse200Test.php b/test/Model/InlineResponse200Test.php deleted file mode 100644 index 87173e8..0000000 --- a/test/Model/InlineResponse200Test.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * InlineResponse200Test Class Doc Comment - * - * @category Class */ -// * @description InlineResponse200 -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class InlineResponse200Test extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "InlineResponse200" - */ - public function testInlineResponse200() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "data" - */ - public function testPropertyData() - { - - } - -} diff --git a/test/Model/JsonErrorResponseTest.php b/test/Model/JsonErrorResponseTest.php index cc4e33e..2b7a39e 100644 --- a/test/Model/JsonErrorResponseTest.php +++ b/test/Model/JsonErrorResponseTest.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class JsonErrorResponseTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,23 +75,19 @@ public static function tearDownAfterClass() */ public function testJsonErrorResponse() { - } /** - * Test attribute "status" + * Test attribute "message" */ - public function testPropertyStatus() + public function testPropertyMessage() { - } /** - * Test attribute "message" + * Test attribute "status" */ - public function testPropertyMessage() + public function testPropertyStatus() { - } - } diff --git a/test/Model/LangTest.php b/test/Model/LangTest.php new file mode 100644 index 0000000..f8dbca3 --- /dev/null +++ b/test/Model/LangTest.php @@ -0,0 +1,86 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class MeasurementDeleteTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,23 +75,19 @@ public static function tearDownAfterClass() */ public function testMeasurementDelete() { - } /** - * Test attribute "variable_id" + * Test attribute "start_time" */ - public function testPropertyVariableId() + public function testPropertyStartTime() { - } /** - * Test attribute "start_time" + * Test attribute "variable_id" */ - public function testPropertyStartTime() + public function testPropertyVariableId() { - } - } diff --git a/test/Model/MeasurementItemTest.php b/test/Model/MeasurementItemTest.php new file mode 100644 index 0000000..4f33f3d --- /dev/null +++ b/test/Model/MeasurementItemTest.php @@ -0,0 +1,100 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * MeasurementRangeTest Class Doc Comment - * - * @category Class */ -// * @description MeasurementRange -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class MeasurementRangeTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "MeasurementRange" - */ - public function testMeasurementRange() - { - - } - - /** - * Test attribute "lower_limit" - */ - public function testPropertyLowerLimit() - { - - } - - /** - * Test attribute "upper_limit" - */ - public function testPropertyUpperLimit() - { - - } - -} diff --git a/test/Model/MeasurementSetTest.php b/test/Model/MeasurementSetTest.php index be6e41f..1cade41 100644 --- a/test/Model/MeasurementSetTest.php +++ b/test/Model/MeasurementSetTest.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class MeasurementSetTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,23 +75,20 @@ public static function tearDownAfterClass() */ public function testMeasurementSet() { - } /** - * Test attribute "measurements" + * Test attribute "combination_operation" */ - public function testPropertyMeasurements() + public function testPropertyCombinationOperation() { - } /** - * Test attribute "variable_name" + * Test attribute "measurement_items" */ - public function testPropertyVariableName() + public function testPropertyMeasurementItems() { - } /** @@ -103,31 +96,26 @@ public function testPropertyVariableName() */ public function testPropertySourceName() { - } /** - * Test attribute "variable_category_name" + * Test attribute "unit_abbreviated_name" */ - public function testPropertyVariableCategoryName() + public function testPropertyUnitAbbreviatedName() { - } /** - * Test attribute "combination_operation" + * Test attribute "variable_category_name" */ - public function testPropertyCombinationOperation() + public function testPropertyVariableCategoryName() { - } /** - * Test attribute "abbreviated_unit_name" + * Test attribute "variable_name" */ - public function testPropertyAbbreviatedUnitName() + public function testPropertyVariableName() { - } - } diff --git a/test/Model/MeasurementSourceTest.php b/test/Model/MeasurementSourceTest.php deleted file mode 100644 index 37ee4f2..0000000 --- a/test/Model/MeasurementSourceTest.php +++ /dev/null @@ -1,93 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * MeasurementSourceTest Class Doc Comment - * - * @category Class */ -// * @description MeasurementSource -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class MeasurementSourceTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "MeasurementSource" - */ - public function testMeasurementSource() - { - - } - - /** - * Test attribute "name" - */ - public function testPropertyName() - { - - } - -} diff --git a/test/Model/MeasurementTest.php b/test/Model/MeasurementTest.php index 88c6135..047af5e 100644 --- a/test/Model/MeasurementTest.php +++ b/test/Model/MeasurementTest.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class MeasurementTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,15 +75,146 @@ public static function tearDownAfterClass() */ public function testMeasurement() { + } + /** + * Test attribute "client_id" + */ + public function testPropertyClientId() + { } /** - * Test attribute "variable_name" + * Test attribute "connector_id" */ - public function testPropertyVariableName() + public function testPropertyConnectorId() + { + } + + /** + * Test attribute "created_at" + */ + public function testPropertyCreatedAt() + { + } + + /** + * Test attribute "icon_icon" + */ + public function testPropertyIconIcon() + { + } + + /** + * Test attribute "id" + */ + public function testPropertyId() + { + } + + /** + * Test attribute "input_type" + */ + public function testPropertyInputType() + { + } + + /** + * Test attribute "ion_icon" + */ + public function testPropertyIonIcon() + { + } + + /** + * Test attribute "manual_tracking" + */ + public function testPropertyManualTracking() + { + } + + /** + * Test attribute "maximum_allowed_value" + */ + public function testPropertyMaximumAllowedValue() + { + } + + /** + * Test attribute "minimum_allowed_value" + */ + public function testPropertyMinimumAllowedValue() + { + } + + /** + * Test attribute "note" + */ + public function testPropertyNote() + { + } + + /** + * Test attribute "originalunit_abbreviated_name" + */ + public function testPropertyOriginalunitAbbreviatedName() + { + } + + /** + * Test attribute "original_unit_abbreviated_name" + */ + public function testPropertyOriginalUnitAbbreviatedName() + { + } + + /** + * Test attribute "original_unit_category_id" + */ + public function testPropertyOriginalUnitCategoryId() + { + } + + /** + * Test attribute "original_unit_category_name" + */ + public function testPropertyOriginalUnitCategoryName() + { + } + + /** + * Test attribute "original_unit_id" + */ + public function testPropertyOriginalUnitId() + { + } + + /** + * Test attribute "original_unit_name" + */ + public function testPropertyOriginalUnitName() + { + } + + /** + * Test attribute "original_value" + */ + public function testPropertyOriginalValue() + { + } + + /** + * Test attribute "png_path" + */ + public function testPropertyPngPath() { + } + /** + * Test attribute "png_url" + */ + public function testPropertyPngUrl() + { } /** @@ -95,7 +222,20 @@ public function testPropertyVariableName() */ public function testPropertySourceName() { + } + + /** + * Test attribute "start_date" + */ + public function testPropertyStartDate() + { + } + /** + * Test attribute "start_time_epoch" + */ + public function testPropertyStartTimeEpoch() + { } /** @@ -103,63 +243,159 @@ public function testPropertySourceName() */ public function testPropertyStartTimeString() { + } + /** + * Test attribute "svg_url" + */ + public function testPropertySvgUrl() + { } /** - * Test attribute "start_time_epoch" + * Test attribute "unit_abbreviated_name" */ - public function testPropertyStartTimeEpoch() + public function testPropertyUnitAbbreviatedName() { + } + /** + * Test attribute "unit_category_id" + */ + public function testPropertyUnitCategoryId() + { } /** - * Test attribute "human_time" + * Test attribute "unit_category_name" */ - public function testPropertyHumanTime() + public function testPropertyUnitCategoryName() { + } + /** + * Test attribute "unit_id" + */ + public function testPropertyUnitId() + { } /** - * Test attribute "value" + * Test attribute "unit_name" */ - public function testPropertyValue() + public function testPropertyUnitName() + { + } + + /** + * Test attribute "updated_at" + */ + public function testPropertyUpdatedAt() { + } + /** + * Test attribute "user_variable_unit_abbreviated_name" + */ + public function testPropertyUserVariableUnitAbbreviatedName() + { } /** - * Test attribute "original_value" + * Test attribute "user_variable_unit_category_id" */ - public function testPropertyOriginalValue() + public function testPropertyUserVariableUnitCategoryId() + { + } + + /** + * Test attribute "user_variable_unit_category_name" + */ + public function testPropertyUserVariableUnitCategoryName() + { + } + + /** + * Test attribute "user_variable_unit_id" + */ + public function testPropertyUserVariableUnitId() { + } + /** + * Test attribute "user_variable_unit_name" + */ + public function testPropertyUserVariableUnitName() + { } /** - * Test attribute "original_abbreviated_unit_name" + * Test attribute "user_variable_variable_category_id" */ - public function testPropertyOriginalAbbreviatedUnitName() + public function testPropertyUserVariableVariableCategoryId() { + } + /** + * Test attribute "user_variable_variable_category_name" + */ + public function testPropertyUserVariableVariableCategoryName() + { } /** - * Test attribute "abbreviated_unit_name" + * Test attribute "valence" */ - public function testPropertyAbbreviatedUnitName() + public function testPropertyValence() { + } + /** + * Test attribute "value" + */ + public function testPropertyValue() + { } /** - * Test attribute "note" + * Test attribute "variable_category_id" */ - public function testPropertyNote() + public function testPropertyVariableCategoryId() + { + } + + /** + * Test attribute "variable_category_image_url" + */ + public function testPropertyVariableCategoryImageUrl() + { + } + + /** + * Test attribute "variable_category_name" + */ + public function testPropertyVariableCategoryName() + { + } + + /** + * Test attribute "variable_description" + */ + public function testPropertyVariableDescription() { + } + /** + * Test attribute "variable_id" + */ + public function testPropertyVariableId() + { } + /** + * Test attribute "variable_name" + */ + public function testPropertyVariableName() + { + } } diff --git a/test/Model/MeasurementUpdateTest.php b/test/Model/MeasurementUpdateTest.php index 70f22ef..9a9166a 100644 --- a/test/Model/MeasurementUpdateTest.php +++ b/test/Model/MeasurementUpdateTest.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class MeasurementUpdateTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,7 +75,6 @@ public static function tearDownAfterClass() */ public function testMeasurementUpdate() { - } /** @@ -87,31 +82,26 @@ public function testMeasurementUpdate() */ public function testPropertyId() { - } /** - * Test attribute "start_time" + * Test attribute "note" */ - public function testPropertyStartTime() + public function testPropertyNote() { - } /** - * Test attribute "value" + * Test attribute "start_time" */ - public function testPropertyValue() + public function testPropertyStartTime() { - } /** - * Test attribute "note" + * Test attribute "value" */ - public function testPropertyNote() + public function testPropertyValue() { - } - } diff --git a/test/Model/OptionTest.php b/test/Model/OptionTest.php new file mode 100644 index 0000000..ea4f8c5 --- /dev/null +++ b/test/Model/OptionTest.php @@ -0,0 +1,149 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class PairsTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,7 +75,6 @@ public static function tearDownAfterClass() */ public function testPairs() { - } /** @@ -87,7 +82,5 @@ public function testPairs() */ public function testPropertyName() { - } - } diff --git a/test/Model/ParticipantInstructionTest.php b/test/Model/ParticipantInstructionTest.php new file mode 100644 index 0000000..af77b67 --- /dev/null +++ b/test/Model/ParticipantInstructionTest.php @@ -0,0 +1,93 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * PermissionTest Class Doc Comment - * - * @category Class */ -// * @description Permission -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class PermissionTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "Permission" - */ - public function testPermission() - { - - } - - /** - * Test attribute "target" - */ - public function testPropertyTarget() - { - - } - - /** - * Test attribute "variable_name" - */ - public function testPropertyVariableName() - { - - } - - /** - * Test attribute "min_timestamp" - */ - public function testPropertyMinTimestamp() - { - - } - - /** - * Test attribute "max_timestamp" - */ - public function testPropertyMaxTimestamp() - { - - } - - /** - * Test attribute "min_time_of_day" - */ - public function testPropertyMinTimeOfDay() - { - - } - - /** - * Test attribute "max_time_of_day" - */ - public function testPropertyMaxTimeOfDay() - { - - } - - /** - * Test attribute "week" - */ - public function testPropertyWeek() - { - - } - -} diff --git a/test/Model/PlotOptionTest.php b/test/Model/PlotOptionTest.php new file mode 100644 index 0000000..097d7eb --- /dev/null +++ b/test/Model/PlotOptionTest.php @@ -0,0 +1,93 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class PostCorrelationTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,7 +75,6 @@ public static function tearDownAfterClass() */ public function testPostCorrelation() { - } /** @@ -87,23 +82,20 @@ public function testPostCorrelation() */ public function testPropertyCauseVariableName() { - } /** - * Test attribute "effect_variable_name" + * Test attribute "correlation" */ - public function testPropertyEffectVariableName() + public function testPropertyCorrelation() { - } /** - * Test attribute "correlation" + * Test attribute "effect_variable_name" */ - public function testPropertyCorrelation() + public function testPropertyEffectVariableName() { - } /** @@ -111,7 +103,5 @@ public function testPropertyCorrelation() */ public function testPropertyVote() { - } - } diff --git a/test/Model/PostMeasurementsDataResponseTest.php b/test/Model/PostMeasurementsDataResponseTest.php new file mode 100644 index 0000000..403cb6f --- /dev/null +++ b/test/Model/PostMeasurementsDataResponseTest.php @@ -0,0 +1,86 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * PostVoteTest Class Doc Comment - * - * @category Class */ -// * @description PostVote -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class PostVoteTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "PostVote" - */ - public function testPostVote() - { - - } - - /** - * Test attribute "cause_variable_id" - */ - public function testPropertyCauseVariableId() - { - - } - - /** - * Test attribute "effect_variable_id" - */ - public function testPropertyEffectVariableId() - { - - } - - /** - * Test attribute "vote" - */ - public function testPropertyVote() - { - - } - -} diff --git a/test/Model/ProcessedDailyMeasurementTest.php b/test/Model/ProcessedDailyMeasurementTest.php new file mode 100644 index 0000000..1655be1 --- /dev/null +++ b/test/Model/ProcessedDailyMeasurementTest.php @@ -0,0 +1,170 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class TrackingReminderDeleteTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,7 +75,6 @@ public static function tearDownAfterClass() */ public function testTrackingReminderDelete() { - } /** @@ -87,7 +82,5 @@ public function testTrackingReminderDelete() */ public function testPropertyId() { - } - } diff --git a/test/Model/TrackingReminderNotificationActionArrayTest.php b/test/Model/TrackingReminderNotificationActionArrayTest.php new file mode 100644 index 0000000..35a02f2 --- /dev/null +++ b/test/Model/TrackingReminderNotificationActionArrayTest.php @@ -0,0 +1,107 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * TrackingReminderNotificationSkipTest Class Doc Comment - * - * @category Class */ -// * @description TrackingReminderNotificationSkip -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class TrackingReminderNotificationSkipTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "TrackingReminderNotificationSkip" - */ - public function testTrackingReminderNotificationSkip() - { - - } - - /** - * Test attribute "id" - */ - public function testPropertyId() - { - - } - -} diff --git a/test/Model/TrackingReminderNotificationSnoozeTest.php b/test/Model/TrackingReminderNotificationSnoozeTest.php deleted file mode 100644 index 8d0f51c..0000000 --- a/test/Model/TrackingReminderNotificationSnoozeTest.php +++ /dev/null @@ -1,93 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * TrackingReminderNotificationSnoozeTest Class Doc Comment - * - * @category Class */ -// * @description TrackingReminderNotificationSnooze -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class TrackingReminderNotificationSnoozeTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "TrackingReminderNotificationSnooze" - */ - public function testTrackingReminderNotificationSnooze() - { - - } - - /** - * Test attribute "id" - */ - public function testPropertyId() - { - - } - -} diff --git a/test/Model/TrackingReminderNotificationTest.php b/test/Model/TrackingReminderNotificationTest.php index 5a1220e..643c48b 100644 --- a/test/Model/TrackingReminderNotificationTest.php +++ b/test/Model/TrackingReminderNotificationTest.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class TrackingReminderNotificationTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,7 +75,111 @@ public static function tearDownAfterClass() */ public function testTrackingReminderNotification() { + } + + /** + * Test attribute "action_array" + */ + public function testPropertyActionArray() + { + } + /** + * Test attribute "available_units" + */ + public function testPropertyAvailableUnits() + { + } + + /** + * Test attribute "client_id" + */ + public function testPropertyClientId() + { + } + + /** + * Test attribute "combination_operation" + */ + public function testPropertyCombinationOperation() + { + } + + /** + * Test attribute "created_at" + */ + public function testPropertyCreatedAt() + { + } + + /** + * Test attribute "unit_abbreviated_name" + */ + public function testPropertyUnitAbbreviatedName() + { + } + + /** + * Test attribute "unit_category_id" + */ + public function testPropertyUnitCategoryId() + { + } + + /** + * Test attribute "unit_category_name" + */ + public function testPropertyUnitCategoryName() + { + } + + /** + * Test attribute "unit_id" + */ + public function testPropertyUnitId() + { + } + + /** + * Test attribute "unit_name" + */ + public function testPropertyUnitName() + { + } + + /** + * Test attribute "default_value" + */ + public function testPropertyDefaultValue() + { + } + + /** + * Test attribute "description" + */ + public function testPropertyDescription() + { + } + + /** + * Test attribute "email" + */ + public function testPropertyEmail() + { + } + + /** + * Test attribute "filling_value" + */ + public function testPropertyFillingValue() + { + } + + /** + * Test attribute "icon_icon" + */ + public function testPropertyIconIcon() + { } /** @@ -87,55 +187,118 @@ public function testTrackingReminderNotification() */ public function testPropertyId() { + } + /** + * Test attribute "image_url" + */ + public function testPropertyImageUrl() + { } /** - * Test attribute "tracking_reminder_id" + * Test attribute "input_type" */ - public function testPropertyTrackingReminderId() + public function testPropertyInputType() { + } + /** + * Test attribute "ion_icon" + */ + public function testPropertyIonIcon() + { } /** - * Test attribute "client_id" + * Test attribute "last_value" */ - public function testPropertyClientId() + public function testPropertyLastValue() { + } + /** + * Test attribute "manual_tracking" + */ + public function testPropertyManualTracking() + { } /** - * Test attribute "user_id" + * Test attribute "maximum_allowed_value" */ - public function testPropertyUserId() + public function testPropertyMaximumAllowedValue() { + } + /** + * Test attribute "minimum_allowed_value" + */ + public function testPropertyMinimumAllowedValue() + { } /** - * Test attribute "variable_id" + * Test attribute "most_common_value" */ - public function testPropertyVariableId() + public function testPropertyMostCommonValue() + { + } + + /** + * Test attribute "notification_bar" + */ + public function testPropertyNotificationBar() + { + } + + /** + * Test attribute "notified_at" + */ + public function testPropertyNotifiedAt() { + } + /** + * Test attribute "number_of_unique_values" + */ + public function testPropertyNumberOfUniqueValues() + { } /** - * Test attribute "pending_reminder_time" + * Test attribute "png_path" */ - public function testPropertyPendingReminderTime() + public function testPropertyPngPath() { + } + /** + * Test attribute "png_url" + */ + public function testPropertyPngUrl() + { } /** - * Test attribute "default_value" + * Test attribute "pop_up" */ - public function testPropertyDefaultValue() + public function testPropertyPopUp() + { + } + + /** + * Test attribute "reminder_end_time" + */ + public function testPropertyReminderEndTime() { + } + /** + * Test attribute "reminder_frequency" + */ + public function testPropertyReminderFrequency() + { } /** @@ -143,15 +306,34 @@ public function testPropertyDefaultValue() */ public function testPropertyReminderSound() { + } + /** + * Test attribute "reminder_start_time" + */ + public function testPropertyReminderStartTime() + { } /** - * Test attribute "pop_up" + * Test attribute "reminder_time" */ - public function testPropertyPopUp() + public function testPropertyReminderTime() { + } + /** + * Test attribute "second_most_common_value" + */ + public function testPropertySecondMostCommonValue() + { + } + + /** + * Test attribute "second_to_last_value" + */ + public function testPropertySecondToLastValue() + { } /** @@ -159,23 +341,90 @@ public function testPropertyPopUp() */ public function testPropertySms() { + } + /** + * Test attribute "svg_url" + */ + public function testPropertySvgUrl() + { } /** - * Test attribute "email" + * Test attribute "third_most_common_value" */ - public function testPropertyEmail() + public function testPropertyThirdMostCommonValue() { + } + /** + * Test attribute "third_to_last_value" + */ + public function testPropertyThirdToLastValue() + { } /** - * Test attribute "notification_bar" + * Test attribute "title" */ - public function testPropertyNotificationBar() + public function testPropertyTitle() { + } + /** + * Test attribute "total" + */ + public function testPropertyTotal() + { + } + + /** + * Test attribute "track_all_actions" + */ + public function testPropertyTrackAllActions() + { + } + + /** + * Test attribute "tracking_reminder_id" + */ + public function testPropertyTrackingReminderId() + { + } + + /** + * Test attribute "tracking_reminder_image_url" + */ + public function testPropertyTrackingReminderImageUrl() + { + } + + /** + * Test attribute "tracking_reminder_notification_id" + */ + public function testPropertyTrackingReminderNotificationId() + { + } + + /** + * Test attribute "tracking_reminder_notification_time" + */ + public function testPropertyTrackingReminderNotificationTime() + { + } + + /** + * Test attribute "tracking_reminder_notification_time_epoch" + */ + public function testPropertyTrackingReminderNotificationTimeEpoch() + { + } + + /** + * Test attribute "tracking_reminder_notification_time_local" + */ + public function testPropertyTrackingReminderNotificationTimeLocal() + { } /** @@ -183,39 +432,110 @@ public function testPropertyNotificationBar() */ public function testPropertyUpdatedAt() { + } + /** + * Test attribute "user_id" + */ + public function testPropertyUserId() + { } /** - * Test attribute "variable_name" + * Test attribute "user_variable_unit_abbreviated_name" */ - public function testPropertyVariableName() + public function testPropertyUserVariableUnitAbbreviatedName() + { + } + + /** + * Test attribute "user_variable_unit_category_id" + */ + public function testPropertyUserVariableUnitCategoryId() { + } + /** + * Test attribute "user_variable_unit_category_name" + */ + public function testPropertyUserVariableUnitCategoryName() + { } /** - * Test attribute "variable_category_name" + * Test attribute "user_variable_unit_id" */ - public function testPropertyVariableCategoryName() + public function testPropertyUserVariableUnitId() { + } + /** + * Test attribute "user_variable_unit_name" + */ + public function testPropertyUserVariableUnitName() + { } /** - * Test attribute "abbreviated_unit_name" + * Test attribute "user_variable_variable_category_id" */ - public function testPropertyAbbreviatedUnitName() + public function testPropertyUserVariableVariableCategoryId() { + } + /** + * Test attribute "user_variable_variable_category_name" + */ + public function testPropertyUserVariableVariableCategoryName() + { } /** - * Test attribute "combination_operation" + * Test attribute "valence" */ - public function testPropertyCombinationOperation() + public function testPropertyValence() { + } + + /** + * Test attribute "variable_category_id" + */ + public function testPropertyVariableCategoryId() + { + } + + /** + * Test attribute "variable_category_image_url" + */ + public function testPropertyVariableCategoryImageUrl() + { + } + + /** + * Test attribute "variable_category_name" + */ + public function testPropertyVariableCategoryName() + { + } + /** + * Test attribute "variable_id" + */ + public function testPropertyVariableId() + { } + /** + * Test attribute "variable_image_url" + */ + public function testPropertyVariableImageUrl() + { + } + + /** + * Test attribute "variable_name" + */ + public function testPropertyVariableName() + { + } } diff --git a/test/Model/TrackingReminderNotificationTrackAllActionTest.php b/test/Model/TrackingReminderNotificationTrackAllActionTest.php new file mode 100644 index 0000000..8432dbc --- /dev/null +++ b/test/Model/TrackingReminderNotificationTrackAllActionTest.php @@ -0,0 +1,107 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * TrackingReminderNotificationTrackTest Class Doc Comment - * - * @category Class */ -// * @description TrackingReminderNotificationTrack -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class TrackingReminderNotificationTrackTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "TrackingReminderNotificationTrack" - */ - public function testTrackingReminderNotificationTrack() - { - - } - - /** - * Test attribute "tracking_reminder_notification" - */ - public function testPropertyTrackingReminderNotification() - { - - } - - /** - * Test attribute "modified_value" - */ - public function testPropertyModifiedValue() - { - - } - -} diff --git a/test/Model/TrackingReminderNotificationsArrayTest.php b/test/Model/TrackingReminderNotificationsArrayTest.php new file mode 100644 index 0000000..5cd66a1 --- /dev/null +++ b/test/Model/TrackingReminderNotificationsArrayTest.php @@ -0,0 +1,79 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class TrackingReminderTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,15 +75,13 @@ public static function tearDownAfterClass() */ public function testTrackingReminder() { - } /** - * Test attribute "id" + * Test attribute "available_units" */ - public function testPropertyId() + public function testPropertyAvailableUnits() { - } /** @@ -95,23 +89,55 @@ public function testPropertyId() */ public function testPropertyClientId() { + } + /** + * Test attribute "combination_operation" + */ + public function testPropertyCombinationOperation() + { } /** - * Test attribute "user_id" + * Test attribute "created_at" */ - public function testPropertyUserId() + public function testPropertyCreatedAt() { + } + /** + * Test attribute "unit_abbreviated_name" + */ + public function testPropertyUnitAbbreviatedName() + { } /** - * Test attribute "variable_id" + * Test attribute "unit_category_id" */ - public function testPropertyVariableId() + public function testPropertyUnitCategoryId() + { + } + + /** + * Test attribute "unit_category_name" + */ + public function testPropertyUnitCategoryName() + { + } + + /** + * Test attribute "unit_id" + */ + public function testPropertyUnitId() { + } + /** + * Test attribute "unit_name" + */ + public function testPropertyUnitName() + { } /** @@ -119,63 +145,139 @@ public function testPropertyVariableId() */ public function testPropertyDefaultValue() { + } + /** + * Test attribute "email" + */ + public function testPropertyEmail() + { } /** - * Test attribute "reminder_start_time" + * Test attribute "error_message" */ - public function testPropertyReminderStartTime() + public function testPropertyErrorMessage() { + } + /** + * Test attribute "filling_value" + */ + public function testPropertyFillingValue() + { } /** - * Test attribute "reminder_end_time" + * Test attribute "first_daily_reminder_time" */ - public function testPropertyReminderEndTime() + public function testPropertyFirstDailyReminderTime() { + } + /** + * Test attribute "frequency_text_description" + */ + public function testPropertyFrequencyTextDescription() + { } /** - * Test attribute "reminder_sound" + * Test attribute "frequency_text_description_with_time" */ - public function testPropertyReminderSound() + public function testPropertyFrequencyTextDescriptionWithTime() { + } + /** + * Test attribute "id" + */ + public function testPropertyId() + { } /** - * Test attribute "reminder_frequency" + * Test attribute "input_type" */ - public function testPropertyReminderFrequency() + public function testPropertyInputType() { + } + /** + * Test attribute "instructions" + */ + public function testPropertyInstructions() + { } /** - * Test attribute "pop_up" + * Test attribute "ion_icon" */ - public function testPropertyPopUp() + public function testPropertyIonIcon() + { + } + + /** + * Test attribute "last_tracked" + */ + public function testPropertyLastTracked() { + } + /** + * Test attribute "last_value" + */ + public function testPropertyLastValue() + { } /** - * Test attribute "sms" + * Test attribute "latest_tracking_reminder_notification_reminder_time" */ - public function testPropertySms() + public function testPropertyLatestTrackingReminderNotificationReminderTime() { + } + /** + * Test attribute "local_daily_reminder_notification_times" + */ + public function testPropertyLocalDailyReminderNotificationTimes() + { } /** - * Test attribute "email" + * Test attribute "local_daily_reminder_notification_times_for_all_reminders" */ - public function testPropertyEmail() + public function testPropertyLocalDailyReminderNotificationTimesForAllReminders() { + } + /** + * Test attribute "manual_tracking" + */ + public function testPropertyManualTracking() + { + } + + /** + * Test attribute "maximum_allowed_value" + */ + public function testPropertyMaximumAllowedValue() + { + } + + /** + * Test attribute "minimum_allowed_value" + */ + public function testPropertyMinimumAllowedValue() + { + } + + /** + * Test attribute "next_reminder_time_epoch_seconds" + */ + public function testPropertyNextReminderTimeEpochSeconds() + { } /** @@ -183,23 +285,118 @@ public function testPropertyEmail() */ public function testPropertyNotificationBar() { + } + /** + * Test attribute "number_of_raw_measurements" + */ + public function testPropertyNumberOfRawMeasurements() + { } /** - * Test attribute "latest_tracking_reminder_notification_reminder_time" + * Test attribute "number_of_unique_values" */ - public function testPropertyLatestTrackingReminderNotificationReminderTime() + public function testPropertyNumberOfUniqueValues() + { + } + + /** + * Test attribute "png_path" + */ + public function testPropertyPngPath() { + } + /** + * Test attribute "png_url" + */ + public function testPropertyPngUrl() + { } /** - * Test attribute "last_tracked" + * Test attribute "pop_up" */ - public function testPropertyLastTracked() + public function testPropertyPopUp() { + } + + /** + * Test attribute "reminder_end_time" + */ + public function testPropertyReminderEndTime() + { + } + /** + * Test attribute "reminder_frequency" + */ + public function testPropertyReminderFrequency() + { + } + + /** + * Test attribute "reminder_sound" + */ + public function testPropertyReminderSound() + { + } + + /** + * Test attribute "reminder_start_epoch_seconds" + */ + public function testPropertyReminderStartEpochSeconds() + { + } + + /** + * Test attribute "reminder_start_time" + */ + public function testPropertyReminderStartTime() + { + } + + /** + * Test attribute "reminder_start_time_local" + */ + public function testPropertyReminderStartTimeLocal() + { + } + + /** + * Test attribute "reminder_start_time_local_human_formatted" + */ + public function testPropertyReminderStartTimeLocalHumanFormatted() + { + } + + /** + * Test attribute "repeating" + */ + public function testPropertyRepeating() + { + } + + /** + * Test attribute "second_daily_reminder_time" + */ + public function testPropertySecondDailyReminderTime() + { + } + + /** + * Test attribute "second_to_last_value" + */ + public function testPropertySecondToLastValue() + { + } + + /** + * Test attribute "sms" + */ + public function testPropertySms() + { } /** @@ -207,7 +404,6 @@ public function testPropertyLastTracked() */ public function testPropertyStartTrackingDate() { - } /** @@ -215,7 +411,41 @@ public function testPropertyStartTrackingDate() */ public function testPropertyStopTrackingDate() { + } + + /** + * Test attribute "svg_url" + */ + public function testPropertySvgUrl() + { + } + + /** + * Test attribute "third_daily_reminder_time" + */ + public function testPropertyThirdDailyReminderTime() + { + } + + /** + * Test attribute "third_to_last_value" + */ + public function testPropertyThirdToLastValue() + { + } + + /** + * Test attribute "tracking_reminder_id" + */ + public function testPropertyTrackingReminderId() + { + } + /** + * Test attribute "tracking_reminder_image_url" + */ + public function testPropertyTrackingReminderImageUrl() + { } /** @@ -223,39 +453,124 @@ public function testPropertyStopTrackingDate() */ public function testPropertyUpdatedAt() { + } + /** + * Test attribute "user_id" + */ + public function testPropertyUserId() + { } /** - * Test attribute "variable_name" + * Test attribute "user_variable_unit_abbreviated_name" */ - public function testPropertyVariableName() + public function testPropertyUserVariableUnitAbbreviatedName() + { + } + + /** + * Test attribute "user_variable_unit_category_id" + */ + public function testPropertyUserVariableUnitCategoryId() { + } + /** + * Test attribute "user_variable_unit_category_name" + */ + public function testPropertyUserVariableUnitCategoryName() + { } /** - * Test attribute "variable_category_name" + * Test attribute "user_variable_unit_id" */ - public function testPropertyVariableCategoryName() + public function testPropertyUserVariableUnitId() { + } + /** + * Test attribute "user_variable_unit_name" + */ + public function testPropertyUserVariableUnitName() + { } /** - * Test attribute "abbreviated_unit_name" + * Test attribute "user_variable_variable_category_id" */ - public function testPropertyAbbreviatedUnitName() + public function testPropertyUserVariableVariableCategoryId() { + } + /** + * Test attribute "user_variable_variable_category_name" + */ + public function testPropertyUserVariableVariableCategoryName() + { } /** - * Test attribute "combination_operation" + * Test attribute "valence" */ - public function testPropertyCombinationOperation() + public function testPropertyValence() + { + } + + /** + * Test attribute "value_and_frequency_text_description" + */ + public function testPropertyValueAndFrequencyTextDescription() + { + } + + /** + * Test attribute "value_and_frequency_text_description_with_time" + */ + public function testPropertyValueAndFrequencyTextDescriptionWithTime() + { + } + + /** + * Test attribute "variable_category_id" + */ + public function testPropertyVariableCategoryId() + { + } + + /** + * Test attribute "variable_category_image_url" + */ + public function testPropertyVariableCategoryImageUrl() + { + } + + /** + * Test attribute "variable_category_name" + */ + public function testPropertyVariableCategoryName() { + } + /** + * Test attribute "variable_description" + */ + public function testPropertyVariableDescription() + { + } + + /** + * Test attribute "variable_id" + */ + public function testPropertyVariableId() + { } + /** + * Test attribute "variable_name" + */ + public function testPropertyVariableName() + { + } } diff --git a/test/Model/TrackingRemindersArrayTest.php b/test/Model/TrackingRemindersArrayTest.php new file mode 100644 index 0000000..6f44a26 --- /dev/null +++ b/test/Model/TrackingRemindersArrayTest.php @@ -0,0 +1,79 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class UnitCategoryTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,7 +75,13 @@ public static function tearDownAfterClass() */ public function testUnitCategory() { + } + /** + * Test attribute "id" + */ + public function testPropertyId() + { } /** @@ -87,7 +89,12 @@ public function testUnitCategory() */ public function testPropertyName() { - } + /** + * Test attribute "standard_unit_abbreviated_name" + */ + public function testPropertyStandardUnitAbbreviatedName() + { + } } diff --git a/test/Model/UnitTest.php b/test/Model/UnitTest.php index 7d59f98..6547838 100644 --- a/test/Model/UnitTest.php +++ b/test/Model/UnitTest.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class UnitTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,23 +75,20 @@ public static function tearDownAfterClass() */ public function testUnit() { - } /** - * Test attribute "name" + * Test attribute "abbreviated_name" */ - public function testPropertyName() + public function testPropertyAbbreviatedName() { - } /** - * Test attribute "abbreviated_name" + * Test attribute "advanced" */ - public function testPropertyAbbreviatedName() + public function testPropertyAdvanced() { - } /** @@ -103,15 +96,41 @@ public function testPropertyAbbreviatedName() */ public function testPropertyCategory() { + } + /** + * Test attribute "category_id" + */ + public function testPropertyCategoryId() + { } /** - * Test attribute "minimum_allowed_value" + * Test attribute "category_name" */ - public function testPropertyMinimumAllowedValue() + public function testPropertyCategoryName() + { + } + + /** + * Test attribute "conversion_steps" + */ + public function testPropertyConversionSteps() + { + } + + /** + * Test attribute "id" + */ + public function testPropertyId() { + } + /** + * Test attribute "manual_tracking" + */ + public function testPropertyManualTracking() + { } /** @@ -119,15 +138,40 @@ public function testPropertyMinimumAllowedValue() */ public function testPropertyMaximumAllowedValue() { + } + /** + * Test attribute "maximum_value" + */ + public function testPropertyMaximumValue() + { } /** - * Test attribute "conversion_steps" + * Test attribute "minimum_allowed_value" */ - public function testPropertyConversionSteps() + public function testPropertyMinimumAllowedValue() { + } + /** + * Test attribute "minimum_value" + */ + public function testPropertyMinimumValue() + { + } + + /** + * Test attribute "name" + */ + public function testPropertyName() + { } + /** + * Test attribute "unit_category" + */ + public function testPropertyUnitCategory() + { + } } diff --git a/test/Model/UpdateTest.php b/test/Model/UpdateTest.php deleted file mode 100644 index 81ddd89..0000000 --- a/test/Model/UpdateTest.php +++ /dev/null @@ -1,149 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * UpdateTest Class Doc Comment - * - * @category Class */ -// * @description Update -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UpdateTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "Update" - */ - public function testUpdate() - { - - } - - /** - * Test attribute "id" - */ - public function testPropertyId() - { - - } - - /** - * Test attribute "user_id" - */ - public function testPropertyUserId() - { - - } - - /** - * Test attribute "connector_id" - */ - public function testPropertyConnectorId() - { - - } - - /** - * Test attribute "number_of_measurements" - */ - public function testPropertyNumberOfMeasurements() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - - /** - * Test attribute "message" - */ - public function testPropertyMessage() - { - - } - - /** - * Test attribute "created_at" - */ - public function testPropertyCreatedAt() - { - - } - - /** - * Test attribute "updated_at" - */ - public function testPropertyUpdatedAt() - { - - } - -} diff --git a/test/Model/UserStudyTest.php b/test/Model/UserStudyTest.php new file mode 100644 index 0000000..3bc426f --- /dev/null +++ b/test/Model/UserStudyTest.php @@ -0,0 +1,919 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class UserTagTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,31 +75,26 @@ public static function tearDownAfterClass() */ public function testUserTag() { - } /** - * Test attribute "tagged_variable_id" + * Test attribute "conversion_factor" */ - public function testPropertyTaggedVariableId() + public function testPropertyConversionFactor() { - } /** - * Test attribute "tag_variable_id" + * Test attribute "tagged_variable_id" */ - public function testPropertyTagVariableId() + public function testPropertyTaggedVariableId() { - } /** - * Test attribute "conversion_factor" + * Test attribute "tag_variable_id" */ - public function testPropertyConversionFactor() + public function testPropertyTagVariableId() { - } - } diff --git a/test/Model/UserTest.php b/test/Model/UserTest.php index 5cdca44..723bd88 100644 --- a/test/Model/UserTest.php +++ b/test/Model/UserTest.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class UserTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,23 +75,76 @@ public static function tearDownAfterClass() */ public function testUser() { + } + /** + * Test attribute "access_token" + */ + public function testPropertyAccessToken() + { } /** - * Test attribute "id" + * Test attribute "access_token_expires" */ - public function testPropertyId() + public function testPropertyAccessTokenExpires() { + } + /** + * Test attribute "access_token_expires_at_milliseconds" + */ + public function testPropertyAccessTokenExpiresAtMilliseconds() + { } /** - * Test attribute "wp_id" + * Test attribute "administrator" */ - public function testPropertyWpId() + public function testPropertyAdministrator() { + } + /** + * Test attribute "avatar" + */ + public function testPropertyAvatar() + { + } + + /** + * Test attribute "avatar_image" + */ + public function testPropertyAvatarImage() + { + } + + /** + * Test attribute "capabilities" + */ + public function testPropertyCapabilities() + { + } + + /** + * Test attribute "client_id" + */ + public function testPropertyClientId() + { + } + + /** + * Test attribute "client_user_id" + */ + public function testPropertyClientUserId() + { + } + + /** + * Test attribute "combine_notifications" + */ + public function testPropertyCombineNotifications() + { } /** @@ -103,7 +152,90 @@ public function testPropertyWpId() */ public function testPropertyDisplayName() { + } + + /** + * Test attribute "earliest_reminder_time" + */ + public function testPropertyEarliestReminderTime() + { + } + + /** + * Test attribute "email" + */ + public function testPropertyEmail() + { + } + + /** + * Test attribute "first_name" + */ + public function testPropertyFirstName() + { + } + + /** + * Test attribute "get_preview_builds" + */ + public function testPropertyGetPreviewBuilds() + { + } + /** + * Test attribute "has_android_app" + */ + public function testPropertyHasAndroidApp() + { + } + + /** + * Test attribute "has_chrome_extension" + */ + public function testPropertyHasChromeExtension() + { + } + + /** + * Test attribute "has_ios_app" + */ + public function testPropertyHasIosApp() + { + } + + /** + * Test attribute "id" + */ + public function testPropertyId() + { + } + + /** + * Test attribute "last_four" + */ + public function testPropertyLastFour() + { + } + + /** + * Test attribute "last_name" + */ + public function testPropertyLastName() + { + } + + /** + * Test attribute "last_sms_tracking_reminder_notification_id" + */ + public function testPropertyLastSmsTrackingReminderNotificationId() + { + } + + /** + * Test attribute "latest_reminder_time" + */ + public function testPropertyLatestReminderTime() + { } /** @@ -111,31 +243,138 @@ public function testPropertyDisplayName() */ public function testPropertyLoginName() { + } + /** + * Test attribute "password" + */ + public function testPropertyPassword() + { } /** - * Test attribute "email" + * Test attribute "phone_number" */ - public function testPropertyEmail() + public function testPropertyPhoneNumber() { + } + /** + * Test attribute "phone_verification_code" + */ + public function testPropertyPhoneVerificationCode() + { } /** - * Test attribute "token" + * Test attribute "push_notifications_enabled" */ - public function testPropertyToken() + public function testPropertyPushNotificationsEnabled() { + } + /** + * Test attribute "refresh_token" + */ + public function testPropertyRefreshToken() + { } /** - * Test attribute "administrator" + * Test attribute "roles" */ - public function testPropertyAdministrator() + public function testPropertyRoles() { + } + /** + * Test attribute "send_predictor_emails" + */ + public function testPropertySendPredictorEmails() + { } + /** + * Test attribute "send_reminder_notification_emails" + */ + public function testPropertySendReminderNotificationEmails() + { + } + + /** + * Test attribute "sms_notifications_enabled" + */ + public function testPropertySmsNotificationsEnabled() + { + } + + /** + * Test attribute "stripe_active" + */ + public function testPropertyStripeActive() + { + } + + /** + * Test attribute "stripe_id" + */ + public function testPropertyStripeId() + { + } + + /** + * Test attribute "stripe_plan" + */ + public function testPropertyStripePlan() + { + } + + /** + * Test attribute "stripe_subscription" + */ + public function testPropertyStripeSubscription() + { + } + + /** + * Test attribute "subscription_ends_at" + */ + public function testPropertySubscriptionEndsAt() + { + } + + /** + * Test attribute "subscription_provider" + */ + public function testPropertySubscriptionProvider() + { + } + + /** + * Test attribute "time_zone_offset" + */ + public function testPropertyTimeZoneOffset() + { + } + + /** + * Test attribute "track_location" + */ + public function testPropertyTrackLocation() + { + } + + /** + * Test attribute "user_registered" + */ + public function testPropertyUserRegistered() + { + } + + /** + * Test attribute "user_url" + */ + public function testPropertyUserUrl() + { + } } diff --git a/test/Model/UserTokenFailedResponseTest.php b/test/Model/UserTokenFailedResponseTest.php deleted file mode 100644 index d8e95e9..0000000 --- a/test/Model/UserTokenFailedResponseTest.php +++ /dev/null @@ -1,109 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * UserTokenFailedResponseTest Class Doc Comment - * - * @category Class */ -// * @description UserTokenFailedResponse -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserTokenFailedResponseTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "UserTokenFailedResponse" - */ - public function testUserTokenFailedResponse() - { - - } - - /** - * Test attribute "code" - */ - public function testPropertyCode() - { - - } - - /** - * Test attribute "message" - */ - public function testPropertyMessage() - { - - } - - /** - * Test attribute "success" - */ - public function testPropertySuccess() - { - - } - -} diff --git a/test/Model/UserTokenRequestInnerUserFieldTest.php b/test/Model/UserTokenRequestInnerUserFieldTest.php deleted file mode 100644 index cfef6d4..0000000 --- a/test/Model/UserTokenRequestInnerUserFieldTest.php +++ /dev/null @@ -1,93 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * UserTokenRequestInnerUserFieldTest Class Doc Comment - * - * @category Class */ -// * @description UserTokenRequestInnerUserField -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserTokenRequestInnerUserFieldTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "UserTokenRequestInnerUserField" - */ - public function testUserTokenRequestInnerUserField() - { - - } - - /** - * Test attribute "id" - */ - public function testPropertyId() - { - - } - -} diff --git a/test/Model/UserTokenRequestTest.php b/test/Model/UserTokenRequestTest.php deleted file mode 100644 index 5733c50..0000000 --- a/test/Model/UserTokenRequestTest.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * UserTokenRequestTest Class Doc Comment - * - * @category Class */ -// * @description UserTokenRequest -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserTokenRequestTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "UserTokenRequest" - */ - public function testUserTokenRequest() - { - - } - - /** - * Test attribute "user" - */ - public function testPropertyUser() - { - - } - - /** - * Test attribute "organization_access_token" - */ - public function testPropertyOrganizationAccessToken() - { - - } - -} diff --git a/test/Model/UserTokenSuccessfulResponseInnerUserFieldTest.php b/test/Model/UserTokenSuccessfulResponseInnerUserFieldTest.php deleted file mode 100644 index 7450685..0000000 --- a/test/Model/UserTokenSuccessfulResponseInnerUserFieldTest.php +++ /dev/null @@ -1,101 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * UserTokenSuccessfulResponseInnerUserFieldTest Class Doc Comment - * - * @category Class */ -// * @description UserTokenSuccessfulResponseInnerUserField -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserTokenSuccessfulResponseInnerUserFieldTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "UserTokenSuccessfulResponseInnerUserField" - */ - public function testUserTokenSuccessfulResponseInnerUserField() - { - - } - - /** - * Test attribute "id" - */ - public function testPropertyId() - { - - } - - /** - * Test attribute "access_token" - */ - public function testPropertyAccessToken() - { - - } - -} diff --git a/test/Model/UserTokenSuccessfulResponseTest.php b/test/Model/UserTokenSuccessfulResponseTest.php deleted file mode 100644 index 071eded..0000000 --- a/test/Model/UserTokenSuccessfulResponseTest.php +++ /dev/null @@ -1,109 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * UserTokenSuccessfulResponseTest Class Doc Comment - * - * @category Class */ -// * @description UserTokenSuccessfulResponse -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserTokenSuccessfulResponseTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "UserTokenSuccessfulResponse" - */ - public function testUserTokenSuccessfulResponse() - { - - } - - /** - * Test attribute "code" - */ - public function testPropertyCode() - { - - } - - /** - * Test attribute "message" - */ - public function testPropertyMessage() - { - - } - - /** - * Test attribute "user" - */ - public function testPropertyUser() - { - - } - -} diff --git a/test/Model/UserVariableArrayTest.php b/test/Model/UserVariableArrayTest.php new file mode 100644 index 0000000..1c34238 --- /dev/null +++ b/test/Model/UserVariableArrayTest.php @@ -0,0 +1,79 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class UserVariableDeleteTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,7 +75,6 @@ public static function tearDownAfterClass() */ public function testUserVariableDelete() { - } /** @@ -87,7 +82,5 @@ public function testUserVariableDelete() */ public function testPropertyVariableId() { - } - } diff --git a/test/Model/UserVariableRelationshipTest.php b/test/Model/UserVariableRelationshipTest.php deleted file mode 100644 index 211a2e6..0000000 --- a/test/Model/UserVariableRelationshipTest.php +++ /dev/null @@ -1,221 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * UserVariableRelationshipTest Class Doc Comment - * - * @category Class */ -// * @description UserVariableRelationship -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserVariableRelationshipTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "UserVariableRelationship" - */ - public function testUserVariableRelationship() - { - - } - - /** - * Test attribute "id" - */ - public function testPropertyId() - { - - } - - /** - * Test attribute "confidence_level" - */ - public function testPropertyConfidenceLevel() - { - - } - - /** - * Test attribute "confidence_score" - */ - public function testPropertyConfidenceScore() - { - - } - - /** - * Test attribute "direction" - */ - public function testPropertyDirection() - { - - } - - /** - * Test attribute "duration_of_action" - */ - public function testPropertyDurationOfAction() - { - - } - - /** - * Test attribute "error_message" - */ - public function testPropertyErrorMessage() - { - - } - - /** - * Test attribute "onset_delay" - */ - public function testPropertyOnsetDelay() - { - - } - - /** - * Test attribute "outcome_variable_id" - */ - public function testPropertyOutcomeVariableId() - { - - } - - /** - * Test attribute "predictor_variable_id" - */ - public function testPropertyPredictorVariableId() - { - - } - - /** - * Test attribute "predictor_unit_id" - */ - public function testPropertyPredictorUnitId() - { - - } - - /** - * Test attribute "sinn_rank" - */ - public function testPropertySinnRank() - { - - } - - /** - * Test attribute "strength_level" - */ - public function testPropertyStrengthLevel() - { - - } - - /** - * Test attribute "strength_score" - */ - public function testPropertyStrengthScore() - { - - } - - /** - * Test attribute "user_id" - */ - public function testPropertyUserId() - { - - } - - /** - * Test attribute "vote" - */ - public function testPropertyVote() - { - - } - - /** - * Test attribute "value_predicting_high_outcome" - */ - public function testPropertyValuePredictingHighOutcome() - { - - } - - /** - * Test attribute "value_predicting_low_outcome" - */ - public function testPropertyValuePredictingLowOutcome() - { - - } - -} diff --git a/test/Model/UserVariableTest.php b/test/Model/UserVariableTest.php index c56a7fa..475b5a4 100644 --- a/test/Model/UserVariableTest.php +++ b/test/Model/UserVariableTest.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class UserVariableTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,207 +75,216 @@ public static function tearDownAfterClass() */ public function testUserVariable() { - } /** - * Test attribute "parent_id" + * Test attribute "alias" */ - public function testPropertyParentId() + public function testPropertyAlias() { - } /** - * Test attribute "user_id" + * Test attribute "available_units" */ - public function testPropertyUserId() + public function testPropertyAvailableUnits() { - } /** - * Test attribute "client_id" + * Test attribute "cause_only" */ - public function testPropertyClientId() + public function testPropertyCauseOnly() { - } /** - * Test attribute "variable_id" + * Test attribute "charts" */ - public function testPropertyVariableId() + public function testPropertyCharts() { - } /** - * Test attribute "default_unit_id" + * Test attribute "charts_link_dynamic" */ - public function testPropertyDefaultUnitId() + public function testPropertyChartsLinkDynamic() { - } /** - * Test attribute "minimum_allowed_value" + * Test attribute "charts_link_email" */ - public function testPropertyMinimumAllowedValue() + public function testPropertyChartsLinkEmail() { - } /** - * Test attribute "maximum_allowed_value" + * Test attribute "charts_link_facebook" */ - public function testPropertyMaximumAllowedValue() + public function testPropertyChartsLinkFacebook() { - } /** - * Test attribute "filling_value" + * Test attribute "charts_link_google" */ - public function testPropertyFillingValue() + public function testPropertyChartsLinkGoogle() { - } /** - * Test attribute "join_with" + * Test attribute "charts_link_static" */ - public function testPropertyJoinWith() + public function testPropertyChartsLinkStatic() { - } /** - * Test attribute "onset_delay" + * Test attribute "charts_link_twitter" */ - public function testPropertyOnsetDelay() + public function testPropertyChartsLinkTwitter() { - } /** - * Test attribute "duration_of_action" + * Test attribute "child_user_tag_variables" */ - public function testPropertyDurationOfAction() + public function testPropertyChildUserTagVariables() { - } /** - * Test attribute "variable_category_id" + * Test attribute "client_id" */ - public function testPropertyVariableCategoryId() + public function testPropertyClientId() { - } /** - * Test attribute "updated" + * Test attribute "combination_operation" */ - public function testPropertyUpdated() + public function testPropertyCombinationOperation() { - } /** - * Test attribute "public" + * Test attribute "common_alias" */ - public function testPropertyPublic() + public function testPropertyCommonAlias() { - } /** - * Test attribute "cause_only" + * Test attribute "common_tagged_variables" */ - public function testPropertyCauseOnly() + public function testPropertyCommonTaggedVariables() { - } /** - * Test attribute "filling_type" + * Test attribute "common_tag_variables" */ - public function testPropertyFillingType() + public function testPropertyCommonTagVariables() { - } /** - * Test attribute "number_of_measurements" + * Test attribute "common_variable_most_common_connector_id" */ - public function testPropertyNumberOfMeasurements() + public function testPropertyCommonVariableMostCommonConnectorId() { - } /** - * Test attribute "number_of_processed_measurements" + * Test attribute "common_variable_updated_at" */ - public function testPropertyNumberOfProcessedMeasurements() + public function testPropertyCommonVariableUpdatedAt() { - } /** - * Test attribute "measurements_at_last_analysis" + * Test attribute "created_at" */ - public function testPropertyMeasurementsAtLastAnalysis() + public function testPropertyCreatedAt() { - } /** - * Test attribute "last_unit_id" + * Test attribute "unit_abbreviated_name" */ - public function testPropertyLastUnitId() + public function testPropertyUnitAbbreviatedName() { - } /** - * Test attribute "last_original_unit_id" + * Test attribute "unit_category_id" */ - public function testPropertyLastOriginalUnitId() + public function testPropertyUnitCategoryId() { + } + /** + * Test attribute "unit_category_name" + */ + public function testPropertyUnitCategoryName() + { } /** - * Test attribute "last_value" + * Test attribute "unit_id" */ - public function testPropertyLastValue() + public function testPropertyUnitId() { + } + /** + * Test attribute "unit_name" + */ + public function testPropertyUnitName() + { } /** - * Test attribute "last_original_value" + * Test attribute "description" */ - public function testPropertyLastOriginalValue() + public function testPropertyDescription() { + } + /** + * Test attribute "duration_of_action" + */ + public function testPropertyDurationOfAction() + { } /** - * Test attribute "number_of_correlations" + * Test attribute "duration_of_action_in_hours" */ - public function testPropertyNumberOfCorrelations() + public function testPropertyDurationOfActionInHours() { + } + /** + * Test attribute "earliest_filling_time" + */ + public function testPropertyEarliestFillingTime() + { } /** - * Test attribute "status" + * Test attribute "earliest_measurement_time" */ - public function testPropertyStatus() + public function testPropertyEarliestMeasurementTime() { + } + /** + * Test attribute "earliest_source_time" + */ + public function testPropertyEarliestSourceTime() + { } /** @@ -287,207 +292,195 @@ public function testPropertyStatus() */ public function testPropertyErrorMessage() { - } /** - * Test attribute "last_successful_update_time" + * Test attribute "experiment_end_time" */ - public function testPropertyLastSuccessfulUpdateTime() + public function testPropertyExperimentEndTime() { - } /** - * Test attribute "standard_deviation" + * Test attribute "experiment_end_time_seconds" */ - public function testPropertyStandardDeviation() + public function testPropertyExperimentEndTimeSeconds() { - } /** - * Test attribute "variance" + * Test attribute "experiment_end_time_string" */ - public function testPropertyVariance() + public function testPropertyExperimentEndTimeString() { - } /** - * Test attribute "minimum_recorded_value" + * Test attribute "experiment_start_time" */ - public function testPropertyMinimumRecordedValue() + public function testPropertyExperimentStartTime() { - } /** - * Test attribute "maximum_recorded_daily_value" + * Test attribute "experiment_start_time_seconds" */ - public function testPropertyMaximumRecordedDailyValue() + public function testPropertyExperimentStartTimeSeconds() { - } /** - * Test attribute "mean" + * Test attribute "experiment_start_time_string" */ - public function testPropertyMean() + public function testPropertyExperimentStartTimeString() { - } /** - * Test attribute "median" + * Test attribute "filling_type" */ - public function testPropertyMedian() + public function testPropertyFillingType() { - } /** - * Test attribute "most_common_unit_id" + * Test attribute "filling_value" */ - public function testPropertyMostCommonUnitId() + public function testPropertyFillingValue() { - } /** - * Test attribute "most_common_value" + * Test attribute "icon_icon" */ - public function testPropertyMostCommonValue() + public function testPropertyIconIcon() { - } /** - * Test attribute "number_of_unique_daily_values" + * Test attribute "highcharts" */ - public function testPropertyNumberOfUniqueDailyValues() + public function testPropertyHighcharts() { - } /** - * Test attribute "number_of_changes" + * Test attribute "id" */ - public function testPropertyNumberOfChanges() + public function testPropertyId() { - } /** - * Test attribute "skewness" + * Test attribute "image_url" */ - public function testPropertySkewness() + public function testPropertyImageUrl() { - } /** - * Test attribute "kurtosis" + * Test attribute "informational_url" */ - public function testPropertyKurtosis() + public function testPropertyInformationalUrl() { - } /** - * Test attribute "latitude" + * Test attribute "ingredient_of_user_tag_variables" */ - public function testPropertyLatitude() + public function testPropertyIngredientOfUserTagVariables() { - } /** - * Test attribute "longitude" + * Test attribute "ingredient_user_tag_variables" */ - public function testPropertyLongitude() + public function testPropertyIngredientUserTagVariables() { - } /** - * Test attribute "location" + * Test attribute "input_type" */ - public function testPropertyLocation() + public function testPropertyInputType() { - } /** - * Test attribute "experiment_start_time" + * Test attribute "ion_icon" */ - public function testPropertyExperimentStartTime() + public function testPropertyIonIcon() { - } /** - * Test attribute "experiment_end_time" + * Test attribute "joined_user_tag_variables" */ - public function testPropertyExperimentEndTime() + public function testPropertyJoinedUserTagVariables() { - } /** - * Test attribute "created_at" + * Test attribute "join_with" */ - public function testPropertyCreatedAt() + public function testPropertyJoinWith() { - } /** - * Test attribute "updated_at" + * Test attribute "kurtosis" */ - public function testPropertyUpdatedAt() + public function testPropertyKurtosis() { - } /** - * Test attribute "outcome" + * Test attribute "last_original_unit_id" */ - public function testPropertyOutcome() + public function testPropertyLastOriginalUnitId() { - } /** - * Test attribute "sources" + * Test attribute "last_original_value" */ - public function testPropertySources() + public function testPropertyLastOriginalValue() { - } /** - * Test attribute "earliest_source_time" + * Test attribute "last_processed_daily_value" */ - public function testPropertyEarliestSourceTime() + public function testPropertyLastProcessedDailyValue() { - } /** - * Test attribute "latest_source_time" + * Test attribute "last_successful_update_time" */ - public function testPropertyLatestSourceTime() + public function testPropertyLastSuccessfulUpdateTime() { + } + /** + * Test attribute "last_unit_id" + */ + public function testPropertyLastUnitId() + { } /** - * Test attribute "earliest_measurement_time" + * Test attribute "last_value" */ - public function testPropertyEarliestMeasurementTime() + public function testPropertyLastValue() { + } + /** + * Test attribute "latest_filling_time" + */ + public function testPropertyLatestFillingTime() + { } /** @@ -495,39 +488,614 @@ public function testPropertyEarliestMeasurementTime() */ public function testPropertyLatestMeasurementTime() { + } + /** + * Test attribute "latest_source_time" + */ + public function testPropertyLatestSourceTime() + { } /** - * Test attribute "earliest_filling_time" + * Test attribute "latest_user_measurement_time" */ - public function testPropertyEarliestFillingTime() + public function testPropertyLatestUserMeasurementTime() { + } + /** + * Test attribute "latitude" + */ + public function testPropertyLatitude() + { } /** - * Test attribute "latest_filling_time" + * Test attribute "location" */ - public function testPropertyLatestFillingTime() + public function testPropertyLocation() { + } + /** + * Test attribute "longitude" + */ + public function testPropertyLongitude() + { } /** - * Test attribute "image_url" + * Test attribute "manual_tracking" */ - public function testPropertyImageUrl() + public function testPropertyManualTracking() { + } + /** + * Test attribute "maximum_allowed_value" + */ + public function testPropertyMaximumAllowedValue() + { } /** - * Test attribute "ion_icon" + * Test attribute "maximum_recorded_daily_value" */ - public function testPropertyIonIcon() + public function testPropertyMaximumRecordedDailyValue() { + } + /** + * Test attribute "maximum_recorded_value" + */ + public function testPropertyMaximumRecordedValue() + { } + /** + * Test attribute "mean" + */ + public function testPropertyMean() + { + } + + /** + * Test attribute "measurements_at_last_analysis" + */ + public function testPropertyMeasurementsAtLastAnalysis() + { + } + + /** + * Test attribute "median" + */ + public function testPropertyMedian() + { + } + + /** + * Test attribute "minimum_allowed_value" + */ + public function testPropertyMinimumAllowedValue() + { + } + + /** + * Test attribute "minimum_recorded_value" + */ + public function testPropertyMinimumRecordedValue() + { + } + + /** + * Test attribute "most_common_connector_id" + */ + public function testPropertyMostCommonConnectorId() + { + } + + /** + * Test attribute "most_common_original_unit_id" + */ + public function testPropertyMostCommonOriginalUnitId() + { + } + + /** + * Test attribute "most_common_unit_id" + */ + public function testPropertyMostCommonUnitId() + { + } + + /** + * Test attribute "most_common_value" + */ + public function testPropertyMostCommonValue() + { + } + + /** + * Test attribute "name" + */ + public function testPropertyName() + { + } + + /** + * Test attribute "number_of_aggregate_correlations_as_cause" + */ + public function testPropertyNumberOfAggregateCorrelationsAsCause() + { + } + + /** + * Test attribute "number_of_aggregate_correlations_as_effect" + */ + public function testPropertyNumberOfAggregateCorrelationsAsEffect() + { + } + + /** + * Test attribute "number_of_changes" + */ + public function testPropertyNumberOfChanges() + { + } + + /** + * Test attribute "number_of_correlations" + */ + public function testPropertyNumberOfCorrelations() + { + } + + /** + * Test attribute "number_of_measurements" + */ + public function testPropertyNumberOfMeasurements() + { + } + + /** + * Test attribute "number_of_processed_daily_measurements" + */ + public function testPropertyNumberOfProcessedDailyMeasurements() + { + } + + /** + * Test attribute "number_of_raw_measurements" + */ + public function testPropertyNumberOfRawMeasurements() + { + } + + /** + * Test attribute "number_of_tracking_reminders" + */ + public function testPropertyNumberOfTrackingReminders() + { + } + + /** + * Test attribute "number_of_unique_daily_values" + */ + public function testPropertyNumberOfUniqueDailyValues() + { + } + + /** + * Test attribute "number_of_unique_values" + */ + public function testPropertyNumberOfUniqueValues() + { + } + + /** + * Test attribute "number_of_user_correlations_as_cause" + */ + public function testPropertyNumberOfUserCorrelationsAsCause() + { + } + + /** + * Test attribute "number_of_user_correlations_as_effect" + */ + public function testPropertyNumberOfUserCorrelationsAsEffect() + { + } + + /** + * Test attribute "number_of_user_variables" + */ + public function testPropertyNumberOfUserVariables() + { + } + + /** + * Test attribute "onset_delay" + */ + public function testPropertyOnsetDelay() + { + } + + /** + * Test attribute "onset_delay_in_hours" + */ + public function testPropertyOnsetDelayInHours() + { + } + + /** + * Test attribute "outcome" + */ + public function testPropertyOutcome() + { + } + + /** + * Test attribute "outcome_of_interest" + */ + public function testPropertyOutcomeOfInterest() + { + } + + /** + * Test attribute "parent" + */ + public function testPropertyParent() + { + } + + /** + * Test attribute "parent_id" + */ + public function testPropertyParentId() + { + } + + /** + * Test attribute "parent_user_tag_variables" + */ + public function testPropertyParentUserTagVariables() + { + } + + /** + * Test attribute "png_path" + */ + public function testPropertyPngPath() + { + } + + /** + * Test attribute "png_url" + */ + public function testPropertyPngUrl() + { + } + + /** + * Test attribute "predictor_of_interest" + */ + public function testPropertyPredictorOfInterest() + { + } + + /** + * Test attribute "price" + */ + public function testPropertyPrice() + { + } + + /** + * Test attribute "product_url" + */ + public function testPropertyProductUrl() + { + } + + /** + * Test attribute "public" + */ + public function testPropertyPublic() + { + } + + /** + * Test attribute "raw_measurements_at_last_analysis" + */ + public function testPropertyRawMeasurementsAtLastAnalysis() + { + } + + /** + * Test attribute "second_most_common_value" + */ + public function testPropertySecondMostCommonValue() + { + } + + /** + * Test attribute "second_to_last_value" + */ + public function testPropertySecondToLastValue() + { + } + + /** + * Test attribute "share_user_measurements" + */ + public function testPropertyShareUserMeasurements() + { + } + + /** + * Test attribute "skewness" + */ + public function testPropertySkewness() + { + } + + /** + * Test attribute "sources" + */ + public function testPropertySources() + { + } + + /** + * Test attribute "standard_deviation" + */ + public function testPropertyStandardDeviation() + { + } + + /** + * Test attribute "standard_deviation" + */ + public function testPropertyStandardDeviation() + { + } + + /** + * Test attribute "status" + */ + public function testPropertyStatus() + { + } + + /** + * Test attribute "subtitle" + */ + public function testPropertySubtitle() + { + } + + /** + * Test attribute "svg_url" + */ + public function testPropertySvgUrl() + { + } + + /** + * Test attribute "third_most_common_value" + */ + public function testPropertyThirdMostCommonValue() + { + } + + /** + * Test attribute "third_to_last_value" + */ + public function testPropertyThirdToLastValue() + { + } + + /** + * Test attribute "unit" + */ + public function testPropertyUnit() + { + } + + /** + * Test attribute "updated" + */ + public function testPropertyUpdated() + { + } + + /** + * Test attribute "updated_at" + */ + public function testPropertyUpdatedAt() + { + } + + /** + * Test attribute "updated_time" + */ + public function testPropertyUpdatedTime() + { + } + + /** + * Test attribute "user_id" + */ + public function testPropertyUserId() + { + } + + /** + * Test attribute "user_tagged_variables" + */ + public function testPropertyUserTaggedVariables() + { + } + + /** + * Test attribute "user_tag_variables" + */ + public function testPropertyUserTagVariables() + { + } + + /** + * Test attribute "user_variable_unit_abbreviated_name" + */ + public function testPropertyUserVariableUnitAbbreviatedName() + { + } + + /** + * Test attribute "user_variable_unit_category_id" + */ + public function testPropertyUserVariableUnitCategoryId() + { + } + + /** + * Test attribute "user_variable_unit_category_name" + */ + public function testPropertyUserVariableUnitCategoryName() + { + } + + /** + * Test attribute "user_variable_unit_id" + */ + public function testPropertyUserVariableUnitId() + { + } + + /** + * Test attribute "user_variable_unit_name" + */ + public function testPropertyUserVariableUnitName() + { + } + + /** + * Test attribute "user_variable_filling_value" + */ + public function testPropertyUserVariableFillingValue() + { + } + + /** + * Test attribute "user_variable_most_common_connector_id" + */ + public function testPropertyUserVariableMostCommonConnectorId() + { + } + + /** + * Test attribute "user_variable_updated_at" + */ + public function testPropertyUserVariableUpdatedAt() + { + } + + /** + * Test attribute "user_variable_valence" + */ + public function testPropertyUserVariableValence() + { + } + + /** + * Test attribute "user_variable_variable_category_id" + */ + public function testPropertyUserVariableVariableCategoryId() + { + } + + /** + * Test attribute "user_variable_variable_category_name" + */ + public function testPropertyUserVariableVariableCategoryName() + { + } + + /** + * Test attribute "user_variable_wikipedia_title" + */ + public function testPropertyUserVariableWikipediaTitle() + { + } + + /** + * Test attribute "valence" + */ + public function testPropertyValence() + { + } + + /** + * Test attribute "variable_category" + */ + public function testPropertyVariableCategory() + { + } + + /** + * Test attribute "variable_category_id" + */ + public function testPropertyVariableCategoryId() + { + } + + /** + * Test attribute "variable_category_image_url" + */ + public function testPropertyVariableCategoryImageUrl() + { + } + + /** + * Test attribute "variable_category_name" + */ + public function testPropertyVariableCategoryName() + { + } + + /** + * Test attribute "variable_filling_value" + */ + public function testPropertyVariableFillingValue() + { + } + + /** + * Test attribute "variable_id" + */ + public function testPropertyVariableId() + { + } + + /** + * Test attribute "variable_name" + */ + public function testPropertyVariableName() + { + } + + /** + * Test attribute "variance" + */ + public function testPropertyVariance() + { + } + + /** + * Test attribute "wikipedia_title" + */ + public function testPropertyWikipediaTitle() + { + } } diff --git a/test/Model/UserVariablesTest.php b/test/Model/UserVariablesTest.php deleted file mode 100644 index 2b40051..0000000 --- a/test/Model/UserVariablesTest.php +++ /dev/null @@ -1,173 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * UserVariablesTest Class Doc Comment - * - * @category Class */ -// * @description UserVariables -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class UserVariablesTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "UserVariables" - */ - public function testUserVariables() - { - - } - - /** - * Test attribute "user" - */ - public function testPropertyUser() - { - - } - - /** - * Test attribute "variable_id" - */ - public function testPropertyVariableId() - { - - } - - /** - * Test attribute "duration_of_action" - */ - public function testPropertyDurationOfAction() - { - - } - - /** - * Test attribute "filling_value" - */ - public function testPropertyFillingValue() - { - - } - - /** - * Test attribute "join_with" - */ - public function testPropertyJoinWith() - { - - } - - /** - * Test attribute "maximum_allowed_value" - */ - public function testPropertyMaximumAllowedValue() - { - - } - - /** - * Test attribute "minimum_allowed_value" - */ - public function testPropertyMinimumAllowedValue() - { - - } - - /** - * Test attribute "onset_delay" - */ - public function testPropertyOnsetDelay() - { - - } - - /** - * Test attribute "experiment_start_time" - */ - public function testPropertyExperimentStartTime() - { - - } - - /** - * Test attribute "experiment_end_time" - */ - public function testPropertyExperimentEndTime() - { - - } - - /** - * Test attribute "alias" - */ - public function testPropertyAlias() - { - - } - -} diff --git a/test/Model/ValueObjectTest.php b/test/Model/ValueObjectTest.php deleted file mode 100644 index 007f57c..0000000 --- a/test/Model/ValueObjectTest.php +++ /dev/null @@ -1,109 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * ValueObjectTest Class Doc Comment - * - * @category Class */ -// * @description ValueObject -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class ValueObjectTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "ValueObject" - */ - public function testValueObject() - { - - } - - /** - * Test attribute "timestamp" - */ - public function testPropertyTimestamp() - { - - } - - /** - * Test attribute "value" - */ - public function testPropertyValue() - { - - } - - /** - * Test attribute "note" - */ - public function testPropertyNote() - { - - } - -} diff --git a/test/Model/VariableCategoryArrayTest.php b/test/Model/VariableCategoryArrayTest.php new file mode 100644 index 0000000..23212d4 --- /dev/null +++ b/test/Model/VariableCategoryArrayTest.php @@ -0,0 +1,79 @@ +. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class VariableCategoryTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,7 +75,125 @@ public static function tearDownAfterClass() */ public function testVariableCategory() { + } + + /** + * Test attribute "app_type" + */ + public function testPropertyAppType() + { + } + + /** + * Test attribute "cause_only" + */ + public function testPropertyCauseOnly() + { + } + + /** + * Test attribute "combination_operation" + */ + public function testPropertyCombinationOperation() + { + } + + /** + * Test attribute "created_time" + */ + public function testPropertyCreatedTime() + { + } + + /** + * Test attribute "unit_abbreviated_name" + */ + public function testPropertyUnitAbbreviatedName() + { + } + /** + * Test attribute "unit_id" + */ + public function testPropertyUnitId() + { + } + + /** + * Test attribute "duration_of_action" + */ + public function testPropertyDurationOfAction() + { + } + + /** + * Test attribute "filling_value" + */ + public function testPropertyFillingValue() + { + } + + /** + * Test attribute "help_text" + */ + public function testPropertyHelpText() + { + } + + /** + * Test attribute "id" + */ + public function testPropertyId() + { + } + + /** + * Test attribute "image_url" + */ + public function testPropertyImageUrl() + { + } + + /** + * Test attribute "ion_icon" + */ + public function testPropertyIonIcon() + { + } + + /** + * Test attribute "manual_tracking" + */ + public function testPropertyManualTracking() + { + } + + /** + * Test attribute "maximum_allowed_value" + */ + public function testPropertyMaximumAllowedValue() + { + } + + /** + * Test attribute "measurement_synonym_singular_lowercase" + */ + public function testPropertyMeasurementSynonymSingularLowercase() + { + } + + /** + * Test attribute "minimum_allowed_value" + */ + public function testPropertyMinimumAllowedValue() + { + } + + /** + * Test attribute "more_info" + */ + public function testPropertyMoreInfo() + { } /** @@ -87,7 +201,82 @@ public function testVariableCategory() */ public function testPropertyName() { + } + + /** + * Test attribute "onset_delay" + */ + public function testPropertyOnsetDelay() + { + } + + /** + * Test attribute "outcome" + */ + public function testPropertyOutcome() + { + } + + /** + * Test attribute "png_path" + */ + public function testPropertyPngPath() + { + } + + /** + * Test attribute "png_url" + */ + public function testPropertyPngUrl() + { + } + + /** + * Test attribute "public" + */ + public function testPropertyPublic() + { + } + + /** + * Test attribute "svg_path" + */ + public function testPropertySvgPath() + { + } + /** + * Test attribute "svg_url" + */ + public function testPropertySvgUrl() + { } + /** + * Test attribute "updated" + */ + public function testPropertyUpdated() + { + } + + /** + * Test attribute "updated_time" + */ + public function testPropertyUpdatedTime() + { + } + + /** + * Test attribute "variable_category_name" + */ + public function testPropertyVariableCategoryName() + { + } + + /** + * Test attribute "variable_category_name_singular" + */ + public function testPropertyVariableCategoryNameSingular() + { + } } diff --git a/test/Model/VariableNewTest.php b/test/Model/VariableNewTest.php deleted file mode 100644 index e4575cf..0000000 --- a/test/Model/VariableNewTest.php +++ /dev/null @@ -1,125 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * VariableNewTest Class Doc Comment - * - * @category Class */ -// * @description VariableNew -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class VariableNewTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "VariableNew" - */ - public function testVariableNew() - { - - } - - /** - * Test attribute "name" - */ - public function testPropertyName() - { - - } - - /** - * Test attribute "category" - */ - public function testPropertyCategory() - { - - } - - /** - * Test attribute "unit" - */ - public function testPropertyUnit() - { - - } - - /** - * Test attribute "combination_operation" - */ - public function testPropertyCombinationOperation() - { - - } - - /** - * Test attribute "parent" - */ - public function testPropertyParent() - { - - } - -} diff --git a/test/Model/VariableTest.php b/test/Model/VariableTest.php deleted file mode 100644 index 2158e62..0000000 --- a/test/Model/VariableTest.php +++ /dev/null @@ -1,341 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * VariableTest Class Doc Comment - * - * @category Class */ -// * @description Variable -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class VariableTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "Variable" - */ - public function testVariable() - { - - } - - /** - * Test attribute "id" - */ - public function testPropertyId() - { - - } - - /** - * Test attribute "name" - */ - public function testPropertyName() - { - - } - - /** - * Test attribute "original_name" - */ - public function testPropertyOriginalName() - { - - } - - /** - * Test attribute "category" - */ - public function testPropertyCategory() - { - - } - - /** - * Test attribute "abbreviated_unit_name" - */ - public function testPropertyAbbreviatedUnitName() - { - - } - - /** - * Test attribute "abbreviated_unit_id" - */ - public function testPropertyAbbreviatedUnitId() - { - - } - - /** - * Test attribute "sources" - */ - public function testPropertySources() - { - - } - - /** - * Test attribute "minimum_allowed_value" - */ - public function testPropertyMinimumAllowedValue() - { - - } - - /** - * Test attribute "maximum_allowed_value" - */ - public function testPropertyMaximumAllowedValue() - { - - } - - /** - * Test attribute "combination_operation" - */ - public function testPropertyCombinationOperation() - { - - } - - /** - * Test attribute "filling_value" - */ - public function testPropertyFillingValue() - { - - } - - /** - * Test attribute "join_with" - */ - public function testPropertyJoinWith() - { - - } - - /** - * Test attribute "joined_variables" - */ - public function testPropertyJoinedVariables() - { - - } - - /** - * Test attribute "parent" - */ - public function testPropertyParent() - { - - } - - /** - * Test attribute "sub_variables" - */ - public function testPropertySubVariables() - { - - } - - /** - * Test attribute "onset_delay" - */ - public function testPropertyOnsetDelay() - { - - } - - /** - * Test attribute "duration_of_action" - */ - public function testPropertyDurationOfAction() - { - - } - - /** - * Test attribute "earliest_measurement_time" - */ - public function testPropertyEarliestMeasurementTime() - { - - } - - /** - * Test attribute "latest_measurement_time" - */ - public function testPropertyLatestMeasurementTime() - { - - } - - /** - * Test attribute "updated" - */ - public function testPropertyUpdated() - { - - } - - /** - * Test attribute "cause_only" - */ - public function testPropertyCauseOnly() - { - - } - - /** - * Test attribute "number_of_correlations" - */ - public function testPropertyNumberOfCorrelations() - { - - } - - /** - * Test attribute "outcome" - */ - public function testPropertyOutcome() - { - - } - - /** - * Test attribute "raw_measurements_at_last_analysis" - */ - public function testPropertyRawMeasurementsAtLastAnalysis() - { - - } - - /** - * Test attribute "number_of_raw_measurements" - */ - public function testPropertyNumberOfRawMeasurements() - { - - } - - /** - * Test attribute "last_unit" - */ - public function testPropertyLastUnit() - { - - } - - /** - * Test attribute "last_value" - */ - public function testPropertyLastValue() - { - - } - - /** - * Test attribute "most_common_value" - */ - public function testPropertyMostCommonValue() - { - - } - - /** - * Test attribute "most_common_unit" - */ - public function testPropertyMostCommonUnit() - { - - } - - /** - * Test attribute "last_source" - */ - public function testPropertyLastSource() - { - - } - - /** - * Test attribute "image_url" - */ - public function testPropertyImageUrl() - { - - } - - /** - * Test attribute "ion_icon" - */ - public function testPropertyIonIcon() - { - - } - -} diff --git a/test/Model/VariableUserSourceTest.php b/test/Model/VariableUserSourceTest.php deleted file mode 100644 index fab19a0..0000000 --- a/test/Model/VariableUserSourceTest.php +++ /dev/null @@ -1,149 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * VariableUserSourceTest Class Doc Comment - * - * @category Class */ -// * @description VariableUserSource -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class VariableUserSourceTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "VariableUserSource" - */ - public function testVariableUserSource() - { - - } - - /** - * Test attribute "user_id" - */ - public function testPropertyUserId() - { - - } - - /** - * Test attribute "variable_id" - */ - public function testPropertyVariableId() - { - - } - - /** - * Test attribute "source_name" - */ - public function testPropertySourceName() - { - - } - - /** - * Test attribute "timestamp" - */ - public function testPropertyTimestamp() - { - - } - - /** - * Test attribute "earliest_measurement_time" - */ - public function testPropertyEarliestMeasurementTime() - { - - } - - /** - * Test attribute "latest_measurement_time" - */ - public function testPropertyLatestMeasurementTime() - { - - } - - /** - * Test attribute "created_at" - */ - public function testPropertyCreatedAt() - { - - } - - /** - * Test attribute "updated_at" - */ - public function testPropertyUpdatedAt() - { - - } - -} diff --git a/test/Model/VariablesNewTest.php b/test/Model/VariablesNewTest.php deleted file mode 100644 index b00807f..0000000 --- a/test/Model/VariablesNewTest.php +++ /dev/null @@ -1,85 +0,0 @@ -. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

- * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - */ - -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Please update the test case below to test the model. - */ - -namespace QuantiModo\Client; - -/** - * VariablesNewTest Class Doc Comment - * - * @category Class */ -// * @description New variables -/** - * @package QuantiModo\Client - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class VariablesNewTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass() - { - - } - - /** - * Setup before running each test case - */ - public function setUp() - { - - } - - /** - * Clean up after running each test case - */ - public function tearDown() - { - - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass() - { - - } - - /** - * Test "VariablesNew" - */ - public function testVariablesNew() - { - - } - -} diff --git a/test/Model/VoteDeleteTest.php b/test/Model/VoteDeleteTest.php index a1b3c74..d178397 100644 --- a/test/Model/VoteDeleteTest.php +++ b/test/Model/VoteDeleteTest.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class VoteDeleteTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,7 +75,6 @@ public static function tearDownAfterClass() */ public function testVoteDelete() { - } /** @@ -87,7 +82,6 @@ public function testVoteDelete() */ public function testPropertyCause() { - } /** @@ -95,7 +89,5 @@ public function testPropertyCause() */ public function testPropertyEffect() { - } - } diff --git a/test/Model/VoteTest.php b/test/Model/VoteTest.php index b524f09..91dc8d1 100644 --- a/test/Model/VoteTest.php +++ b/test/Model/VoteTest.php @@ -11,11 +11,11 @@ */ /** - * QuantiModo + * quantimodo * - * Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at . Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API:
Parameter Description
limit The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.
offset Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.
sort Sort by given field. If the field is prefixed with '-', it will sort in descending order.
### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)"2013-01-D01T01:01:01"` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters:
**Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `()` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21`

**Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43`

**Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%`

**Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`
`?value=!42,43` `//filter records with value not greater than 21`
`?value=!(ge)21`

**Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3
`?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778
`?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`

+ * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do). * - * OpenAPI spec version: 2.0 + * OpenAPI spec version: 5.8.100414 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -47,7 +47,6 @@ class VoteTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -55,7 +54,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -63,7 +61,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -71,7 +68,6 @@ public function tearDown() */ public static function tearDownAfterClass() { - } /** @@ -79,15 +75,13 @@ public static function tearDownAfterClass() */ public function testVote() { - } /** - * Test attribute "id" + * Test attribute "cause_variable_id" */ - public function testPropertyId() + public function testPropertyCauseVariableId() { - } /** @@ -95,55 +89,47 @@ public function testPropertyId() */ public function testPropertyClientId() { - } /** - * Test attribute "user_id" + * Test attribute "created_at" */ - public function testPropertyUserId() + public function testPropertyCreatedAt() { - } /** - * Test attribute "cause_id" + * Test attribute "effect_variable_id" */ - public function testPropertyCauseId() + public function testPropertyEffectVariableId() { - } /** - * Test attribute "effect_id" + * Test attribute "id" */ - public function testPropertyEffectId() + public function testPropertyId() { - } /** - * Test attribute "value" + * Test attribute "updated_at" */ - public function testPropertyValue() + public function testPropertyUpdatedAt() { - } /** - * Test attribute "created_at" + * Test attribute "user_id" */ - public function testPropertyCreatedAt() + public function testPropertyUserId() { - } /** - * Test attribute "updated_at" + * Test attribute "value" */ - public function testPropertyUpdatedAt() + public function testPropertyValue() { - } - } diff --git a/test/Model/XAxiTest.php b/test/Model/XAxiTest.php new file mode 100644 index 0000000..3d5b9bc --- /dev/null +++ b/test/Model/XAxiTest.php @@ -0,0 +1,121 @@ +