lokalise / lokalise-cli-2-go

Lokalise CLI v2
Other
108 stars 52 forks source link

Task list/retrieve commands are failing #27

Closed rousik closed 4 years ago

rousik commented 4 years ago

The problem lies in the unmarshalling of the TaskLanguage.task.languages.initial_tm_leverage. Go expects this to be map[string]int64 and the API documentation does seem to indicate that this is what's expected (.e.g { '20%': 0, ...}, but API does return empty lists instead of empty structure which breaks the parser:

json: cannot unmarshal array into Go struct field TaskLanguage.task.languages.initial_tm_leverage of type map[string]int64
rousik commented 4 years ago

Here's the snipped of the task response that is being parsed:

"languages": [
  {
    ...
    "status": "created",
    "progress": 0,
    "initial_tm_leverage": [],
    ...
beinarovic commented 4 years ago

Hey @rousik ,

Sorry for the late response... We got this fixed a while ago, it should work fine now.