Google translate API lib for DNX
This commit is contained in:
parent
29fd09270f
commit
848ab885c6
17 changed files with 525 additions and 0 deletions
11
GoogleCode/GoogleTranslate/Objects/Error/Error.cs
Normal file
11
GoogleCode/GoogleTranslate/Objects/Error/Error.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace GoogleTranslateNET.Objects.Error
|
||||
{
|
||||
public class Error
|
||||
{
|
||||
public int Code { get; set; }
|
||||
public string Message { get; set; }
|
||||
public List<ErrorData> Errors { get; set; }
|
||||
}
|
||||
}
|
||||
11
GoogleCode/GoogleTranslate/Objects/Error/ErrorData.cs
Normal file
11
GoogleCode/GoogleTranslate/Objects/Error/ErrorData.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
namespace GoogleTranslateNET.Objects.Error
|
||||
{
|
||||
public class ErrorData
|
||||
{
|
||||
public string Domain { get; set; }
|
||||
public string Reason { get; set; }
|
||||
public string Message { get; set; }
|
||||
public string LocationType { get; set; }
|
||||
public string Location { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
namespace GoogleTranslateNET.Objects.Error
|
||||
{
|
||||
public class ErrorResponse
|
||||
{
|
||||
public Error Error { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
namespace GoogleTranslateNET.Objects.LanguageDetection
|
||||
{
|
||||
public class LanguageDetection
|
||||
{
|
||||
public string Language { get; set; }
|
||||
public bool IsReliable { get; set; }
|
||||
public float Confidence { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace GoogleTranslateNET.Objects.LanguageDetection
|
||||
{
|
||||
public class LanguageDetectionData
|
||||
{
|
||||
public List<List<LanguageDetection>> Detections { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
namespace GoogleTranslateNET.Objects.LanguageDetection
|
||||
{
|
||||
public class LanguageDetectionResult
|
||||
{
|
||||
public LanguageDetectionData Data { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace GoogleTranslateNET.Objects.SupportedLanguages
|
||||
{
|
||||
public class SupportedLanguageData
|
||||
{
|
||||
public List<TranslationLanaguage> Languages { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
namespace GoogleTranslateNET.Objects.SupportedLanguages
|
||||
{
|
||||
public class SupportedLanguageResult
|
||||
{
|
||||
public SupportedLanguageData Data { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
namespace GoogleTranslateNET.Objects.SupportedLanguages
|
||||
{
|
||||
public class TranslationLanaguage
|
||||
{
|
||||
public string Language { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
namespace GoogleTranslateNET.Objects.Translation
|
||||
{
|
||||
public class TranslateResult
|
||||
{
|
||||
public TranslationData Data { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
namespace GoogleTranslateNET.Objects.Translation
|
||||
{
|
||||
public class Translation
|
||||
{
|
||||
public string TranslatedText { get; set; }
|
||||
public string DetectedSourceLanguage { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace GoogleTranslateNET.Objects.Translation
|
||||
{
|
||||
public class TranslationData
|
||||
{
|
||||
public List<Translation> Translations { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue