Download the PHP package cure-dao/cure-dao-sdk-php without Composer
On this page you can find all versions of the php package cure-dao/cure-dao-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cure-dao-sdk-php
CureDAO API SDK for PHP
We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our docs and SDKs or contact us.
Requirements
PHP 7.2 and up
Installation & Usage
Install Composer and run
Then run composer install
Getting Started
Create a .env file in the root directory of your project.
Create your API Client Application at https://curedao.org/api-clients.
Copy the client_id
and client_secret
you receive into the .env file.
Add the following lines to your .env file:
How to Analyze the Relationship Between a Pair of Variables
The request below returns the analysis results, the HTML used in the studies, and an array of Highcharts configurations. The chart configs could be transformed to work with other charting libraries as well.
Example Response from analyze()
Tests
To run the unit tests:
Documentation for API Endpoints
All URIs are relative to https://v7.curedao.org/api | Class | Method | HTTP request | Description |
---|---|---|---|---|
AnalyticsApi | getCorrelationExplanations | GET /v3/correlations/explanations | Get correlation explanations | |
AnalyticsApi | getCorrelations | GET /v3/correlations | Get correlations | |
AppSettingsApi | getAppSettings | GET /v3/appSettings | Get client app settings | |
AuthenticationApi | getAccessToken | GET /v3/oauth2/token | Get a user access token | |
AuthenticationApi | getOauthAuthorizationCode | GET /v3/oauth2/authorize | Request Authorization Code | |
AuthenticationApi | postGoogleIdToken | POST /v3/googleIdToken | Post GoogleIdToken | |
ConnectorsApi | connectConnector | GET /v3/connectors/{connectorName}/connect | Obtain a token from 3rd party data source | |
ConnectorsApi | disconnectConnector | GET /v3/connectors/{connectorName}/disconnect | Delete stored connection info | |
ConnectorsApi | getConnectors | GET /v3/connectors/list | List of Connectors | |
ConnectorsApi | getIntegrationJs | GET /v3/integration.js | Get embeddable connect javascript | |
ConnectorsApi | getMobileConnectPage | GET /v3/connect/mobile | Mobile connect page | |
ConnectorsApi | updateConnector | GET /v3/connectors/{connectorName}/update | Sync with data source | |
FeedApi | getFeed | GET /v3/feed | Tracking reminder notifications, messages, and study results | |
FeedApi | postFeed | POST /v3/feed | Post user interactions with feed | |
MeasurementsApi | deleteMeasurement | DELETE /v3/measurements/delete | Delete a measurement | |
MeasurementsApi | getMeasurements | GET /v3/measurements | Get measurements for this user | |
MeasurementsApi | getPairs | GET /v3/pairs | Get pairs of measurements for correlational analysis | |
MeasurementsApi | measurementExportRequest | POST /v2/measurements/exportRequest | Post Request for Measurements CSV | |
MeasurementsApi | postMeasurements | POST /v3/measurements/post | Post a new set or update existing measurements to the database | |
MeasurementsApi | updateMeasurement | POST /v3/measurements/update | Update a measurement | |
NotificationsApi | getNotificationPreferences | GET /v3/notificationPreferences | Get NotificationPreferences | |
NotificationsApi | getNotifications | GET /v3/notifications | Get Notifications | |
NotificationsApi | postDeviceToken | POST /v3/deviceTokens | Post DeviceTokens | |
NotificationsApi | postNotifications | POST /v3/notifications | Post Notifications | |
RemindersApi | deleteTrackingReminder | DELETE /v3/trackingReminders/delete | Delete Tracking Reminder | |
RemindersApi | getTrackingReminderNotifications | GET /v3/trackingReminderNotifications | Get specific tracking reminder notifications | |
RemindersApi | getTrackingReminders | GET /v3/trackingReminders | Get repeating tracking reminder settings | |
RemindersApi | postTrackingReminderNotifications | POST /v3/trackingReminderNotifications | Snooze, skip, or track a tracking reminder notification | |
RemindersApi | postTrackingReminders | POST /v3/trackingReminders | Store a Tracking Reminder | |
SharesApi | deleteShare | POST /v3/shares/delete | Delete share | |
SharesApi | getShares | GET /v3/shares | Get Authorized Apps, Studies, and Individuals | |
SharesApi | inviteShare | POST /v3/shares/invite | Delete share | |
StudiesApi | createStudy | POST /v3/study/create | Create a Study | |
StudiesApi | deleteVote | DELETE /v3/votes/delete | Delete vote | |
StudiesApi | getOpenStudies | GET /v3/studies/open | These are open studies that anyone can join | |
StudiesApi | getStudies | GET /v3/studies | Get Personal or Population Studies | |
StudiesApi | getStudiesCreated | GET /v3/studies/created | Get studies you have created | |
StudiesApi | getStudiesJoined | GET /v3/studies/joined | Studies You Have Joined | |
StudiesApi | getStudy | GET /v4/study | Get Study | |
StudiesApi | joinStudy | POST /v3/study/join | Join a Study | |
StudiesApi | postVote | POST /v3/votes | Post or update vote | |
StudiesApi | publishStudy | POST /v3/study/publish | Publish Your Study | |
UnitsApi | getUnitCategories | GET /v3/unitCategories | Get unit categories | |
UnitsApi | getUnits | GET /v3/units | Get units | |
UserApi | deleteUser | DELETE /v3/user/delete | Delete user | |
UserApi | getUser | GET /v3/user | Get user info | |
UserApi | getUserBlogs | GET /v3/userBlogs | Get UserBlogs | |
UserApi | postUserBlogs | POST /v3/userBlogs | Post UserBlogs | |
UserApi | postUserSettings | POST /v3/userSettings | Post UserSettings | |
VariablesApi | deleteUserTag | DELETE /v3/userTags/delete | Delete user tag or ingredient | |
VariablesApi | deleteUserVariable | DELETE /v3/userVariables/delete | Delete All Measurements For Variable | |
VariablesApi | getVariableCategories | GET /v3/variableCategories | Variable categories | |
VariablesApi | getVariables | GET /v3/variables | Get variables along with related user-specific analysis settings and statistics | |
VariablesApi | postUserTags | POST /v3/userTags | Post or update user tags or ingredients | |
VariablesApi | postUserVariables | POST /v3/variables | Update User Settings for a Variable | |
VariablesApi | resetUserVariableSettings | POST /v3/userVariables/reset | Reset user settings for a variable to defaults | |
Documentation For Models
- ActivitiesResponse
- Activity
- AppSettings
- AppSettingsResponse
- AuthorizedClients
- Button
- Card
- Chart
- CommonResponse
- ConnectInstructions
- ConversionStep
- Correlation
- DataSource
- DeviceToken
- Explanation
- ExplanationStartTracking
- FeedResponse
- GetConnectorsResponse
- GetCorrelationsDataResponse
- GetCorrelationsResponse
- GetSharesResponse
- GetStudiesResponse
- GetTrackingReminderNotificationsResponse
- Group
- GroupsMember
- GroupsMembersResponse
- GroupsResponse
- Image
- InputField
- JsonErrorResponse
- Measurement
- MeasurementDelete
- MeasurementItem
- MeasurementSet
- MeasurementUpdate
- Notification
- NotificationsResponse
- Pair
- ParticipantInstruction
- PostMeasurementsDataResponse
- PostMeasurementsResponse
- PostStudyCreateResponse
- PostStudyPublishResponse
- PostTrackingRemindersDataResponse
- PostTrackingRemindersResponse
- PostUserSettingsDataResponse
- PostUserSettingsResponse
- ShareInvitationBody
- Study
- StudyCharts
- StudyCreationBody
- StudyHtml
- StudyImages
- StudyJoinResponse
- StudyLinks
- StudySharing
- StudyText
- StudyVotes
- TrackingReminder
- TrackingReminderDelete
- TrackingReminderNotification
- TrackingReminderNotificationAction
- TrackingReminderNotificationPost
- TrackingReminderNotificationTrackAllAction
- Unit
- UnitCategory
- User
- UserBlog
- UserBlogsResponse
- UserTag
- UserVariableDelete
- Variable
- VariableCategory
- VariableCharts
- Vote
- VoteDelete
Documentation For Authorization
access_token
- Type: API key
- API key parameter name: access_token
- Location: URL query string
client_id
- Type: API key
- API key parameter name: clientId
- Location: URL query string
curedao_oauth2
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://v7.curedao.org/api/v2/oauth/authorize
- Scopes:
- basic: Allows you to read user info (display name, email, etc)
- readmeasurements: Allows one to read a user's measurements
- writemeasurements: Allows you to write user measurements
Author
All versions of cure-dao-sdk-php with dependencies
ext-curl Version *
ext-json Version *
ext-mbstring Version *
nategood/httpful Version ^0.3
vlucas/phpdotenv Version ^5
zircote/swagger-php Version *
icanboogie/inflector Version ^2
illuminate/collections Version ^8
pragmarx/ia-str Version ^7
json-mapper/json-mapper Version ^2
strikebit/json-to-php Version ^1