Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

dots-wrapper

3.3.0 • Public • Published

··· dots ···

digital ocean API wrapper

actions quality coverage security

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. 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
  4. certificate
    1. create-certificate
    2. delete-certificate
    3. get-certificate
    4. list-certificates
  5. container-registry
    1. configure-registry
    2. delete-registry
    3. get-docker-credentials
    4. get-registry
  6. customer
    1. download-invoice
    2. get-balance
    3. get-invoice-summary
    4. list-billing-history
    5. list-invoice-items
    6. list-invoices
  7. 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-read-only-replicas
    27. migrate-database-cluster
    28. remove-database-cluster-user
    29. resize-database-cluster
    30. restore-database-cluster-backup
    31. update-database-cluster-firewall-rules
  8. 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
  9. droplet
    1. change-droplet-kernel
    2. create-droplet
    3. create-droplets
    4. delete-droplet
    5. delete-droplets-by-tag
    6. disable-droplet-backups
    7. do-action-by-droplet-tag
    8. enable-droplet-backups
    9. enable-droplet-ipv6
    10. enable-droplet-private-networking
    11. get-droplet
    12. get-droplet-action
    13. list-droplet-actions
    14. list-droplet-backups
    15. list-droplet-kernels
    16. list-droplet-neighborhoods
    17. list-droplet-neighbors
    18. list-droplets
    19. list-droplet-snapshots
    20. power-cycle-droplet
    21. power-off-droplet
    22. power-on-droplet
    23. reboot-droplet
    24. rebuild-droplet
    25. rename-droplet
    26. reset-droplet-password
    27. resize-droplet
    28. restore-droplet
    29. shutdown-droplet
    30. snapshot-droplet
  10. 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
  11. 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
  12. 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
  13. kubernetes
    1. create-kubernetes-cluster
    2. create-node-pool
    3. delete-kubernetes-cluster
    4. delete-node-pool
    5. delete-node
    6. get-clusterlint-diagnostics
    7. get-kubernetes-cluster-credentials
    8. get-kubernetes-cluster-kubeconfig
    9. get-kubernetes-cluster
    10. get-node-pool
    11. list-available-options-of-kubernetes
    12. list-kubernetes-cluster-available-upgrades
    13. list-kubernetes-clusters
    14. list-node-pools
    15. run-clusterlint-on-kubernetes-cluster
    16. update-kubernetes-cluster
    17. update-node-pool
    18. upgrade-kubernetes-cluster
  14. 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
  15. 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
  16. region
    1. list-regions
  17. size
    1. list-sizes
  18. snapshot
    1. delete-snapshot
    2. get-snapshot
    3. list-snapshots
  19. ssh-key
    1. create-ssh-key
    2. destroy-ssh-key
    3. get-ssh-key
    4. list-ssh-keys
    5. update-ssh-key
  20. tag
    1. create-tag
    2. delete-tag
    3. get-tag
    4. list-tags
    5. tag-resources
    6. untag-resources
  21. volume
    1. attach-volume-to-droplet
    2. create-volume
    3. create-volume-snapshot
    4. delete-volume
    5. detach-volume-from-droplet
    6. get-volume
    7. get-volume-action
    8. list-volume-actions
    9. list-volumes
    10. list-volume-snapshots
    11. resize-volume
  22. vpc
    1. create-vpc
    2. get-vpc
    3. list-vpcs
    4. update-vpc
    5. list-vpc-resources
    6. delete-vpc

contributors

license: mit

Install

npm i dots-wrapper

DownloadsWeekly Downloads

188

Version

3.3.0

License

MIT

Unpacked Size

675 kB

Total Files

951

Last publish

Collaborators

  • avatar