|
JubeatPlus 3.9.11
|
The recommend network's advert-data model store. More...
#include <RecommendAdData.h>


Class Methods | |
| (nullable NSArray *) | + getBannerDisplayStatusList |
| The archived banner-display-status list. | |
| (nullable NSArray *) | + getAdModelSettingList |
| The archived advert-model setting list. | |
| (nullable NSArray *) | + getAdList |
| The archived advert list. | |
| (nullable NSArray *) | + getSelfList |
| The archived self-advert list. | |
| (nullable NSData *) | + getResponseNsData |
The raw network response data cached under the ApplilinkNetwork.responseNsData key. | |
| (nullable NSDictionary *) | + getInterstitialSpecList |
| The archived interstitial-specification dictionary. | |
| (int) | + getAdStatusByAdModel: |
| The cached advert status for an advert model. | |
| (nullable NSArray *) | + getAdDataByAdId: |
| The advert-data records for an advert identifier. | |
| (nullable NSDictionary *) | + getAdDataList:adType: |
The first record of a list whose ad_type equals a value. | |
| (nullable NSDictionary *) | + getAdDataWithAppliId: |
| The advert-data record for an application identifier. | |
| (nullable NSArray *) | + getAdListByAdType: |
| The advert list narrowed to a single advert type. | |
| (nullable NSArray *) | + getAppBannerList |
| The application-banner records for the lottery banner. | |
| (nullable NSArray *) | + getAppIconList |
| The application-icon records for the lottery icons. | |
| (nullable NSArray *) | + getAppInterstitialList: |
| The application-interstitial records for the lottery interstitial. | |
| (nullable NSDictionary *) | + getLotteryBannerData |
| Draw a lottery banner record. | |
| (nullable NSArray *) | + getLotteryIconData |
| Draw up to four lottery icon records. | |
| (nullable NSDictionary *) | + getLotteryInterstitialDataForMovie: |
| Draw a lottery interstitial record. | |
| (nullable NSDictionary *) | + getLotteryInterstitialDataWithList: |
| Draw one record from a priority-weighted list. | |
| (nullable NSArray *) | + getInterstitialSpecPriorityList |
| The interstitial display-specification list sorted by descending priority. | |
| (nullable NSArray *) | + getInterstitialSpecCountForAdDisplaySpecList: |
| Filter a display-specification list by remaining display count. | |
| (nullable NSArray *) | + getInterstitialSpecInstallForAdDisplaySpecList:movieFlg: |
| Filter a display-specification list by install state, movie capability, and display term. | |
| (BOOL) | + checkMovieWithAdData: |
| Whether an advert-data record describes a movie creative. | |
| (nullable NSArray *) | + getAdInterstitialUrlListTermForAdDisplaySpecList: |
| The interstitial advert records for a display-specification list. | |
| (nullable NSArray *) | + getPosterUrlList |
| The de-duplicated poster-rectangle records for every movie advert. | |
| (nullable NSArray *) | + getAdInterstitialUrlListTermForList: |
| The de-duplicated interstitial banner URLs of a list. | |
| (nullable NSArray *) | + getMovieUrlList |
The de-duplicated movie URLs decoded from every advert's movie_url_list. | |
| (nullable NSDictionary *) | + getAdDisplayCountDailyDictionary |
| The archived daily advert-display-count dictionary, valid only for today. | |
| (nullable NSDictionary *) | + getAdDisplayCountTotalDictionary |
| The archived total advert-display-count dictionary. | |
| (int) | + getAdTypeWithAdModel:adLocation: |
| The advert type for an advert model at an ad location. | |
| (nullable NSArray *) | + getAdListTermForList: |
| Filter a list to the records still within their display term. | |
| (nullable NSArray *) | + getAdBannerListForList: |
The de-duplicated banner URLs of a list, gathered from each record's banner_url_list. | |
| (nullable NSArray *) | + shuffled: |
| A randomly shuffled copy of a list. | |
| (nullable NSError *) | + lotteryInterstitialWithAdLocation: |
| Run the interstitial-display frequency lottery for an ad location. | |
| (nullable NSString *) | + getInstallFlgWithAdData: |
| The install-flag string for an advert-data record. | |
| (nullable NSDictionary *) | + getMovieAdData: |
| The debug movie advert-data record for a movie URL. | |
The recommend network's advert-data model store.
| + (BOOL) checkMovieWithAdData: | (nullable NSDictionary *) | adData |
Whether an advert-data record describes a movie creative.
The record is a movie when its external_ad_disp_mng.ad_content_kind equals the movie kind and it carries a non-empty movie_url.
| adData | The advert-data record. |
YES when the record is a playable movie creative. | + (nullable NSArray *) getAdBannerListForList: | (nullable NSArray *) | list |
The de-duplicated banner URLs of a list, gathered from each record's banner_url_list.
| list | The advert records to gather from. |
banner_url_list entries. | + (NSArray *) getAdDataByAdId: | (int) | adId |
The advert-data records for an advert identifier.
Narrows the advert list to the records whose ad_id equals adId.
| adId | The advert identifier. |
nil when the list is empty. | + (nullable NSDictionary *) getAdDataList: | (nullable NSArray *) | list | |
| adType: | (int) | adType |
The first record of a list whose ad_type equals a value.
| list | The advert records to search. |
| adType | The advert-type identifier. |
nil. | + (nullable NSDictionary *) getAdDataWithAppliId: | (nullable NSString *) | appliId |
The advert-data record for an application identifier.
Narrows the advert list to the records whose appli_id equals appliId, preferring a record whose primary_flg is set, and returns that record.
| appliId | The advert application identifier. |
nil. | + (NSDictionary *) getAdDisplayCountDailyDictionary |
The archived daily advert-display-count dictionary, valid only for today.
Unarchives the adDisplayCountDaily blob and returns it only when its recorded adDisplayDate matches the current day; otherwise nil.
nil. | + (NSDictionary *) getAdDisplayCountTotalDictionary |
The archived total advert-display-count dictionary.
nil. | + (nullable NSArray *) getAdInterstitialUrlListTermForAdDisplaySpecList: | (nullable NSArray *) | list |
The interstitial advert records for a display-specification list.
Resolves each entry's advert data by ad_id_to, narrows it to the interstitial advert type, keeps the records that carry a non-empty interstitial_banner_url, and de-duplicates them.
| list | The ad_display_spec entries. |
| + (nullable NSArray *) getAdInterstitialUrlListTermForList: | (nullable NSArray *) | list |
The de-duplicated interstitial banner URLs of a list.
| list | The advert records to gather from. |
interstitial_banner_url_list entries, de-duplicated. | + (NSArray *) getAdList |
The archived advert list.
Unarchived from the ApplilinkRecommend.allAdData blob under its list key.
nil. | + (NSArray *) getAdListByAdType: | (int) | adType |
The advert list narrowed to a single advert type.
| adType | The advert-type identifier. |
ad_type equals adType. | + (nullable NSArray *) getAdListTermForList: | (nullable NSArray *) | list |
Filter a list to the records still within their display term.
Keeps the records whose external_ad_disp_mng.end_date is at or after the current time.
| list | The advert records to filter. |
| + (NSArray *) getAdModelSettingList |
The archived advert-model setting list.
In debug mode the list comes from RecommendDebug; otherwise it is unarchived from the ApplilinkRecommend.allAdData blob under its ad_model_setting_list key.
nil. | + (int) getAdStatusByAdModel: | (int) | adModel |
The cached advert status for an advert model.
Looks the advert model up in the banner-display-status list and returns its status value.
| adModel | The advert-model identifier. |
status value, or zero when the model is absent or malformed. | + (int) getAdTypeWithAdModel: | (int) | adModel | |
| adLocation: | (nullable NSString *) | adLocation |
The advert type for an advert model at an ad location.
Searches the advert-model setting list for the entry matching adLocation and adModel and returns its ad_type value, defaulting to the app-banner type when there is no match.
| adModel | The advert-model identifier. |
| adLocation | The ad-location identifier. |
| + (NSArray *) getAppBannerList |
The application-banner records for the lottery banner.
Draws a lottery banner, resolves its cached banner_url (picked at random from banner_url_list) to the on-disk banner-cache path, and records the creative identifier and install flag.
nil. | + (NSArray *) getAppIconList |
The application-icon records for the lottery icons.
Resolves each drawn lottery-icon banner_icon_url (picked at random from banner_icon_url_list) to its cached file name and records the creative identifier and install flag.
| + (NSArray *) getAppInterstitialList: | (BOOL) | movieFlg |
The application-interstitial records for the lottery interstitial.
Draws a lottery interstitial, and for a movie creative resolves the movie and poster URLs, otherwise resolves the interstitial banner. The resolved creative is copied to the on-disk banner-cache path, the creative identifier is recorded, and the install-flag string is attached.
| movieFlg | Whether only movie-capable interstitials are eligible. |
nil. | + (NSArray *) getBannerDisplayStatusList |
The archived banner-display-status list.
In debug mode the list comes from RecommendDebug; otherwise it is unarchived from the ApplilinkRecommend.allAdData blob under its banner_display_status_list key.
nil. | + (nullable NSString *) getInstallFlgWithAdData: | (nullable NSDictionary *) | adData |
The install-flag string for an advert-data record.
Returns "1" when the record's install_flg is already set, or when the record's default_scheme URL can be opened by the device; otherwise "0".
| adData | The advert-data record. |
"1" or "0". | + (nullable NSArray *) getInterstitialSpecCountForAdDisplaySpecList: | (nullable NSArray *) | list |
Filter a display-specification list by remaining display count.
Keeps the entries whose recorded daily and total display counts are still below their max_display_count_daily and max_display_count_total limits.
| list | The ad_display_spec entries to filter. |
| + (nullable NSArray *) getInterstitialSpecInstallForAdDisplaySpecList: | (nullable NSArray *) | list | |
| movieFlg: | (BOOL) | movieFlg |
Filter a display-specification list by install state, movie capability, and display term.
Keeps the entries whose advert is installed (or whose install is not required), which are movie capable when movieFlg is set, and whose display term has not expired, carrying the priority through to each surviving record.
| list | The ad_display_spec entries to filter. |
| movieFlg | Whether only movie-capable interstitials are eligible. |
| + (NSDictionary *) getInterstitialSpecList |
The archived interstitial-specification dictionary.
Unarchived from the ApplilinkRecommend.allAdData blob under its interstitial_spec_list key.
nil. | + (NSArray *) getInterstitialSpecPriorityList |
The interstitial display-specification list sorted by descending priority.
ad_display_spec entries sorted by priority. | + (NSDictionary *) getLotteryBannerData |
Draw a lottery banner record.
Filters the banner-type adverts to the ones still within their display term, then picks one uniformly at random.
nil. | + (NSArray *) getLotteryIconData |
Draw up to four lottery icon records.
Filters the icon-type adverts to the ones still within their display term, shuffles them, and returns the first four (or fewer).
nil. | + (NSDictionary *) getLotteryInterstitialDataForMovie: | (BOOL) | movieFlg |
Draw a lottery interstitial record.
Reduces the interstitial display-specification list to the entries whose daily and total display counts, install state, and movie capability still allow a display, then draws one weighted by priority.
| movieFlg | Whether only movie-capable interstitials are eligible. |
nil. | + (nullable NSDictionary *) getLotteryInterstitialDataWithList: | (nullable NSArray *) | list |
Draw one record from a priority-weighted list.
Sums every record's priority, draws a value in that range, and returns the record whose cumulative priority window contains the draw.
| list | The candidate records, each carrying a priority. |
nil. | + (nullable NSDictionary *) getMovieAdData: | (nullable NSString *) | movieUrl |
The debug movie advert-data record for a movie URL.
Searches movieList (RecommendDebug) for the record whose movie_url equals movieUrl, copies it, and attaches the install-flag string.
| movieUrl | The movie URL to match. |
nil. | + (NSArray *) getMovieUrlList |
The de-duplicated movie URLs decoded from every advert's movie_url_list.
Strips the applilink://ext-app:80/movie? prefix, URL-decodes the payload, splits it on &, strips the movie_url= prefix from each field, URL-decodes it, and keeps the non-empty results.
| + (NSArray *) getPosterUrlList |
The de-duplicated poster-rectangle records for every movie advert.
poster_url_rect_list entries of the movie adverts, de-duplicated. | + (NSData *) getResponseNsData |
The raw network response data cached under the ApplilinkNetwork.responseNsData key.
nil. | + (NSArray *) getSelfList |
The archived self-advert list.
Unarchived from the ApplilinkRecommend.allAdData blob under its self key.
nil. | + (nullable NSError *) lotteryInterstitialWithAdLocation: | (nullable NSString *) | adLocation |
Run the interstitial-display frequency lottery for an ad location.
Reads the frequency_n / frequency_m specification for adLocation, advances the persisted per-location frequency counters, and decides whether the interstitial should be shown this time.
| adLocation | The ad-location identifier. |
nil when the interstitial should be shown, otherwise a localised NSError describing why it was suppressed. | + (nullable NSArray *) shuffled: | (nullable NSArray *) | list |
A randomly shuffled copy of a list.
| list | The list to shuffle. |
list in random order.