Open Trivia DB (Independent Publisher) (#1993)

* Create README.md

* Update README.md

* Add files via upload

* Delete apiProperties.json

* Delete apiDefinition.swagger.json

* Add files via upload

* Delete apiDefinition.swagger.json

* Delete apiProperties.json

* Add files via upload

* Update apiProperties.json

* Update apiProperties.json

* Update apiDefinition.swagger.json

* Update README.md

* Update apiDefinition.swagger.json

* Rename independent-publisher-connectors/OpenTriviaDB Proposal- OTDB (Independent Publisher)/README.md to independent-publisher-connectors/OpenTriviaDB (Independent Publisher)README.md

* Rename independent-publisher-connectors/OpenTriviaDB (Independent Publisher)README.md to independent-publisher-connectors/OpenTriviaDB (Independent Publisher)/README.md

* Create README.md

* Delete independent-publisher-connectors/OpenTriviaDB (Independent Publisher) directory

* Rename independent-publisher-connectors/OpenTriviaDB Proposal- OTDB (Independent Publisher)/README.md to independent-publisher-connectors/OpenTriviaDB (Independent Publisher)/README.md

* Rename independent-publisher-connectors/OpenTriviaDB Proposal- OTDB (Independent Publisher)/apiDefinition.swagger.json to independent-publisher-connectors/OpenTriviaDB (Independent Publisher)/apiDefinition.swagger.json

* Rename independent-publisher-connectors/OpenTriviaDB Proposal- OTDB (Independent Publisher)/apiProperties.json to independent-publisher-connectors/OpenTriviaDB (Independent Publisher)/apiProperties.json

* Rename independent-publisher-connectors/OpenTriviaDB (Independent Publisher)/README.md to independent-publisher-connectors/OpenTriviaDB/README.md

* Rename independent-publisher-connectors/OpenTriviaDB (Independent Publisher)/apiDefinition.swagger.json to independent-publisher-connectors/OpenTriviaDB/apiDefinition.swagger.json

* Rename independent-publisher-connectors/OpenTriviaDB (Independent Publisher)/apiProperties.json to independent-publisher-connectors/OpenTriviaDB/apiProperties.json
This commit is contained in:
Kiveshan 2022-10-20 04:08:05 +02:00 коммит произвёл GitHub
Родитель 2b4e1b34b6
Коммит 385144e862
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 969 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,36 @@
# Open Trivia Database
The Open Trivia DB is a fun and interactive API that provides an easy way to acquire fun and random trivia questions at a moments notice.
## Publisher: Kiveshan Naidoo, Rishay Sunder
## Prerequisites
None
## Supported Operations
### Get a certain number of trivia questions, based on a criteria
Get a certain amount of questions from the database based on categories such as difficulty, Question Type and Category. Leaving
these options blank will return a random question
### Category Lookup
Returns the entire list of categories and ids in the database.
### Category Question Count Lookup:
Returns the number of questions in the database, in a specific category.
### Global Question Count Lookup:
Returns the number of ALL questions in the database. Total, Pending, Verified, and Rejected.
## Obtaining Credentials
No credentials required
## Limitations
Only 1 Category can be requested per API Call. To get questions from any category, don't specify a category.
A Maximum of 50 Questions can be retrieved per call.
## API Documentation
Visit the [Open Trivia DB](https://opentdb.com/api_config.php) page for further details

Просмотреть файл

@ -0,0 +1,924 @@
{
"swagger": "2.0",
"info": {
"title": "OpenTrivaDatabase",
"description": "This is a connector to the Open Trivia Database which allows access to trivia questions of varying categories.",
"version": "1.0",
"contact": {
"name":"Kiveshan Naidoo, Rishay Sunder",
"url":"https://opentdb.com",
"email": "kiveshannaidoo9@gmail.come"
}
},
"host": "opentdb.com",
"basePath": "/",
"schemes": [
"https"
],
"consumes": [],
"produces": [],
"paths": {
"/api_category.php": {
"get": {
"responses": {
"200": {
"description": "Sucessful operation",
"schema": {
"type": "object",
"properties": {
"trivia_categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "id"
},
"name": {
"type": "string",
"description": "name"
}
}
},
"description": "trivia_categories"
}
}
}
}
},
"summary": "Get Categories",
"description": "Get the categories along with their IDs'.",
"operationId": "GetCategories",
"parameters": []
}
},
"/api.php": {
"get": {
"responses": {
"200": {
"description": "Sucessful operation",
"schema": {
"type": "object",
"properties": {
"response_code": {
"type": "integer",
"format": "int32",
"description": "response_code"
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"category": {
"type": "string",
"description": "category"
},
"type": {
"type": "string",
"description": "type"
},
"difficulty": {
"type": "string",
"description": "difficulty"
},
"question": {
"type": "string",
"description": "question"
},
"correct_answer": {
"type": "string",
"description": "correct_answer"
},
"incorrect_answers": {
"type": "array",
"items": {
"type": "string"
},
"description": "incorrect_answers"
}
}
},
"description": "results"
}
}
}
}
},
"summary": "Get Question",
"description": "Gets a certain amount of questions.",
"operationId": "GetQuestion",
"parameters": [
{
"name": "amount",
"in": "query",
"required": true,
"type": "integer",
"description": "Amount of questions you want to receive.",
"x-ms-summary": "Amount"
},
{
"name": "category",
"in": "query",
"required": false,
"type": "integer",
"description": "The category of questions.",
"x-ms-summary": "Category",
"x-ms-dynamic-values": {
"operationId": "GetCategories",
"value-path": "id",
"value-collection": "trivia_categories",
"value-title": "name"
}
},
{
"name": "difficulty",
"in": "query",
"required": false,
"type": "string",
"description": "The difficulty of the question/s.",
"x-ms-summary": "Difficulty",
"enum": [
"easy",
"medium",
"hard"
]
},
{
"name": "type",
"in": "query",
"required": false,
"type": "string",
"enum": [
"boolean",
"multiple"
],
"description": "The type of question/s.",
"x-ms-summary": "Type"
}
]
}
},
"/api_count.php": {
"get": {
"responses": {
"200": {
"description": "Sucessful operation",
"schema": {
"type": "object",
"properties": {
"category_id": {
"type": "integer",
"format": "int32",
"description": "category_id"
},
"category_question_count": {
"type": "object",
"properties": {
"total_question_count": {
"type": "integer",
"format": "int32",
"description": "total_question_count"
},
"total_easy_question_count": {
"type": "integer",
"format": "int32",
"description": "total_easy_question_count"
},
"total_medium_question_count": {
"type": "integer",
"format": "int32",
"description": "total_medium_question_count"
},
"total_hard_question_count": {
"type": "integer",
"format": "int32",
"description": "total_hard_question_count"
}
},
"description": "category_question_count"
}
}
}
}
},
"summary": "Question Count Lookup",
"description": "Returns the number of questions in the database, in a specific category.",
"operationId": "QuestionCountLookup",
"parameters": [
{
"name": "category",
"in": "query",
"required": true,
"type": "integer",
"description": "Category of question.",
"x-ms-summary": "Category",
"x-ms-dynamic-values": {
"operationId": "GetCategories",
"value-path": "id",
"value-collection": "trivia_categories",
"value-title": "name"
}
}
]
}
},
"/api_count_global.php": {
"get": {
"responses": {
"200": {
"description": "Sucessful operation",
"schema": {
"type": "object",
"properties": {
"overall": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "overall"
},
"categories": {
"type": "object",
"properties": {
"9": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "9"
},
"10": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "10"
},
"11": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "11"
},
"12": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "12"
},
"13": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "13"
},
"14": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "14"
},
"15": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "15"
},
"16": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "16"
},
"17": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "17"
},
"18": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "18"
},
"19": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "19"
},
"20": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "20"
},
"21": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "21"
},
"22": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "22"
},
"23": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "23"
},
"24": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "24"
},
"25": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "25"
},
"26": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "26"
},
"27": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "27"
},
"28": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "28"
},
"29": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "29"
},
"30": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "30"
},
"31": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "31"
},
"32": {
"type": "object",
"properties": {
"total_num_of_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_questions"
},
"total_num_of_pending_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_pending_questions"
},
"total_num_of_verified_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_verified_questions"
},
"total_num_of_rejected_questions": {
"type": "integer",
"format": "int32",
"description": "total_num_of_rejected_questions"
}
},
"description": "32"
}
},
"description": "categories"
}
}
}
}
},
"summary": "Global Count Lookup",
"description": "Returns the number of ALL questions in the database. Total, Pending, Verified, and Rejected.",
"operationId": "GlobalCountLookup",
"parameters": []
}
}
},
"definitions": {},
"parameters": {},
"responses": {},
"securityDefinitions": {},
"security": [],
"tags": [],
"x-ms-connector-metadata":[
{
"propertyName":"Website",
"propertyValue":"http://opentdb.com/"
},
{
"propertyName":"Privacy policy",
"propertyValue":"https://docs.npmjs.com/policies/terms"
},
{
"propertyName":"Categories",
"propertyValue":"Lifestyle and Entertainment"
}
]
}

Просмотреть файл

@ -0,0 +1,9 @@
{
"properties": {
"connectionParameters": {},
"iconBrandColor": "#da3b01",
"capabilities": [],
"publisher": "Kiveshan Naidoo",
"stackOwner":"PIXELTAIL GAMES LLC"
}
}