Skip to content

Instantly share code, notes, and snippets.

@antono
Forked from anonymous/clojure api for google+.clj
Created October 24, 2011 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antono/1310770 to your computer and use it in GitHub Desktop.
Save antono/1310770 to your computer and use it in GitHub Desktop.
clojure api for google+
(filter
(fn [user]
(let [langs-of-posts (map google.translate/guess-language
(google.plus/get-user-posts user))]
(and
(pos? (count langs-of-posts))
(every? #(#{:be :en :eo :ja :ru :uk} %) langs-of-posts)) ))
(google.plus/select-users-by-cirle "esperanto"))
@antono
Copy link
Author

antono commented Oct 25, 2011

Google::Plus.get_users_by_circle('esperanto').find_all do |user|
  user.posts.any? do |post|
    %w(eo ru be en).include? Goog::Translate.guess_language(post)
  end
end

@antono
Copy link
Author

antono commented Oct 25, 2011

interese ke en ruby dank al rubena ripetilo oni ne bezonas (and (pos? (...) ) parton...
Verŝajne versio en clojure funkcios por kvazaŭ-senĉesaj listoj, ĉu?

@tavisrudd
Copy link

Hi Antono,
Where can I find this google.plus clj api?
Tavis

@antono
Copy link
Author

antono commented Jan 16, 2012

@tavisrudd unfortunately this is only pseudocode to compare clojure and ruby :)

@tavisrudd
Copy link

Damn :)

@antono
Copy link
Author

antono commented Jan 18, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment