mirror of
				https://gitlab.com/questable/api-docs
				synced 2025-11-03 21:50:05 +01:00 
			
		
		
		
	Add /update_quest, /update_side_quest
This commit is contained in:
		
							
								
								
									
										110
									
								
								docs.yml
									
									
									
									
									
								
							
							
						
						
									
										110
									
								
								docs.yml
									
									
									
									
									
								
							@@ -29,12 +29,15 @@ paths:
 | 
				
			|||||||
                - $ref: '#/components/schemas/token'
 | 
					                - $ref: '#/components/schemas/token'
 | 
				
			||||||
            responses:
 | 
					            responses:
 | 
				
			||||||
                200:
 | 
					                200:
 | 
				
			||||||
 | 
					                    description: Returns an array of incomplete quests
 | 
				
			||||||
                    content:
 | 
					                    content:
 | 
				
			||||||
                        application/json:
 | 
					                        application/json:
 | 
				
			||||||
                            schema:
 | 
					                            schema:
 | 
				
			||||||
                                type: array
 | 
					                                type: array
 | 
				
			||||||
                                items:
 | 
					                                items:
 | 
				
			||||||
                                    $ref: '#/components/schemas/quests'
 | 
					                                    $ref: '#/components/schemas/quests'
 | 
				
			||||||
 | 
					                401:
 | 
				
			||||||
 | 
					                    $ref: "#/components/responses/bad_auth"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /get_side_quests:
 | 
					    /get_side_quests:
 | 
				
			||||||
        get:
 | 
					        get:
 | 
				
			||||||
@@ -44,12 +47,15 @@ paths:
 | 
				
			|||||||
                - $ref: '#/components/schemas/token'
 | 
					                - $ref: '#/components/schemas/token'
 | 
				
			||||||
            responses:
 | 
					            responses:
 | 
				
			||||||
                200:
 | 
					                200:
 | 
				
			||||||
 | 
					                    description: Returns an array of incomplete side quests
 | 
				
			||||||
                    content:
 | 
					                    content:
 | 
				
			||||||
                        application/json:
 | 
					                        application/json:
 | 
				
			||||||
                            schema:
 | 
					                            schema:
 | 
				
			||||||
                                type: array
 | 
					                                type: array
 | 
				
			||||||
                                items:
 | 
					                                items:
 | 
				
			||||||
                                    $ref: '#/components/schemas/quests'
 | 
					                                    $ref: '#/components/schemas/quests'
 | 
				
			||||||
 | 
					                401:
 | 
				
			||||||
 | 
					                    $ref: "#/components/responses/bad_auth"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /get_quest:
 | 
					    /get_quest:
 | 
				
			||||||
        get:
 | 
					        get:
 | 
				
			||||||
@@ -60,10 +66,13 @@ paths:
 | 
				
			|||||||
                - $ref: '#/components/schemas/id'
 | 
					                - $ref: '#/components/schemas/id'
 | 
				
			||||||
            responses:
 | 
					            responses:
 | 
				
			||||||
                200:
 | 
					                200:
 | 
				
			||||||
 | 
					                    description: Returns the quest.
 | 
				
			||||||
                    content:
 | 
					                    content:
 | 
				
			||||||
                        application/json:
 | 
					                        application/json:
 | 
				
			||||||
                            schema:
 | 
					                            schema:
 | 
				
			||||||
                                $ref: '#/components/schemas/quests'
 | 
					                                $ref: '#/components/schemas/quests'
 | 
				
			||||||
 | 
					                401:
 | 
				
			||||||
 | 
					                    $ref: "#/components/responses/bad_auth"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /get_side_quest:
 | 
					    /get_side_quest:
 | 
				
			||||||
        get:
 | 
					        get:
 | 
				
			||||||
