How franck-gaspoz/gtradrestapi works
Project type and purpose
• This is an open-source .NET Framework 4.6.2 library plus a small CLI wrapper that lets C# programs (or end-users via command line) call Google Translate’s undocumented REST API for free translations.
• Key artifacts:
• GTradRestAPIClient (and its interface) – the core client library
• CLI.cs – a console‐app entrypoint that uses the client
• Domain types (Translation, Languages, TranslateException)
• Utility layers (NetUtil, LanguagesUtil)
• Configuration (app.config / GTradRestAPISettings, Properties/Settings)
File structure
• Top-level .cs files define the library and CLI.
• GTradRestAPIClient.cs + IGTradRestAPIClient.cs implement an interface-driven HTTP client.
• Utilities (NetUtil) encapsulate HTTP/URL formation and calls.
• Domain objects (Translation.cs, Languages.cs) model input/output.
• Exceptions (TranslateException.cs) handle errors.
• CLI.cs wires up user input → client → output.
• app.config / Settings.settings hold default REST endpoint and keys.
• Third-party libs (packages/Newtonsoft.Json for JSON parsing, Microsoft.Bcl for async support).
README for additional insights
• Usage snippet shows asynchronous TranslateAsync call returning a Task<string>.
• No built-in UI beyond the console app.
• Development has stopped; focus is solely on core translation functionality.
Elements
• Green for third-party dependencies
• Orange for external systems (Google Translate API)