Account methods

This describes the endpoints that deal with Account information on Gengo API.

Stats (GET)

Summary :
Retrieves account stats, such as orders made.
URL :
http://api.gengo.com/v2/account/stats
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

print(gengo.getAccountStats())

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "opstat": "ok",
  "response": {
    "credits_spent": 1023.31,
    "user_since": 1234089500,
    "currency": "USD",
    "billing_type": "Pre-pay",
    "customer_type": "Retail"
  }
}

Me (GET)

Summary :
Retrieves account information, such as email.
URL :
http://api.gengo.com/v2/account/me
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

print(gengo.getAccountMe())

Response

1
2
3
4
5
6
7
8
9
{
  "opstat": "ok",
  "response": {
	  "email": "john@gengo.com",
	  "full_name": "John Doe",
	  "display_name": "johnny",
	  "language_code": "en"
  }
}

Balance (GET)

Summary :
Retrieves account balance in credits.
URL :
http://api.gengo.com/v2/account/balance
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

print(gengo.getAccountBalance())

Response

1
2
3
4
5
6
7
{
  "opstat": "ok",
  "response": {
    "credits": 25.32,
    "currency": "USD"
  }
}

Preferred translators (GET)

Summary :
Retrieves preferred translators set by user.
URL :
http://api.gengo.com/v2/account/preferred_translators
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

print(gengo.getPreferredTranslators())

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
  "opstat": "ok",
  "response": [
    {
      "translators": [
        {
          "last_login": 1375824155,
          "id": 8596
        },
        {
          "last_login": 1372822132,
          "id": 24123
        }
      ],
      "lc_tgt": "ja",
      "lc_src": "en",
      "tier": "standard"
    },
    {
      "translators": [
        {
          "last_login": 1375825234,
          "id": 14765
        },
        {
          "last_login": 1372822132,
          "id": 3627
        }
      ],
      "lc_tgt": "en",
      "lc_src": "ja",
      "tier": "pro"
    }
  ]
}