Import plug-ins import data in hunter suite.
To begin the development of your own plug-in you can download the sample project.

An import plug-in need to be an application (.app).
The info dictionary (Info.plist) of your application must have the following keys used by Hunter Suite

  • HSPluginName the name of your plug-in. Used to present the plug-in to the user.
  • HSPluginType the type of hunter suite plug-in. The value for import plug-ins is: Import
  • Creator (optional) your name or nick name. This value will be displayed in the plug-ins manager as Creator of plug-in.
  • CFBundleVersion version of your plug-in. This values is used by plug-in manager to display plug-in update. Current version of plug-in manger check the version code as a String comparison. And this choice could create some problem with version code (for example 1.10 is an older version than 1.9).

HSImport

For the development of import plug-ins the SDK provide the class HSImport.
Method of this class:

- (id)init;This method will initialize the class and read task parameters passed by the hunter suite. The parameters read will identify what is the calling application of your plug-in.

@property(retain) NSString *listName; Specify the name of the list that will be crated in the calling application when importing.

- (void)addItem:(NSXMLElement*)anItem;This method will add the XMLElement anItem to the list of returned items. You should use this method only if the item doesn’t have an image.

- (void)addItem:(NSXMLElement*)anItem withImage:(NSData*)imageData; This method will add the XMLElement anItem to the list of returned items. You can specify the NSData representing the image of item’s cover.

- (void)addItem:(NSXMLElement*)anItem withImageAtPath:(NSString*)imagePath; This method is equivalent to addItem: withImage:, if the image if a png file this method will be much more faster than the previous one.

- (void)addItem:(NSXMLElement*)anItem withImageAtPath:(NSString*)imagePath andBundledFilesURLS:(NSArray*)urls; This method is useful if you want to copy a series of file into the hunter suite application support folders. The third parameter is an NSArray on NSURL

- (NSString*)mainEntityName;This method return the name of the main element for the calling application.
(Film for Dvd Hunter, Game for Game Hunter, Book for Book Hunter)

-(HunterApplication) callingApplication;return the code of application who launched the plug-in

- (NSString*)voteRatingFor:(NSUInteger)value;This method will create the string for the VoteRating field of an item.
The value should be less or equal than 5. Greater values will create a sting with 5 stars.