{ "info": { "author": "Gengo, Inc.", "author_email": "api@gengo.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Topic :: Communications :: Chat", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "myGengo Python Library (for the [myGengo API](http://mygengo.com/))\r\n========================================================================================================\r\nTranslating your tools and products helps people all over the world access them; this is, of course, a\r\nsomewhat tricky problem to solve. **[myGengo](http://mygengo.com/)** is a service that offers human-translation\r\n(which is often a higher quality than machine translation), and an API to manage sending in work and watching\r\njobs. This is a python interface to make using the API simpler (some would say incredibly easy). \r\n\r\nInstallation & Requirements\r\n-------------------------------------------------------------------------------------------------------\r\nInstalling myGengo is fairly simple:\r\n\r\n pip install mygengo\r\n\r\nAlternatively, if you're in the stone ages:\r\n\r\n easy_install mygengo\r\n\r\nmyGengo also relies on httplib2, which can be installed through either of the above methods. If\r\nyou're running on a version of Python prior to 2.6, you'll need to install simplejson as well.\r\n\r\nA version of myGengo for Python 3 is in the works, but as Python 3 isn't even quite deemed production\r\nready/reliable yet, it's not the highest priority at the moment.\r\n\r\n\r\nTests - Running Them, etc\r\n------------------------------------------------------------------------------------------------------\r\nmyGengo has a full suite of Unit Tests. To run them, grab the source, head into the mygengo directory, \r\nand execute the tests file with the Python interpreter, ala:\r\n\r\n python tests.py\r\n\r\n\r\nQuestion, Comments, Complaints, Praise?\r\n------------------------------------------------------------------------------------------------------\r\nIf you have questions or comments and would like to reach us directly, please feel free to do\r\nso at the following outlets. We love hearing from developers!\r\n\r\nEmail: ryan [at] mygengo dot com \r\nTwitter: **[@mygengo_dev](http://twitter.com/mygengo_dev)** \r\n\r\nIf you come across any issues, please file them on the **[Github project issue tracker](https://github.com/myGengo/mygengo-python/issues)**. Thanks!\r\n\r\n\r\nDocumentation\r\n-----------------------------------------------------------------------------------------------------\r\n**Full documentation of each function is below**, but anyone should be able to cobble together \r\na working script with the following:\r\n\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly false, depending on your dev needs\r\n)\r\n \r\nprint gengo.getAccountBalance()\r\n```\r\n\r\nAll function definitions can be found inside mygengo/mockdb.py. They exist as an uber dictionary: the\r\nkey of the dictionary entry is the function name, and the parameters are exactly the same as specified\r\nover on the **[myGengo API docs](http://mygengo.com/about/services/api)**.\r\n\r\nMyGengo()\r\n---------------------------------------------------------------------------------------------------\r\nCreates an instance of MyGengo for you to communicate with the myGengo API. This needs to be done\r\nbefore any of the methods below are available.\r\n\r\n#### Parameters:\r\n- _public_key_: Required. Your public key, generated on the myGengo API site.\r\n- _private_key_: Required. Your private key, generated on the myGengo API site.\r\n- _sandbox_: Optional. Defaults to False, dictates whethe to send the call to the myGengo Sandbox API.\r\n- _api_version_: Optional. API version to use with myGengo (defaults to 1).\r\n- _headers_: Optional. Additional HTTP headers to send along, passed as a dictionary object. \r\n\r\n#### Example: \r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n```\r\n\r\nMyGengo.getAccountStats()\r\n---------------------------------------------------------------------------------------------------\r\nRetrieves your account stats, like orders made, etc.\r\n\r\n#### Parameters:\r\nNone \r\n\r\n### Example: \r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\nprint gengo.getAccountStats()\r\n```\r\n\r\nMyGengo.getAccountBalance()\r\n--------------------------------------------------------------------------------------------------\r\nRetrieves your account balance in myGengo credits.\r\n\r\n### Parameters:\r\nNone\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\nprint gengo.getAccountBalance()\r\n```\r\n\r\nMyGengo.postTranslationJob()\r\n---------------------------------------------------------------------------------------------------\r\nSends a new job over to myGengo for translation. Jobs are dictionaries that get passed around; an example is\r\nbelow.\r\n\r\n### Parameters:\r\n- _job_: Required. A dictionary containing a full job description for myGengo (**see below**).\r\n\r\n### Example:\r\n``` python \r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\njob = {\r\n 'type': 'text', # REQUIRED. Type to translate, you'll probably always put 'text' here. ;P\r\n 'slug': 'Single :: English to Japanese', # REQUIRED. Slug for internally storing, can be generic.\r\n 'body_src': 'Testing myGengo API library calls.', # REQUIRED. The text you're translating. ;P\r\n 'lc_src': 'en', # REQUIRED. source_language_code (see getServiceLanguages() for a list of codes) \r\n 'lc_tgt': 'ja', # REQUIRED. target_language_code (see getServiceLanguages() for a list of codes)\r\n 'tier': 'standard', # REQUIRED. tier type (\"machine\", \"standard\", \"pro\", or \"ultra\")\r\n \r\n 'auto_approve': 0, # OPTIONAL. Hopefully self explanatory (1 = yes, 0 = no),\r\n 'comment': 'HEY THERE TRANSLATOR', # OPTIONAL. Comment to leave for translator.\r\n 'callback_url': 'http://...', # OPTIONAL. Callback URL that updates are sent to.\r\n\t'custom_data': 'your optional custom data, limited to 1kb.' # OPTIONAL\r\n}\r\n\r\ngengo.postTranslationJob(job = job)\r\n```\r\n\r\nMyGengo.postTranslationJobs()\r\n----------------------------------------------------------------------------------------------------------\r\nSubmits a job or group of jobs to translate.\r\n\r\n### Parameters:\r\n- _jobs_: Required. A Dictionary of jobs and associated properties to run up to myGengo.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\ndata = {\r\n\t'jobs': {\r\n\t\t'job_1': {\r\n\t\t\t'type': 'text', # REQUIRED. Type to translate, you'll probably always put 'text' here. ;P\r\n\t\t\t'slug': 'Single :: English to Japanese', # REQUIRED. Slug for internally storing, can be generic.\r\n\t\t\t'body_src': 'Testing myGengo API library calls.', # REQUIRED. The text you're translating. ;P\r\n\t\t\t'lc_src': 'en', # REQUIRED. source_language_code (see getServiceLanguages() for a list of codes) \r\n\t\t\t'lc_tgt': 'ja', # REQUIRED. target_language_code (see getServiceLanguages() for a list of codes)\r\n\t\t\t'tier': 'standard', # REQUIRED. tier type (\"machine\", \"standard\", \"pro\", or \"ultra\")\r\n\t\t\t\r\n\t\t\t'auto_approve': 0, # OPTIONAL. Hopefully self explanatory (1 = yes, 0 = no),\r\n\t\t\t'comment': 'HEY THERE TRANSLATOR', # OPTIONAL. Comment to leave for translator.\r\n\t\t\t'callback_url': 'http://...', # OPTIONAL. Callback URL that updates are sent to.\r\n\t\t\t'custom_data': 'your optional custom data, limited to 1kb.' # OPTIONAL\r\n\t\t},\r\n\t\t'job_2': {\r\n\t\t\t'type': 'text', # REQUIRED. Type to translate, you'll probably always put 'text' here. ;P\r\n\t\t\t'slug': 'Single :: English to Japanese', # REQUIRED. Slug for internally storing, can be generic.\r\n\t\t\t'body_src': 'Testing myGengo API library calls.', # REQUIRED. The text you're translating. ;P\r\n\t\t\t'lc_src': 'en', # REQUIRED. source_language_code (see getServiceLanguages() for a list of codes) \r\n\t\t\t'lc_tgt': 'ja', # REQUIRED. target_language_code (see getServiceLanguages() for a list of codes)\r\n\t\t\t'tier': 'standard', # REQUIRED. tier type (\"machine\", \"standard\", \"pro\", or \"ultra\")\r\n\r\n\t\t\t'auto_approve': 0, # OPTIONAL. Hopefully self explanatory (1 = yes, 0 = no),\r\n\t\t\t'comment': 'HEY THERE TRANSLATOR', # OPTIONAL. Comment to leave for translator.\r\n\t\t\t'callback_url': 'http://...', # OPTIONAL. Callback URL that updates are sent to.\r\n\t\t\t'custom_data': 'your optional custom data, limited to 1kb.' # OPTIONAL\r\n\t\t},\r\n },\r\n\t'process': 1, # OPTIONAL. 1 (true, default) / 0 (false). Whether to pay for the job(s) and make them available for translation.\r\n 'as_group': 1, # OPTIONAL. 1 (true) / 0 (false, default). Whether all jobs in this group should be done by one translator.\r\n}\r\n\r\n# Post over our two jobs, use the same translator for both, don't pay for them\r\ngengo.postTranslationJobs(jobs = data)\r\n```\r\n**Note:** 'as_group' has a catch: some restrictions apply to what jobs can be grouped, including the requirement that language pairs and tiers must be the same across all jobs.\r\n\r\n\r\nMyGengo.determineTranslationCost()\r\n----------------------------------------------------------------------------------------------------------\r\nDetermine how much it'll cost to translate a given piece of text/copy. A method that believes it's a POST, even though\r\nit very much seems like a GET. Bears a striking similarity to MyGengo.postTranslationJobs().\r\n\r\n### Parameters:\r\n- _jobs_: Required. An Dictionary of Jobs to run up to myGengo.\r\n\r\n### Example:\t\r\n``` python\r\nfrom mygengo import MyGengo\r\n \r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n \r\njobs_data = {\r\n\t'job_1': {\r\n \t'type': 'text', # REQUIRED. Type to translate, you'll probably always put 'text' here. ;P\r\n 'slug': 'Single :: English to Japanese', # REQUIRED. Slug for internally storing, can be generic.\r\n 'body_src': 'Testing myGengo API library calls.', # REQUIRED. The text you're translating. ;P\r\n 'lc_src': 'en', # REQUIRED. source_language_code (see getServiceLanguages() for a list of codes) \r\n 'lc_tgt': 'ja', # REQUIRED. target_language_code (see getServiceLanguages() for a list of codes)\r\n 'tier': 'standard', # REQUIRED. tier type (\"machine\", \"standard\", \"pro\", or \"ultra\")\r\n \r\n \t'auto_approve': 0, # OPTIONAL. Hopefully self explanatory (1 = yes, 0 = no),\r\n 'comment': 'HEY THERE TRANSLATOR', # OPTIONAL. Comment to leave for translator.\r\n 'callback_url': 'http://...', # OPTIONAL. Callback URL that updates are sent to.\r\n\t\t'custom_data': 'your optional custom data, limited to 1kb.' # OPTIONAL\r\n\t},\r\n 'job_2': {\r\n \t'type': 'text', # REQUIRED. Type to translate, you'll probably always put 'text' here. ;P\r\n 'slug': 'Single :: English to Japanese', # REQUIRED. Slug for internally storing, can be generic.\r\n 'body_src': 'Testing myGengo API library calls.', # REQUIRED. The text you're translating. ;P\r\n 'lc_src': 'en', # REQUIRED. source_language_code (see getServiceLanguages() for a list of codes) \r\n 'lc_tgt': 'ja', # REQUIRED. target_language_code (see getServiceLanguages() for a list of codes)\r\n 'tier': 'standard', # REQUIRED. tier type (\"machine\", \"standard\", \"pro\", or \"ultra\")\r\n \r\n 'auto_approve': 0, # OPTIONAL. Hopefully self explanatory (1 = yes, 0 = no),\r\n 'comment': 'HEY THERE TRANSLATOR', # OPTIONAL. Comment to leave for translator.\r\n 'callback_url': 'http://...', # OPTIONAL. Callback URL that updates are sent to.\r\n\t\t'custom_data': 'your optional custom data, limited to 1kb.' # OPTIONAL\r\n },\r\n}\r\n \r\n# Post over our two jobs, use the same translator for both, don't pay for them\r\ngengo.determineTranslationCost(jobs = jobs_data)\r\n```\r\n\r\nMyGengo.updateTranslationJob()\r\n----------------------------------------------------------------------------------------------------------\r\nUpdates an existing job. A bit of a hamburger method in that you can cook this one many different ways - pay\r\nattention to the parameter specifications.\r\n\r\n### Parameters:\r\n- _id_: Required. The ID of the job you're updating.\r\n- _action_: Required. A dictionary describing the actions you are performing on this job (\"purchase\", \"revise\", \"approve\", \"reject\"). Some\r\nof these actions require other parameters, see their respective sections immediately below.\r\n\r\n### \"purchase\" Parameters:\r\nNone\r\n\r\n### \"revise\" Parameters:\r\n- _comment_: Optional. A comment describing the revision.\r\n\r\n### \"approve\" Parameters:\r\n- _rating_: Required. 1 - 5, 1 = ohgodwtfisthis, 5 = I want yo babies yo,\r\n- _for_translator_: Optional. Comments that you can pass on to the translator.\r\n- _for_mygengo_: Optional. Comments to send to the myGengo staff (kept private on myGengo's end)\r\n- _public_: Optional. 1 (true) / 0 (false, default). Whether myGengo can share this feedback publicly.\r\n\r\n### \"reject\" Parameters:\r\n- _reason_: Required. Reason for rejection (must be \"quality\", \"incomplete\", \"other\")\r\n- _comment_: Required. Explain your rejection, especially if all you put was \"other\".\r\n- _captcha_: Required. The captcha image text. Each job in a \"reviewable\" state will have a captcha_url value, which is a URL to an image. This captcha value is required only if a job is to be rejected. If the captcha is wrong, a URL for a new captcha is also included with the error message.\r\n- _follow_up_: Optional. \"requeue\" (default) or \"cancel\". If you choose \"requeue\" the job will be rejected and then passed onto another translator. If you choose \"cancel\" the job will be completely cancelled upon rejection.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\n# Some example action objects, choose one to test by uncommenting\r\nupdateObj = {'action': 'purchase'}\r\n# updateObj = {'action': 'revise', 'comment': 'Thanks but no thanks'}\r\n# updateObj = {'action': 'approve', 'rating': 1, 'for_translator': 'Thanks!'}\r\n# updateObj = {'action': 'reject', 'reason': 'quality', 'comment': 'My grandmother does better.', 'captcha': 'bert'}\r\n\r\ngengo.updateTranslationJob(id = 42, action = updateObj)\r\n```\r\n\r\nMyGengo.updateTranslationJobs()\r\n----------------------------------------------------------------------------------------------------------\r\nUpdates multiple existing jobs. A bit of a hamburger method in that you can cook this one many different ways - pay\r\nattention to the parameter specifications.\r\n\r\n### Parameters:\r\n- _id_: Required. The ID of the job you're updating.\r\n- _action_: Required. A dictionary describing the actions you are performing on these job (\"purchase\", \"revise\", \"approve\", \"reject\"). Some\r\nof these actions require other parameters, see their respective sections immediately below.\r\n\r\n### \"purchase\" Parameters:\r\nNone\r\n\r\n### \"revise\" Parameters:\r\n- _comment_: Optional. A comment describing the revision.\r\n\r\n### \"approve\" Parameters:\r\n- _rating_: Required. 1 - 5, 1 = ohgodwtfisthis, 5 = I want yo babies yo,\r\n- _for_translator_: Optional. Comments that you can pass on to the translator.\r\n- _for_mygengo_: Optional. Comments to send to the myGengo staff (kept private on myGengo's end)\r\n- _public_: Optional. 1 (true) / 0 (false, default). Whether myGengo can share this feedback publicly.\r\n\r\n### \"reject\" Parameters:\r\n- _reason_: Required. Reason for rejection (must be \"quality\", \"incomplete\", \"other\")\r\n- _comment_: Required. Explain your rejection, especially if all you put was \"other\".\r\n- _captcha_: Required. The captcha image text. Each job in a \"reviewable\" state will have a captcha_url value, which is a URL to an image. This captcha value is required only if a job is to be rejected. If the captcha is wrong, a URL for a new captcha is also included with the error message.\r\n- _follow_up_: Optional. \"requeue\" (default) or \"cancel\". If you choose \"requeue\" the job will be rejected and then passed onto another translator. If you choose \"cancel\" the job will be completely cancelled upon rejection.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\n# Some example action objects, choose one to test by uncommenting\r\nupdateObj = {'action': 'purchase'}\r\n# updateObj = {'action': 'revise', 'comment': 'Thanks but no thanks'}\r\n# updateObj = {'action': 'approve', 'rating': 1, 'for_translator': 'Thanks!'}\r\n# updateObj = {'action': 'reject', 'reason': 'quality', 'comment': 'My grandmother does better.', 'captcha': 'bert'}\r\n\r\ngengo.updateTranslationJob(id = 42, action = updateObj)\r\n```\r\n\r\n\r\nMyGengo.getTranslationJob()\r\n----------------------------------------------------------------------------------------------------------\r\nRetrieves a specific job from mygengo.\r\n\r\n### Parameters:\r\n- _id_: Required. The ID of the job you want to retrieve.\r\n- _pre_mt_: Optional. 1 (true) / 0 (false, default). Whether to return a machine translation if the human translation is not complete yet.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\ngengo.getTranslationJob(id = 42, pre_mt = 1)\r\n```\r\n\r\nMyGengo.getTranslationJobs()\r\n----------------------------------------------------------------------------------------------------------\r\nRetrieves a list of resources for the most recent jobs filtered by the given parameters.\r\n\r\n### Parameters:\r\n- _status_: Optional. \"unpaid\", \"available\", \"pending\", \"reviewable\", \"approved\", \"rejected\", or \"canceled\".\r\n- _timestamp_after_: Optional. Epoch timestamp from which to filter submitted jobs.\r\n- _count_: Optional. Defaults to 10.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\ngengo.getTranslationJobs(status = \"unpaid\", count = 15)\r\n```\r\n\r\nMyGengo.getTranslationJobBatch()\r\n----------------------------------------------------------------------------------------------------------\r\nRetrieves the group of jobs that were previously submitted together.\r\n\r\n### Parameters:\r\n- _id_: Required. The ID of a job that you're looking for the entire batch of.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\ngengo.getTranslationJobBatch(id = 42)\r\n```\r\n\r\n\r\nMyGengo.postTranslationJobComment()\r\n----------------------------------------------------------------------------------------------------------\r\nSubmits a new comment to the job's comment thread.\r\n\r\n### Parameters:\r\n- _id_: Required. The ID of the translation job to comment on.\r\n- _comment_: Required. A dictionary with the body/text of your comment.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\ngengo.postTranslationJobComment(id = 42, comment = {\r\n\t'body': 'I love lamp!',\r\n})\r\n```\r\n\r\nMyGengo.getTranslationJobComments()\r\n----------------------------------------------------------------------------------------------------------\r\nRetrieves the comment thread for a job.\r\n\r\n### Parameters:\r\n- _id_: Required. The ID of the translation job you're retrieving comments from.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\ngengo.getTranslationJobComments(id = 42)\r\n```\r\n\r\nMyGengo.getTranslationJobFeedback()\r\n-----------------------------------------------------------------------------------------------------------\r\nRetrieves the feedback you have submitted for a particular job.\r\n\r\n### Parameters:\r\n- _id_: Required. The ID of the translation job you're retrieving comments from.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\ngengo.getTranslationJobFeedback(id = 42)\r\n```\r\n\r\nMyGengo.getTranslationJobRevisions()\r\n-------------------------------------------------------------------------------------------------------------\r\nGets list of revision resources for a job. Revisions are created each time a translator or Senior Translator updates the text.\r\n\r\n### Parameters:\r\n- _id_: Required. The ID of the translation job you're getting revisions from.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\ngengo.getTranslationJobRevisions(id = 42)\r\n```\r\n\r\nMyGengo.getTranslationJobRevision()\r\n----------------------------------------------------------------------------------------------------------\r\nGets a specific revision for a job.\r\n\r\n### Parameters:\r\n- _id_: Required. The ID of the translation job you're getting revisions from.\r\n- _rev_id_: Required. The ID of the revision you're looking up.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\ngengo.getTranslationJobRevision(id = 42, rev_id = 1)\r\n```\r\n\r\nMyGengo.getTranslationJobPreviewImage()\r\n----------------------------------------------------------------------------------------------------------\r\nReturns a GIF preview image of the translated text.\r\n\r\n### Parameters:\r\n- _id_: Required. The ID of the translation job you want a preview image for.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\ngengo.getTranslationJobPreview(id = 42)\r\n```\r\n\r\nMyGengo.deleteTranslationJob()\r\n----------------------------------------------------------------------------------------------------------\r\nCancels the job. You can only cancel a job if it has not been started already by a translator.\r\n\r\n### Parameters:\r\n- _id_: Required. The ID of the job you want to delete.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\ngengo.deleteTranslationJob(id = 42)\r\n```\r\n\r\nMyGengo.deleteTranslationJobs()\r\n----------------------------------------------------------------------------------------------------------\r\nCancels multiple jobs. You can only cancel a job if it has not been started already by a translator.\r\n\r\n### Parameters:\r\n- _id_: Required. The ID of the job you want to delete.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\ngengo.deleteTranslationJobs(ids = [42, 43, 44, 56])\r\n```\r\n\r\nMyGengo.getServiceLanguages()\r\n----------------------------------------------------------------------------------------------------------\r\nReturns a list of supported languages and their language codes.\r\n\r\n### Paramters:\r\nNone\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\ngengo.getServiceLanguages()\r\n```\r\n\r\nMyGengo.getServiceLanguagePairs()\r\n--------------------------------------------------------------------------------------------------------\r\nReturns supported translation language pairs, tiers, and credit prices.\r\n\r\n### Parameters:\r\n- _lc_src_: Optional. A source language code to filter the results to relevant pairs.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo\r\n\r\ngengo = MyGengo(\r\n public_key = 'your_public_key',\r\n private_key = 'your_private_key',\r\n sandbox = True, # possibly False, depending on your dev needs\r\n)\r\n\r\n# Send along an optional source language declaration.\r\ngengo.getServiceLanguagePairs(lc_src = 'en')\r\n```\r\n\r\nMyGengo.unicode2utf8()\r\n--------------------------------------------------------------------------------------------------------\r\nConvenience method for making sure that text is in an acceptable format for myGengo submissions.\r\n\r\n### Parameters:\r\n- _text_: Required. Text to convert.\r\n\r\n### Example:\r\n``` python\r\nfrom mygengo import MyGengo \r\n\r\n# Make this into a UTF-8 encoded string...\r\nMyGengo.unicode2utf8(\"\u79c1\u306f\")\r\n```", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/myGengo/mygengo-python/tree/master", "keywords": "mygengo translation language api japanese english", "license": "LGPL License", "maintainer": "", "maintainer_email": "", "name": "mygengo", "package_url": "https://pypi.org/project/mygengo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mygengo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/myGengo/mygengo-python/tree/master" }, "release_url": "https://pypi.org/project/mygengo/1.3.3/", "requires_dist": null, "requires_python": null, "summary": "Official Python library for interfacing with the MyGengo API.", "version": "1.3.3" }, "last_serial": 795144, "releases": { "1.0.0": [], "1.2.0": [ { "comment_text": "", "digests": { "md5": "0e0053fe0c6b1e40b4243ad155375317", "sha256": "12aec4e3b46ee85c5e35667373cdd41923862d65161e37d59fc19a62cd483a42" }, "downloads": -1, "filename": "mygengo-1.2.0.tar.gz", "has_sig": false, "md5_digest": "0e0053fe0c6b1e40b4243ad155375317", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15769, "upload_time": "2011-05-29T17:10:53", "url": "https://files.pythonhosted.org/packages/ae/00/daef9e9ce0244e95a2a93358fac5216442c7cce0b492255da2ac91dd4f09/mygengo-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "a8e62ffa0c2a8f52c903084d6e29f178", "sha256": "c05ef9fd9ab3e7ce32bac6baec8ec9774a20cee48dc172498e74b11e0a3da239" }, "downloads": -1, "filename": "mygengo-1.2.1.tar.gz", "has_sig": false, "md5_digest": "a8e62ffa0c2a8f52c903084d6e29f178", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15773, "upload_time": "2011-06-04T20:34:24", "url": "https://files.pythonhosted.org/packages/5c/45/62e42c3f24c31a06a87f20ad598082ad671896eaf9ebf81f1cba54a2139d/mygengo-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "35dac86f3319c3ac98b4bea4e627446f", "sha256": "916fdb87bbdce5cad64f92d4a45d67f011f744d1a8982496d680703e3c376c99" }, "downloads": -1, "filename": "mygengo-1.2.2.tar.gz", "has_sig": false, "md5_digest": "35dac86f3319c3ac98b4bea4e627446f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15810, "upload_time": "2011-06-11T07:38:17", "url": "https://files.pythonhosted.org/packages/94/9d/6643a4b7337a04f745473330219e63afc3b358b804b54af5dd3b6c00e301/mygengo-1.2.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "f7f53e28d4ab4d5950e96f447fe17052", "sha256": "27003dcbd0bd5517520e64494b619d227718a0ab0a3a66c16e604343426eb282" }, "downloads": -1, "filename": "mygengo-1.3.tar.gz", "has_sig": false, "md5_digest": "f7f53e28d4ab4d5950e96f447fe17052", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16335, "upload_time": "2011-08-21T19:48:02", "url": "https://files.pythonhosted.org/packages/39/54/5d760a4cd5611df6b34886aef66fb3df442f4ccd9dd8739d58136d05e2a3/mygengo-1.3.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "65f2ee7345dcb56af111d70a6d3a6536", "sha256": "7c587e42da6d891785d27d65aab8dbfeee7c4a574bb3234086ebcdd9a772cd00" }, "downloads": -1, "filename": "mygengo-1.3.1.tar.gz", "has_sig": false, "md5_digest": "65f2ee7345dcb56af111d70a6d3a6536", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16360, "upload_time": "2011-10-03T04:26:50", "url": "https://files.pythonhosted.org/packages/e0/0b/18186cb61153fcd1147c1b6d0084d7585cd845405b00374f7a15063b996e/mygengo-1.3.1.tar.gz" } ], "1.3.2": [ { "comment_text": "", "digests": { "md5": "9d1166528ecdd74f75293155c89d479b", "sha256": "8bad6ec2c195c8e2c244d31ef7bd85726f820160c17806a086bcac36c2a5fc2b" }, "downloads": -1, "filename": "mygengo-1.3.2.tar.gz", "has_sig": false, "md5_digest": "9d1166528ecdd74f75293155c89d479b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19776, "upload_time": "2011-10-04T05:52:05", "url": "https://files.pythonhosted.org/packages/f3/e1/68a3baf926c7f0d2bedd4826555cd9461ebd9f235d8a05fd44d1d0a3b12a/mygengo-1.3.2.tar.gz" } ], "1.3.3": [ { "comment_text": "", "digests": { "md5": "e0dbc9bcaf7e07c8364705a685b6d53f", "sha256": "ebc1aaf0aa33c5340d62507c671c86e9820cb5cdfd0e9aeee87c6647aaf192b0" }, "downloads": -1, "filename": "mygengo-1.3.3.tar.gz", "has_sig": false, "md5_digest": "e0dbc9bcaf7e07c8364705a685b6d53f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19753, "upload_time": "2011-10-24T02:08:24", "url": "https://files.pythonhosted.org/packages/d2/f1/c1504095a20dabce489ebbe045701d70ff3b3919da204c55ff02f4cfb9a2/mygengo-1.3.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e0dbc9bcaf7e07c8364705a685b6d53f", "sha256": "ebc1aaf0aa33c5340d62507c671c86e9820cb5cdfd0e9aeee87c6647aaf192b0" }, "downloads": -1, "filename": "mygengo-1.3.3.tar.gz", "has_sig": false, "md5_digest": "e0dbc9bcaf7e07c8364705a685b6d53f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19753, "upload_time": "2011-10-24T02:08:24", "url": "https://files.pythonhosted.org/packages/d2/f1/c1504095a20dabce489ebbe045701d70ff3b3919da204c55ff02f4cfb9a2/mygengo-1.3.3.tar.gz" } ] }