{"id":1060242,"date":"2024-12-31T15:32:10","date_gmt":"2024-12-31T07:32:10","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1060242.html"},"modified":"2024-12-31T15:32:13","modified_gmt":"2024-12-31T07:32:13","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e7%ba%a2%e7%81%af%e5%8f%98%e7%bb%bf%e7%81%af%e7%9a%84%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1060242.html","title":{"rendered":"\u5982\u4f55\u7528python\u7ea2\u706f\u53d8\u7eff\u706f\u7684\u7a0b\u5e8f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/a6eafd18-048d-4d8e-9432-ab9c9d49f9f3.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"\u5982\u4f55\u7528python\u7ea2\u706f\u53d8\u7eff\u706f\u7684\u7a0b\u5e8f\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u7528Python\u7ea2\u706f\u53d8\u7eff\u706f\u7684\u7a0b\u5e8f<\/strong><\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528Python\u7f16\u5199\u7ea2\u706f\u53d8\u7eff\u706f\u7684\u7a0b\u5e8f\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Pygame\u5e93\u3001\u5b9a\u4e49\u4e00\u4e2a\u72b6\u6001\u673a\u3001\u4f7f\u7528\u65f6\u95f4\u5ef6\u8fdf\u51fd\u6570\u7b49\u65b9\u5f0f\u6765\u5b9e\u73b0<\/strong>\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u6765\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u4e14\u5b9e\u7528\u7684\u7ea2\u706f\u53d8\u7eff\u706f\u7684\u7a0b\u5e8f\uff0c\u5e76\u63d0\u4f9b\u5b8c\u6574\u7684\u4ee3\u7801\u793a\u4f8b\u3002<\/p>\n<\/p>\n<h2><strong>\u4e00\u3001\u4ecb\u7ecdPygame\u5e93<\/strong><\/h2>\n<p><p>Pygame\u662f\u4e00\u4e2a\u5e7f\u6cdb\u4f7f\u7528\u7684Python\u5e93\uff0c\u7528\u4e8e\u7f16\u5199\u6e38\u620f\u548c\u591a\u5a92\u4f53\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u63d0\u4f9b\u4e86\u7b80\u5355\u800c\u5f3a\u5927\u7684\u5de5\u5177\u6765\u5904\u7406\u56fe\u50cf\u3001\u58f0\u97f3\u548c\u7528\u6237\u8f93\u5165\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Pygame\u6765\u521b\u5efa\u4e00\u4e2a\u7ea2\u706f\u53d8\u7eff\u706f\u7684\u6a21\u62df\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><h2>1\u3001\u5b89\u88c5Pygame\u5e93<\/h2>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u7f16\u5199\u4ee3\u7801\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5148\u5b89\u88c5Pygame\u5e93\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pygame<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5f00\u59cb\u7f16\u5199\u7a0b\u5e8f\u4e86\u3002<\/p>\n<\/p>\n<p><h2>2\u3001\u521d\u59cb\u5316Pygame<\/h2>\n<\/p>\n<p><p>\u5728\u4f7f\u7528Pygame\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5bf9\u5176\u8fdb\u884c\u521d\u59cb\u5316\uff0c\u5e76\u521b\u5efa\u4e00\u4e2a\u7a97\u53e3\u6765\u663e\u793a\u6211\u4eec\u7684\u4ea4\u901a\u706f\u3002\u4ee5\u4e0b\u662f\u521d\u59cb\u5316Pygame\u7684\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pygame<\/p>\n<p>import sys<\/p>\n<h2><strong>\u521d\u59cb\u5316Pygame<\/strong><\/h2>\n<p>pygame.init()<\/p>\n<h2><strong>\u8bbe\u7f6e\u7a97\u53e3\u5927\u5c0f<\/strong><\/h2>\n<p>size = (400, 600)<\/p>\n<p>screen = pygame.display.set_mode(size)<\/p>\n<h2><strong>\u8bbe\u7f6e\u7a97\u53e3\u6807\u9898<\/strong><\/h2>\n<p>pygame.display.set_caption(&quot;Traffic Light Simulation&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>3\u3001\u7ed8\u5236\u4ea4\u901a\u706f<\/h2>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9700\u8981\u5b9a\u4e49\u4e00\u4e2a\u51fd\u6570\u6765\u7ed8\u5236\u4ea4\u901a\u706f\u3002\u5728\u8fd9\u4e2a\u51fd\u6570\u4e2d\uff0c\u6211\u4eec\u5c06\u6839\u636e\u5f53\u524d\u7684\u706f\u5149\u72b6\u6001\u7ed8\u5236\u4e0d\u540c\u989c\u8272\u7684\u5706\u5f62\u6765\u8868\u793a\u7ea2\u706f\u3001\u9ec4\u706f\u548c\u7eff\u706f\u3002\u4ee5\u4e0b\u662f\u7ed8\u5236\u4ea4\u901a\u706f\u7684\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def draw_traffic_light(state):<\/p>\n<p>    screen.fill((255, 255, 255))  # \u586b\u5145\u80cc\u666f\u4e3a\u767d\u8272<\/p>\n<p>    # \u4ea4\u901a\u706f\u5916\u58f3<\/p>\n<p>    pygame.draw.rect(screen, (0, 0, 0), [150, 100, 100, 300])<\/p>\n<p>    # \u7ea2\u706f<\/p>\n<p>    if state == &quot;red&quot;:<\/p>\n<p>        pygame.draw.circle(screen, (255, 0, 0), (200, 150), 40)<\/p>\n<p>    else:<\/p>\n<p>        pygame.draw.circle(screen, (100, 0, 0), (200, 150), 40)<\/p>\n<p>    # \u9ec4\u706f<\/p>\n<p>    if state == &quot;yellow&quot;:<\/p>\n<p>        pygame.draw.circle(screen, (255, 255, 0), (200, 250), 40)<\/p>\n<p>    else:<\/p>\n<p>        pygame.draw.circle(screen, (100, 100, 0), (200, 250), 40)<\/p>\n<p>    # \u7eff\u706f<\/p>\n<p>    if state == &quot;green&quot;:<\/p>\n<p>        pygame.draw.circle(screen, (0, 255, 0), (200, 350), 40)<\/p>\n<p>    else:<\/p>\n<p>        pygame.draw.circle(screen, (0, 100, 0), (200, 350), 40)<\/p>\n<p>    pygame.display.flip()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<h2><strong>\u4e8c\u3001\u5b9a\u4e49\u72b6\u6001\u673a<\/strong><\/h2>\n<p><p>\u6211\u4eec\u9700\u8981\u4e00\u4e2a\u72b6\u6001\u673a\u6765\u7ba1\u7406\u4ea4\u901a\u706f\u7684\u72b6\u6001\u8f6c\u6362\u3002\u72b6\u6001\u673a\u5c06\u6839\u636e\u65f6\u95f4\u5ef6\u8fdf\u5728\u7ea2\u706f\u3001\u9ec4\u706f\u548c\u7eff\u706f\u4e4b\u95f4\u8fdb\u884c\u5207\u6362\u3002\u4ee5\u4e0b\u662f\u5b9a\u4e49\u72b6\u6001\u673a\u7684\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><h2>1\u3001\u5b9a\u4e49\u72b6\u6001<\/h2>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5b9a\u4e49\u4ea4\u901a\u706f\u7684\u72b6\u6001\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">states = [&quot;red&quot;, &quot;green&quot;, &quot;yellow&quot;]<\/p>\n<p>current_state_index = 0<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>2\u3001\u5207\u6362\u72b6\u6001<\/h2>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5b9a\u4e49\u4e00\u4e2a\u51fd\u6570\u6765\u5207\u6362\u4ea4\u901a\u706f\u7684\u72b6\u6001\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def switch_state():<\/p>\n<p>    global current_state_index<\/p>\n<p>    current_state_index = (current_state_index + 1) % len(states)<\/p>\n<p>    return states[current_state_index]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<h2><strong>\u4e09\u3001\u4f7f\u7528\u65f6\u95f4\u5ef6\u8fdf<\/strong><\/h2>\n<p><p>\u4e3a\u4e86\u5728\u6307\u5b9a\u65f6\u95f4\u5185\u5207\u6362\u72b6\u6001\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528\u65f6\u95f4\u5ef6\u8fdf\u51fd\u6570\u3002Pygame\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u65f6\u95f4\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002\u4ee5\u4e0b\u662f\u5b9e\u73b0\u65f6\u95f4\u5ef6\u8fdf\u7684\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><h2>1\u3001\u8bbe\u7f6e\u65f6\u95f4\u95f4\u9694<\/h2>\n<\/p>\n<p><p>\u6211\u4eec\u53ef\u4ee5\u5b9a\u4e49\u4e00\u4e2a\u65f6\u95f4\u95f4\u9694\u6765\u63a7\u5236\u72b6\u6001\u5207\u6362\u7684\u901f\u5ea6\u3002\u4ee5\u4e0b\u662f\u8bbe\u7f6e\u65f6\u95f4\u95f4\u9694\u7684\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">RED_DURATION = 5000   # \u7ea2\u706f\u6301\u7eed\u65f6\u95f4\uff08\u6beb\u79d2\uff09<\/p>\n<p>GREEN_DURATION = 5000 # \u7eff\u706f\u6301\u7eed\u65f6\u95f4\uff08\u6beb\u79d2\uff09<\/p>\n<p>YELLOW_DURATION = 2000 # \u9ec4\u706f\u6301\u7eed\u65f6\u95f4\uff08\u6beb\u79d2\uff09<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>2\u3001\u4e3b\u5faa\u73af<\/h2>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u6211\u4eec\u9700\u8981\u4e00\u4e2a\u4e3b\u5faa\u73af\u6765\u4e0d\u65ad\u66f4\u65b0\u4ea4\u901a\u706f\u7684\u72b6\u6001\uff0c\u5e76\u6839\u636e\u65f6\u95f4\u95f4\u9694\u8fdb\u884c\u5207\u6362\u3002\u4ee5\u4e0b\u662f\u4e3b\u5faa\u73af\u7684\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">clock = pygame.time.Clock()<\/p>\n<p>start_time = pygame.time.get_ticks()<\/p>\n<p>while True:<\/p>\n<p>    for event in pygame.event.get():<\/p>\n<p>        if event.type == pygame.QUIT:<\/p>\n<p>            pygame.quit()<\/p>\n<p>            sys.exit()<\/p>\n<p>    current_time = pygame.time.get_ticks()<\/p>\n<p>    elapsed_time = current_time - start_time<\/p>\n<p>    if states[current_state_index] == &quot;red&quot; and elapsed_time &gt;= RED_DURATION:<\/p>\n<p>        draw_traffic_light(&quot;red&quot;)<\/p>\n<p>        switch_state()<\/p>\n<p>        start_time = current_time<\/p>\n<p>    elif states[current_state_index] == &quot;green&quot; and elapsed_time &gt;= GREEN_DURATION:<\/p>\n<p>        draw_traffic_light(&quot;green&quot;)<\/p>\n<p>        switch_state()<\/p>\n<p>        start_time = current_time<\/p>\n<p>    elif states[current_state_index] == &quot;yellow&quot; and elapsed_time &gt;= YELLOW_DURATION:<\/p>\n<p>        draw_traffic_light(&quot;yellow&quot;)<\/p>\n<p>        switch_state()<\/p>\n<p>        start_time = current_time<\/p>\n<p>    draw_traffic_light(states[current_state_index])<\/p>\n<p>    clock.tick(30)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<h2><strong>\u56db\u3001\u603b\u7ed3<\/strong><\/h2>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u6211\u4eec\u4f7f\u7528Python\u548cPygame\u5e93\u6210\u529f\u5b9e\u73b0\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u7ea2\u706f\u53d8\u7eff\u706f\u7684\u7a0b\u5e8f\u3002\u8fd9\u4e2a\u7a0b\u5e8f\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528Pygame\u5e93\u8fdb\u884c\u56fe\u5f62\u7ed8\u5236\u3001\u5982\u4f55\u4f7f\u7528\u72b6\u6001\u673a\u7ba1\u7406\u4ea4\u901a\u706f\u7684\u72b6\u6001\u8f6c\u6362\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528\u65f6\u95f4\u5ef6\u8fdf\u51fd\u6570\u63a7\u5236\u72b6\u6001\u5207\u6362\u7684\u901f\u5ea6\u3002\u901a\u8fc7\u8fd9\u4e9b\u77e5\u8bc6\uff0c\u4f60\u53ef\u4ee5\u8fdb\u4e00\u6b65\u6269\u5c55\u548c\u4f18\u5316\u8fd9\u4e2a\u7a0b\u5e8f\uff0c\u6dfb\u52a0\u66f4\u591a\u7684\u529f\u80fd\u548c\u7ec6\u8282\u3002<\/p>\n<\/p>\n<p><p>\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff0c\u795d\u4f60\u7f16\u7a0b\u6109\u5feb\uff01<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u5b9e\u73b0\u7ea2\u706f\u53d8\u7eff\u706f\u7684\u6a21\u62df\u7a0b\u5e8f\uff1f<\/strong><br \/>\u8981\u5b9e\u73b0\u7ea2\u706f\u53d8\u7eff\u706f\u7684\u7a0b\u5e8f\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528Python\u7684\u65f6\u95f4\u63a7\u5236\u529f\u80fd\u548c\u7b80\u5355\u7684\u903b\u8f91\u7ed3\u6784\u3002\u9996\u5148\uff0c\u9700\u8981\u5bfc\u5165time\u5e93\u4ee5\u5b9e\u73b0\u5ef6\u65f6\u529f\u80fd\uff0c\u7136\u540e\u8bbe\u7f6e\u7ea2\u706f\u548c\u7eff\u706f\u7684\u72b6\u6001\uff0c\u901a\u8fc7\u5faa\u73af\u6765\u6a21\u62df\u706f\u5149\u7684\u53d8\u5316\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u57fa\u672c\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<pre><code class=\"language-python\">import time\n\ndef traffic_light():\n    while True:\n        print(&quot;\u7ea2\u706f\u4eae\uff01&quot;)\n        time.sleep(5)  # \u7ea2\u706f\u4eae5\u79d2\n        print(&quot;\u7eff\u706f\u4eae\uff01&quot;)\n        time.sleep(5)  # \u7eff\u706f\u4eae5\u79d2\n\ntraffic_light()\n<\/code><\/pre>\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u7a0b\u5e8f\u4f1a\u4e0d\u65ad\u5faa\u73af\uff0c\u7ea2\u706f\u548c\u7eff\u706f\u4ea4\u66ff\u4eae\u8d77\u3002<\/p>\n<p><strong>\u8fd9\u4e2a\u7a0b\u5e8f\u80fd\u5426\u6269\u5c55\u5230\u66f4\u590d\u6742\u7684\u4ea4\u901a\u706f\u63a7\u5236\u7cfb\u7edf\uff1f<\/strong><br \/>\u5f53\u7136\u53ef\u4ee5\u3002\u60a8\u53ef\u4ee5\u5728\u8fd9\u4e2a\u57fa\u7840\u4e0a\u6dfb\u52a0\u66f4\u591a\u529f\u80fd\uff0c\u4f8b\u5982\u9ec4\u706f\u72b6\u6001\u3001\u884c\u4eba\u8fc7\u8857\u6309\u94ae\u3001\u4ea4\u901a\u6d41\u91cf\u4f20\u611f\u5668\u7b49\u3002\u6b64\u5916\uff0c\u53ef\u4ee5\u5229\u7528\u7c7b\u548c\u5bf9\u8c61\u6765\u66f4\u597d\u5730\u7ec4\u7ec7\u4ee3\u7801\uff0c\u4f7f\u7a0b\u5e8f\u66f4\u5177\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002\u901a\u8fc7\u5f15\u5165\u6761\u4ef6\u8bed\u53e5\u548c\u4e8b\u4ef6\u9a71\u52a8\u673a\u5236\uff0c\u53ef\u4ee5\u5b9e\u73b0\u66f4\u667a\u80fd\u7684\u4ea4\u901a\u706f\u63a7\u5236\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u7a0b\u5e8f\u4e2d\u52a0\u5165\u7528\u6237\u8f93\u5165\u6765\u63a7\u5236\u706f\u5149\u72b6\u6001\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528<code>input()<\/code>\u51fd\u6570\u6765\u83b7\u53d6\u7528\u6237\u7684\u8f93\u5165\uff0c\u4ece\u800c\u6539\u53d8\u706f\u5149\u7684\u72b6\u6001\u3002\u4f8b\u5982\uff0c\u7528\u6237\u53ef\u4ee5\u8f93\u5165\u201c\u7ea2\u706f\u201d\u6216\u201c\u7eff\u706f\u201d\uff0c\u7a0b\u5e8f\u5c06\u6839\u636e\u8f93\u5165\u6539\u53d8\u5f53\u524d\u706f\u5149\u72b6\u6001\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<pre><code class=\"language-python\">def traffic_light_control():\n    while True:\n        user_input = input(&quot;\u8bf7\u8f93\u5165\u706f\u5149\u72b6\u6001\uff08\u7ea2\u706f\/\u7eff\u706f\uff09\uff1a&quot;)\n        if user_input == &quot;\u7ea2\u706f&quot;:\n            print(&quot;\u7ea2\u706f\u4eae\uff01&quot;)\n        elif user_input == &quot;\u7eff\u706f&quot;:\n            print(&quot;\u7eff\u706f\u4eae\uff01&quot;)\n        else:\n            print(&quot;\u65e0\u6548\u8f93\u5165\uff0c\u8bf7\u8f93\u5165\u7ea2\u706f\u6216\u7eff\u706f\u3002&quot;)\n\ntraffic_light_control()\n<\/code><\/pre>\n<p>\u8fd9\u6837\uff0c\u7528\u6237\u53ef\u4ee5\u52a8\u6001\u63a7\u5236\u706f\u5149\u72b6\u6001\uff0c\u589e\u5f3a\u4e86\u7a0b\u5e8f\u7684\u4e92\u52a8\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u7528Python\u7ea2\u706f\u53d8\u7eff\u706f\u7684\u7a0b\u5e8f \u4f7f\u7528Python\u7f16\u5199\u7ea2\u706f\u53d8\u7eff\u706f\u7684\u7a0b\u5e8f\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Pygame\u5e93\u3001\u5b9a\u4e49\u4e00\u4e2a\u72b6 [&hellip;]","protected":false},"author":3,"featured_media":1060253,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1060242"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1060242"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1060242\/revisions"}],"predecessor-version":[{"id":1060254,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1060242\/revisions\/1060254"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1060253"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1060242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1060242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1060242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}