Manos Chorianopoulos

Telematics functionality with temporary ui

......@@ -7,7 +7,7 @@
<key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
</dict>
</dict>
......
......@@ -7,7 +7,7 @@
<key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
......
......@@ -118,6 +118,10 @@
- (void)updateRefreshTokenMA:(NSString*)access_token :(NSString*)refresh_token;
- (NSString*)getAccessTokenM;
- (long)getNetworkStatusM;
- (void)sendAccelerationDataAsync:(NSArray*)accelerationTimestamps :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
- (void)getTelematicsHistoryAsync:(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
- (void)getTripMetricsAsync:(NSNumber*)tripId :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
- (void)rateTripAsync:(NSNumber*)tripId :(NSNumber*)rating :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
@end
#endif /* MyApi_h */
......
......@@ -1820,6 +1820,58 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
}];
}
- (void)sendAccelerationDataAsync:(NSArray*)accelerationTimestamps :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure
{
[[Warply sharedService] sendAccelerationDataWithSuccessBlock:accelerationTimestamps :^(NSDictionary *response) {
if (success) {
success(response);
}
} failureBlock:^(NSError *error) {
if (failure) {
failure(error);
}
}];
}
- (void)getTelematicsHistoryAsync:(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure
{
[[Warply sharedService] getTelematicsHistoryWithSuccessBlock:^(NSDictionary *response) {
if (success) {
success(response);
}
} failureBlock:^(NSError *error) {
if (failure) {
failure(error);
}
}];
}
- (void)getTripMetricsAsync:(NSNumber*)tripId :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure
{
[[Warply sharedService] getTripMetricsWithSuccessBlock:tripId :^(NSDictionary *response) {
if (success) {
success(response);
}
} failureBlock:^(NSError *error) {
if (failure) {
failure(error);
}
}];
}
- (void)rateTripAsync:(NSNumber*)tripId :(NSNumber*)rating :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure
{
[[Warply sharedService] rateTripWithSuccessBlock:tripId :rating :^(NSDictionary *response) {
if (success) {
success(response);
}
} failureBlock:^(NSError *error) {
if (failure) {
failure(error);
}
}];
}
- (void) sendEvent: (NSString *) eventName priority: (BOOL) priority {
NSString *event_Name = eventName;
NSNumber *time_submitted = [NSNumber numberWithDouble:[[NSDate date] timeIntervalSince1970]];
......
......@@ -423,6 +423,14 @@ WL_VERSION_INTERFACE()
- (void)getSingleCampaignWithSuccessBlock:(NSString *)sessionUuid :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
- (void) sendAccelerationDataWithSuccessBlock:(NSArray*)accelerationTimestamps :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
- (void) getTelematicsHistoryWithSuccessBlock:(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
- (void) getTripMetricsWithSuccessBlock:(NSNumber*)tripId :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
- (void) rateTripWithSuccessBlock:(NSNumber*)tripId :(NSNumber*)rating :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
/*!
@abstract Get the full page add accordint to the display_type of a campaign.
@attributeblock successBlock This block is called when getInbox is sucessful and allOffers is empty or nil and returns an array with the available WLInboxItem items. Otherwise, the allOffers array is filtered.
......