Skip to content

Commit 65ce975

Browse files
docs: Fix event name
1 parent 951b444 commit 65ce975

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sources/platform/actors/publishing/monetize/pay_per_event.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ The `eventChargeLimitReached` property checks if the current event type can be c
247247
```js
248248
import { Actor } from 'apify';
249249

250-
const chargForApiCall = async () => {
250+
const chargForApiProductDetail = async () => {
251251
const chargeResult = await Actor.charge({
252-
eventName: "api-call",
252+
eventName: "product-detail",
253253
});
254254

255255
return chargeResult;
@@ -260,7 +260,7 @@ await Actor.init();
260260
const main = async () => {
261261
// API call, or any other logic that you want to charge for
262262

263-
const chargeResult = await chargForApiCall();
263+
const chargeResult = await chargForApiProductDetail();
264264

265265
if (chargeResult.eventChargeLimitReached) {
266266
await Actor.exit();
@@ -280,8 +280,8 @@ await Actor.exit();
280280
```python
281281
from apify import Actor
282282

283-
async def charge_for_api_call():
284-
charge_result = await Actor.charge(event_name='api-call')
283+
async def charge_for_api_product_detail():
284+
charge_result = await Actor.charge(event_name='product-detail')
285285

286286
return charge_result
287287

@@ -290,7 +290,7 @@ async def main():
290290

291291
# API call, or any other logic that you want to charge for
292292

293-
charge_result = await charge_for_api_call()
293+
charge_result = await charge_for_api_product_detail()
294294

295295
if charge_result.event_charge_limit_reached:
296296
await Actor.exit()

0 commit comments

Comments
 (0)