Skip to content

Conversation

janbuchar
Copy link
Contributor

@janbuchar janbuchar added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Feb 25, 2025
@github-actions github-actions bot added this to the 109th sprint - Tooling team milestone Feb 25, 2025
vdusek

This comment was marked as resolved.

Pijukatel

This comment was marked as resolved.

@janbuchar
Copy link
Contributor Author

I think it would be suitable to include example Pay per event schema. I could not find this schema mentioned in the documentation and the only hint I found was in platform webpage hint -> see attached picture

There should now be a form in the console, so I think it's not necessary anymore 🙂

@janbuchar janbuchar requested review from Pijukatel and vdusek March 6, 2025 16:41
Copy link
Contributor

@Pijukatel Pijukatel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several chunks on commented out code in the .jsx files. What is the point of adding it?

Copy link
Contributor

@vdusek vdusek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The highlight of = is not good, but I guess there's nothing we can do about it.

image

LGTM

Comment on lines 26 to 30
If you need finer control over charging, you can access call <ApiLink to="class/Actor#get_charging_manager">`Actor.get_charging_manager()`</ApiLink> to access the <ApiLink to="class/ChargingManager">`ChargingManager`</ApiLink>, which can provide more detailed information - for example how many events of each type can be charged before reaching the configured limit.

## Transitioning from a different pricing model

When you plan to start using the pay-per-event pricing model for an Actor that is already monetized with a different pricing model, your source code will need support both pricing models during the transition period enforced by the Apify platform. Arguably the most frequent case is the transition from the pay-per-result model which utilizes the `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable to prevent returning unpaid dataset items. The following is an example how to handle such scenarios. The key part is the <ApiLink to="class/ChargingManager#get_pricing_info">`ChargingManager.get_pricing_info`</ApiLink> method which returns information about the current pricing model.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Actor.get_charging_manager() - brackets
  • ChargingManager.get_pricing_info - no brackets

Could you unify it?

@janbuchar
Copy link
Contributor Author

There are several chunks on commented out code in the .jsx files. What is the point of adding it?

No idea, I just copied it. Removed.

@janbuchar janbuchar merged commit a546e75 into master Mar 7, 2025
26 of 27 checks passed
@janbuchar janbuchar deleted the ppe-guide branch March 7, 2025 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy and adapt Actor.charge docs from JS SDK
3 participants