Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save rtanglao/1020258 to your computer and use it in GitHub Desktop.

Select an option

Save rtanglao/1020258 to your computer and use it in GitHub Desktop.
oneGetSatisfactionTopicFromRolandsMongoDBinRuby
p = topicsColl.find_one()
pp p
{"_id"=>BSON::ObjectId('4de6c57bcf32980220000010'),
"me_too_count"=>1,
"slug"=>"my_folders_have_disappeared",
"reply_id_array"=>[5499308, 5703224],
"created_at"=>Sat May 07 14:32:00 UTC 2011,
"user_defined_code"=>false,
"author"=>
{"name"=>"g_owen_home",
"avatar_url_medium"=>
"http://getsatisfaction.com/images/user_default_medium.png",
"photo"=>"/images/user_default_medium.png",
"canonical_name"=>"g_owen_home",
"url"=>"http://api.getsatisfaction.com/people/2633140",
"avatar_path_mini"=>"/images/user_default_mini.png",
"avatar_url_mini"=>
"http://getsatisfaction.com/images/user_default_mini.png",
"id"=>2633140,
"avatar"=>"http://getsatisfaction.com/images/user_default_medium.png",
"at_sfn"=>"http://getsatisfaction.com/people/g_owen_home",
"avatar_url_large"=>
"http://getsatisfaction.com/images/user_default_large.png",
"avatar_url_small"=>
"http://getsatisfaction.com/images/user_default_small.png",
"avatar_path_medium"=>"/images/user_default_medium.png",
"avatar_path_large"=>"/images/user_default_large.png",
"avatar_path_small"=>"/images/user_default_small.png"},
"last_active_at"=>Wed Jun 01 20:34:01 UTC 2011,
"synthetic_status_journal"=>
[{"status_update_time"=>Wed Jun 01 20:34:01 UTC 2011, "status"=>nil}],
"tags_str"=>"closeme~folders~settings~",
"url"=>"http://api.getsatisfaction.com/topics/2390255",
"tag_count"=>3,
"id"=>2390255,
"employee"=>false,
"subject"=>"My folders have disappeared!!",
"follower_count"=>1,
"fulltext_with_tags"=>
"my folders have disappeared!! hello all! running thunderbird 3.1.10 on windows 7 home premium with time warner cable as isp. until yesterday, column on left let me switch between folders like in and sent. i clicked on a particular subfolder and now it's stuck there and column offering other folders has disappeared. have tried going thru \"view\" followed by \"folders\" and tried all the choices there. have also tried turning off and back on. any ideas on what to do? thank you!! could you post a screen capture? so we can see what you are seeing. g_owen, are you still there? closeme folders settings ",
"fulltext"=>
"my folders have disappeared!! hello all! running thunderbird 3.1.10 on windows 7 home premium with time warner cable as isp. until yesterday, column on left let me switch between folders like in and sent. i clicked on a particular subfolder and now it's stuck there and column offering other folders has disappeared. have tried going thru \"view\" followed by \"folders\" and tried all the choices there. have also tried turning off and back on. any ideas on what to do? thank you!! could you post a screen capture? so we can see what you are seeing. g_owen, are you still there?",
"at_sfn"=>
"http://getsatisfaction.com/mozilla_messaging/topics/my_folders_have_disappeared",
"content"=>
"Hello all! Running Thunderbird 3.1.10 on Windows 7 Home Premium with Time Warner cable as ISP. Until yesterday, column on left let me switch between folders like in and sent. I clicked on a particular subfolder and now it's stuck there and column offering other folders has disappeared. Have tried going thru \"view\" followed by \"folders\" and tried all the choices there. Have also tried turning off and back on. Any ideas on what to do? Thank you!!",
"most_recent_activity"=>"comment",
"company_id"=>45188,
"reply_array"=>
[{"created_at"=>"2011/05/08 02:06:30 +0000",
"author"=>
{"name"=>"Matt",
"photo"=>"/images/user_default_medium.png",
"avatar_url_medium"=>
"http://s3.amazonaws.com/satisfaction-production/public/uploaded_images/4154942/untitled_medium.JPG",
"canonical_name"=>"matt_678579",
"url"=>"http://api.getsatisfaction.com/people/952932",
"avatar_url_mini"=>
"http://s3.amazonaws.com/satisfaction-production/public/uploaded_images/4154942/untitled_mini.JPG",
"avatar_path_mini"=>"/images/user_default_mini.png",
"id"=>952932,
"avatar"=>
"http://s3.amazonaws.com/satisfaction-production/public/uploaded_images/4154942/untitled_medium.JPG",
"at_sfn"=>"http://getsatisfaction.com/people/matt_678579",
"avatar_url_large"=>
"http://s3.amazonaws.com/satisfaction-production/public/uploaded_images/4154942/untitled_large.JPG",
"avatar_url_small"=>
"http://s3.amazonaws.com/satisfaction-production/public/uploaded_images/4154942/untitled_small.JPG",
"avatar_path_medium"=>"/images/user_default_medium.png",
"avatar_path_large"=>"/images/user_default_large.png",
"avatar_path_small"=>"/images/user_default_small.png"},
"url"=>"http://api.getsatisfaction.com/topics/2390255/replies/5499308",
"id"=>5499308,
"employee"=>false,
"content"=>
"could you post a screen capture? So we can see what you are seeing.",
"star_promoted"=>false,
"topic_id"=>2390255,
"company_promoted"=>false},
{"created_at"=>"2011/06/01 20:34:01 +0000",
"author"=>
{"name"=>"Wayne (wsmwk)",
"photo"=>"/images/user_default_medium.png",
"avatar_url_medium"=>
"http://getsatisfaction.com/images/user_default_medium.png",
"canonical_name"=>"wayne_mery",
"url"=>"http://api.getsatisfaction.com/people/516436",
"avatar_url_mini"=>
"http://getsatisfaction.com/images/user_default_mini.png",
"avatar_path_mini"=>"/images/user_default_mini.png",
"id"=>516436,
"avatar"=>"http://getsatisfaction.com/images/user_default_medium.png",
"at_sfn"=>"http://getsatisfaction.com/people/wayne_mery",
"avatar_url_large"=>
"http://getsatisfaction.com/images/user_default_large.png",
"avatar_url_small"=>
"http://getsatisfaction.com/images/user_default_small.png",
"avatar_path_medium"=>"/images/user_default_medium.png",
"avatar_path_large"=>"/images/user_default_large.png",
"avatar_path_small"=>"/images/user_default_small.png"},
"url"=>"http://api.getsatisfaction.com/topics/2390255/replies/5703224",
"id"=>5703224,
"employee"=>false,
"content"=>"g_owen, are you still there?",
"star_promoted"=>false,
"topic_id"=>2390255,
"company_promoted"=>false}],
"tag_id_array"=>[412689, 1561, 439],
"tags_array"=>["closeme", "folders", "settings"],
"flag_count"=>0,
"reply_count"=>2,
"has_promoted_replies"=>false,
"status"=>nil,
"style"=>"problem"}
=> nil
irb(main):034:0>
@rtanglao
Copy link
Author

a sample Get Satisfaction topic from Roland's Get Satisfaction Database created by:
https://github.com/rtanglao/momogs/blob/master/mongoUpdateSlurpGS.rb

bugs:

  • topic["reply_array"][0]["created_at"] is a String instead of an ISO Date
  • topic["reply_array"][1]["created_at"] is a String instead of an ISO Date
    etc

@rtanglao
Copy link
Author

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