Skip to content

Latest commit

 

History

History
105 lines (69 loc) · 4.37 KB

examples.md

File metadata and controls

105 lines (69 loc) · 4.37 KB

Examples

This page provides detailed examples of how to use the xmrig API. Each example demonstrates a specific functionality.

Examples List

  1. Add Miners
  2. List All Miners
  3. Get Individual Miners
  4. Update Config
  5. Update Individual Miners Endpoints
  6. Update All Endpoints for All Miners
  7. Start/Stop All Miners
  8. Pause/Resume All Miners
  9. Remove Miner
  10. Access Properties
  11. Full Example

Add Miners

This example demonstrates how to add XMRig miners to the XMRigManager. It shows how to configure logging and add miners to the manager.

{% include "../examples/add_miners.py" %}

List All Miners

This example demonstrates how to list all XMRig miners managed by the XMRigManager. It shows how to configure logging, add miners to the manager, and list all miners.

{% include "../examples/list_all_miners.py" %}

Get Individual Miners

This example demonstrates how to retrieve individual XMRig miners from the XMRigManager. It shows how to configure logging, add miners to the manager, and retrieve individual miners.

{% include "../examples/get_individual_miners.py" %}

Update Config

This example demonstrates how to update the configuration of an XMRig miner using the XMRigManager. It shows how to configure logging, add miners to the manager, retrieve the current config, modify it, and post the updated config.

{% include "../examples/update_config.py" %}

Update Individual Miners Endpoints

This example demonstrates how to update the endpoints for individual XMRig miners using the XMRigManager. It shows how to configure logging, add miners to the manager, and update the summary, backends, and config endpoints for each miner.

{% include "../examples/update_individual_miners_endpoints.py" %}

Update All Endpoints for All Miners

This example demonstrates how to update all endpoints for all XMRig miners using the XMRigManager. It shows how to configure logging, add miners to the manager, and update all endpoints for all miners in the manager.

{% include "../examples/update_all_miners.py" %}

Start Or Stop All Miners

This example demonstrates how to start and stop all XMRig miners using the XMRigManager. It shows how to configure logging, add miners to the manager, and perform start/stop actions on all miners.

{% include "../examples/start_stop_all_miners.py" %}

Pause Or Resume All Miners

This example demonstrates how to pause and resume all XMRig miners using the XMRigManager. It shows how to configure logging, add miners to the manager, and perform pause/resume actions on all miners.

{% include "../examples/pause_resume_all_miners.py" %}

Remove Miner

This example demonstrates how to remove an XMRig miner from the XMRigManager. It shows how to configure logging, add miners to the manager, list all miners, remove a miner, and list all miners again.

{% include "../examples/remove_miner.py" %}

Access Properties

This example demonstrates how to use the XMRigManager to manage multiple XMRig miners. It shows how to configure logging, add miners to the manager, and retrieve data from individual miners. The example logs various properties of the miners, such as summary, backends, config, hashrates, and job counters.

{% include "../examples/access_properties.py" %}

Full Example

This full example demonstrates various functionalities of the XMRigManager. It shows how to configure logging, add and remove miners, list all miners, update endpoints, pause/resume miners, start/stop miners, and update the miner's config.

{% include "../examples/full-example.py" %}