Skip to content

Commit

Permalink
Write docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopsaheysa committed Mar 15, 2024
1 parent 673ffaa commit fc5a3f0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/Using-Operations-Service.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ if (!operationsService.isPollingOperations) {
}
```

### Default and Minimum TimeInterval Enforcement

For convenience, there is a default implementation where you can omit the polling interval and it is automatically set to 7 seconds. If you specify an interval below 5 seconds, it will be automatically adjusted to 5 seconds to prevent server overload.

### Setting up a delegate

To receive the result of the polling, set up a delegate.

<!-- begin box warning -->
Expand Down Expand Up @@ -148,6 +154,10 @@ class MyOperationsManager: WMTOperationsDelegate {
Polling behavior can be adjusted by the `pollingOptions` parameter when [creating an instance](#creating-an-instance) of the service.
<!-- end -->

### Best Practices and Recommendations

For optimal server performance, consider adjusting polling intervals based on your application's requirements. For instance, when push notifications are enabled, it's advisable to double the polling interval to minimize server load.

## Approve an Operation

To approve an operation use `WMTOperations.authorize`. You can simply use it with the following examples:
Expand Down

0 comments on commit fc5a3f0

Please sign in to comment.