Trip tag for iOS app

Setting up


Add trip tag
Return tags successfully added (with tag and type only, without source).

/**
 * Add track tags. Return tags successfully added (with tag and type only, without source).
 *
 * @param trackToken  Track id.
 */ 
- (void)addTrackTags:(NSArray<RPTag *>*)tags to:(NSString *)trackToken completion:(id response, NSArray *error)callback;
let tagExample = RPTag.init()
tagExample.tag = "BusinessTag"
tagExample.source = "TelematicsApp"
RPEntry.instance().api.addTrackTags([tagExample], to: "TRACK_TOKEN") { response, error in
    //
}

Remove trip tag
Return tags successfully removed (with tag and type only, without source).

/**
 * Remove track tags. Return tags successfully removed (with tag and type only, without source).
 *
 * @param trackToken  Track id.
 */
- (void)removeTrackTags:(NSArray<RPTag *>*)tags from:(NSString *)trackToken completion:(id response, NSArray *error)callback;
let tagExample = RPTag.init()
tagExample.tag = "BusinessTag"
tagExample.source = "TelematicsApp"
RPEntry.instance().api.removeTrackTags([tagExample], from: "TRACK_TOKEN") { response, error in
    //
}

Get trip tags

/**
 * Returns track tags.
 *
 * @param trackToken  Track id.
 */
- (void)getTrackTags:(NSString *)trackToken completion:(id response, NSArray *error)callback;
RPEntry.instance().api.getTrackTags("TRACK_TOKEN") { response, error in
    //
}

Did this page help you?