Manos Chorianopoulos

Telematics functionality with temporary ui

...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key> 7 <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
8 <dict> 8 <dict>
9 <key>orderHint</key> 9 <key>orderHint</key>
10 - <integer>0</integer> 10 + <integer>1</integer>
11 </dict> 11 </dict>
12 </dict> 12 </dict>
13 </dict> 13 </dict>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key> 7 <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
8 <dict> 8 <dict>
9 <key>orderHint</key> 9 <key>orderHint</key>
10 - <integer>1</integer> 10 + <integer>0</integer>
11 </dict> 11 </dict>
12 </dict> 12 </dict>
13 </dict> 13 </dict>
......
...@@ -118,6 +118,10 @@ ...@@ -118,6 +118,10 @@
118 - (void)updateRefreshTokenMA:(NSString*)access_token :(NSString*)refresh_token; 118 - (void)updateRefreshTokenMA:(NSString*)access_token :(NSString*)refresh_token;
119 - (NSString*)getAccessTokenM; 119 - (NSString*)getAccessTokenM;
120 - (long)getNetworkStatusM; 120 - (long)getNetworkStatusM;
121 +- (void)sendAccelerationDataAsync:(NSArray*)accelerationTimestamps :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
122 +- (void)getTelematicsHistoryAsync:(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
123 +- (void)getTripMetricsAsync:(NSNumber*)tripId :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
124 +- (void)rateTripAsync:(NSNumber*)tripId :(NSNumber*)rating :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
121 125
122 @end 126 @end
123 #endif /* MyApi_h */ 127 #endif /* MyApi_h */
......
...@@ -1820,6 +1820,58 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; ...@@ -1820,6 +1820,58 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
1820 }]; 1820 }];
1821 } 1821 }
1822 1822
1823 +- (void)sendAccelerationDataAsync:(NSArray*)accelerationTimestamps :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure
1824 +{
1825 + [[Warply sharedService] sendAccelerationDataWithSuccessBlock:accelerationTimestamps :^(NSDictionary *response) {
1826 + if (success) {
1827 + success(response);
1828 + }
1829 + } failureBlock:^(NSError *error) {
1830 + if (failure) {
1831 + failure(error);
1832 + }
1833 + }];
1834 +}
1835 +
1836 +- (void)getTelematicsHistoryAsync:(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure
1837 +{
1838 + [[Warply sharedService] getTelematicsHistoryWithSuccessBlock:^(NSDictionary *response) {
1839 + if (success) {
1840 + success(response);
1841 + }
1842 + } failureBlock:^(NSError *error) {
1843 + if (failure) {
1844 + failure(error);
1845 + }
1846 + }];
1847 +}
1848 +
1849 +- (void)getTripMetricsAsync:(NSNumber*)tripId :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure
1850 +{
1851 + [[Warply sharedService] getTripMetricsWithSuccessBlock:tripId :^(NSDictionary *response) {
1852 + if (success) {
1853 + success(response);
1854 + }
1855 + } failureBlock:^(NSError *error) {
1856 + if (failure) {
1857 + failure(error);
1858 + }
1859 + }];
1860 +}
1861 +
1862 +- (void)rateTripAsync:(NSNumber*)tripId :(NSNumber*)rating :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure
1863 +{
1864 + [[Warply sharedService] rateTripWithSuccessBlock:tripId :rating :^(NSDictionary *response) {
1865 + if (success) {
1866 + success(response);
1867 + }
1868 + } failureBlock:^(NSError *error) {
1869 + if (failure) {
1870 + failure(error);
1871 + }
1872 + }];
1873 +}
1874 +
1823 - (void) sendEvent: (NSString *) eventName priority: (BOOL) priority { 1875 - (void) sendEvent: (NSString *) eventName priority: (BOOL) priority {
1824 NSString *event_Name = eventName; 1876 NSString *event_Name = eventName;
1825 NSNumber *time_submitted = [NSNumber numberWithDouble:[[NSDate date] timeIntervalSince1970]]; 1877 NSNumber *time_submitted = [NSNumber numberWithDouble:[[NSDate date] timeIntervalSince1970]];
......
...@@ -423,6 +423,14 @@ WL_VERSION_INTERFACE() ...@@ -423,6 +423,14 @@ WL_VERSION_INTERFACE()
423 423
424 - (void)getSingleCampaignWithSuccessBlock:(NSString *)sessionUuid :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; 424 - (void)getSingleCampaignWithSuccessBlock:(NSString *)sessionUuid :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
425 425
426 +- (void) sendAccelerationDataWithSuccessBlock:(NSArray*)accelerationTimestamps :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
427 +
428 +- (void) getTelematicsHistoryWithSuccessBlock:(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
429 +
430 +- (void) getTripMetricsWithSuccessBlock:(NSNumber*)tripId :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
431 +
432 +- (void) rateTripWithSuccessBlock:(NSNumber*)tripId :(NSNumber*)rating :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
433 +
426 /*! 434 /*!
427 @abstract Get the full page add accordint to the display_type of a campaign. 435 @abstract Get the full page add accordint to the display_type of a campaign.
428 @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. 436 @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.
......