Revisions (翻訳結果)

翻訳結果一覧の取得

指定した依頼に対する翻訳結果の一覧を取得することが出来ます。

Resource URL

GET /api/v1/questions/:question_id/revisions/

Example Response

$ curl -i -H "Accept: application/json" -H "Content-type: application/json" -X GET https://biz.conyac.cc/api/v1/questions/6/revisions?access_token=8c1525a501a5b10671b148003c65b1ed5c0598da5907f0a7855dc248faac8b76 
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "success": true,
  "message": "the translation_revision is found.",
  "question": {
    "id": 6,
    "project_id": 3,
    "question_source_id": 7,
    "user_id": 107,
    "title": "body2<hoge>ddd</hoge>",
    "letter_count": 8,
    "language_id": "ja",
    "translated_language_id": "en",
    "status": 4,
    "status_text": "completed",
    "total_point": 32,
    "created_at": "2014-06-10T10:32:50.000+09:00",
    "updated_at": "2014-06-10T10:33:14.000+09:00",
    "custom_field": null,
    "description": "",
    "ended_at": "2014-06-10T10:33:14.000+09:00",
    "grab_expires_at": "2014-06-10T13:33:03.000+09:00",
    "translated_at": "2014-06-10T10:33:13.000+09:00",
    "individual": false,
    "double_check": false,
    "escape_text": false,
    "url": "https://biz.conyac.cc/api/v1/questions/6",
    "html_url": "https://conyac.cc/b/projects/3/questions/6",
    "cancelable": false,
    "organization_id": 4,
    "file_type": "html_text",
    "user": {
      "id": 107,
      "login": "test10",
      "created_at": "2014-06-10T10:32:38.000+09:00",
      "updated_at": "2014-06-10T10:32:38.000+09:00",
      "locale": "en",
      "picture_url": "https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.png?d=identicon&r=PG&s=48",
      "translator": false
    },
    "language": {
      "id": "ja",
      "localized_name": "Japanese"
    },
    "translated_language": {
      "id": "en",
      "localized_name": "English"
    }
  },
  "organization": {
    "id": 4,
    "name": "test10",
    "plan_id": 1,
    "user_id": 107,
    "default": 1,
    "description": null,
    "created_at": "2014-06-10T10:32:38.000+09:00",
    "updated_at": "2014-06-10T10:32:50.000+09:00",
    "url": "https://biz.conyac.cc/api/v1/organizations/4",
    "html_url": "https://conyac.cc/b/organizations/4",
    "point": 78986,
    "available_point": 78986
  },
  "page": 1,
  "per_page": 30,
  "total_pages": 1,
  "total_count": 1,
  "translation_revisions": [
    {
      "revision_number": 1,
      "submitted": true,
      "download_url": "https://biz.conyac.cc/api/v1/questions/6/revisions/1/file",
      "downloadable": true,
      "submitted_at": "2014-06-10T10:33:13.000+09:00",
      "user_id": 103,
      "url": "https://biz.conyac.cc/api/v1/questions/6/revisions/1",
      "html_url": "https://conyac.cc/b/projects/3/questions/6/revisions/1"
    }
  ]
}

翻訳結果の取得

指定した依頼に対する特定の翻訳結果を取得することが出来ます。

Resource URL

GET /api/v1/questions/:question_id/revisions/:revision_number

Example Response

$ curl -i -H "Accept: application/json" -H "Content-type: application/json" -X GET https://biz.conyac.cc/api/v1/questions/6/revisions/1?access_token=8c1525a501a5b10671b148003c65b1ed5c0598da5907f0a7855dc248faac8b76 
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "success": true,
  "message": "the translation_revision is found.",
  "question": {
    "id": 6,
    "project_id": 3,
    "question_source_id": 7,
    "user_id": 107,
    "title": "body2<hoge>ddd</hoge>",
    "letter_count": 8,
    "language_id": "ja",
    "translated_language_id": "en",
    "status": 4,
    "status_text": "completed",
    "total_point": 32,
    "created_at": "2014-06-10T10:32:50.000+09:00",
    "updated_at": "2014-06-10T10:33:14.000+09:00",
    "custom_field": null,
    "description": "",
    "ended_at": "2014-06-10T10:33:14.000+09:00",
    "grab_expires_at": "2014-06-10T13:33:03.000+09:00",
    "translated_at": "2014-06-10T10:33:13.000+09:00",
    "individual": false,
    "double_check": false,
    "escape_text": false,
    "url": "https://biz.conyac.cc/api/v1/questions/6",
    "html_url": "https://conyac.cc/b/projects/3/questions/6",
    "cancelable": false,
    "organization_id": 4,
    "file_type": "html_text",
    "user": {
      "id": 107,
      "login": "test10",
      "created_at": "2014-06-10T10:32:38.000+09:00",
      "updated_at": "2014-06-10T10:32:38.000+09:00",
      "locale": "en",
      "picture_url": "https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.png?d=identicon&r=PG&s=48",
      "translator": false
    },
    "language": {
      "id": "ja",
      "localized_name": "Japanese"
    },
    "translated_language": {
      "id": "en",
      "localized_name": "English"
    }
  },
  "organization": {
    "id": 4,
    "name": "test10",
    "plan_id": 1,
    "user_id": 107,
    "default": 1,
    "description": null,
    "created_at": "2014-06-10T10:32:38.000+09:00",
    "updated_at": "2014-06-10T10:32:50.000+09:00",
    "url": "https://biz.conyac.cc/api/v1/organizations/4",
    "html_url": "https://conyac.cc/b/organizations/4",
    "point": 78986,
    "available_point": 78986
  },
  "page": 1,
  "per_page": 30,
  "total_pages": 1,
  "total_count": 1,
  "translation": {
    "revision_number": 1,
    "submitted": true,
    "download_url": "https://biz.conyac.cc/api/v1/questions/6/revisions/1/file",
    "downloadable": true,
    "submitted_at": "2014-06-10T10:33:13.000+09:00",
    "user_id": 103,
    "url": "https://biz.conyac.cc/api/v1/questions/6/revisions/1",
    "html_url": "https://conyac.cc/b/projects/3/questions/6/revisions/1",
    "paragraphs": [
      {
        "id": 95,
        "paragraph_id": 0,
        "section_id": 95,
        "display_order": 0,
        "original_text": "body2<hoge>ddd</hoge>",
        "translated_text": "body2<hoge>ddd</hoge>ش و",
        "updated_by": 103,
        "updated_at": "2014-06-10T10:33:07.000+09:00",
        "revision_number": 1
      }
    ]
  }
}

