-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
6,616 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
library api; | ||
|
||
import 'dart:async'; | ||
import 'dart:convert'; | ||
import 'dart:html'; | ||
import 'package:http/browser_client.dart'; | ||
import 'package:http/http.dart'; | ||
import 'package:dartson/dartson.dart'; | ||
import 'package:crypto/crypto.dart'; | ||
import 'package:intl/intl.dart'; | ||
|
||
part 'api_client.dart'; | ||
part 'api_exception.dart'; | ||
part 'auth/authentication.dart'; | ||
part 'auth/api_key_auth.dart'; | ||
part 'auth/oauth.dart'; | ||
part 'auth/http_basic_auth.dart'; | ||
|
||
part 'api/variableUserSource_api.dart'; | ||
part 'api/measurement_api.dart'; | ||
part 'api/variable_api.dart'; | ||
part 'api/update_api.dart'; | ||
part 'api/aggregatedCorrelation_api.dart'; | ||
part 'api/connector_api.dart'; | ||
part 'api/correlation_api.dart'; | ||
part 'api/connection_api.dart'; | ||
part 'api/unit_api.dart'; | ||
part 'api/userVariable_api.dart'; | ||
part 'api/source_api.dart'; | ||
part 'api/variableCategory_api.dart'; | ||
part 'api/credential_api.dart'; | ||
part 'api/unitCategory_api.dart'; | ||
part 'api/vote_api.dart'; | ||
|
||
part 'model/measurementValue.dart'; | ||
part 'model/measurementPost.dart'; | ||
part 'model/aggregatedCorrelation.dart'; | ||
part 'model/connection.dart'; | ||
part 'model/connector.dart'; | ||
part 'model/correlation.dart'; | ||
part 'model/credential.dart'; | ||
part 'model/measurement.dart'; | ||
part 'model/measurementExport.dart'; | ||
part 'model/source.dart'; | ||
part 'model/unit.dart'; | ||
part 'model/unitCategory.dart'; | ||
part 'model/unitConversion.dart'; | ||
part 'model/update.dart'; | ||
part 'model/userVariable.dart'; | ||
part 'model/variable.dart'; | ||
part 'model/variableCategory.dart'; | ||
part 'model/variableUserSource.dart'; | ||
part 'model/vote.dart'; | ||
part 'model/inlineResponse200.dart'; | ||
part 'model/inlineResponse2001.dart'; | ||
part 'model/inlineResponse2002.dart'; | ||
part 'model/inlineResponse2003.dart'; | ||
part 'model/inlineResponse2004.dart'; | ||
part 'model/inlineResponse2005.dart'; | ||
part 'model/inlineResponse2006.dart'; | ||
part 'model/inlineResponse2007.dart'; | ||
part 'model/inlineResponse2008.dart'; | ||
part 'model/inlineResponse2009.dart'; | ||
part 'model/inlineResponse20010.dart'; | ||
part 'model/inlineResponse20011.dart'; | ||
part 'model/inlineResponse20012.dart'; | ||
part 'model/inlineResponse20013.dart'; | ||
part 'model/inlineResponse20014.dart'; | ||
part 'model/inlineResponse20015.dart'; | ||
part 'model/inlineResponse20016.dart'; | ||
part 'model/inlineResponse20017.dart'; | ||
part 'model/inlineResponse20018.dart'; | ||
part 'model/inlineResponse20019.dart'; | ||
part 'model/inlineResponse20020.dart'; | ||
part 'model/inlineResponse20021.dart'; | ||
part 'model/inlineResponse20022.dart'; | ||
part 'model/inlineResponse20023.dart'; | ||
part 'model/inlineResponse20024.dart'; | ||
part 'model/inlineResponse20025.dart'; | ||
part 'model/inlineResponse20026.dart'; | ||
part 'model/inlineResponse20027.dart'; | ||
part 'model/inlineResponse20028.dart'; | ||
part 'model/inlineResponse20029.dart'; | ||
part 'model/inlineResponse20030.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,301 @@ | ||
part of api; | ||
|
||
|
||
class AggregatedCorrelationApi { | ||
String basePath = "https://app.quantimo.do/api/v2"; | ||
ApiClient apiClient = ApiClient.defaultApiClient; | ||
|
||
AggregatedCorrelationApi([ApiClient apiClient]) { | ||
if (apiClient != null) { | ||
this.apiClient = apiClient; | ||
} | ||
} | ||
|
||
|
||
/// Get all AggregatedCorrelations | ||
/// | ||
/// Get all AggregatedCorrelations | ||
Future<InlineResponse200> aggregatedCorrelationsGet(Number correlation, int causeId, int effectId, int onsetDelay, int durationOfAction, int numberOfPairs, Number valuePredictingHighOutcome, Number valuePredictingLowOutcome, Number optimalPearsonProduct, Number vote, int numberOfUsers, int numberOfCorrelations, Number statisticalSignificance, String causeUnit, int causeUnitId, int causeChanges, int effectChanges, Number aggregateQmScore, String createdAt, String updatedAt, String status, String errorMessage, String lastSuccessfulUpdateTime, Number reversePearsonCorrelationCoefficient, Number predictivePearsonCorrelationCoefficient, int limit, int offset, String sort) { | ||
Object postBody = null; | ||
|
||
|
||
// create path and map variables | ||
String path = "/aggregatedCorrelations".replaceAll("{format}","json"); | ||
|
||
// query params | ||
Map<String, String> queryParams = {}; | ||
Map<String, String> headerParams = {}; | ||
Map<String, String> formParams = {}; | ||
if("null" != correlation) | ||
queryParams["correlation"] = correlation is List ? correlation.join(',') : correlation; | ||
if("null" != causeId) | ||
queryParams["cause_id"] = causeId is List ? causeId.join(',') : causeId; | ||
if("null" != effectId) | ||
queryParams["effect_id"] = effectId is List ? effectId.join(',') : effectId; | ||
if("null" != onsetDelay) | ||
queryParams["onset_delay"] = onsetDelay is List ? onsetDelay.join(',') : onsetDelay; | ||
if("null" != durationOfAction) | ||
queryParams["duration_of_action"] = durationOfAction is List ? durationOfAction.join(',') : durationOfAction; | ||
if("null" != numberOfPairs) | ||
queryParams["number_of_pairs"] = numberOfPairs is List ? numberOfPairs.join(',') : numberOfPairs; | ||
if("null" != valuePredictingHighOutcome) | ||
queryParams["value_predicting_high_outcome"] = valuePredictingHighOutcome is List ? valuePredictingHighOutcome.join(',') : valuePredictingHighOutcome; | ||
if("null" != valuePredictingLowOutcome) | ||
queryParams["value_predicting_low_outcome"] = valuePredictingLowOutcome is List ? valuePredictingLowOutcome.join(',') : valuePredictingLowOutcome; | ||
if("null" != optimalPearsonProduct) | ||
queryParams["optimal_pearson_product"] = optimalPearsonProduct is List ? optimalPearsonProduct.join(',') : optimalPearsonProduct; | ||
if("null" != vote) | ||
queryParams["vote"] = vote is List ? vote.join(',') : vote; | ||
if("null" != numberOfUsers) | ||
queryParams["number_of_users"] = numberOfUsers is List ? numberOfUsers.join(',') : numberOfUsers; | ||
if("null" != numberOfCorrelations) | ||
queryParams["number_of_correlations"] = numberOfCorrelations is List ? numberOfCorrelations.join(',') : numberOfCorrelations; | ||
if("null" != statisticalSignificance) | ||
queryParams["statistical_significance"] = statisticalSignificance is List ? statisticalSignificance.join(',') : statisticalSignificance; | ||
if("null" != causeUnit) | ||
queryParams["cause_unit"] = causeUnit is List ? causeUnit.join(',') : causeUnit; | ||
if("null" != causeUnitId) | ||
queryParams["cause_unit_id"] = causeUnitId is List ? causeUnitId.join(',') : causeUnitId; | ||
if("null" != causeChanges) | ||
queryParams["cause_changes"] = causeChanges is List ? causeChanges.join(',') : causeChanges; | ||
if("null" != effectChanges) | ||
queryParams["effect_changes"] = effectChanges is List ? effectChanges.join(',') : effectChanges; | ||
if("null" != aggregateQmScore) | ||
queryParams["aggregate_qm_score"] = aggregateQmScore is List ? aggregateQmScore.join(',') : aggregateQmScore; | ||
if("null" != createdAt) | ||
queryParams["created_at"] = createdAt is List ? createdAt.join(',') : createdAt; | ||
if("null" != updatedAt) | ||
queryParams["updated_at"] = updatedAt is List ? updatedAt.join(',') : updatedAt; | ||
if("null" != status) | ||
queryParams["status"] = status is List ? status.join(',') : status; | ||
if("null" != errorMessage) | ||
queryParams["error_message"] = errorMessage is List ? errorMessage.join(',') : errorMessage; | ||
if("null" != lastSuccessfulUpdateTime) | ||
queryParams["last_successful_update_time"] = lastSuccessfulUpdateTime is List ? lastSuccessfulUpdateTime.join(',') : lastSuccessfulUpdateTime; | ||
if("null" != reversePearsonCorrelationCoefficient) | ||
queryParams["reverse_pearson_correlation_coefficient"] = reversePearsonCorrelationCoefficient is List ? reversePearsonCorrelationCoefficient.join(',') : reversePearsonCorrelationCoefficient; | ||
if("null" != predictivePearsonCorrelationCoefficient) | ||
queryParams["predictive_pearson_correlation_coefficient"] = predictivePearsonCorrelationCoefficient is List ? predictivePearsonCorrelationCoefficient.join(',') : predictivePearsonCorrelationCoefficient; | ||
if("null" != limit) | ||
queryParams["limit"] = limit is List ? limit.join(',') : limit; | ||
if("null" != offset) | ||
queryParams["offset"] = offset is List ? offset.join(',') : offset; | ||
if("null" != sort) | ||
queryParams["sort"] = sort is List ? sort.join(',') : sort; | ||
|
||
|
||
|
||
List<String> contentTypes = ["application/json"]; | ||
|
||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; | ||
List<String> authNames = []; | ||
|
||
if(contentType.startsWith("multipart/form-data")) { | ||
bool hasFields = false; | ||
MultipartRequest mp = new MultipartRequest(null, null); | ||
|
||
if(hasFields) | ||
postBody = mp; | ||
} | ||
else { | ||
|
||
} | ||
|
||
return apiClient.invokeAPI(basePath, path, 'GET', queryParams, postBody, headerParams, formParams, contentType, authNames).then((response) { | ||
if(response.statusCode >= 400) { | ||
throw new ApiException(response.statusCode, response.body); | ||
} | ||
else if(response.body != null){ | ||
return ApiClient.deserialize(response.body, InlineResponse200); | ||
} | ||
else { | ||
return null; | ||
} | ||
}); | ||
} | ||
|
||
/// Store AggregatedCorrelation | ||
/// | ||
/// Store AggregatedCorrelation | ||
Future<InlineResponse2001> aggregatedCorrelationsPost(AggregatedCorrelation body) { | ||
Object postBody = body; | ||
|
||
|
||
// create path and map variables | ||
String path = "/aggregatedCorrelations".replaceAll("{format}","json"); | ||
|
||
// query params | ||
Map<String, String> queryParams = {}; | ||
Map<String, String> headerParams = {}; | ||
Map<String, String> formParams = {}; | ||
|
||
|
||
|
||
List<String> contentTypes = ["application/json"]; | ||
|
||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; | ||
List<String> authNames = []; | ||
|
||
if(contentType.startsWith("multipart/form-data")) { | ||
bool hasFields = false; | ||
MultipartRequest mp = new MultipartRequest(null, null); | ||
|
||
if(hasFields) | ||
postBody = mp; | ||
} | ||
else { | ||
|
||
} | ||
|
||
return apiClient.invokeAPI(basePath, path, 'POST', queryParams, postBody, headerParams, formParams, contentType, authNames).then((response) { | ||
if(response.statusCode >= 400) { | ||
throw new ApiException(response.statusCode, response.body); | ||
} | ||
else if(response.body != null){ | ||
return ApiClient.deserialize(response.body, InlineResponse2001); | ||
} | ||
else { | ||
return null; | ||
} | ||
}); | ||
} | ||
|
||
/// Get AggregatedCorrelation | ||
/// | ||
/// Get AggregatedCorrelation | ||
Future<InlineResponse2001> aggregatedCorrelationsIdGet(int id) { | ||
Object postBody = null; | ||
|
||
|
||
// create path and map variables | ||
String path = "/aggregatedCorrelations/{id}".replaceAll("{format}","json").replaceAll("{" + "id" + "}", id.toString()); | ||
|
||
// query params | ||
Map<String, String> queryParams = {}; | ||
Map<String, String> headerParams = {}; | ||
Map<String, String> formParams = {}; | ||
|
||
|
||
|
||
List<String> contentTypes = ["application/json"]; | ||
|
||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; | ||
List<String> authNames = []; | ||
|
||
if(contentType.startsWith("multipart/form-data")) { | ||
bool hasFields = false; | ||
MultipartRequest mp = new MultipartRequest(null, null); | ||
|
||
if(hasFields) | ||
postBody = mp; | ||
} | ||
else { | ||
|
||
} | ||
|
||
return apiClient.invokeAPI(basePath, path, 'GET', queryParams, postBody, headerParams, formParams, contentType, authNames).then((response) { | ||
if(response.statusCode >= 400) { | ||
throw new ApiException(response.statusCode, response.body); | ||
} | ||
else if(response.body != null){ | ||
return ApiClient.deserialize(response.body, InlineResponse2001); | ||
} | ||
else { | ||
return null; | ||
} | ||
}); | ||
} | ||
|
||
/// Update AggregatedCorrelation | ||
/// | ||
/// Update AggregatedCorrelation | ||
Future<InlineResponse2002> aggregatedCorrelationsIdPut(int id, AggregatedCorrelation body) { | ||
Object postBody = body; | ||
|
||
|
||
// create path and map variables | ||
String path = "/aggregatedCorrelations/{id}".replaceAll("{format}","json").replaceAll("{" + "id" + "}", id.toString()); | ||
|
||
// query params | ||
Map<String, String> queryParams = {}; | ||
Map<String, String> headerParams = {}; | ||
Map<String, String> formParams = {}; | ||
|
||
|
||
|
||
List<String> contentTypes = ["application/json"]; | ||
|
||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; | ||
List<String> authNames = []; | ||
|
||
if(contentType.startsWith("multipart/form-data")) { | ||
bool hasFields = false; | ||
MultipartRequest mp = new MultipartRequest(null, null); | ||
|
||
if(hasFields) | ||
postBody = mp; | ||
} | ||
else { | ||
|
||
} | ||
|
||
return apiClient.invokeAPI(basePath, path, 'PUT', queryParams, postBody, headerParams, formParams, contentType, authNames).then((response) { | ||
if(response.statusCode >= 400) { | ||
throw new ApiException(response.statusCode, response.body); | ||
} | ||
else if(response.body != null){ | ||
return ApiClient.deserialize(response.body, InlineResponse2002); | ||
} | ||
else { | ||
return null; | ||
} | ||
}); | ||
} | ||
|
||
/// Delete AggregatedCorrelation | ||
/// | ||
/// Delete AggregatedCorrelation | ||
Future<InlineResponse2002> aggregatedCorrelationsIdDelete(int id) { | ||
Object postBody = null; | ||
|
||
|
||
// create path and map variables | ||
String path = "/aggregatedCorrelations/{id}".replaceAll("{format}","json").replaceAll("{" + "id" + "}", id.toString()); | ||
|
||
// query params | ||
Map<String, String> queryParams = {}; | ||
Map<String, String> headerParams = {}; | ||
Map<String, String> formParams = {}; | ||
|
||
|
||
|
||
List<String> contentTypes = ["application/json"]; | ||
|
||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; | ||
List<String> authNames = []; | ||
|
||
if(contentType.startsWith("multipart/form-data")) { | ||
bool hasFields = false; | ||
MultipartRequest mp = new MultipartRequest(null, null); | ||
|
||
if(hasFields) | ||
postBody = mp; | ||
} | ||
else { | ||
|
||
} | ||
|
||
return apiClient.invokeAPI(basePath, path, 'DELETE', queryParams, postBody, headerParams, formParams, contentType, authNames).then((response) { | ||
if(response.statusCode >= 400) { | ||
throw new ApiException(response.statusCode, response.body); | ||
} | ||
else if(response.body != null){ | ||
return ApiClient.deserialize(response.body, InlineResponse2002); | ||
} | ||
else { | ||
return null; | ||
} | ||
}); | ||
} | ||
|
||
} |
Oops, something went wrong.