More API documentation
This commit is contained in:
@@ -58,10 +58,28 @@ class MoviePlugin(Plugin):
|
||||
}
|
||||
})
|
||||
addApiView('movie.available_chars', self.charView)
|
||||
|
||||
addApiView('movie.add', self.addView)
|
||||
addApiView('movie.edit', self.edit)
|
||||
addApiView('movie.delete', self.delete)
|
||||
addApiView('movie.add', self.addView, docs = {
|
||||
'desc': 'Add new movie to the wanted list',
|
||||
'params': {
|
||||
'identifier': {'desc': 'IMDB id of the movie your want to add.'},
|
||||
'profile_id': {'desc': 'ID of quality profile you want the add the movie in. If empty will use the default profile.'},
|
||||
'title': {'desc': 'Movie title to use for searches. Has to be one of the titles returned by movie.search.'},
|
||||
}
|
||||
})
|
||||
addApiView('movie.edit', self.edit, docs = {
|
||||
'desc': 'Add new movie to the wanted list',
|
||||
'params': {
|
||||
'id': {'desc': 'Movie ID you want to edit'},
|
||||
'profile_id': {'desc': 'ID of quality profile you want the edit the movie to.'},
|
||||
'default_title': {'desc': 'Movie title to use for searches. Has to be one of the titles returned by movie.search.'},
|
||||
}
|
||||
})
|
||||
addApiView('movie.delete', self.delete, docs = {
|
||||
'desc': 'Delete a movie from the wanted list',
|
||||
'params': {
|
||||
'id': {'desc': 'Movie ID you want to delete'},
|
||||
}
|
||||
})
|
||||
|
||||
addEvent('movie.add', self.add)
|
||||
addEvent('movie.get', self.get)
|
||||
|
||||
@@ -16,8 +16,18 @@ class Release(Plugin):
|
||||
def __init__(self):
|
||||
addEvent('release.add', self.add)
|
||||
|
||||
addApiView('release.download', self.download)
|
||||
addApiView('release.delete', self.delete)
|
||||
addApiView('release.download', self.download, docs = {
|
||||
'desc': 'Send a release manually to the downloaders',
|
||||
'params': {
|
||||
'id': {'type': 'id', 'desc': 'ID of the release object in release-table'}
|
||||
}
|
||||
})
|
||||
addApiView('release.delete', self.delete, docs = {
|
||||
'desc': 'Check for available update',
|
||||
'params': {
|
||||
'id': {'type': 'id', 'desc': 'ID of the release object in release-table'}
|
||||
}
|
||||
})
|
||||
|
||||
def add(self, group):
|
||||
db = get_session()
|
||||
|
||||
@@ -22,7 +22,9 @@ class Renamer(Plugin):
|
||||
|
||||
def __init__(self):
|
||||
|
||||
addApiView('renamer.scan', self.scanView)
|
||||
addApiView('renamer.scan', self.scanView, docs = {
|
||||
'desc': 'For the renamer to check for new files to rename',
|
||||
})
|
||||
|
||||
addEvent('renamer.scan', self.scan)
|
||||
addEvent('app.load', self.scan)
|
||||
@@ -31,7 +33,7 @@ class Renamer(Plugin):
|
||||
|
||||
def scanView(self):
|
||||
|
||||
fireEvent('renamer.scan')
|
||||
fireEventAsync('renamer.scan')
|
||||
|
||||
return jsonified({
|
||||
'success': True
|
||||
|
||||
@@ -29,7 +29,13 @@ class StatusPlugin(Plugin):
|
||||
addEvent('status.all', self.all)
|
||||
addEvent('app.initialize', self.fill)
|
||||
|
||||
addApiView('status.list', self.list)
|
||||
addApiView('status.list', self.list, docs = {
|
||||
'desc': 'Check for available update',
|
||||
'return': {'type': 'object', 'example': """{
|
||||
'success': True,
|
||||
'list': array, statuses
|
||||
}"""}
|
||||
})
|
||||
|
||||
def list(self):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user