Skip to content

Latest commit

 

History

History
56 lines (30 loc) · 1.77 KB

README.md

File metadata and controls

56 lines (30 loc) · 1.77 KB

MorseCodeRest

A tiny API to translate morse code into standard letters/numbers.

The following image was used as reference to morse code:

image

Installation

The easiest way to get this API running is by using Visual Studio. Follow these steps:

  1. Clone this git repository to your device
  2. Run it with Visual Studio.

Usage

There are currently only two endpoints:

  • /api/translate?morseCharacter=[morseCharacter]
  • /api/translate/word?morseCharactersSeperatedBySpace=[morseCharacter] [morseCharacter] [morseCharacter]

You can see all endpoints when you have it running at this url: localhost:[yourPort]/swagger

You can also access it in your browser through something like this url:

http:https://localhost:62032/api/translate?morseCharacter=.

[baseUrl]/api/translate?morseCharacter=[morseCharacterInput]

Curl Examples

Example: curl -X GET "http:https://localhost:62032/api/translate?morseCharacter=." -H "accept: */*"

Output: E

Example with word: curl -X GET "http:https://localhost:62032/api/translate/word?morseCharactersSeperatedBySpace=...%20---%20..." -H "accept: */*"

Output: SOS

JavaScript examples

Translating single morse character:

image

image

Translating word:

image

image

Maintainer

Noitcereon