GoogleImageSearchAgent

@interface GoogleImageSearchAgent : NSObject <SearchAgent>

GoogleImageSearchAgent follows the SearchAgent protocol to get image’s from Google Custom Search. In increments of 10, it will return 100 or less images on a successful search, depending on the maxSearchResult property of the PhotoPersonalizationOption. It searches with safeSearch set to high.

  • Default initializer for GoogleImageSearchAgent

    Declaration

    Objective-C

    + (nonnull instancetype)
    googleImageSearchAgentWithNetworkManager:
        (nonnull id<VONetworkManagerProtocol>)networkManager
                                      APIKey:(nonnull NSString *)apiKey
                                    cxString:(nonnull NSString *)cxString
                            maxSearchResults:(NSInteger)maxSearchResults;

    Parameters

    networkManager

    - network manager to make the request to Google Custom Search

    apiKey

    - Google API key

    cxString

    - Google cx string

    maxSearchResults

    - The maximum number of search results to be displayed

    Return Value

    instance of GoogleImageSearchAgent