doc: Api descriptions

pull/8/head
db0 2023-06-24 03:13:06 +02:00
parent 9340734140
commit 051d3a356e
3 changed files with 8 additions and 4 deletions

View File

@ -66,6 +66,7 @@ class Endorsements(Resource):
@api.response(404, 'Instance not registered', models.response_model_error)
def put(self, domain):
'''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()
if not self.args.apikey:

View File

@ -67,6 +67,9 @@ class Guarantees(Resource):
@api.response(404, 'Instance not registered', models.response_model_error)
def put(self, domain):
'''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()
if not self.args.apikey:

View File

@ -57,9 +57,9 @@ class WhitelistDomain(Resource):
@api.marshal_with(models.response_model_instances, code=200, description='Instances')
@api.response(400, 'Bad Request', models.response_model_error)
def put(self, domain):
'''Register a new instance to the fediseer
An instance account has to exist in the fediseer lemmylemmy instance
That account will recieve the new API key via PM
'''Claim an fediverse instance.
If the instance hasn't been recorded yet it will be polled and added.
You must specify an admin account which will recieve the new API key via Private Message.
'''
self.args = self.put_parser.parse_args()
if '@' in self.args.admin:
@ -146,7 +146,7 @@ class WhitelistDomain(Resource):
@api.response(401, 'Invalid API Key', models.response_model_error)
@api.response(403, 'Forbidden', models.response_model_error)
def delete(self, domain):
'''Delete claim to instance
'''Delete claim to instance (Not implemented)
'''
return e.BadRequest("Not implemented")
self.args = self.patch_parser.parse_args()