最新の翻訳を確認

指定した依頼に対する最新の翻訳結果の取得することが出来ます。 翻訳が投稿されていない場合には、翻訳途中の状態を返します。

Resource URL

GET /api/v1/questions/:question_id/revisions/latest

Example Response

$ curl -i -H "Accept: application/json" -H "Content-type: application/json" -X GET https://biz.conyac.cc/api/v1/questions/6/revisions/latest?access_token=8c1525a501a5b10671b148003c65b1ed5c0598da5907f0a7855dc248faac8b76 
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "success": true,
  "message": "the translation_revision is found.",
  "question": {
    "id": 6,
    "project_id": 3,
    "question_source_id": 7,
    "user_id": 107,
    "title": "body2<hoge>ddd</hoge>",
    "letter_count": 8,
    "language_id": "ja",
    "translated_language_id": "en",
    "status": 4,
    "status_text": "completed",
    "total_point": 32,
    "created_at": "2014-06-10T10:32:50.000+09:00",
    "updated_at": "2014-06-10T10:33:14.000+09:00",
    "custom_field": null,
    "description": "",
    "ended_at": "2014-06-10T10:33:14.000+09:00",
    "grab_expires_at": "2014-06-10T13:33:03.000+09:00",
    "translated_at": "2014-06-10T10:33:13.000+09:00",
    "individual": false,
    "double_check": false,
    "escape_text": false,
    "url": "https://biz.conyac.cc/api/v1/questions/6",
    "html_url": "https://conyac.cc/b/projects/3/questions/6",
    "cancelable": false,
    "organization_id": 4,
    "file_type": "html_text",
    "user": {
      "id": 107,
      "login": "test10",
      "created_at": "2014-06-10T10:32:38.000+09:00",
      "updated_at": "2014-06-10T10:32:38.000+09:00",
      "locale": "en",
      "picture_url": "https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.png?d=identicon&r=PG&s=48",
      "translator": false
    },
    "language": {
      "id": "ja",
      "localized_name": "Japanese"
    },
    "translated_language": {
      "id": "en",
      "localized_name": "English"
    }
  },
  "organization": {
    "id": 4,
    "name": "test10",
    "plan_id": 1,
    "user_id": 107,
    "default": 1,
    "description": null,
    "created_at": "2014-06-10T10:32:38.000+09:00",
    "updated_at": "2014-06-10T10:32:50.000+09:00",
    "url": "https://biz.conyac.cc/api/v1/organizations/4",
    "html_url": "https://conyac.cc/b/organizations/4",
    "point": 78986,
    "available_point": 78986
  },
  "page": 1,
  "per_page": 30,
  "total_pages": 1,
  "total_count": 1,
  "translation": {
    "revision_number": 1,
    "submitted": true,
    "download_url": "https://biz.conyac.cc/api/v1/questions/6/revisions/1/file",
    "downloadable": true,
    "submitted_at": "2014-06-10T10:33:13.000+09:00",
    "user_id": 103,
    "url": "https://biz.conyac.cc/api/v1/questions/6/revisions/1",
    "html_url": "https://conyac.cc/b/projects/3/questions/6/revisions/1",
    "paragraphs": [
      {
        "id": 95,
        "paragraph_id": 0,
        "section_id": 95,
        "display_order": 0,
        "original_text": "body2<hoge>ddd</hoge>",
        "translated_text": "body2<hoge>ddd</hoge>ش و",
        "updated_by": 103,
        "updated_at": "2014-06-10T10:33:07.000+09:00",
        "revision_number": 1
      }
    ]
  }
}