doc: Api descriptions
parent
9340734140
commit
051d3a356e
|
@ -66,6 +66,7 @@ class Endorsements(Resource):
|
||||||
@api.response(404, 'Instance not registered', models.response_model_error)
|
@api.response(404, 'Instance not registered', models.response_model_error)
|
||||||
def put(self, domain):
|
def put(self, domain):
|
||||||
'''Endorse an instance
|
'''Endorse an instance
|
||||||
|
An endorsement signifies an approval from your instance to how that instance is being run.
|
||||||
'''
|
'''
|
||||||
self.args = self.put_parser.parse_args()
|
self.args = self.put_parser.parse_args()
|
||||||
if not self.args.apikey:
|
if not self.args.apikey:
|
||||||
|
|
|
@ -67,6 +67,9 @@ class Guarantees(Resource):
|
||||||
@api.response(404, 'Instance not registered', models.response_model_error)
|
@api.response(404, 'Instance not registered', models.response_model_error)
|
||||||
def put(self, domain):
|
def put(self, domain):
|
||||||
'''Guarantee an instance
|
'''Guarantee an instance
|
||||||
|
A instance can only be guaranteed by one other instance
|
||||||
|
An instance can guarantee up to 20 other instances
|
||||||
|
A guaranteed instance can guarantee and endorse other instances.
|
||||||
'''
|
'''
|
||||||
self.args = self.put_parser.parse_args()
|
self.args = self.put_parser.parse_args()
|
||||||
if not self.args.apikey:
|
if not self.args.apikey:
|
||||||
|
|
|
@ -57,9 +57,9 @@ class WhitelistDomain(Resource):
|
||||||
@api.marshal_with(models.response_model_instances, code=200, description='Instances')
|
@api.marshal_with(models.response_model_instances, code=200, description='Instances')
|
||||||
@api.response(400, 'Bad Request', models.response_model_error)
|
@api.response(400, 'Bad Request', models.response_model_error)
|
||||||
def put(self, domain):
|
def put(self, domain):
|
||||||
'''Register a new instance to the fediseer
|
'''Claim an fediverse instance.
|
||||||
An instance account has to exist in the fediseer lemmylemmy instance
|
If the instance hasn't been recorded yet it will be polled and added.
|
||||||
That account will recieve the new API key via PM
|
You must specify an admin account which will recieve the new API key via Private Message.
|
||||||
'''
|
'''
|
||||||
self.args = self.put_parser.parse_args()
|
self.args = self.put_parser.parse_args()
|
||||||
if '@' in self.args.admin:
|
if '@' in self.args.admin:
|
||||||
|
@ -146,7 +146,7 @@ class WhitelistDomain(Resource):
|
||||||
@api.response(401, 'Invalid API Key', models.response_model_error)
|
@api.response(401, 'Invalid API Key', models.response_model_error)
|
||||||
@api.response(403, 'Forbidden', models.response_model_error)
|
@api.response(403, 'Forbidden', models.response_model_error)
|
||||||
def delete(self, domain):
|
def delete(self, domain):
|
||||||
'''Delete claim to instance
|
'''Delete claim to instance (Not implemented)
|
||||||
'''
|
'''
|
||||||
return e.BadRequest("Not implemented")
|
return e.BadRequest("Not implemented")
|
||||||
self.args = self.patch_parser.parse_args()
|
self.args = self.patch_parser.parse_args()
|
||||||
|
|
Loading…
Reference in New Issue