Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
username0x0a committed Nov 29, 2020
2 parents f58f22b + f7e9c33 commit bd68952
Show file tree
Hide file tree
Showing 12 changed files with 97 additions and 96 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ query.limit = 10;
```swift
// Set your API key
TravelKit.shared().apiKey = "<YOUR_API_KEY_GOES_HERE>"
TravelKit.shared.apiKey = "<YOUR_API_KEY_GOES_HERE>"
// Create query to get Top 10 Sightseeing Places in London
let query = TKPlacesQuery()
Expand All @@ -90,7 +90,7 @@ query.categories = [.sightseeing]
query.limit = 10
// Perform query and print a message containing the first item
TravelKit.shared().places(for: query) { (places, error) in
TravelKit.shared.places.places(for: query) { (places, error) in
if let place = places?.first { print("Let's visit \(place.name)!") }
else { print("Something went wrong :/") }
}
Expand Down
4 changes: 2 additions & 2 deletions TravelKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Pod::Spec.new do |spec|

spec.name = 'TravelKit'
spec.version = '3.1'
spec.version = '3.1.1'
spec.license = 'MIT'
spec.homepage = 'https://github.com/sygic-travel/apple-sdk'
spec.authors = 'Tripomatic s.r.o.', 'Michal Zelinka'
spec.summary = 'Travel SDK for travelling projects'
spec.source = { :http => 'https://github.com/sygic-travel/apple-sdk/releases/download/v3.1/TravelKit-3.1-iOS.zip' }
spec.source = { :http => 'https://github.com/sygic-travel/apple-sdk/releases/download/v3.1.1/TravelKit-3.1.1-iOS.zip' }
spec.documentation_url = 'http://docs.sygictravelapi.com/apple-sdk/latest'
spec.module_name = 'TravelKit'

Expand Down
2 changes: 1 addition & 1 deletion TravelKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = TK;
LastUpgradeCheck = 1200;
LastUpgradeCheck = 1220;
ORGANIZATIONNAME = Tripomatic;
TargetAttributes = {
D6B2A1281E530AFD005509E8 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
4 changes: 2 additions & 2 deletions TravelKit/Config.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

TK_BUNDLE_VERSION = 3.1
TK_BUNDLE_BUILD = 302
TK_BUNDLE_VERSION = 3.1.1
TK_BUNDLE_BUILD = 304
48 changes: 24 additions & 24 deletions TravelKit/TKDirection.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,47 +230,47 @@ typedef NS_ENUM(NSUInteger, TKDirectionStepMode) {
///----------------------

/// Calculated duration of the step.
@property (atomic) NSTimeInterval duration;
@property (atomic, readonly) NSTimeInterval duration;
/// Calculated distance of the step.
@property (atomic) CLLocationDistance distance;
@property (atomic, readonly) CLLocationDistance distance;

/// Mode of the step.
@property (atomic) TKDirectionStepMode mode;
@property (atomic, readonly) TKDirectionStepMode mode;
/// Polyline of the step.
@property (nonatomic, copy, nullable) NSString *polyline;
@property (nonatomic, copy, nullable, readonly) NSString *polyline;

/// Optional name of the origin location.
@property (nonatomic, copy, nullable) NSString *originName;
@property (nonatomic, copy, nullable, readonly) NSString *originName;
/// Optional coordinate of the origin location.
@property (nonatomic, strong, nullable) CLLocation *originLocation;
@property (nonatomic, strong, nullable, readonly) CLLocation *originLocation;

/// Optional name of the destination location.
@property (nonatomic, copy, nullable) NSString *destinationName;
@property (nonatomic, copy, nullable, readonly) NSString *destinationName;
/// Optional coordinate of the destination location.
@property (nonatomic, strong, nullable) CLLocation *destinationLocation;
@property (nonatomic, strong, nullable, readonly) CLLocation *destinationLocation;

/// Optional stops along the step.
@property (nonatomic, copy) NSArray<TKDirectionIntermediateStop *> *intermediateStops;
@property (nonatomic, copy, readonly) NSArray<TKDirectionIntermediateStop *> *intermediateStops;

/// Optional short name of the public transport line. Examples: _6_, _X12_, _B_, _Bakerloo Line_, …
@property (nonatomic, copy, nullable) NSString *shortName;
@property (nonatomic, copy, nullable, readonly) NSString *shortName;
/// Optional long name of the public transport line, usually describing the route. Example: _Brooklyn - Manhattan - Staten Island_
@property (nonatomic, copy, nullable) NSString *longName;
@property (nonatomic, copy, nullable, readonly) NSString *longName;
/// Optional headsign. Mainly used for public transport. Examples: _Moorgate, _Chesham_, _Aldgate_, …
@property (nonatomic, copy, nullable) NSString *headsign;
@property (nonatomic, copy, nullable, readonly) NSString *headsign;
/// Optional public transport line color. Provided in RGB HEX.
@property (nonatomic, strong, nullable) NSNumber *lineColor;
@property (nonatomic, strong, nullable, readonly) NSNumber *lineColor;
/// Attribution string.
@property (nonatomic, copy, nullable) NSString *attribution;
@property (nonatomic, copy, nullable, readonly) NSString *attribution;

// Departure date of the step.
@property (nonatomic, strong, nullable) NSDate *departureDate;
@property (nonatomic, strong, nullable, readonly) NSDate *departureDate;
/// Departure date string. ISO-8601 format without the timezone.
@property (nonatomic, copy, nullable) NSString *departureLocalString;
@property (nonatomic, copy, nullable, readonly) NSString *departureLocalString;
// Arrival date of the step.
@property (nonatomic, strong, nullable) NSDate *arrivalDate;
@property (nonatomic, strong, nullable, readonly) NSDate *arrivalDate;
/// Arrival date string. ISO-8601 format without the timezone.
@property (nonatomic, copy, nullable) NSString *arrivalLocalString;
@property (nonatomic, copy, nullable, readonly) NSString *arrivalLocalString;

- (instancetype)init UNAVAILABLE_ATTRIBUTE;
+ (instancetype)new UNAVAILABLE_ATTRIBUTE;
Expand All @@ -292,22 +292,22 @@ typedef NS_ENUM(NSUInteger, TKDirectionStepMode) {
///----------------------

/// Optional stop name.
@property (nonatomic, copy, nullable) NSString *name;
@property (nonatomic, copy, nullable, readonly) NSString *name;

/// Location of the stop.
@property (nonatomic, strong) CLLocation *location;
@property (nonatomic, strong, readonly) CLLocation *location;

/// Calculated arrival date.
@property (nonatomic, strong, nullable) NSDate *arrivalDate;
@property (nonatomic, strong, nullable, readonly) NSDate *arrivalDate;

/// Calculated arrival date string. ISO-8601 format without the timezone.
@property (nonatomic, copy, nullable) NSString *arrivalLocalString;
@property (nonatomic, copy, nullable, readonly) NSString *arrivalLocalString;

/// Calculated departure date.
@property (nonatomic, strong, nullable) NSDate *departureDate;
@property (nonatomic, strong, nullable, readonly) NSDate *departureDate;

/// Calculated departure date string. ISO-8601 format without the timezone.
@property (nonatomic, copy, nullable) NSString *departureLocalString;
@property (nonatomic, copy, nullable, readonly) NSString *departureLocalString;

- (instancetype)init UNAVAILABLE_ATTRIBUTE;
+ (instancetype)new UNAVAILABLE_ATTRIBUTE;
Expand Down
78 changes: 39 additions & 39 deletions TravelKit/TKPlace.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,58 +132,58 @@ NS_ASSUME_NONNULL_BEGIN
/// (https://docs.google.com/spreadsheets/d/1qlTdvBlLDo3fxBTSqmbqQOQJXsynfukBHxI_Xpi2Srw/edit#gid=1588428987) and
/// [CSV file](https://admin.sygictraveldata.com/data-export/zf8979vspcvz61dya3pyxbvsduyjtnh4) as well.

@property (nonatomic, copy) NSString *ID NS_SWIFT_NAME(ID);
@property (nonatomic, copy, readonly) NSString *ID NS_SWIFT_NAME(ID);

/// Displayable name of the place, translated if possible. Example: _Buckingham Palace_.
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy, readonly) NSString *name;

/// Displayable name suffix. Example: _London, United Kingdom_.
@property (nonatomic, copy, nullable) NSString *suffix;
@property (nonatomic, copy, nullable, readonly) NSString *suffix;

/// Denotable place level. Each place has a level property that describes the type of the place by administration level.
///
/// @see `TKPlaceLevel`
@property (atomic) TKPlaceLevel level;
@property (atomic, readonly) TKPlaceLevel level;

/// Short perex introducing the place.
@property (nonatomic, copy, nullable) NSString *perex;
@property (nonatomic, copy, nullable, readonly) NSString *perex;

/// Location of the place.
@property (nonatomic, strong) CLLocation *location;
@property (nonatomic, strong, readonly) CLLocation *location;

/// 18-character Quad key representing map tile coordinate using Mercator (Google/Bing) projection.
/// For details see [Bing Maps](https://msdn.microsoft.com/en-us/library/bb259689.aspx) docs or [maptiler.org](www.maptiler.org/google-maps-coordinates-tile-bounds-projection/) .
@property (nonatomic, copy, nullable) NSString *quadKey;
@property (nonatomic, copy, nullable, readonly) NSString *quadKey;

/// Bounding box. Object with south-west and north-east point in degrees. Specifies bounds of places that have an area.
@property (nonatomic, strong, nullable) TKMapRegion *boundingBox;
@property (nonatomic, strong, nullable, readonly) TKMapRegion *boundingBox;

/// Global rating value.
///
/// @note Possible values: double in range `0`--`10.0`.
@property (nonatomic, strong, nullable) NSNumber *rating;
@property (nonatomic, strong, nullable, readonly) NSNumber *rating;

/// Stringified type intended to be shown in the UI, e.g. 'Playground', 'Post Office', 'ATM' etc.
@property (nonatomic, copy, nullable) NSString *kind;
@property (nonatomic, copy, nullable, readonly) NSString *kind;

/// Marker identifier usable for displayable icon. For more information please see [Sygic Travel API](http://docs.sygictravelapi.com/1.1/#section-places) .
/// @note For a full list of all available markers see [Markers sheet](https://docs.google.com/spreadsheets/d/1mpP-aw6FrWBF4WQpgErCz2tsB_OhEp56co-y5VC80VY/edit#gid=0)
@property (nonatomic, copy, nullable) NSString *marker;
@property (nonatomic, copy, nullable, readonly) NSString *marker;

/// List of Category slugs assigned. For more information please see [Sygic Travel API](http://docs.sygictravelapi.com/1.1/#section-places) .
///
/// @see `TKPlaceCategory`
@property (atomic) TKPlaceCategory categories;
@property (atomic, readonly) TKPlaceCategory categories;

/// List of Parent IDs. Parent IDs are IDs of other places. These parent places can be for example the geographical units the place is part of.
/// This can be useful when working with a map, searching for cities by location, etc.
@property (nonatomic, copy, nullable) NSArray<NSString *> *parents;
@property (nonatomic, copy, nullable, readonly) NSArray<NSString *> *parents;

/// List of custom flags.
@property (nonatomic, copy, nullable) NSArray<NSString *> *flags;
@property (nonatomic, copy, nullable, readonly) NSArray<NSString *> *flags;

/// Thumbnail URL to an image of size 150×150 pixels.
@property (nonatomic, strong, nullable) NSURL *thumbnailURL;
@property (nonatomic, strong, nullable, readonly) NSURL *thumbnailURL;

///-------------------------
/// @name Helping properties
Expand All @@ -206,7 +206,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface TKDetailedPlace : TKPlace

/// Place detail of `TKPlaceDetail` instance containing further attributes.
@property (nonatomic, strong, nullable) TKPlaceDetail *detail;
@property (nonatomic, strong, nullable, readonly) TKPlaceDetail *detail;

@end

Expand All @@ -222,19 +222,19 @@ NS_ASSUME_NONNULL_BEGIN
@interface TKPlaceDescription : NSObject

/// Full-length text description.
@property (nonatomic, copy) NSString *text;
@property (nonatomic, copy, readonly) NSString *text;

/// Language code of the description.
@property (nonatomic, copy, nullable) NSString *languageID;
@property (nonatomic, copy, nullable, readonly) NSString *languageID;

/// Flag of the description provider.
@property (atomic) TKPlaceDescriptionProvider provider;
@property (atomic, readonly) TKPlaceDescriptionProvider provider;

/// URL address of the description source.
@property (nonatomic, copy, nullable) NSURL *sourceURL;
@property (nonatomic, copy, nullable, readonly) NSURL *sourceURL;

/// Flag of the translation provider.
@property (atomic) TKTranslationProvider translationProvider;
@property (atomic, readonly) TKTranslationProvider translationProvider;

@end

Expand All @@ -250,10 +250,10 @@ NS_ASSUME_NONNULL_BEGIN
@interface TKPlaceTag : NSObject

/// Displayable key, always in English.
@property (nonatomic, copy, nonnull) NSString *key;
@property (nonatomic, copy, nonnull, readonly) NSString *key;

/// Displayable value, translated if available.
@property (nonatomic, copy, nullable) NSString *name;
@property (nonatomic, copy, nullable, readonly) NSString *name;

@end

Expand All @@ -269,56 +269,56 @@ NS_ASSUME_NONNULL_BEGIN
@interface TKPlaceDetail : NSObject

/// `TKPlaceDescription` instance object containing a detailed description.
@property (nonatomic, strong, nullable) TKPlaceDescription *fullDescription;
@property (nonatomic, strong, nullable, readonly) TKPlaceDescription *fullDescription;

/// List of Place Tags. Each place can have multiple tags which describe it or it’s properties. Tags can be used to filter places.
/// @note You can see list of available tags [here](docs.sygictravelapi.com/taglist.html) .
@property (nonatomic, copy, nullable) NSArray<TKPlaceTag *> *tags;
@property (nonatomic, copy, nullable, readonly) NSArray<TKPlaceTag *> *tags;

/// List of external References.

/// References are entities that represent place's relations to other websites, articles, social networks, rentals,
/// passes, ticket, tour, and accommodation providers, parking, transfers, and other information.
@property (nonatomic, copy, nullable) NSArray<TKReference *> *references;
@property (nonatomic, copy, nullable, readonly) NSArray<TKReference *> *references;

/// List of main Media for use. Used for displaying a larger thumbnail or a cover photo.
@property (nonatomic, copy, nullable) NSArray<TKMedium *> *mainMedia;
@property (nonatomic, copy, nullable, readonly) NSArray<TKMedium *> *mainMedia;

/// Local name string.
@property (nonatomic, copy, nullable) NSString *localName;
@property (nonatomic, copy, nullable, readonly) NSString *localName;

/// Translated name string.
@property (nonatomic, copy, nullable) NSString *translatedName;
@property (nonatomic, copy, nullable, readonly) NSString *translatedName;

/// English name string.
@property (nonatomic, copy, nullable) NSString *englishName;
@property (nonatomic, copy, nullable, readonly) NSString *englishName;

/// Time zone string.
@property (nonatomic, copy, nullable) NSString *timezone;
@property (nonatomic, copy, nullable, readonly) NSString *timezone;

/// Address string.
@property (nonatomic, copy, nullable) NSString *address;
@property (nonatomic, copy, nullable, readonly) NSString *address;

/// Phone number string.
@property (nonatomic, copy, nullable) NSString *phone;
@property (nonatomic, copy, nullable, readonly) NSString *phone;

/// Email string.
@property (nonatomic, copy, nullable) NSString *email;
@property (nonatomic, copy, nullable, readonly) NSString *email;

/// Estimated avarage time that people usually spend at this place in seconds.
@property (nonatomic, strong, nullable) NSNumber *duration;
@property (nonatomic, strong, nullable, readonly) NSNumber *duration;

/// Opening hours string in a structured OpenStreetMap format.
@property (nonatomic, copy, nullable) NSString *openingHours;
@property (nonatomic, copy, nullable, readonly) NSString *openingHours;

/// Opening hours note string.
@property (nonatomic, copy, nullable) NSString *openingHoursNote;
@property (nonatomic, copy, nullable, readonly) NSString *openingHoursNote;

/// Admission string.
@property (nonatomic, copy, nullable) NSString *admission;
@property (nonatomic, copy, nullable, readonly) NSString *admission;

/// Additional attributes.
@property (nonatomic, copy, nullable) NSDictionary<NSString *, NSString *> *attributes;
@property (nonatomic, copy, nullable, readonly) NSDictionary<NSString *, NSString *> *attributes;

@end

Expand Down
Loading

0 comments on commit bd68952

Please sign in to comment.