hank
2019-01-22 02be5892b45a9ebbeb74e6697e712be999d5d0f8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*
 * CBInPlay.h
 * Chartboost
 * 7.3.0
 *
 * Copyright 2018 Chartboost. All rights reserved.
 */
 
#import "Chartboost.h"
 
/*! @abstract CBInPlay forward declaration. */
@class CBInPlay;
 
/*!
 @class Chartboost
 
 @abstract
 Provide methods to display and controler Chartboost native advertising types.
 This is a category extension that adds additional functionality to the Chartboost object.
 
 @discussion For more information on integrating and using the Chartboost SDK
 please visit our help site documentation at https://help.chartboost.com
 */
@interface Chartboost (CBInPlay)
 
/*!
 @abstract
 Cache a number of InPlay objects for the given CBLocation.
 
 @param location The location for the Chartboost impression type.
 
 @discussion This method will first check if there is a locally cached InPlay object set
 for the given CBLocation and, if found, will do nothing. If no locally cached data exists
 the method will attempt to fetch data from the Chartboost API server.
*/
+ (void)cacheInPlay:(CBLocation)location;
 
 
/*!
 @abstract
 Determine if a locally cached InPlay object exists for the given CBLocation.
 
 @param location The location for the Chartboost impression type.
 
 @return YES if there a locally cached InPlay object, and NO if not.
 
 @discussion A return value of YES here indicates that the corresponding
 getInPlay:(CBLocation)location method will return an InPlay object without making
 additional Chartboost API server requests to fetch data to present.
 */
+ (BOOL)hasInPlay:(CBLocation)location;
 
/*!
 @abstract
 Return an InPlay object for the given CBLocation.
 
 @param location The location for the Chartboost impression type.
 
 @return CBInPlay object if one exists in the InPlay cache or nil if one is not yet available.
 
 @discussion This method will first check if there is a locally cached InPlay object
 for the given CBLocation and, if found, will return the object using the locally cached data.
 If no locally cached data exists the method will attempt to fetch data from the
 Chartboost API server.  If the Chartboost API server is unavailable
 or there is no eligible InPlay object to present in the given CBLocation this method
 is a no-op.
 */
+ (CBInPlay *)getInPlay:(CBLocation)location;
 
@end
 
 
/*!
 @class CBInPlay
 
 @abstract
 CBInPlay ad type is a native ad type that is left the end user to integrate into their
 applications own custom experiences.  Chartboost acts as a data marshalling system
 and gives the developer access to specific attributes of the ad type.
 
 @discussion For more information on integrating and using the Chartboost SDK
 please visit our help site documentation at https://help.chartboost.com
 */
@interface CBInPlay : NSObject
 
/*! @abstract CBLocation target for the CBInPlay ad. */
@property (nonatomic, strong, readonly) CBLocation location;
 
/*! @abstract Image byte data for the CBInPlay icon. */
@property (nonatomic, strong, readonly) NSData *appIcon;
 
/*! @abstract Application name associated with the ad. */
@property (nonatomic, strong, readonly) NSString *appName;
 
/*!
 @abstract
 Marks the CBInPlay object as shown and notifies the Charboost API servers.
 
 @discussion This method will emit a server request to the Chartboost API servers
 to mark the CBInPlay ad as viewed.  You must send this information to correlate
 with installs driven by the ad.
 */
- (void)show;
 
/*!
 @abstract
 Marks the CBInPlay object as clicked and notifies the Charboost API servers.
 
 @discussion This method will emit a server request to the Chartboost API servers
 to mark the CBInPlay ad as clicked.  You must send this information to correlate
 with installs driven by the ad.
 */
- (void)click;
 
/*!
 @abstract
 Clears all CBInPlay objects from the cache locations.
 
 @discussion This method will clear all the CBInPlay native ads from the internal cash. 
 This is intended to be used to either force an update for all content or reduce the
 memory overhead of this feature.
 */
- (void)clearCache;
 
@end