swagger: "2.0"
schemes:
  - https
  - http
host: api.funtranslations.com
info:
  contact:
    name: Fun Translations
    url: https://funtranslations.com/api/braille
    x-twitter: funtranslate
  description: |
    Braille conversion API on the cloud. Translate from English text to Braille and get Braille results suitable for many display types.[Click here to subscribe](http://funtranslations.com/api/braille) 
  termsOfService: https://funtranslations.com/terms
  title: FunTranslations Braille API
  version: "2.3"
  x-apisguru-categories:
    - text
  x-logo:
    url: https://twitter.com/funtranslate/profile_image?size=original
  x-origin:
    - format: swagger
      url: https://funtranslations.com/yaml/funtranslations.braille.yaml
      version: "2.0"
  x-providerName: funtranslations.com
  x-serviceName: braile
consumes:
  - application/json
produces:
  - application/json
  - application/xml
  - application/js
securityDefinitions:
  X-Funtranslations-Api-Secret:
    in: header
    name: X-Funtranslations-Api-Secret
    type: apiKey
tags:
  - description: Braille Translation API
    externalDocs:
      description: Find out more
      url: http://funtranslations.com/api/braille
    name: Braille
paths:
  /translate/braille:
    get:
      description: Translate from English to Braille. This is what you use if you have a braille display. This API translates the English text into characters that a braille display understands and you can feed the translated text directly to the display.
      parameters:
        - description: Text to translate
          format: string
          in: query
          name: text
          required: true
          type: string
      produces:
        - application/json
        - application/xml
        - application/js
      responses:
        "200":
          description: 200  response
          examples:
            application/json: |-
              {
                  "success": {
                      "total": 1
                  },
                  "contents": {
                      "translated": "  ,fun ,transl,ns has \"s?+ =\r\n\"ey\"o4\r\n",
                      "text": "Fun Translations has something for everyone.",
                      "translation": {
                          "source": "english",
                          "destination": "braille display"
                      }
                  }
              }
        "401":
          description: 401  response
          examples:
            application/json: |-
              {
                  "error": {
                      "code": 401,
                      "message": "Unauthorized"
                  }
              }    
      security:
        - X-Funtranslations-Api-Secret: []
      tags:
        - Braille
  /translate/braille/dots:
    get:
      description: Use this to see which dots are enabled for each Braille letters. This is highly educational (to see which dots are enabled) and can potentially drive a non braille display which works on individual dots.
      parameters:
        - description: Text to translate
          format: string
          in: query
          name: text
          required: true
          type: string
      produces:
        - application/json
        - application/xml
        - application/js
      responses:
        "200":
          description: 200  response
          examples:
            application/json: |-
              {
                  "success": {
                      "total": 1
                  },
                  "contents": {
                      "translated": [
                          "none",
                          "none",
                          "6",
                          "124",
                          "136",
                          "1345",
                          "none",
                          "6",
                          "2345",
                          "1235",
                          "1",
                          "1345",
                          "234",
                          "123",
                          "6",
                          "1345",
                          "234",
                          "none",
                          "125",
                          "1",
                          "234",
                          "none",
                          "5",
                          "234",
                          "1456",
                          "346",
                          "none",
                          "123456",
                          "\r",
                          "\n",
                          "5",
                          "15",
                          "13456",
                          "5",
                          "135",
                          "256",
                          "\r",
                          "\n"
                      ],
                      "text": "Fun Translations has something for everyone.",
                      "translation": {
                          "source": "english",
                          "destination": "braille dots"
                      }
                  }
              }
        "401":
          description: 401  response
          examples:
            application/json: |-
              {
                  "error": {
                      "code": 401,
                      "message": "Unauthorized"
                  }
              }        
      security:
        - X-Funtranslations-Api-Secret: []
      tags:
        - Braille
  /translate/braille/html:
    get:
      description: Translate from English to Braille Image characters. This is probably what you want to use if you are displaying braille in a browser.
      parameters:
        - description: Text to translate
          format: string
          in: query
          name: text
          required: true
          type: string
      produces:
        - application/json
        - application/xml
        - application/js
      responses:
        "200":
          description: 200  response
          examples:
            application/json: |-
              {
                  "success": {
                      "total": 1
                  },
                  "contents": {
                      "translated": [
                          "&#x2800;",
                          "&#x2800;",
                          "&#x2820;",
                          "&#x280b;",
                          "&#x2825;",
                          "&#x281d;",
                          "&#x2800;",
                          "&#x2820;",
                          "&#x281e;",
                          "&#x2817;",
                          "&#x2801;",
                          "&#x281d;",
                          "&#x280e;",
                          "&#x2807;",
                          "&#x2820;",
                          "&#x281d;",
                          "&#x280e;",
                          "&#x2800;",
                          "&#x2813;",
                          "&#x2801;",
                          "&#x280e;",
                          "&#x2800;",
                          "&#x2810;",
                          "&#x280e;",
                          "&#x2839;",
                          "&#x282c;",
                          "&#x2800;",
                          "&#x283f;",
                          "\r",
                          "\n",
                          "&#x2810;",
                          "&#x2811;",
                          "&#x283d;",
                          "&#x2810;",
                          "&#x2815;",
                          "&#x2832;",
                          "\r",
                          "\n"
                      ],
                      "text": "Fun Translations has something for everyone.",
                      "translation": {
                          "source": "english",
                          "destination": "braille html"
                      }
                  }
              }
        "401":
          description: 401  response
          examples:
            application/json: |-
              {
                  "error": {
                      "code": 401,
                      "message": "Unauthorized"
                  }
              }                                            
      security:
        - X-Funtranslations-Api-Secret: []
      tags:
        - Braille
  /translate/braille/image:
    get:
      description: Translate from English to Braille image characters. This is probably what you want to use if you are displaying braille in a browser.
      parameters:
        - description: Text to translate
          format: string
          in: query
          name: text
          required: true
          type: string
      produces:
        - application/json
        - application/xml
        - application/js
      responses:
        "200":
          description: 200  response
          examples:
            application/json: |-
              {
                  "success": {
                      "total": 1
                  },
                  "contents": {
                      "translated": [
                          "<img src='http://funtranslations.com/img/braille/char/00.gif' alt='char 0x2800 = &#x2800;' title='char 0x2800 = &#x2800;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/00.gif' alt='char 0x2800 = &#x2800;' title='char 0x2800 = &#x2800;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/20.gif' alt='char 0x2820 = &#x2820;' title='char 0x2820 = &#x2820;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/0b.gif' alt='char 0x280b = &#x280b;' title='char 0x280b = &#x280b;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/25.gif' alt='char 0x2825 = &#x2825;' title='char 0x2825 = &#x2825;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/1d.gif' alt='char 0x281d = &#x281d;' title='char 0x281d = &#x281d;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/00.gif' alt='char 0x2800 = &#x2800;' title='char 0x2800 = &#x2800;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/20.gif' alt='char 0x2820 = &#x2820;' title='char 0x2820 = &#x2820;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/1e.gif' alt='char 0x281e = &#x281e;' title='char 0x281e = &#x281e;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/17.gif' alt='char 0x2817 = &#x2817;' title='char 0x2817 = &#x2817;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/01.gif' alt='char 0x2801 = &#x2801;' title='char 0x2801 = &#x2801;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/1d.gif' alt='char 0x281d = &#x281d;' title='char 0x281d = &#x281d;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/0e.gif' alt='char 0x280e = &#x280e;' title='char 0x280e = &#x280e;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/07.gif' alt='char 0x2807 = &#x2807;' title='char 0x2807 = &#x2807;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/20.gif' alt='char 0x2820 = &#x2820;' title='char 0x2820 = &#x2820;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/1d.gif' alt='char 0x281d = &#x281d;' title='char 0x281d = &#x281d;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/0e.gif' alt='char 0x280e = &#x280e;' title='char 0x280e = &#x280e;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/00.gif' alt='char 0x2800 = &#x2800;' title='char 0x2800 = &#x2800;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/13.gif' alt='char 0x2813 = &#x2813;' title='char 0x2813 = &#x2813;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/01.gif' alt='char 0x2801 = &#x2801;' title='char 0x2801 = &#x2801;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/0e.gif' alt='char 0x280e = &#x280e;' title='char 0x280e = &#x280e;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/00.gif' alt='char 0x2800 = &#x2800;' title='char 0x2800 = &#x2800;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/10.gif' alt='char 0x2810 = &#x2810;' title='char 0x2810 = &#x2810;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/0e.gif' alt='char 0x280e = &#x280e;' title='char 0x280e = &#x280e;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/39.gif' alt='char 0x2839 = &#x2839;' title='char 0x2839 = &#x2839;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/2c.gif' alt='char 0x282c = &#x282c;' title='char 0x282c = &#x282c;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/00.gif' alt='char 0x2800 = &#x2800;' title='char 0x2800 = &#x2800;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/3f.gif' alt='char 0x283f = &#x283f;' title='char 0x283f = &#x283f;' class='img-braille-char'>",
                          "\r",
                          "\n",
                          "<img src='http://funtranslations.com/img/braille/char/10.gif' alt='char 0x2810 = &#x2810;' title='char 0x2810 = &#x2810;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/11.gif' alt='char 0x2811 = &#x2811;' title='char 0x2811 = &#x2811;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/3d.gif' alt='char 0x283d = &#x283d;' title='char 0x283d = &#x283d;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/10.gif' alt='char 0x2810 = &#x2810;' title='char 0x2810 = &#x2810;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/15.gif' alt='char 0x2815 = &#x2815;' title='char 0x2815 = &#x2815;' class='img-braille-char'>",
                          "<img src='http://funtranslations.com/img/braille/char/32.gif' alt='char 0x2832 = &#x2832;' title='char 0x2832 = &#x2832;' class='img-braille-char'>",
                          "\r",
                          "\n"
                      ],
                      "text": "Fun Translations has something for everyone.",
                      "translation": {
                          "source": "english",
                          "destination": "braille images"
                      }
                  }
              }
        "401":
          description: 401  response
          examples:
            application/json: |-
              {
                  "error": {
                      "code": 401,
                      "message": "Unauthorized"
                  }
              } 
      security:
        - X-Funtranslations-Api-Secret: []
      tags:
        - Braille
  /translate/braille/unicode:
    get:
      description: Translate from English to Braille Unicode characters.
      parameters:
        - description: Text to translate
          format: string
          in: query
          name: text
          required: true
          type: string
      produces:
        - application/json
        - application/xml
        - application/js
      responses:
        "200":
          description: 200  response
          examples:
            application/json: |-
              {
                  "success": {
                      "total": 1
                  },
                  "contents": {
                      "translated": [
                          "⠀",
                          "⠀",
                          "⠠",
                          "⠋",
                          "⠥",
                          "⠝",
                          "⠀",
                          "⠠",
                          "⠞",
                          "⠗",
                          "⠁",
                          "⠝",
                          "⠎",
                          "⠇",
                          "⠠",
                          "⠝",
                          "⠎",
                          "⠀",
                          "⠓",
                          "⠁",
                          "⠎",
                          "⠀",
                          "⠐",
                          "⠎",
                          "⠹",
                          "⠬",
                          "⠀",
                          "⠿",
                          "\r",
                          "\n",
                          "⠐",
                          "⠑",
                          "⠽",
                          "⠐",
                          "⠕",
                          "⠲",
                          "\r",
                          "\n"
                      ],
                      "text": "Fun Translations has something for everyone.",
                      "translation": {
                          "source": "english",
                          "destination": "braille unicode"
                      }
                  }
              }
        "401":
          description: 401  response
          examples:
            application/json: |-
              {
                  "error": {
                      "code": 401,
                      "message": "Unauthorized"
                  }
              }    
      security:
        - X-Funtranslations-Api-Secret: []
      tags:
        - Braille
