forked from microsoft/PowerPlatformConnectors
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Discord (Independent Publisher) (microsoft#996)
* Init Discord Connector * Added connector details * Added Michael's company name
- Loading branch information
Showing
3 changed files
with
467 additions
and
0 deletions.
There are no files selected for viewing
395 changes: 395 additions & 0 deletions
395
independent-publisher-connectors/Discord/apiDefinition.swagger.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,395 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Discord", | ||
"description": "Discord is a voice, video and text communication service used by over a hundred million people to hang out and talk with their friends and communities.", | ||
"version": "1.0", | ||
"contact": { | ||
"name": "Daniel Laskewitz | Sogeti", | ||
"url": "https://youtube.com/daniellaskewitz", | ||
"email": "connectorsupport@laskewitz.io" | ||
} | ||
}, | ||
"x-ms-connector-metadata": [ | ||
{ | ||
"propertyName": "Website", | ||
"propertyValue": "https://discord.com" | ||
}, | ||
{ | ||
"propertyName": "Privacy policy", | ||
"propertyValue": "https://discord.com/privacy" | ||
}, | ||
{ | ||
"propertyName": "Categories", | ||
"propertyValue": "Lifestyle and Entertainment;Social Media" | ||
} | ||
], | ||
"host": "discord.com", | ||
"basePath": "/api", | ||
"schemes": ["https"], | ||
"consumes": [], | ||
"produces": [], | ||
"paths": { | ||
"/v9/users/@me": { | ||
"get": { | ||
"responses": { | ||
"200": { | ||
"description": "default", | ||
"schema": { | ||
"$ref": "#/definitions/User" | ||
} | ||
} | ||
}, | ||
"summary": "Get Current User", | ||
"description": "Returns the user object of the requestors account.", | ||
"operationId": "GetCurrentUser", | ||
"parameters": [] | ||
} | ||
}, | ||
"/v9/users/@me/connections": { | ||
"get": { | ||
"responses": { | ||
"200": { | ||
"description": "default", | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/Connection" | ||
} | ||
} | ||
} | ||
}, | ||
"summary": "Get User Connections", | ||
"description": "Returns a list of connection objects.", | ||
"operationId": "GetUserConnections", | ||
"parameters": [] | ||
} | ||
}, | ||
"/v9/users/@me/guilds": { | ||
"get": { | ||
"responses": { | ||
"200": { | ||
"description": "default", | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/Guild" | ||
} | ||
} | ||
} | ||
}, | ||
"parameters": [], | ||
"summary": "Get Current User Guilds", | ||
"description": "Returns a list of partial guild objects the current user is a member of.", | ||
"operationId": "GetCurrentUserGuilds" | ||
} | ||
}, | ||
"/v9/webhooks/{webhook.id}/{webhook.token}": { | ||
"post": { | ||
"consumes": ["application/json"], | ||
"responses": { | ||
"200": { | ||
"description": "default", | ||
"schema": { | ||
"$ref": "#/definitions/Webhook" | ||
} | ||
} | ||
}, | ||
"summary": "Execute Webhook", | ||
"description": "This request executes a webhook by using a webhook id and token.", | ||
"operationId": "ExecuteWebhook", | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/WebhookID" | ||
}, | ||
{ | ||
"$ref": "#/parameters/WebhookToken" | ||
}, | ||
{ | ||
"name": "content-type", | ||
"in": "header", | ||
"required": false, | ||
"type": "string", | ||
"default": "application/json", | ||
"enum": ["application/json", "multipart/form-data"], | ||
"x-ms-summary": "Content-Type", | ||
"description": "The content type of the request." | ||
}, | ||
{ | ||
"name": "body", | ||
"in": "body", | ||
"required": false, | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"content": { | ||
"type": "string", | ||
"x-ms-summary": "Content", | ||
"description": "The message contents (up to 2000 characters)." | ||
}, | ||
"username": { | ||
"type": "string", | ||
"x-ms-summary": "Username", | ||
"description": "Override the default username of the webhook." | ||
}, | ||
"avatar-url": { | ||
"type": "string", | ||
"x-ms-summary": "Avatar URL", | ||
"description": "Override the default avatar of the webhook." | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"Channel": {}, | ||
"Connection": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"description": "type" | ||
}, | ||
"id": { | ||
"type": "string", | ||
"description": "id" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "name" | ||
}, | ||
"visibility": { | ||
"type": "integer", | ||
"format": "int32", | ||
"description": "visibility" | ||
}, | ||
"friend_sync": { | ||
"type": "boolean", | ||
"description": "friend_sync" | ||
}, | ||
"show_activity": { | ||
"type": "boolean", | ||
"description": "show_activity" | ||
}, | ||
"verified": { | ||
"type": "boolean", | ||
"description": "verified" | ||
} | ||
} | ||
}, | ||
"Guild": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"description": "id" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "name" | ||
}, | ||
"icon": { | ||
"type": "string", | ||
"description": "icon" | ||
}, | ||
"owner": { | ||
"type": "boolean", | ||
"description": "owner" | ||
}, | ||
"permissions": { | ||
"type": "string", | ||
"description": "permissions" | ||
}, | ||
"features": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"description": "features" | ||
} | ||
} | ||
}, | ||
"User": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"x-ms-summary": "ID", | ||
"description": "The user's id." | ||
}, | ||
"username": { | ||
"type": "string", | ||
"x-ms-summary": "Username", | ||
"description": "The user's username, not unique across the platform." | ||
}, | ||
"discriminator": { | ||
"type": "string", | ||
"x-ms-summary": "Discriminator", | ||
"description": "The user's 4-digit discord-tag." | ||
}, | ||
"avatar": { | ||
"type": "string", | ||
"x-ms-summary": "Avatar", | ||
"description": "The user's avatar hash." | ||
}, | ||
"bot": { | ||
"type": "boolean", | ||
"x-ms-summary": "Bot", | ||
"description": "Whether the user belongs to an OAuth2 application." | ||
}, | ||
"system": { | ||
"type": "boolean", | ||
"x-ms-summary": "System", | ||
"description": "Whether the user is an Official Discord System user (part of the urgent message system)." | ||
}, | ||
"mfa_enabled": { | ||
"type": "boolean", | ||
"x-ms-summary": "MFA Enabled", | ||
"description": "Whether the user has two factor enabled on their account." | ||
}, | ||
"locale": { | ||
"type": "string", | ||
"x-ms-summary": "Locale", | ||
"description": "The user's chosen language option." | ||
}, | ||
"verified": { | ||
"type": "boolean", | ||
"x-ms-summary": "Verified", | ||
"description": "Whether the email on this account has been verified." | ||
}, | ||
"email": { | ||
"type": "string", | ||
"x-ms-summary": "Email", | ||
"description": "The user's email." | ||
}, | ||
"flags": { | ||
"type": "integer", | ||
"format": "int32", | ||
"x-ms-summary": "Flags", | ||
"description": "The flags on a user's account." | ||
}, | ||
"premium_type": { | ||
"type": "integer", | ||
"format": "int32", | ||
"x-ms-summary": "Premium Type", | ||
"description": "The type of Nitro subscription on a user's account." | ||
}, | ||
"public_flags": { | ||
"type": "integer", | ||
"format": "int32", | ||
"x-ms-summary": "Public Flags", | ||
"description": "The public flags on a user's account." | ||
} | ||
} | ||
}, | ||
"Webhook": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"x-ms-summary": "ID", | ||
"description": "The id of the webhook." | ||
}, | ||
"type": { | ||
"type": "integer", | ||
"x-ms-summary": "Type", | ||
"description": "The type of webhook." | ||
}, | ||
"guild_id": { | ||
"type": "string", | ||
"x-ms-summary": "Guild ID", | ||
"description": "The guild id this webhook is for, if any." | ||
}, | ||
"channel_id": { | ||
"type": "string", | ||
"x-ms-summary": "Channel ID", | ||
"description": "The channel id this webhook is for, if any." | ||
}, | ||
"user": { | ||
"$ref": "#/definitions/User" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"x-ms-summary": "Name", | ||
"description": "The default name of the webhook." | ||
}, | ||
"avatar": { | ||
"type": "string", | ||
"x-ms-summary": "Avatar", | ||
"description": "The default user avatar hash of the webhook." | ||
}, | ||
"token": { | ||
"type": "string", | ||
"x-ms-summary": "Token", | ||
"description": "The secure token of the webhook (returned for Incoming Webhooks)." | ||
}, | ||
"application_id": { | ||
"type": "string", | ||
"x-ms-summary": "Application ID", | ||
"description": "The bot/OAuth2 application that created this webhook." | ||
}, | ||
"source_guild": { | ||
"$ref": "#/definitions/Guild" | ||
}, | ||
"source_channel": { | ||
"$ref": "#/definitions/Channel" | ||
} | ||
} | ||
} | ||
}, | ||
"parameters": { | ||
"GuildID": { | ||
"name": "guild.id", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-summary": "Guild", | ||
"description": "Select the guild (server).", | ||
"x-ms-url-encoding": "single", | ||
"x-ms-dynamic-values": { | ||
"operationId": "GetCurrentUserGuilds", | ||
"value-path": "id", | ||
"value-title": "name" | ||
} | ||
}, | ||
"WebhookID": { | ||
"name": "webhook.id", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-summary": "Webhook ID", | ||
"description": "The ID of the webhook.", | ||
"x-ms-url-encoding": "single" | ||
}, | ||
"WebhookToken": { | ||
"name": "webhook.token", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-summary": "Webhook Token", | ||
"description": "The token of the webhook.", | ||
"x-ms-url-encoding": "single" | ||
} | ||
}, | ||
"responses": {}, | ||
"securityDefinitions": { | ||
"undefined": { | ||
"type": "oauth2", | ||
"flow": "accessCode", | ||
"authorizationUrl": "https://discord.com/api/oauth2/authorize", | ||
"tokenUrl": "https://discord.com/api/oauth2/token", | ||
"scopes": { | ||
"identify email guilds connections webhook.incoming": "identify email guilds connections webhook.incoming" | ||
} | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"undefined": ["identify email guilds connections webhook.incoming"] | ||
} | ||
], | ||
"tags": [] | ||
} |
Oops, something went wrong.