pydo.one_clicks.list()

Description

To list all available 1-Click applications, send a GET request to /v2/1-clicks. The type may be provided as query paramater in order to restrict results to a certain type of 1-Click, for example: /v2/1-clicks?type=droplet. Current supported types are kubernetes and droplet.

The response will be a JSON object with a key called 1_clicks. This will be set to an array of 1-Click application data, each of which will contain the the slug and type for the 1-Click.

Parameters

Name Type Required Description Default Value
type string False Restrict results to a certain type of 1-Click.

Request Sample

import os
from pydo import Client

client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN"))

one_click_apps = client.one_clicks.list()

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

A JSON object with a key of 1_clicks.

Click to expand an example response for All 1-Click Applications.
{
  "value": {
    "1_clicks": [
      {
        "slug": "monitoring",
        "type": "kubernetes"
      },
      {
        "slug": "wordpress-18-04",
        "type": "droplet"
      }
    ]
  }
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}