{"id":2221,"date":"2015-06-08T00:11:39","date_gmt":"2015-06-07T16:11:39","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=2221"},"modified":"2015-06-08T00:11:39","modified_gmt":"2015-06-07T16:11:39","slug":"%e5%a6%82%e4%bd%95%e4%b8%8b%e8%bd%bdgists%e7%9a%84%e6%96%87%e4%bb%b6%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/2221.html","title":{"rendered":"\u5982\u4f55\u4e0b\u8f7dgists\u7684\u6587\u4ef6\uff1f"},"content":{"rendered":"<h6>\u7f18\u7531\uff1a<\/h6>\n<p>\u6709\u4e0d\u5c11\u4eba\u4f7f\u7528gists\u4f5c\u4e3a\u4ed6\u4eec\u7684\u4ee3\u7801\u4ed3\u5e93\uff0c\u800c\u4e0d\u662fGitHub\u4e0a\u7684repository\uff0c\u4f46\u662fgists\u53c8\u88ab\u5899\u6389\u4e86\uff08\u60f3\u5b89\u9759\u5730\u4e0b\u8f7d\u4e2a\u4ee3\u7801\u600e\u4e48\u5c31\u8fd9\u4e48\u56f0\u96be\u5462\uff1f\uff09\uff0c\u4f5c\u4e3a\u4e00\u4e2a\u4ee5\u770b<span style=\"color: #ff0000;\"><strong>\u597d\u4ee3\u7801<\/strong><\/span>\u4e3a\u7231\u597d\u7684\u6211\u5f97\u60f3\u529e\u6cd5\u89e3\u51b3\u4e00\u4e0b\u8fd9\u4e2a\u95ee\u9898\uff0c\u4e8e\u662f\u6709\u4e86\u4e0b\u6587\u3002<\/p>\n<h6>\u641c\u7d22\u5173\u952e\u5b57\uff1a<\/h6>\n<ul>\n<li>Get all gists of a GitHub user<\/li>\n<li>Get all gists of a GitHub user site:stackoverflow.com<\/li>\n<\/ul>\n<h6>\u53c2\u8003\u94fe\u63a5\uff1a<\/h6>\n<ul>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/6724490\/pull-all-gists-from-github\">http:\/\/stackoverflow.com\/questions\/6724490\/pull-all-gists-from-github<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/18918302\/how-to-get-a-single-gist-from-github-with-get-gists-id\">http:\/\/stackoverflow.com\/questions\/18918302\/how-to-get-a-single-gist-from-github-with-get-gists-id<\/a><\/li>\n<li><a href=\"https:\/\/developer.github.com\/v3\/gists\/#list-gists\">https:\/\/developer.github.com\/v3\/gists\/#list-gists<\/a><\/li>\n<li><a href=\"https:\/\/developer.github.com\/v3\/users\/#get-all-users\">https:\/\/developer.github.com\/v3\/users\/#get-all-users<\/a><\/li>\n<li><a href=\"https:\/\/developer.github.com\/v3\/repos\/#list-user-repositories\">https:\/\/developer.github.com\/v3\/repos\/#list-user-repositories<\/a><\/li>\n<\/ul>\n<h6>\u53c2\u8003\u89e3\u7b54\uff1a<\/h6>\n<p>\u83b7\u53d6\u67d0\u4e2auser\u7684\u6240\u6709\u516c\u5f00gists\uff1a<a href=\"https:\/\/api.github.com\/users\/koraktor\/gists\">https:\/\/api.github.com\/users\/koraktor\/gists<\/a><\/p>\n<p>\u83b7\u53d6\u67d0\u4e2a\u7279\u5b9aid\u7684gists\uff1a<a href=\"https:\/\/api.github.com\/gists\/1092043\">https:\/\/api.github.com\/gists\/1092043<\/a><\/p>\n<p>\u7136\u540e\u901a\u8fc7\u89e3\u6790\u8fd4\u56de\u7684json\u5185\u5bb9\uff0c\u83b7\u53d6\u5bf9\u5e94id\u7684raw_url\uff0c\u7136\u540e\u76f4\u63a5wget\u4e0b\u6765\u5c31\u884c\u4e86\u3002<\/p>\n<p>==<\/p>\n<h6>\u60f3\u8981\u901a\u8fc7\u811a\u672c\u5b9e\u73b0\u7684\u529f\u80fd\u6709\uff1a<\/h6>\n<ol>\n<li>\u7ed9\u5b9agists\u7684id\uff0c\u7136\u540e\u81ea\u52a8\u4e0b\u8f7d\u5176\u4e2d\u6d89\u53ca\u5230\u7684\u6240\u6709\u6587\u4ef6\uff1b<\/li>\n<li>\u7ed9\u5b9agists\u7684username\uff0c\u5f97\u5230\u8be5\u7528\u6237\u6240\u6709\u7684public gists\uff1b<\/li>\n<li>\u4e86\u89e3\u6700\u8fd1\u6700\u706b\u7684gists\u6709\u54ea\u4e9b\u3002<\/li>\n<\/ol>\n<p>==<\/p>\n<h6>\u53ef\u80fd\u9700\u8981\u6ce8\u610f\u7684\u51e0\u4e2a\u95ee\u9898\uff1a<\/h6>\n<p>{<span style=\"color: #ff0000;\"><strong>#\u6587\u4ef6\u683c\u5f0f<\/strong><\/span><\/p>\n<p>application\/vnd.github.VERSION.raw<\/p>\n<p>application\/vnd.github.VERSION.base64<\/p>\n<p>}<\/p>\n<p>{<span style=\"color: #ff0000;\"><strong>#\u5b58\u653e\u540d\u79f0<\/strong><\/span><\/p>\n<p>\u65b0\u5efa\u76ee\u5f55\uff1a$user_$id<\/p>\n<p>\u65b0\u5efa\u63cf\u8ff0\u6587\u4ef6\uff1a$id_$description.txt<\/p>\n<p>}<\/p>\n<p>{<span style=\"color: #ff0000;\"><strong>#\u4e0b\u8f7d\u901f\u5ea6\u7684\u63a7\u5236<\/strong><\/span><\/p>\n<p>\u53ef\u4ee5\u53c2\u8003\uff1a<\/p>\n<p><a href=\"https:\/\/raw.githubusercontent.com\/lijiejie\/GitHack\/master\/GitHack.py\">https:\/\/raw.githubusercontent.com\/lijiejie\/GitHack\/master\/GitHack.py<\/a><\/p>\n<p>}<\/p>\n<p><a href=\"https:\/\/gist.githubusercontent.com\/fedir\/5466075\/raw\/d3f47664c0fcf40fd18698c9031cda6bfda3fb8b\/gist-backup.py\">https:\/\/gist.githubusercontent.com\/fedir\/5466075\/raw\/d3f47664c0fcf40fd18698c9031cda6bfda3fb8b\/gist-backup.py<\/a><\/p>\n<p>\u4e2d\u7684\u505a\u6cd5\u2014\u2014\u591a\u7ebf\u7a0b\u4e0b\u8f7dgists\u4e2d\u51fa\u73b0\u7684 &#8220;files&#8221; -&gt; &#8220;raw_url&#8221; \u3002<\/p>\n<p>=EOF=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7f18\u7531\uff1a \u6709\u4e0d\u5c11\u4eba\u4f7f\u7528gists\u4f5c\u4e3a\u4ed6\u4eec\u7684\u4ee3\u7801\u4ed3\u5e93\uff0c\u800c\u4e0d\u662fGitHub\u4e0a\u7684repository\uff0c\u4f46\u662fgists\u53c8 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,7,12],"tags":[522,365,8],"class_list":["post-2221","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-programing","category-tools","tag-gists","tag-github","tag-python"],"views":4267,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=2221"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2221\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=2221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=2221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=2221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}