Skip to content

pjpimentel/dots

Repository files navigation

dots

digital ocean api wrapper

actions quality coverage security npm

installing

    npm install --save dots-wrapper@latest

using

typescript

  import { createApiClient } from 'dots-wrapper';
  const myApiToken = 'my-long-token';
  const dots = createApiClient({token: myApiToken});

  const main = async () => {
    const {data:{account}} = await dots.account.getAccount();
    console.log(account);
  };

  main();

javascript/nodejs

  const {createApiClient} = require('dots-wrapper');
  const myApiToken = 'my-long-token';
  const dots = createApiClient({token: myApiToken});

  const main = async () => {
    const {data:{account}} = await dots.account.getAccount();
    console.log(account);
  };

  main();

browser

index.html

  <script src='https://unpkg.com/dots-wrapper@latest/dist/index-browser.min.js'></script>

js.js

  const {createApiClient} = window.dots;
  const myApiToken = 'my-long-token';
  const dots = createApiClient({token: myApiToken});

  const main = async () => {
    const {data:{account}} = await dots.account.getAccount();
    console.log(account);
  };

  main();

docs

  1. account
    1. get-account
  2. action
    1. get-action
    2. list-actions
  3. app
    1. cancel-app-deployment
    2. create-app-deployment
    3. create-app
    4. delete-app
    5. get-active-deployment-logs
    6. get-aggregated-app-deployment-logs
    7. get-app-deployment-logs
    8. get-app-deployment
    9. get-app
    10. list-app-deployments
    11. list-apps
    12. run-app-detection
    13. update-app
  4. cdn-endpoint
    1. create-cdn-endpoint
    2. delete-cdn-endpoint
    3. get-cdn-endpoint
    4. list-cdn-endpoints
    5. purge-cache
    6. update-cdn-endpoint
  5. certificate
    1. create-certificate
    2. delete-certificate
    3. get-certificate
    4. list-certificates
  6. container-registry
    1. configure-registry
    2. delete-registry
    3. get-docker-credentials
    4. get-registry
  7. customer
    1. download-invoice
    2. get-balance
    3. get-invoice-summary
    4. list-billing-history
    5. list-invoice-items
    6. list-invoices
  8. database
    1. configure-database-cluster-eviction-policy
    2. configure-database-cluster-maintenance-window
    3. configure-database-cluster-sql-modes
    4. create-connection-pool
    5. create-database-cluster-db
    6. create-database-cluster-user
    7. create-database-cluster
    8. create-read-only-replica
    9. delete-connection-pool
    10. delete-database-cluster-db
    11. destroy-database-cluster
    12. destroy-read-only-replica
    13. get-connection-pool
    14. get-database-cluster-db
    15. get-database-cluster-eviction-policy
    16. get-database-cluster-sql-mode
    17. get-database-cluster-user
    18. get-database-cluster
    19. get-read-only-replica
    20. list-connection-pools
    21. list-database-cluster-backups
    22. list-database-cluster-dbs
    23. list-database-cluster-firewall-rules
    24. list-database-cluster-users
    25. list-database-clusters
    26. list-database-options
    27. list-read-only-replicas
    28. migrate-database-cluster
    29. remove-database-cluster-user
    30. resize-database-cluster
    31. restore-database-cluster-backup
    32. update-database-cluster-firewall-rules
  9. domain
    1. create-domain
    2. create-domain-record
    3. delete-domain
    4. delete-domain-record
    5. get-domain
    6. get-domain-record
    7. list-domain-records
    8. list-domains
    9. update-domain-record
  10. droplet
    1. change-droplet-kernel
    2. create-droplet
    3. create-droplets
    4. delete-droplet
    5. delete-droplets-by-tag
    6. destroy-droplet-and-all-associated-resources
    7. destroy-droplet-and-associated-resources
    8. disable-droplet-backups
    9. do-action-by-droplet-tag
    10. enable-droplet-backups
    11. enable-droplet-ipv6
    12. enable-droplet-private-networking
    13. get-droplet-action
    14. get-droplet-destroy-status
    15. get-droplet
    16. list-droplet-actions
    17. list-droplet-associated-resources
    18. list-droplet-backups
    19. list-droplet-kernels
    20. list-droplet-neighborhoods
    21. list-droplet-neighbors
    22. list-droplet-snapshots
    23. list-droplets
    24. power-cycle-droplet
    25. power-off-droplet
    26. power-on-droplet
    27. reboot-droplet
    28. rebuild-droplet
    29. rename-droplet
    30. reset-droplet-password
    31. resize-droplet
    32. restore-droplet
    33. retry-droplet-destroy
    34. shutdown-droplet
    35. snapshot-droplet
  11. firewall
    1. add-droplets-to-firewall
    2. add-rules-to-firewall
    3. add-tags-to-firewall
    4. create-firewall
    5. delete-firewall
    6. get-firewall
    7. list-firewalls
    8. remove-droplets-from-firewall
    9. remove-rules-from-firewall
    10. remove-tags-from-firewall
    11. update-firewall
  12. floating-ip
    1. assign-ip-to-droplet
    2. create-floating-ip
    3. delete-floating-ip
    4. get-floating-ip
    5. get-floating-ip-action
    6. list-floating-ip-actions
    7. list-floating-ips
    8. unassign-ip-from-droplet
  13. image
    1. convert-image-to-snapshot
    2. create-custom-image
    3. delete-image
    4. get-image
    5. get-image-action
    6. list-image-actions
    7. list-images
    8. transfer-image
    9. update-image
  14. kubernetes
    1. add-container-registry
    2. create-kubernetes-cluster
    3. create-node-pool
    4. delete-kubernetes-cluster
    5. delete-node-pool
    6. delete-node
    7. get-clusterlint-diagnostics
    8. get-kubernetes-cluster-credentials
    9. get-kubernetes-cluster-kubeconfig
    10. get-kubernetes-cluster
    11. get-node-pool
    12. list-available-options-of-kubernetes
    13. list-kubernetes-cluster-available-upgrades
    14. list-kubernetes-clusters
    15. list-node-pools
    16. remove-container-registry
    17. run-clusterlint-on-kubernetes-cluster
    18. update-kubernetes-cluster
    19. update-node-pool
    20. upgrade-kubernetes-cluster
  15. load-balancer
    1. add-droplets-to-load-balancer
    2. add-rules-to-load-balancer
    3. create-load-balancer
    4. delete-load-balancer
    5. get-load-balancer
    6. list-load-balancers
    7. remove-droplets-from-load-balancer
    8. remove-rules-from-load-balancer
    9. update-load-balancer
  16. monitoring
    1. get-droplet-available-memory-metrics
    2. get-droplet-bandwidth-metrics
    3. get-droplet-cpu-metrics
    4. get-droplet-free-memory-metrics
    5. get-droplet-total-memory-metrics
  17. project
    1. assign-resources-to-default-project
    2. assign-resources-to-project
    3. create-project
    4. delete-project
    5. get-default-project
    6. get-project
    7. list-default-project-resources
    8. list-project-resources
    9. list-projects
    10. patch-default-project
    11. patch-project
    12. update-default-project
    13. update-project
  18. region
    1. list-regions
  19. size
    1. list-sizes
  20. snapshot
    1. delete-snapshot
    2. get-snapshot
    3. list-snapshots
  21. ssh-key
    1. create-ssh-key
    2. destroy-ssh-key
    3. get-ssh-key
    4. list-ssh-keys
    5. update-ssh-key
  22. tag
    1. create-tag
    2. delete-tag
    3. get-tag
    4. list-tags
    5. tag-resources
    6. untag-resources
  23. volume
    1. attach-volume-to-droplet
    2. create-volume
    3. create-volume-snapshot
    4. delete-volume-by-name
    5. delete-volume
    6. detach-volume-from-droplet
    7. get-volume
    8. get-volume-action
    9. list-volume-actions
    10. list-volumes
    11. list-volume-snapshots
    12. resize-volume
  24. vpc
    1. create-vpc
    2. get-vpc
    3. list-vpcs
    4. update-vpc
    5. list-vpc-resources
    6. delete-vpc

contributors

license: mit