Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions FTGooglePlacesAPI/FTGooglePlacesAPIDetailResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,6 @@
@property (nonatomic, strong, readonly) NSURL *websiteUrl;

@property (nonatomic, assign, readonly) NSTimeInterval utcOffset;
@property (nonatomic, copy, readonly) NSArray *addressComponents;

@end
1 change: 1 addition & 0 deletions FTGooglePlacesAPI/FTGooglePlacesAPIDetailResponse.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ - (void)ftgp_importDictionary:(NSDictionary *)dictionary
_websiteUrl = [NSURL URLWithString:[dictionary ftgp_nilledObjectForKey:@"website"]];

_utcOffset = [[dictionary ftgp_nilledObjectForKey:@"utc_offset"] doubleValue];
_addressComponents = [dictionary ftgp_nilledObjectForKey:@"address_components"];
}

@end
6 changes: 5 additions & 1 deletion FTGooglePlacesAPI/FTGooglePlacesAPISearchResultItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ - (void)ftgpi_importDictionary:(NSDictionary *)dictionary

}

_addressString = [dictionary ftgp_nilledObjectForKey:@"vicinity"];
if (dictionary[@"vicinity"]) {
_addressString = [dictionary ftgp_nilledObjectForKey:@"vicinity"];
} else if (dictionary[@"formatted_address"]) {
_addressString = [dictionary ftgp_nilledObjectForKey:@"formatted_address"];
}

// Openeed state may or may not be present
NSNumber *openedState = [dictionary ftgp_nilledValueForKeyPath:@"opening_hours.open_now"];
Expand Down
5 changes: 5 additions & 0 deletions FTGooglePlacesAPI/FTGooglePlacesAPIService.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,9 @@ typedef void (^FTGooglePlacesAPIDetailRequestCompletionhandler)(FTGooglePlacesAP
*/
+ (void)setDebugLoggingEnabled:(BOOL)enabled;

/**
* Cancel all the running Places requests.
*/
+ (void)cancelAllRequests;

@end
5 changes: 5 additions & 0 deletions FTGooglePlacesAPI/FTGooglePlacesAPIService.m
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ + (void)setDebugLoggingEnabled:(BOOL)enabled
FTGooglePlacesAPIDebugLoggingEnabled = enabled;
}

+ (void)cancelAllRequests
{
[[FTGooglePlacesAPIService sharedService].httpRequestOperationManager.operationQueue cancelAllOperations];
}

#pragma mark - Private class methods

+ (void)executeRequest:(id<FTGooglePlacesAPIRequest>)request
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>FD422588-35B3-46C2-8EF7-3936E6B10189</string>
<key>IDESourceControlProjectName</key>
<string>FTGooglePlacesAPI</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>DD20A1A48C66B5213E0FEBB87A95EF51D6C6F3E8</key>
<string>github.com:AFNetworking/AFNetworking.git</string>
<key>F8DE5E0E3C11A175741C8D49C74487562DC374DB</key>
<string>https://github.com/satgi/FTGooglePlacesAPI.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>XcodeProject/FTGooglePlacesAPI.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>DD20A1A48C66B5213E0FEBB87A95EF51D6C6F3E8</key>
<string>../../..XcodeProject/FTGooglePlacesAPI/Thirdparty/AFNetworking/</string>
<key>F8DE5E0E3C11A175741C8D49C74487562DC374DB</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/satgi/FTGooglePlacesAPI.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>F8DE5E0E3C11A175741C8D49C74487562DC374DB</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>DD20A1A48C66B5213E0FEBB87A95EF51D6C6F3E8</string>
<key>IDESourceControlWCCName</key>
<string>AFNetworking</string>
</dict>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>F8DE5E0E3C11A175741C8D49C74487562DC374DB</string>
<key>IDESourceControlWCCName</key>
<string>FTGooglePlacesAPI</string>
</dict>
</array>
</dict>
</plist>