File: v1_app.py

package info (click to toggle)
python-vultr 1.0.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: python: 1,004; makefile: 5
file content (20 lines) | stat: -rw-r--r-- 617 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'''Partial class to handle Vultr App API calls'''
from .utils import VultrBase


class VultrApp(VultrBase):
    '''Handles Vultr App API calls'''
    def __init__(self, api_key):
        VultrBase.__init__(self, api_key)

    def list(self, params=None):
        ''' /v1/app/list
        GET - account
        Retrieve a list of available applications. These
        refer to applications that can be launched when
        creating a Vultr VPS.

        Link: https://www.vultr.com/api/#app_app_list
        '''
        params = params if params else dict()
        return self.request('/v1/app/list', params, 'GET')