@@ -74,10 +83,60 @@ paths:
 | 
				
			|||||||
                - $ref: '#/components/schemas/id'
 | 
					                - $ref: '#/components/schemas/id'
 | 
				
			||||||
            responses:
 | 
					            responses:
 | 
				
			||||||
                200:
 | 
					                200:
 | 
				
			||||||
 | 
					                    description: Returns the side quest.
 | 
				
			||||||
                    content:
 | 
					                    content:
 | 
				
			||||||
                        application/json:
 | 
					                        application/json:
 | 
				
			||||||
                            schema:
 | 
					                            schema:
 | 
				
			||||||
                                $ref: '#/components/schemas/quests'
 | 
					                                $ref: '#/components/schemas/quests'
 | 
				
			||||||
 | 
					                401:
 | 
				
			||||||
 | 
					                    $ref: "#/components/responses/bad_auth"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /update_quest:
 | 
				
			||||||
 | 
					        post:
 | 
				
			||||||
 | 
					            summary: update_quest
 | 
				
			||||||
 | 
					            description: To change any of the parameters of a quest. (Pass atleast one of optional parameters)
 | 
				
			||||||
 | 
					            parameters:
 | 
				
			||||||
 | 
					                - $ref: '#/components/schemas/token'
 | 
				
			||||||
 | 
					                - $ref: '#/components/schemas/id'
 | 
				
			||||||
 | 
					                - $ref: '#/components/schemas/name'
 | 
				
			||||||
 | 
					                - $ref: '#/components/schemas/difficulty'
 | 
				
			||||||
 | 
					                - $ref: '#/components/schemas/priority'
 | 
				
			||||||
 | 
					                - $ref: '#/components/schemas/state'
 | 
				
			||||||
 | 
					            responses:
 | 
				
			||||||
 | 
					                200:
 | 
				
			||||||
 | 
					                    description: Returns the updated quest.
 | 
				
			||||||
 | 
					                    content:
 | 
				
			||||||
 | 
					                        application/json:
 | 
				
			||||||
 | 
					                            schema:
 | 
				
			||||||
 | 
					                                $ref: '#/components/schemas/quests'
 | 
				
			||||||
 | 
					                401:
 | 
				
			||||||
 | 
					                    $ref: "#/components/responses/bad_auth"
 | 
				
			||||||
 | 
					                400:
 | 
				
			||||||
 | 
					                    $ref: "#/components/responses/bad_request"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /update_side_quest:
 | 
				
			||||||
 | 
					        post:
 | 
				
			||||||
 | 
					            summary: update_side_quest
 | 
				
			||||||
 | 
					            description: To change any of the parameters of a side quest. (Pass atleast one of optional parameters)
 | 
				
			||||||
 | 
					            parameters:
 | 
				
			||||||
 | 
					                - $ref: '#/components/schemas/token'
 | 
				
			||||||
 | 
					                - $ref: '#/components/schemas/id'
 | 
				
			||||||
 | 
					                - $ref: '#/components/schemas/name'
 | 
				
			||||||
 | 
					                - $ref: '#/components/schemas/difficulty'
 | 
				
			||||||
 | 
					                - $ref: '#/components/schemas/priority'
 | 
				
			||||||
 | 
					                - $ref: '#/components/schemas/state'
 | 
				
			||||||
 | 
					            responses:
 | 
				
			||||||
 | 
					                200:
 | 
				
			||||||
 | 
					                    description: Returns the updated side quest.
 | 
				
			||||||
 | 
					                    content:
 | 
				
			||||||
 | 
					                        application/json:
 | 
				
			||||||
 | 
					                            schema:
 | 
				
			||||||
 | 
					                                $ref: '#/components/schemas/quests'
 | 
				
			||||||
 | 
					                401:
 | 
				
			||||||
 | 
					                    $ref: "#/components/responses/bad_auth"
 | 
				
			||||||
 | 
					                400:
 | 
				
			||||||
 | 
					                    $ref: "#/components/responses/bad_request"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
components:
 | 
					components:
 | 
				
			||||||
    schemas:
 | 
					    schemas:
 | 
				
			||||||
@@ -120,3 +179,54 @@ components:
 | 
				
			|||||||
                state:
 | 
					                state:
 | 
				
			||||||
                    type: boolean
 | 
					                    type: boolean
 | 
				
			||||||
                    description: True if the quest/side quest has been completed
 | 
					                    description: True if the quest/side quest has been completed
 | 
				
			||||||
 | 
					        name:
 | 
				
			||||||
 | 
					            name: name
 | 
				
			||||||
 | 
					            in: query
 | 
				
			||||||
 | 
					            description: Updated Name of the quest/side quest
 | 
				
			||||||
 | 
					            required: false
 | 
				
			||||||
 | 
					            schema:
 | 
				
			||||||
 | 
					                type: string
 | 
				
			||||||
 | 
					        priority:
 | 
				
			||||||
 | 
					            name: priority
 | 
				
			||||||
 | 
					            in: query
 | 
				
			||||||
 | 
					            description: New Priority to set. (Low = 1, Medium = 2, High = 3)
 | 
				
			||||||
 | 
					            required: false
 | 
				
			||||||
 | 
					            schema:
 | 
				
			||||||
 | 
					                type: integer
 | 
				
			||||||
 | 
					        difficulty:
 | 
				
			||||||
 | 
					            name: difficulty
 | 
				
			||||||
 | 
					            in: query
 | 
				
			||||||
 | 
					            description: New Difficulty to set. (Low = 1, Medium = 2, High = 3)
 | 
				
			||||||
 | 
					            required: false
 | 
				
			||||||
 | 
					            schema:
 | 
				
			||||||
 | 
					                type: integer
 | 
				
			||||||
 | 
					        state:
 | 
				
			||||||
 | 
					            name: state
 | 
				
			||||||
 | 
					            in: query
 | 
				
			||||||
 | 
					            description: New state. (can only be true, completed quests can't be un-completed)
 | 
				
			||||||
 | 
					            required: false
 | 
				
			||||||
 | 
					            schema:
 | 
				
			||||||
 | 
					                type: true
 | 
				
			||||||
 | 
					    responses:
 | 
				
			||||||
 | 
					        bad_request:
 | 
				
			||||||
 | 
					            description: The request has missing parameters.
 | 
				
			||||||
 | 
					            content:
 | 
				
			||||||
 | 
					                application/json:
 | 
				
			||||||
 | 
					                    schema:
 | 
				
			||||||
 | 
					                        required:
 | 
				
			||||||
 | 
					                            - error
 | 
				
			||||||
 | 
					                        properties:
 | 
				
			||||||
 | 
					                            error:
 | 
				
			||||||
 | 
					                                type: string
 | 
				
			||||||
 | 
					                                description: Explains the error. Possible values are "insufficient parameters"
 | 
				
			||||||
 | 
					        bad_auth:
 | 
				
			||||||
 | 
					            description: The token is invalid.
 | 
				
			||||||
 | 
					            content:
 | 
				
			||||||
 | 
					                application/json:
 | 
				
			||||||
 | 
					                    schema:
 | 
				
			||||||
 | 
					                        required:
 | 
				
			||||||
 | 
					                            - error
 | 
				
			||||||
 | 
					                        properties:
 | 
				
			||||||
 | 
					                            error:
 | 
				
			||||||
 | 
					                                type: string
 | 
				
			||||||
 | 
					                                description: The token is invalid
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user