tencent cloud

Feedback

Searching mini programs

Last updated: 2024-07-03 18:00:50
    The mini program SDK provides an API for searching online mini programs by keywords and categories.
    Note:
    firstType and secondType specify the primary and secondary categories for the mini program search.
    The completion parameter is used to retrieve the search results.
    // Search mini programs
    // Search mini program
    // @param name Search by name keyword - search name keyword
    // @param completion Search results - search results
    - (void)searchAppletsWithName:(NSString *)name
                          completion:(void (^)(NSArray<TMFAppletSearchInfo *> * _Nullable, NSError * _Nullable))completion;
     
    // Search mini programs
    // Search mini program
    // @param name Search by name keyword - search name keyword
    // @param firstType Primary category name - first level classification name
    // @param secondType Secondary category name - second level classification name
    // @param completion Search results - search results
    - (void)searchAppletsWithName:(NSString * _Nullable )name
                       firstType:(NSString * _Nullable)firstType
                       secondType:(NSString * _Nullable)secondType
                       completion:(void (^)(NSArray<TMFAppletSearchInfo *> * _Nullable, NSError * _Nullable))completion;

    Search by keyword

    Sample code:
    [[TMFMiniAppSDKManager sharedInstance] searchAppletsWithName:searchString completion:^(NSArray<TMFAppletSearchInfo *> * _Nonnull result, NSError * _Nonnull aError) {
    if (error) {
    // Search failed, or the list is empty
    } else {
    //Search successful, list not empty
    }
    }];

    Search by single category

    Sample code:
    [[TMFMiniAppSDKManager sharedInstance] searchAppletsWithName:nil firstType:@"firstType" secondType:nil completion:^(NSArray<TMFAppletSearchInfo *> * _Nullable info, NSError * _Nullable error) {
    if (error) {
    // Search failed, or the list is empty
    } else {
    //Search successful, list not empty
    }
    }];

    Bicategory search

    Note:
    The result of a bicategory search is the intersection of two categories.
    Sample code:
    [[TMFMiniAppSDKManager sharedInstance] searchAppletsWithName:nil firstType:@"firstType" secondType:@"secondType" completion:^(NSArray<TMFAppletSearchInfo *> * _Nullable info, NSError * _Nullable error) {
    if (error) {
    // Search failed, or the list is empty
    } else {
    //Search successful, list not empty
    }
    }];
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support