|
16 | 16 |
|
17 | 17 | /** |
18 | 18 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
19 | | - * https://openapi-generator.tech |
20 | | - * Do not edit the class manually. |
| 19 | + * https://openapi-generator.tech Do not edit the class manually. |
21 | 20 | */ |
22 | | - |
23 | 21 | package com.linecorp.bot.insight.client; |
24 | | -import java.net.URI; |
25 | | - |
26 | | -import java.util.concurrent.CompletableFuture; |
27 | 22 |
|
28 | 23 | import com.linecorp.bot.client.base.ApiAuthenticatedClientBuilder; |
29 | | -import com.linecorp.bot.client.base.ApiClientBuilder; |
30 | 24 | import com.linecorp.bot.client.base.Result; |
31 | | -import com.linecorp.bot.client.base.BlobContent; |
32 | | -import com.linecorp.bot.client.base.UploadFile; |
33 | 25 | import com.linecorp.bot.client.base.channel.ChannelTokenSupplier; |
34 | | - |
35 | | -import retrofit2.Call; |
36 | | -import retrofit2.http.*; |
37 | | - |
38 | | -import okhttp3.RequestBody; |
39 | | -import okhttp3.MultipartBody; |
40 | | - |
41 | 26 | import com.linecorp.bot.insight.model.GetFriendsDemographicsResponse; |
42 | 27 | import com.linecorp.bot.insight.model.GetMessageEventResponse; |
43 | 28 | import com.linecorp.bot.insight.model.GetNumberOfFollowersResponse; |
44 | 29 | import com.linecorp.bot.insight.model.GetNumberOfMessageDeliveriesResponse; |
45 | 30 | import com.linecorp.bot.insight.model.GetStatisticsPerUnitResponse; |
46 | | - |
47 | | - |
48 | | -import java.util.ArrayList; |
49 | | -import java.util.HashMap; |
50 | | -import java.util.List; |
51 | | -import java.util.Map; |
52 | | -import java.util.Set; |
| 31 | +import java.net.URI; |
| 32 | +import java.util.concurrent.CompletableFuture; |
| 33 | +import retrofit2.http.*; |
53 | 34 |
|
54 | 35 | @javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator") |
55 | 36 | public interface InsightClient { |
56 | 37 |
|
57 | | - /** |
58 | | - * |
59 | | - * Retrieves the demographic attributes for a LINE Official Account's friends.You can only retrieve information about friends for LINE Official Accounts created by users in Japan (JP), Thailand (TH), Taiwan (TW) and Indonesia (ID). |
60 | | - * |
61 | | - * @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-demographic"> Documentation</a> |
62 | | - */ |
63 | | - |
64 | | - |
65 | | - @GET("/v2/bot/insight/demographic") |
66 | | - |
67 | | - CompletableFuture<Result<GetFriendsDemographicsResponse>> getFriendsDemographics( |
68 | | - ); |
69 | | - |
70 | | - |
71 | | - /** |
72 | | - * Get user interaction statistics |
73 | | - * Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account. |
74 | | - * @param requestId Request ID of a narrowcast message or broadcast message. Each Messaging API request has a request ID. (required) |
75 | | - * |
76 | | - * @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-message-event">Get user interaction statistics Documentation</a> |
77 | | - */ |
78 | | - |
79 | | - |
80 | | - @GET("/v2/bot/insight/message/event") |
81 | | - |
82 | | - CompletableFuture<Result<GetMessageEventResponse>> getMessageEvent(@Query("requestId") String requestId |
83 | | - ); |
84 | | - |
85 | | - |
86 | | - /** |
87 | | - * Get number of followers |
88 | | - * Returns the number of users who have added the LINE Official Account on or before a specified date. |
89 | | - * @param date Date for which to retrieve the number of followers. Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9 (optional) |
90 | | - * |
91 | | - * @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-number-of-followers">Get number of followers Documentation</a> |
92 | | - */ |
93 | | - |
94 | | - |
95 | | - @GET("/v2/bot/insight/followers") |
96 | | - |
97 | | - CompletableFuture<Result<GetNumberOfFollowersResponse>> getNumberOfFollowers(@Query("date") String date |
98 | | - ); |
99 | | - |
100 | | - |
101 | | - /** |
102 | | - * Get number of message deliveries |
103 | | - * Returns the number of messages sent from LINE Official Account on a specified day. |
104 | | - * @param date Date for which to retrieve number of sent messages. - Format: yyyyMMdd (e.g. 20191231) - Timezone: UTC+9 (required) |
105 | | - * |
106 | | - * @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-number-of-delivery-messages">Get number of message deliveries Documentation</a> |
107 | | - */ |
108 | | - |
109 | | - |
110 | | - @GET("/v2/bot/insight/message/delivery") |
111 | | - |
112 | | - CompletableFuture<Result<GetNumberOfMessageDeliveriesResponse>> getNumberOfMessageDeliveries(@Query("date") String date |
113 | | - ); |
114 | | - |
115 | | - |
116 | | - /** |
117 | | - * |
118 | | - * You can check the per-unit statistics of how users interact with push messages and multicast messages sent from your LINE Official Account. |
119 | | - * @param customAggregationUnit Name of aggregation unit specified when sending the message. Case-sensitive. For example, `Promotion_a` and `Promotion_A` are regarded as different unit names. (required) |
120 | | - * @param from Start date of aggregation period. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9 (required) |
121 | | - * @param to End date of aggregation period. The end date can be specified for up to 30 days later. For example, if the start date is 20210301, the latest end date is 20210331. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9 (required) |
122 | | - * |
123 | | - * @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-statistics-per-unit"> Documentation</a> |
124 | | - */ |
125 | | - |
126 | | - |
127 | | - @GET("/v2/bot/insight/message/event/aggregation") |
128 | | - |
129 | | - CompletableFuture<Result<GetStatisticsPerUnitResponse>> getStatisticsPerUnit(@Query("customAggregationUnit") String customAggregationUnit, @Query("from") String from, @Query("to") String to |
130 | | - ); |
131 | | - |
132 | | - |
133 | | - |
134 | | - |
135 | | - public static ApiAuthenticatedClientBuilder<InsightClient> builder(String channelToken) { |
136 | | - return new ApiAuthenticatedClientBuilder<>(URI.create("https://api.line.me"), InsightClient.class, new InsightExceptionBuilder(), channelToken); |
137 | | - } |
138 | | - public static ApiAuthenticatedClientBuilder<InsightClient> builder(ChannelTokenSupplier channelTokenSupplier) { |
139 | | - return new ApiAuthenticatedClientBuilder<>(URI.create("https://api.line.me"), InsightClient.class, new InsightExceptionBuilder(), channelTokenSupplier); |
140 | | - } |
141 | | - |
142 | | - |
| 38 | + /** |
| 39 | + * Retrieves the demographic attributes for a LINE Official Account's friends.You can only |
| 40 | + * retrieve information about friends for LINE Official Accounts created by users in Japan (JP), |
| 41 | + * Thailand (TH), Taiwan (TW) and Indonesia (ID). |
| 42 | + * |
| 43 | + * @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-demographic"> |
| 44 | + * Documentation</a> |
| 45 | + */ |
| 46 | + @GET("/v2/bot/insight/demographic") |
| 47 | + CompletableFuture<Result<GetFriendsDemographicsResponse>> getFriendsDemographics(); |
| 48 | + |
| 49 | + /** |
| 50 | + * Get user interaction statistics Returns statistics about how users interact with narrowcast |
| 51 | + * messages or broadcast messages sent from your LINE Official Account. |
| 52 | + * |
| 53 | + * @param requestId Request ID of a narrowcast message or broadcast message. Each Messaging API |
| 54 | + * request has a request ID. (required) |
| 55 | + * @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-message-event">Get |
| 56 | + * user interaction statistics Documentation</a> |
| 57 | + */ |
| 58 | + @GET("/v2/bot/insight/message/event") |
| 59 | + CompletableFuture<Result<GetMessageEventResponse>> getMessageEvent( |
| 60 | + @Query("requestId") String requestId); |
| 61 | + |
| 62 | + /** |
| 63 | + * Get number of followers Returns the number of users who have added the LINE Official Account on |
| 64 | + * or before a specified date. |
| 65 | + * |
| 66 | + * @param date Date for which to retrieve the number of followers. Format: yyyyMMdd (e.g. |
| 67 | + * 20191231) Timezone: UTC+9 (optional) |
| 68 | + * @see <a |
| 69 | + * href="https://developers.line.biz/en/reference/messaging-api/#get-number-of-followers">Get |
| 70 | + * number of followers Documentation</a> |
| 71 | + */ |
| 72 | + @GET("/v2/bot/insight/followers") |
| 73 | + CompletableFuture<Result<GetNumberOfFollowersResponse>> getNumberOfFollowers( |
| 74 | + @Query("date") String date); |
| 75 | + |
| 76 | + /** |
| 77 | + * Get number of message deliveries Returns the number of messages sent from LINE Official Account |
| 78 | + * on a specified day. |
| 79 | + * |
| 80 | + * @param date Date for which to retrieve number of sent messages. - Format: yyyyMMdd (e.g. |
| 81 | + * 20191231) - Timezone: UTC+9 (required) |
| 82 | + * @see <a |
| 83 | + * href="https://developers.line.biz/en/reference/messaging-api/#get-number-of-delivery-messages">Get |
| 84 | + * number of message deliveries Documentation</a> |
| 85 | + */ |
| 86 | + @GET("/v2/bot/insight/message/delivery") |
| 87 | + CompletableFuture<Result<GetNumberOfMessageDeliveriesResponse>> getNumberOfMessageDeliveries( |
| 88 | + @Query("date") String date); |
| 89 | + |
| 90 | + /** |
| 91 | + * You can check the per-unit statistics of how users interact with push messages and multicast |
| 92 | + * messages sent from your LINE Official Account. |
| 93 | + * |
| 94 | + * @param customAggregationUnit Name of aggregation unit specified when sending the message. |
| 95 | + * Case-sensitive. For example, `Promotion_a` and `Promotion_A` are |
| 96 | + * regarded as different unit names. (required) |
| 97 | + * @param from Start date of aggregation period. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9 |
| 98 | + * (required) |
| 99 | + * @param to End date of aggregation period. The end date can be specified for up to 30 days |
| 100 | + * later. For example, if the start date is 20210301, the latest end date is 20210331. Format: |
| 101 | + * yyyyMMdd (e.g. 20210301) Time zone: UTC+9 (required) |
| 102 | + * @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-statistics-per-unit"> |
| 103 | + * Documentation</a> |
| 104 | + */ |
| 105 | + @GET("/v2/bot/insight/message/event/aggregation") |
| 106 | + CompletableFuture<Result<GetStatisticsPerUnitResponse>> getStatisticsPerUnit( |
| 107 | + @Query("customAggregationUnit") String customAggregationUnit, |
| 108 | + @Query("from") String from, |
| 109 | + @Query("to") String to); |
| 110 | + |
| 111 | + public static ApiAuthenticatedClientBuilder<InsightClient> builder(String channelToken) { |
| 112 | + return new ApiAuthenticatedClientBuilder<>( |
| 113 | + URI.create("https://api.line.me"), |
| 114 | + InsightClient.class, |
| 115 | + new InsightExceptionBuilder(), |
| 116 | + channelToken); |
| 117 | + } |
| 118 | + |
| 119 | + public static ApiAuthenticatedClientBuilder<InsightClient> builder( |
| 120 | + ChannelTokenSupplier channelTokenSupplier) { |
| 121 | + return new ApiAuthenticatedClientBuilder<>( |
| 122 | + URI.create("https://api.line.me"), |
| 123 | + InsightClient.class, |
| 124 | + new InsightExceptionBuilder(), |
| 125 | + channelTokenSupplier); |
| 126 | + } |
143 | 127 | } |
0 commit comments