{"id":27284,"date":"2023-08-15T12:02:57","date_gmt":"2023-08-15T04:02:57","guid":{"rendered":"https:\/\/cravatar.com\/developer\/?p=27284"},"modified":"2023-08-15T12:04:10","modified_gmt":"2023-08-15T04:04:10","slug":"ruby-image-requests","status":"publish","type":"post","link":"https:\/\/cravatar.com\/developer\/ruby-image-requests","title":{"rendered":"Ruby \u56fe\u50cf\u8bf7\u6c42"},"content":{"rendered":"\n
# include MD5 gem, should be part of standard ruby install\nrequire 'digest\/md5'\n \n# get the email from URL-parameters or what have you and make lowercase\nemail_address = params[:email].downcase\n \n# create the md5 hash\nhash = Digest::MD5.hexdigest(email_address)\n \n# compile URL which can be used in <img src="RIGHT_HERE"...\nimage_src = "https:\/\/cravatar.cn\/avatar\/#{hash}"<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":18727,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[34],"class_list":["post-27284","post","type-post","status-publish","format-standard","hentry","category-software","tag-ruby","no-featured-image-padding"],"yoast_head":"\nRuby \u56fe\u50cf\u8bf7\u6c42 - Cravatar \u5f00\u53d1\u6587\u6863<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cravatar.com\/developer\/ruby-image-requests\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ruby \u56fe\u50cf\u8bf7\u6c42 - Cravatar \u5f00\u53d1\u6587\u6863\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cravatar.com\/developer\/ruby-image-requests\" \/>\n<meta property=\"og:site_name\" content=\"Cravatar \u5f00\u53d1\u6587\u6863\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-15T04:02:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-15T04:04:10+00:00\" \/>\n<meta name=\"author\" content=\"\u8bd7\u8bed\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u8bd7\u8bed\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/cravatar.com\/developer\/ruby-image-requests#article\",\"isPartOf\":{\"@id\":\"https:\/\/cravatar.com\/developer\/ruby-image-requests\"},\"author\":{\"name\":\"\u8bd7\u8bed\",\"@id\":\"https:\/\/cravatar.com\/developer\/#\/schema\/person\/926f4cd5225ed8083a2075f3226065c2\"},\"headline\":\"Ruby \u56fe\u50cf\u8bf7\u6c42\",\"datePublished\":\"2023-08-15T04:02:57+00:00\",\"dateModified\":\"2023-08-15T04:04:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cravatar.com\/developer\/ruby-image-requests\"},\"wordCount\":1,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/cravatar.com\/developer\/#organization\"},\"keywords\":[\"Ruby\"],\"articleSection\":[\"\u81ea\u5b9a\u4e49\u7a0b\u5e8f\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/cravatar.com\/developer\/ruby-image-requests#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cravatar.com\/developer\/ruby-image-requests\",\"url\":\"https:\/\/cravatar.com\/developer\/ruby-image-requests\",\"name\":\"Ruby \u56fe\u50cf\u8bf7\u6c42 - Cravatar \u5f00\u53d1\u6587\u6863\",\"isPartOf\":{\"@id\":\"https:\/\/cravatar.com\/developer\/#website\"},\"datePublished\":\"2023-08-15T04:02:57+00:00\",\"dateModified\":\"2023-08-15T04:04:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/cravatar.com\/developer\/ruby-image-requests#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cravatar.com\/developer\/ruby-image-requests\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cravatar.com\/developer\/ruby-image-requests#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/cravatar.com\/developer\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ruby \u56fe\u50cf\u8bf7\u6c42\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cravatar.com\/developer\/#website\",\"url\":\"https:\/\/cravatar.com\/developer\/\",\"name\":\"Cravatar \u5f00\u53d1\u6587\u6863\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cravatar.com\/developer\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cravatar.com\/developer\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cravatar.com\/developer\/#organization\",\"name\":\"Cravatar \u5f00\u53d1\u6587\u6863\",\"url\":\"https:\/\/cravatar.com\/developer\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/cravatar.com\/developer\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cravatar.com\/developer\/wp-content\/uploads\/sites\/18\/2023\/08\/cr-logo-02.png\",\"contentUrl\":\"https:\/\/cravatar.com\/developer\/wp-content\/uploads\/sites\/18\/2023\/08\/cr-logo-02.png\",\"width\":870,\"height\":225,\"caption\":\"Cravatar \u5f00\u53d1\u6587\u6863\"},\"image\":{\"@id\":\"https:\/\/cravatar.com\/developer\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cravatar.com\/developer\/#\/schema\/person\/926f4cd5225ed8083a2075f3226065c2\",\"name\":\"\u8bd7\u8bed\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/cravatar.com\/developer\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/cravatar.com\/avatar\/60f1c4f099fc44da2978d9107535f58e?s=96&r=g&cache-key=60f1c4f099fc44da2978d9107535f58e\",\"contentUrl\":\"https:\/\/cravatar.com\/avatar\/60f1c4f099fc44da2978d9107535f58e?s=96&r=g&cache-key=60f1c4f099fc44da2978d9107535f58e\",\"caption\":\"\u8bd7\u8bed\"},\"sameAs\":[\"https:\/\/www.feibisi.com\/\"],\"url\":\"https:\/\/cravatar.com\/developer\/author\/feibisi\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ruby \u56fe\u50cf\u8bf7\u6c42 - Cravatar \u5f00\u53d1\u6587\u6863","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cravatar.com\/developer\/ruby-image-requests","og_locale":"zh_CN","og_type":"article","og_title":"Ruby \u56fe\u50cf\u8bf7\u6c42 - Cravatar \u5f00\u53d1\u6587\u6863","og_url":"https:\/\/cravatar.com\/developer\/ruby-image-requests","og_site_name":"Cravatar \u5f00\u53d1\u6587\u6863","article_published_time":"2023-08-15T04:02:57+00:00","article_modified_time":"2023-08-15T04:04:10+00:00","author":"\u8bd7\u8bed","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u8bd7\u8bed"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cravatar.com\/developer\/ruby-image-requests#article","isPartOf":{"@id":"https:\/\/cravatar.com\/developer\/ruby-image-requests"},"author":{"name":"\u8bd7\u8bed","@id":"https:\/\/cravatar.com\/developer\/#\/schema\/person\/926f4cd5225ed8083a2075f3226065c2"},"headline":"Ruby \u56fe\u50cf\u8bf7\u6c42","datePublished":"2023-08-15T04:02:57+00:00","dateModified":"2023-08-15T04:04:10+00:00","mainEntityOfPage":{"@id":"https:\/\/cravatar.com\/developer\/ruby-image-requests"},"wordCount":1,"commentCount":0,"publisher":{"@id":"https:\/\/cravatar.com\/developer\/#organization"},"keywords":["Ruby"],"articleSection":["\u81ea\u5b9a\u4e49\u7a0b\u5e8f"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/cravatar.com\/developer\/ruby-image-requests#respond"]}]},{"@type":"WebPage","@id":"https:\/\/cravatar.com\/developer\/ruby-image-requests","url":"https:\/\/cravatar.com\/developer\/ruby-image-requests","name":"Ruby \u56fe\u50cf\u8bf7\u6c42 - Cravatar \u5f00\u53d1\u6587\u6863","isPartOf":{"@id":"https:\/\/cravatar.com\/developer\/#website"},"datePublished":"2023-08-15T04:02:57+00:00","dateModified":"2023-08-15T04:04:10+00:00","breadcrumb":{"@id":"https:\/\/cravatar.com\/developer\/ruby-image-requests#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cravatar.com\/developer\/ruby-image-requests"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cravatar.com\/developer\/ruby-image-requests#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/cravatar.com\/developer\/"},{"@type":"ListItem","position":2,"name":"Ruby \u56fe\u50cf\u8bf7\u6c42"}]},{"@type":"WebSite","@id":"https:\/\/cravatar.com\/developer\/#website","url":"https:\/\/cravatar.com\/developer\/","name":"Cravatar \u5f00\u53d1\u6587\u6863","description":"","publisher":{"@id":"https:\/\/cravatar.com\/developer\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cravatar.com\/developer\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"https:\/\/cravatar.com\/developer\/#organization","name":"Cravatar \u5f00\u53d1\u6587\u6863","url":"https:\/\/cravatar.com\/developer\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/cravatar.com\/developer\/#\/schema\/logo\/image\/","url":"https:\/\/cravatar.com\/developer\/wp-content\/uploads\/sites\/18\/2023\/08\/cr-logo-02.png","contentUrl":"https:\/\/cravatar.com\/developer\/wp-content\/uploads\/sites\/18\/2023\/08\/cr-logo-02.png","width":870,"height":225,"caption":"Cravatar \u5f00\u53d1\u6587\u6863"},"image":{"@id":"https:\/\/cravatar.com\/developer\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/cravatar.com\/developer\/#\/schema\/person\/926f4cd5225ed8083a2075f3226065c2","name":"\u8bd7\u8bed","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/cravatar.com\/developer\/#\/schema\/person\/image\/","url":"https:\/\/cravatar.com\/avatar\/60f1c4f099fc44da2978d9107535f58e?s=96&r=g&cache-key=60f1c4f099fc44da2978d9107535f58e","contentUrl":"https:\/\/cravatar.com\/avatar\/60f1c4f099fc44da2978d9107535f58e?s=96&r=g&cache-key=60f1c4f099fc44da2978d9107535f58e","caption":"\u8bd7\u8bed"},"sameAs":["https:\/\/www.feibisi.com\/"],"url":"https:\/\/cravatar.com\/developer\/author\/feibisi"}]}},"_links":{"self":[{"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/posts\/27284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/users\/18727"}],"replies":[{"embeddable":true,"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/comments?post=27284"}],"version-history":[{"count":0,"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/posts\/27284\/revisions"}],"wp:attachment":[{"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/media?parent=27284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/categories?post=27284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/tags?post=27284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}