Game Service

Game service is a set of APIs to power e-Learning games

Get Words

GET https://dtml.org/api/GameService/Words/?step=1

Gets Words for student. The API uses either school setting or ML to determine the words. In order to minimize JSON response payload, the images are send back without full URI. The root URI for images is https://dtml.blob.core.windows.net/content/words/{filename}

Query Parameters

Name
Type
Description

expand

boolean

If true, adds additional fields to the response

withImages

boolean

If set to true only returns words with images

lang

string

two letter code for language of the user

step

number

Level for the words to be returned

top

number

Maximum number of words to return

Headers

Name
Type
Description

Authentication

string

If authenticated the system will use user data to select appropriate words for the user. If not, generic word selection algorithm will be applied.

{
   "complexity":2.15,
   "words":[
      {
         "complexity":2,
         "image":"globe.png",
         "lan":"es",
         "trans":"globo",
         "word":"globe"
      },
      {
         "complexity":3,
         "image":"plate.png",
         "lan":"es",
         "trans":"plato",
         "word":"plate"
      },
      {
         "complexity":2,
         "image":"tea.png",
         "lan":"es",
         "trans":"té",
         "word":"tea"
      },
      {
         "complexity":1,
         "image":"sun.png",
         "lan":"es",
         "trans":"sol",
         "word":"sun"
      },
      {
         "complexity":3,
         "image":"salad.png",
         "lan":"es",
         "trans":"ensalada",
         "word":"salad"
      },
      {
         "complexity":1,
         "image":"bike.png",
         "lan":"es",
         "trans":"bicicleta",
         "word":"bike"
      },
      {
         "complexity":1,
         "image":"dog.png",
         "lan":"es",
         "trans":"perro",
         "word":"dog"
      },
      {
         "complexity":3,
         "image":"raspberry.png",
         "lan":"es",
         "trans":"frambuesa",
         "word":"raspberry"
      },
      {
         "complexity":2,
         "image":"crown.png",
         "lan":"es",
         "trans":"corona",
         "word":"crown"
      },
      {
         "complexity":2,
         "image":"pie.png",
         "lan":"es",
         "trans":"tarta",
         "word":"pie"
      },
      {
         "complexity":2,
         "image":"lion.png",
         "lan":"es",
         "trans":"león",
         "word":"lion"
      },
      {
         "complexity":2,
         "image":"kettle.png",
         "lan":"es",
         "trans":"tetera",
         "word":"kettle"
      },
      {
         "complexity":3,
         "image":"fork.png",
         "lan":"es",
         "trans":"tenedor",
         "word":"fork"
      },
      {
         "complexity":1,
         "image":"milk.png",
         "lan":"es",
         "trans":"leche",
         "word":"milk"
      },
      {
         "complexity":2,
         "image":"baloon.png",
         "lan":"es",
         "trans":"globo",
         "word":"balloon"
      },
      {
         "complexity":3,
         "image":"beans.png",
         "lan":"es",
         "trans":"frijol",
         "word":"bean"
      },
      {
         "complexity":3,
         "image":"potatoes.png",
         "lan":"es",
         "trans":"papas",
         "word":"potatoes"
      },
      {
         "complexity":2,
         "image":"doughnut.png",
         "lan":"es",
         "trans":"rosquilla",
         "word":"doughnut"
      },
      {
         "complexity":3,
         "image":"duck.png",
         "lan":"es",
         "trans":"pato",
         "word":"duck"
      },
      {
         "complexity":2,
         "image":"doctor.png",
         "lan":"es",
         "trans":"medico",
         "word":"doctor"
      }
   ]
}

Check Word

GET https://dtml.org/api/GameService/CheckWord/?source=apple&guess=manzana&lan=es

Verifies translation of the words

Query Parameters

Name
Type
Description

lan

string

User language

guess

string

User guessed word

source

string

English words to check

{
"complexity":1,
"correct":"manzana",
"isCorrect":false,
"source":"apple"
}

Score Phrase

GET https://dtml.org/api/GameService/ScorePhrase/?phrase=hello%20world&lang=ru

Gets a numeric complexity score for English phrase

Query Parameters

Name
Type
Description

success

string

Optional indicator if game considered the phrase valid.

source

string

Optional name of the game or learning module

lang

string

User language. Score might depend on user native language

phrase

string

Phrase to score

15

Record reinforcement

GET https://dtml.org/api/GameService/Reinforcement/?value=apple&type=word&source=test

The method records information about game activity into user reinforcement table for processing. The examples of reinforcements can be missed words, or incorrect answers, or any other information game wants to record about user completing game objectives

Query Parameters

Name
Type
Description

source

string

Learning module or a game which is making the call

type

string

Description of the value. For example, "word", "subject", "phrase", "voice"

value

string

Value to record. Often the value is the word which user did not recognized.

Headers

Name
Type
Description

Authentication

string

Required. If Authentication header is not provided the method will not record data.

OK

Last updated