Skip to content

Commit

Permalink
Add deeparteffects.com API
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRalphson committed Nov 26, 2017
1 parent de30f8b commit c635ef6
Show file tree
Hide file tree
Showing 2 changed files with 254 additions and 0 deletions.
247 changes: 247 additions & 0 deletions APIs/deeparteffects.com/2017-02-10T162446Z/swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
swagger: '2.0'
schemes:
- https
host: api.deeparteffects.com
basePath: /v1
info:
contact:
x-twitter: deeparteffects
title: Deep Art Effects
version: '2017-02-10T16:24:46Z'
x-apisguru-categories:
- media
x-logo:
url: 'https://twitter.com/deeparteffects/profile_image?size=original'
x-origin:
- format: swagger
url: 'http://docs.deeparteffects.com/swagger.json'
version: '2.0'
x-providerName: deeparteffects.com
produces:
- application/json
securityDefinitions:
api_key:
in: header
name: x-api-key
type: apiKey
sigv4:
in: header
name: Authorization
type: apiKey
x-amazon-apigateway-authtype: awsSigv4
paths:
/noauth/result:
get:
parameters:
- in: query
name: submissionId
required: false
type: string
responses:
'200':
description: 200 response
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: '#/definitions/Result'
'400':
description: 400 response
schema:
$ref: '#/definitions/Error'
security:
- api_key: []
x-amazon-apigateway-integration:
httpMethod: GET
passthroughBehavior: when_no_match
requestParameters:
integration.request.querystring.apiKey: context.identity.apiKey
integration.request.querystring.identifier: method.request.querystring.submissionId
responses:
'200':
responseParameters:
method.response.header.Access-Control-Allow-Origin: '''*'''
responseTemplates:
application/json: |-
#set($inputRoot = $input.path('$').data)
{
"status" : "$inputRoot.status",
"url" : "$inputRoot.filepath"
}
statusCode: '200'
'400':
responseTemplates:
application/json: |-
#set($inputRoot = $input.path('$'))
{
"message" : "Invalid request"
}
statusCode: '400'
type: http
uri: 'https://www.deeparteffects.com/service/getsubmissionresultv3'
/noauth/styles:
get:
responses:
'200':
description: 200 response
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: '#/definitions/Styles'
security:
- api_key: []
x-amazon-apigateway-integration:
httpMethod: GET
passthroughBehavior: when_no_match
requestParameters:
integration.request.querystring.apiKey: context.identity.apiKey
responses:
'200':
responseParameters:
method.response.header.Access-Control-Allow-Origin: '''*'''
responseTemplates:
application/json: "#set($inputRoot = $input.path('$'))\n{\n \"styles\": [\n#foreach($style in $inputRoot.data)\n {\n \"id\" : \"$style.identifier\",\n \"title\" : \"$style.title\",\n \"url\" : \"$style.url\",\n \"description\" : \"$style.description\"\n }#if($foreach.hasNext),#end\n\t\t\n#end\n ]\n}"
statusCode: '200'
type: http
uri: 'https://www.deeparteffects.com/service/liststyles?e=1'
/noauth/upload:
post:
consumes:
- application/json
parameters:
- in: body
name: UploadRequest
required: true
schema:
$ref: '#/definitions/UploadRequest'
responses:
'200':
description: 200 response
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: '#/definitions/UploadResponse'
'400':
description: 400 response
schema:
$ref: '#/definitions/Error'
security:
- api_key: []
x-amazon-apigateway-integration:
httpMethod: POST
passthroughBehavior: when_no_templates
requestTemplates:
application/json: |-
#set($inputRoot = $input.path('$'))
{
"apiKey" : "$context.identity.apiKey",
#if("$!inputRoot.imageSize"!="")
"imageSize" : $inputRoot.imageSize,
#end
#if("$!inputRoot.partnerId"!="")
"partnerId" : "$inputRoot.partnerId",
#end
#if("$!inputRoot.optimizeForPrint"!="")
"optimizeForPrint" : $inputRoot.optimizeForPrint,
#end
#if("$!inputRoot.useOriginalColors"!="")
"useOriginalColors" : $inputRoot.useOriginalColors,
#end
"styleId" : "$inputRoot.styleId",
"imageBase64Encoded" : "$inputRoot.imageBase64Encoded"
}
responses:
'200':
responseParameters:
method.response.header.Access-Control-Allow-Origin: '''*'''
responseTemplates:
application/json: |-
#set($inputRoot = $input.path('$').data)
{
"submissionId" : "$inputRoot.identifier"
}
statusCode: '200'
'4\d{2}':
responseTemplates:
application/json: |-
#set($inputRoot = $input.path('$'))
{
"message" : "Invalid request"
}
statusCode: '400'
type: http
uri: 'https://www.deeparteffects.com/service/uploadv3'
definitions:
Empty:
title: Empty Schema
type: object
Error:
properties:
message:
type: string
title: Error Schema
type: object
Result:
properties:
status:
description: 'Submissiond status. Can be ''new'', ''error'', ''processing'', ''finished'''
type: string
url:
description: Result url for the artwork
type: string
title: GetResult Schema
type: object
Style:
properties:
description:
description: Style description
type: string
id:
description: The unique identifier for a style
type: string
title:
description: Style title
type: string
url:
description: Style URL
type: string
title: Style Schema
type: object
Styles:
properties:
styles:
items:
$ref: '#/definitions/Style'
type: array
title: List Styles Schema
type: object
UploadRequest:
properties:
imageBase64Encoded:
description: Base64 decoded image
type: string
imageSize:
description: Image size in px. Picture will be resized for processing.
type: integer
optimizeForPrint:
description: Use this flag to get an artwork optimized for print.
type: boolean
partnerId:
description: The unique identifier for a partner with dedicated api access.
type: string
styleId:
description: The unique identifier for a style
type: string
useOriginalColors:
description: Use this flag to use the original color from your photo for the artwork.
type: boolean
title: Request schema for a submission
type: object
UploadResponse:
properties:
submissionId:
type: string
title: Response Schema for upload request
type: object
7 changes: 7 additions & 0 deletions APIs/deeparteffects.com/patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
info:
x-apisguru-categories:
- media
contact:
x-twitter: deeparteffects
x-logo:
url: 'https://twitter.com/deeparteffects/profile_image?size=original'

0 comments on commit c635ef6

Please sign in to comment.