lingq¶ ↑
Gem for interacting with the API of lingq.com. It’s a language learning website, and it’s pretty useful, but I want to be able to work on my flashcards offline. This gem is being written to be included in a desktop client (and maybe eventually a mobile client), but will certainly still be useful as a standalone api wrapper for other projects that want to interact with Lingq.com
Getting Started¶ ↑
You need the API key for your account. Usage is as follows:
require 'lingq' client = Lingq::Client.new("apikey") #must be one of the languages available for this user, check client.languages array client.change_language!("ru") #load all lessons for the user lessons = client.lessons #load all lingq flashcards for the user words = client.words #load only the flashcards for a single lesson words = lessons.first.words #update all updatable flashcard information word = words.first word.status = 2 word.hint = "A better definition of the word" client.update_word!(word) #update the 0-3 status of a word (updates the server) word.increment_status!
Current Status¶ ↑
Right now just data pulling is done, and you can manually update flashcards through the client object. ()
BE WARNED! The update call for saving flashcard data is currently being done through a system(“curl …”) because I’m having trouble getting httparty to do the PUT action I want correctly. If you are on windows, this will be a problem. I’m working on it. :)
Note on Patches/Pull Requests¶ ↑
-
Fork the project.
-
Make your feature addition or bug fix.
-
Add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
-
Send me a pull request. Bonus points for topic branches.
Copyright¶ ↑
Copyright © 2010 Ethan Vizitei. See LICENSE for details.