Skip to content

Commit 906719f

Browse files
authored
Add UpToRemainingQuota parameter to narrowcast API (#248)
* Add upToRemainingQuota option to narrowcast * Correct notificationDisabled type
1 parent 0245085 commit 906719f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/api-reference/client.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class Client {
2424
messages: Message | Message[],
2525
recipient?: ReceieptObject,
2626
filter?: { demographic: DemographicFilterObject },
27-
limit?: { max: number },
27+
limit?: { max?: number, upToRemainingQuota?: boolean },
28+
notificationDisabled?: boolean,
2829
): Promise<MessageAPIResponseBase>
2930
broadcast(messages: Message | Message[], notificationDisabled: boolean = false): Promise<MessageAPIResponseBase>
3031
getMessageContent(messageId: string): Promise<Readable>
@@ -162,7 +163,7 @@ interface ClientConfig {
162163

163164
## Common Specifications
164165

165-
Regarding to things like [Retrying an API request](https://developers.line.biz/en/reference/messaging-api/#retry-api-request), there's an API called `setRequestOptionOnce`.
166+
Regarding to things like [Retrying an API request](https://developers.line.biz/en/reference/messaging-api/#retry-api-request), there's an API called `setRequestOptionOnce`.
166167
When you call this first and call the API support that request option, then it will be set to that request and will be cleared automatically.
167168

168169
## Methods

lib/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ export default class Client {
111111
messages: Types.Message | Types.Message[],
112112
recipient?: Types.ReceieptObject,
113113
filter?: { demographic: Types.DemographicFilterObject },
114-
limit?: { max: number },
115-
notificationDisabled: boolean = false,
114+
limit?: { max?: number, upToRemainingQuota?: boolean },
115+
notificationDisabled?: boolean,
116116
): Promise<Types.MessageAPIResponseBase> {
117117
return this.http.post(
118118
`${MESSAGING_API_PREFIX}/message/narrowcast`,

test/client.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ describe("client", () => {
242242
recipient,
243243
filter,
244244
limit,
245-
notificationDisabled: false,
246245
});
247246

248247
const res = await client.narrowcast(

0 commit comments

Comments
 (0)