Created
May 20, 2011 08:30
-
-
Save shunirr/982556 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
datas = API からデータを拾ってくる() | |
datas.each do |data| | |
status_object_id = data.id | |
unless DB.duplication?(status_object_id) | |
DB.insert("objects_table", :object_id => status_object_id, :data => data) | |
DB.insert("relations", :parent_id => "me" :object_id =>status_object_id) | |
ステータスを表示する | |
end | |
comments = data.comments | |
comments.each do |comment| | |
comment_object_id = comment.id | |
unless DB.duplication?(comment_object_id) | |
DB.insert("objects_table", :object_id => comment_object_id, :data => data) | |
DB.insert("relations", :parent_id =>status_object_id, :object_id => comment_object_id) | |
コメントを表示する | |
end | |
end | |
end | |
これで良いと思った?でも残念、さやかちゃんでした!! |
Author
shunirr
commented
May 20, 2011
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment