• Stars
    star
    3
  • Rank 3,963,521 (Top 79 %)
  • Language
    Crystal
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Crystal Client for Glosbe API

Glosbe Build Status

Crystal client for Glosbe API

Installation

Add this to your application's shard.yml:

dependencies:
  glosbe:
    github: greyblake/crystal-glosbe

Usage

require "glosbe"

client = Glosbe::Client.new

# Translate a word from German to English
response = client.translate("de", "en", "Achtung", tm: true)  # =>  #<Glosbe::TranslateResponse ... >

# Print translations
response.tuc.each do |translation|
  puts translation.phrase.try(&.text)
end

# Print examples of usage
response.examples.each do |example|
  puts example.first    # sentence in German
  puts example.second   # translation in English
end

Please check Glosbe::Client and Glosbe API for more details.

Errors

Client methods may raise the following errors:

  • Glosbe::Error
  • Glosbe::HttpError
  • Glosbe::ParseError

Running tests

crystal spec

Contributors

  • greyblake Sergey Potapov - creator, maintainer

More Repositories

1

nutype

Rust newtype with guarantees πŸ‡ΊπŸ‡¦ πŸ¦€
Rust
1,068
star
2

whatlang-rs

Natural language detection library for Rust. Try demo online: https://whatlang.org/
Rust
926
star
3

ta-rs

Technical analysis library for Rust language
Rust
584
star
4

vim-preview

Vim plugin for previewing markup files(markdown,rdoc,textile,html)
Vim Script
209
star
5

envconfig-rs

Build a config structure from environment variables in Rust without boilerplate
Rust
186
star
6

blogo

Mountable blog engine for Ruby on Rails
Ruby
101
star
7

kinded

Generate Rust enum variants without associated data
Rust
81
star
8

cargo-testify

Watches changes in a rust project, runs test and shows friendly notification
Rust
80
star
9

awesome-programming-books

List of good programming books for beginners and professionals
80
star
10

mago

Magic numbers detector for Ruby source code
Ruby
58
star
11

humble-investing

List of resources that I use for investing research
41
star
12

jsonpath-rs

JSONPath for Rust
Rust
37
star
13

from-typescript-to-rescript

Frontend of https://Inhyped.com written in TypeScript and rewritten in ReScript
TypeScript
29
star
14

telebot

Ruby client for Telegram bot API
Ruby
28
star
15

fast_seeder

Speed up seeding your Rails application using multiple SQL inserts!
Ruby
25
star
16

xplan

Visualizes dependencies between tasks
Rust
22
star
17

dm-rspec

RSpec matchers for DataMapper
Ruby
19
star
18

hellcheck

HTTP health checker implemented in Rust
Rust
19
star
19

vim-esperanto

Vim plugin for typing Esperanto language in any way (Esperanto keyboard, h, x, ^)
Vim Script
15
star
20

crystal-google_translate

Google Translate client for Crystal
Crystal
14
star
21

hail

HTTP load testing tool powered by Rust
Rust
14
star
22

crystal-magma

Crystal interpreter
Crystal
13
star
23

poloniex-rs

Rust client for Poloniex API
Rust
9
star
24

whatlang-ffi

C bindings for whatlang Rust library
C
9
star
25

rustcast

Code for RustCast screencast episodes (https://www.youtube.com/channel/UCZSy_LFJOtOPPcsE64KxDkw)
Rust
8
star
26

crystal-aitk

Artificial Intelligence Tool Kit for Crystal lang
Crystal
8
star
27

tokipona

Ruby library to process constructed language Toki Pona
Ruby
8
star
28

rails3_pg_deferred_constraints

Rails 3 engine which provides a hack to avoid RI_ConstraintTrigger Error bug.
Ruby
7
star
29

dotvim

My .vim
Vim Script
4
star
30

conway-rs

Conway's Game of Life implemented in Rust.
Rust
4
star
31

arbitrary_ext

Provides a way to derive Arbitrary trait but set custom implementation for single fields if necessary.
Rust
4
star
32

rails_markdown

Allows you to use markdown templates with placeholders in rails application}
Ruby
3
star
33

vim-smartdict

Vim plugin to use translate words (dictionary).
Vim Script
3
star
34

dot-nvim

My nvim config
Vim Script
2
star
35

crystal-cossack

Simple and flexible HTTP client for Crystal with middleware and test support.
2
star
36

enum_param-rs

Rust
2
star
37

beep-alarm

Alarm written in bash and based on beep tool
2
star
38

crystal-delemma

Lemmatization tool for German language.implemented in Crystal
Crystal
2
star
39

crystal-telegram_bot

Crystal
2
star
40

whatlang-website

Website for whatlang (whatlang.org)
JavaScript
2
star
41

crystal-icr

Interactive console for Crystal programming language
2
star
42

envconfig-rs-old

An easy way to build a config structure form environment variables in Rust without boilerplate.
Rust
1
star
43

greyblake.github.com

My blog
HTML
1
star
44

talks

Public talks / presentations
Vue
1
star
45

alis

Tool to create more flexible aliases.
Ruby
1
star
46

rustcast-travis-demo

Rust
1
star
47

gync

Synchronize data of desktop applications with Git
Ruby
1
star
48

dm-enum

Enumerated models for DataMapper
Ruby
1
star
49

deutscher_bot

Telegram Bot that helps to learn German, implemented in Crystal
Crystal
1
star
50

crystal-jwt

JWT implementation in Crystal
1
star