{"id":1154293,"date":"2025-01-13T17:49:27","date_gmt":"2025-01-13T09:49:27","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1154293.html"},"modified":"2025-01-13T17:49:29","modified_gmt":"2025-01-13T09:49:29","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e5%88%b6%e4%bd%9c%e6%b8%b8%e6%88%8f","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1154293.html","title":{"rendered":"\u5982\u4f55\u7528python\u5236\u4f5c\u6e38\u620f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25183929\/b0a6d273-2f1f-4593-a20c-5b69892f84a6.webp\" alt=\"\u5982\u4f55\u7528python\u5236\u4f5c\u6e38\u620f\" \/><\/p>\n<p><p> \u8981\u7528Python\u5236\u4f5c\u6e38\u620f\uff0c\u4f60\u9700\u8981\u638c\u63e1<strong>\u6e38\u620f\u5f00\u53d1\u5e93\u3001\u6e38\u620f\u8bbe\u8ba1\u539f\u5219\u3001\u7f16\u7a0b\u6280\u5de7<\/strong>\u3002\u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684Python\u6e38\u620f\u5f00\u53d1\u5e93\u662fPygame\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5728Python\u4e2d\u8fdb\u884c2D\u6e38\u620f\u7684\u5f00\u53d1\u3002\u9996\u5148\uff0c\u5b89\u88c5Pygame\u5e93\u5e76\u4e86\u89e3\u5176\u57fa\u672c\u529f\u80fd\uff1b\u5176\u6b21\uff0c\u8bbe\u8ba1\u6e38\u620f\u7684\u57fa\u672c\u67b6\u6784\uff0c\u5305\u62ec\u6e38\u620f\u5faa\u73af\u3001\u4e8b\u4ef6\u5904\u7406\u548c\u6e32\u67d3\uff1b\u6700\u540e\uff0c\u9010\u6b65\u589e\u52a0\u6e38\u620f\u529f\u80fd\uff0c\u5982\u89d2\u8272\u63a7\u5236\u3001\u78b0\u649e\u68c0\u6d4b\u548c\u97f3\u6548\u7b49\u3002\u4e0b\u9762\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u4f7f\u7528Python\u548cPygame\u5e93\u5236\u4f5c\u4e00\u4e2a\u7b80\u5355\u6e38\u620f\u7684\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5\u548c\u8bbe\u7f6ePygame<\/h3>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u7f16\u5199\u6e38\u620f\u4ee3\u7801\u4e4b\u524d\uff0c\u9700\u8981\u5148\u5b89\u88c5Pygame\u5e93\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528pip\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\u521b\u5efa\u4e00\u4e2aPython\u6587\u4ef6\uff0c\u5bfc\u5165Pygame\u5e93\uff0c\u5e76\u8fdb\u884c\u521d\u59cb\u5316\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pygame<\/p>\n<p>pygame.init()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u521b\u5efa\u6e38\u620f\u7a97\u53e3<\/h3>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a\u7a97\u53e3\u662f\u5f00\u53d1\u6e38\u620f\u7684\u7b2c\u4e00\u6b65\u3002\u5728Pygame\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>pygame.display.set_mode()<\/code>\u51fd\u6570\u6765\u521b\u5efa\u7a97\u53e3\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8bbe\u7f6e\u7a97\u53e3\u5927\u5c0f<\/p>\n<p>screen = pygame.display.set_mode((800, 600))<\/p>\n<h2><strong>\u8bbe\u7f6e\u7a97\u53e3\u6807\u9898<\/strong><\/h2>\n<p>pygame.display.set_caption(&quot;My First Game&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u6e38\u620f\u4e3b\u5faa\u73af<\/h3>\n<\/p>\n<p><p>\u6e38\u620f\u4e3b\u5faa\u73af\u662f\u6e38\u620f\u7684\u6838\u5fc3\u90e8\u5206\uff0c\u5b83\u63a7\u5236\u6e38\u620f\u7684\u8fd0\u884c\u548c\u66f4\u65b0\u3002\u5728\u8fd9\u4e2a\u5faa\u73af\u4e2d\uff0c\u4f60\u9700\u8981\u5904\u7406\u4e8b\u4ef6\u3001\u66f4\u65b0\u6e38\u620f\u72b6\u6001\u4ee5\u53ca\u6e32\u67d3\u6e38\u620f\u753b\u9762\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">running = True<\/p>\n<p>while running:<\/p>\n<p>    for event in pygame.event.get():<\/p>\n<p>        if event.type == pygame.QUIT:<\/p>\n<p>            running = False<\/p>\n<p>    # \u66f4\u65b0\u6e38\u620f\u72b6\u6001<\/p>\n<p>    # \u6e32\u67d3\u6e38\u620f\u753b\u9762<\/p>\n<p>    pygame.display.flip()<\/p>\n<p>pygame.quit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u7ed8\u5236\u6e38\u620f\u5143\u7d20<\/h3>\n<\/p>\n<p><p>\u5728\u6e38\u620f\u4e2d\uff0c\u4f60\u9700\u8981\u7ed8\u5236\u5404\u79cd\u6e38\u620f\u5143\u7d20\uff0c\u5982\u80cc\u666f\u3001\u89d2\u8272\u548c\u654c\u4eba\u7b49\u3002Pygame\u63d0\u4f9b\u4e86\u591a\u79cd\u7ed8\u56fe\u51fd\u6570\uff0c\u5982<code>pygame.draw.rect()<\/code>\u548c<code>pygame.draw.circle()<\/code>\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e9b\u51fd\u6570\u6765\u7ed8\u5236\u6e38\u620f\u5143\u7d20\u3002\u4f8b\u5982\uff0c\u7ed8\u5236\u4e00\u4e2a\u77e9\u5f62\u8868\u793a\u73a9\u5bb6\u89d2\u8272\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">player_color = (0, 128, 255)<\/p>\n<p>player_rect = pygame.Rect(100, 100, 50, 50)<\/p>\n<p>pygame.draw.rect(screen, player_color, player_rect)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u5904\u7406\u7528\u6237\u8f93\u5165<\/h3>\n<\/p>\n<p><p>\u7528\u6237\u8f93\u5165\u662f\u6e38\u620f\u4ea4\u4e92\u7684\u91cd\u8981\u90e8\u5206\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528Pygame\u7684\u4e8b\u4ef6\u7cfb\u7edf\u6765\u5904\u7406\u952e\u76d8\u548c\u9f20\u6807\u8f93\u5165\u3002\u4f8b\u5982\uff0c\u68c0\u6d4b\u7528\u6237\u6309\u4e0b\u65b9\u5411\u952e\u79fb\u52a8\u73a9\u5bb6\u89d2\u8272\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">keys = pygame.key.get_pressed()<\/p>\n<p>if keys[pygame.K_LEFT]:<\/p>\n<p>    player_rect.x -= 5<\/p>\n<p>if keys[pygame.K_RIGHT]:<\/p>\n<p>    player_rect.x += 5<\/p>\n<p>if keys[pygame.K_UP]:<\/p>\n<p>    player_rect.y -= 5<\/p>\n<p>if keys[pygame.K_DOWN]:<\/p>\n<p>    player_rect.y += 5<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u6dfb\u52a0\u6e38\u620f\u903b\u8f91<\/h3>\n<\/p>\n<p><p>\u6e38\u620f\u903b\u8f91\u5305\u62ec\u78b0\u649e\u68c0\u6d4b\u3001\u5206\u6570\u8ba1\u7b97\u548c\u6e38\u620f\u8fdb\u5ea6\u7b49\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528Pygame\u7684\u77e9\u5f62\u78b0\u649e\u68c0\u6d4b\u529f\u80fd\u6765\u5b9e\u73b0\u7b80\u5355\u7684\u78b0\u649e\u68c0\u6d4b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5047\u8bbe\u6709\u4e00\u4e2a\u654c\u4eba\u77e9\u5f62<\/p>\n<p>enemy_rect = pygame.Rect(300, 300, 50, 50)<\/p>\n<h2><strong>\u68c0\u6d4b\u73a9\u5bb6\u548c\u654c\u4eba\u662f\u5426\u78b0\u649e<\/strong><\/h2>\n<p>if player_rect.colliderect(enemy_rect):<\/p>\n<p>    print(&quot;Collision detected!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u6dfb\u52a0\u97f3\u6548\u548c\u80cc\u666f\u97f3\u4e50<\/h3>\n<\/p>\n<p><p>\u97f3\u6548\u548c\u80cc\u666f\u97f3\u4e50\u53ef\u4ee5\u589e\u5f3a\u6e38\u620f\u4f53\u9a8c\u3002Pygame\u63d0\u4f9b\u4e86\u97f3\u9891\u6a21\u5757\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u52a0\u8f7d\u548c\u64ad\u653e\u97f3\u6548\u548c\u97f3\u4e50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u52a0\u8f7d\u97f3\u6548<\/p>\n<p>collision_sound = pygame.mixer.Sound(&quot;collision.wav&quot;)<\/p>\n<h2><strong>\u64ad\u653e\u97f3\u6548<\/strong><\/h2>\n<p>collision_sound.play()<\/p>\n<h2><strong>\u52a0\u8f7d\u80cc\u666f\u97f3\u4e50<\/strong><\/h2>\n<p>pygame.mixer.music.load(&quot;background.mp3&quot;)<\/p>\n<h2><strong>\u64ad\u653e\u80cc\u666f\u97f3\u4e50<\/strong><\/h2>\n<p>pygame.mixer.music.play(-1)  # -1\u8868\u793a\u5faa\u73af\u64ad\u653e<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001\u4f18\u5316\u548c\u53d1\u5e03\u6e38\u620f<\/h3>\n<\/p>\n<p><p>\u5728\u5b8c\u6210\u6e38\u620f\u5f00\u53d1\u540e\uff0c\u4f60\u9700\u8981\u8fdb\u884c\u4f18\u5316\u548c\u53d1\u5e03\u3002\u4f18\u5316\u5305\u62ec\u63d0\u5347\u6e38\u620f\u6027\u80fd\u3001\u51cf\u5c11\u5185\u5b58\u5360\u7528\u548c\u4fee\u590dbug\u7b49\u3002\u53d1\u5e03\u6e38\u620f\u65f6\uff0c\u53ef\u4ee5\u5c06Python\u811a\u672c\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u4fbf\u4e8e\u5206\u53d1\u548c\u5b89\u88c5\u3002\u4f8b\u5982\uff0c\u4f7f\u7528PyInstaller\u6253\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pyinstaller<\/p>\n<p>pyinstaller --onefile my_game.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e5d\u3001\u793a\u4f8b\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528Pygame\u5236\u4f5c\u4e00\u4e2a\u7b80\u5355\u7684\u6e38\u620f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pygame<\/p>\n<p>import random<\/p>\n<h2><strong>\u521d\u59cb\u5316Pygame<\/strong><\/h2>\n<p>pygame.init()<\/p>\n<h2><strong>\u8bbe\u7f6e\u7a97\u53e3\u5927\u5c0f\u548c\u6807\u9898<\/strong><\/h2>\n<p>screen = pygame.display.set_mode((800, 600))<\/p>\n<p>pygame.display.set_caption(&quot;My First Game&quot;)<\/p>\n<h2><strong>\u5b9a\u4e49\u989c\u8272<\/strong><\/h2>\n<p>WHITE = (255, 255, 255)<\/p>\n<p>BLUE = (0, 128, 255)<\/p>\n<h2><strong>\u5b9a\u4e49\u73a9\u5bb6\u548c\u654c\u4eba<\/strong><\/h2>\n<p>player_rect = pygame.Rect(100, 100, 50, 50)<\/p>\n<p>enemy_rect = pygame.Rect(300, 300, 50, 50)<\/p>\n<h2><strong>\u52a0\u8f7d\u97f3\u6548\u548c\u80cc\u666f\u97f3\u4e50<\/strong><\/h2>\n<p>collision_sound = pygame.mixer.Sound(&quot;collision.wav&quot;)<\/p>\n<p>pygame.mixer.music.load(&quot;background.mp3&quot;)<\/p>\n<p>pygame.mixer.music.play(-1)<\/p>\n<h2><strong>\u6e38\u620f\u4e3b\u5faa\u73af<\/strong><\/h2>\n<p>running = True<\/p>\n<p>while running:<\/p>\n<p>    for event in pygame.event.get():<\/p>\n<p>        if event.type == pygame.QUIT:<\/p>\n<p>            running = False<\/p>\n<p>    # \u5904\u7406\u7528\u6237\u8f93\u5165<\/p>\n<p>    keys = pygame.key.get_pressed()<\/p>\n<p>    if keys[pygame.K_LEFT]:<\/p>\n<p>        player_rect.x -= 5<\/p>\n<p>    if keys[pygame.K_RIGHT]:<\/p>\n<p>        player_rect.x += 5<\/p>\n<p>    if keys[pygame.K_UP]:<\/p>\n<p>        player_rect.y -= 5<\/p>\n<p>    if keys[pygame.K_DOWN]:<\/p>\n<p>        player_rect.y += 5<\/p>\n<p>    # \u78b0\u649e\u68c0\u6d4b<\/p>\n<p>    if player_rect.colliderect(enemy_rect):<\/p>\n<p>        collision_sound.play()<\/p>\n<p>        # \u91cd\u7f6e\u654c\u4eba\u4f4d\u7f6e<\/p>\n<p>        enemy_rect.x = random.randint(0, 750)<\/p>\n<p>        enemy_rect.y = random.randint(0, 550)<\/p>\n<p>    # \u7ed8\u5236\u6e38\u620f\u5143\u7d20<\/p>\n<p>    screen.fill(WHITE)<\/p>\n<p>    pygame.draw.rect(screen, BLUE, player_rect)<\/p>\n<p>    pygame.draw.rect(screen, (255, 0, 0), enemy_rect)<\/p>\n<p>    # \u66f4\u65b0\u663e\u793a<\/p>\n<p>    pygame.display.flip()<\/p>\n<h2><strong>\u9000\u51faPygame<\/strong><\/h2>\n<p>pygame.quit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5236\u4f5c\u4e00\u4e2a\u7b80\u5355\u76842D\u6e38\u620f\u3002\u867d\u7136\u8fd9\u662f\u4e00\u4e2a\u5165\u95e8\u7ea7\u7684\u4f8b\u5b50\uff0c\u4f46\u5b83\u6db5\u76d6\u4e86\u6e38\u620f\u5f00\u53d1\u7684\u57fa\u672c\u6d41\u7a0b\u548c\u6838\u5fc3\u6982\u5ff5\u3002\u968f\u7740\u7ecf\u9a8c\u7684\u79ef\u7d2f\uff0c\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u5236\u4f5c\u66f4\u590d\u6742\u7684\u6e38\u620f\uff0c\u5e76\u9010\u6b65\u638c\u63e1\u66f4\u9ad8\u7ea7\u7684\u6e38\u620f\u5f00\u53d1\u6280\u672f\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5236\u4f5c\u6e38\u620f\u65f6\u9700\u8981\u638c\u63e1\u54ea\u4e9bPython\u5e93\uff1f<\/strong><br \/>\u5728\u4f7f\u7528Python\u5236\u4f5c\u6e38\u620f\u65f6\uff0c\u4e00\u4e9b\u5e38\u7528\u7684\u5e93\u5305\u62ecPygame\u3001Pyglet\u3001Arcade\u548cPanda3D\u3002Pygame\u662f\u6700\u6d41\u884c\u7684\u9009\u62e9\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u6765\u5904\u7406\u56fe\u50cf\u3001\u97f3\u6548\u548c\u4e8b\u4ef6\u3002Pyglet\u548cArcade\u5219\u9002\u5408\u4e8e\u5236\u4f5c2D\u6e38\u620f\uff0c\u800cPanda3D\u5219\u66f4\u9002\u54083D\u6e38\u620f\u5f00\u53d1\u3002\u9009\u62e9\u5408\u9002\u7684\u5e93\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002<\/p>\n<p><strong>\u521d\u5b66\u8005\u8be5\u5982\u4f55\u5f00\u59cbPython\u6e38\u620f\u5f00\u53d1\uff1f<\/strong><br \/>\u521d\u5b66\u8005\u53ef\u4ee5\u4ece\u5b66\u4e60Python\u7684\u57fa\u7840\u77e5\u8bc6\u5f00\u59cb\uff0c\u5982\u6570\u636e\u7c7b\u578b\u3001\u63a7\u5236\u7ed3\u6784\u548c\u51fd\u6570\u7b49\u3002\u63a5\u4e0b\u6765\uff0c\u5efa\u8bae\u5c1d\u8bd5\u4e00\u4e9b\u7b80\u5355\u7684\u9879\u76ee\uff0c\u4f8b\u5982\u5236\u4f5c\u4e00\u4e2a\u7ecf\u5178\u7684\u201c\u6253\u7816\u5757\u201d\u6e38\u620f\u3002\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u4ee5\u53c2\u8003\u5728\u7ebf\u6559\u7a0b\u548c\u6587\u6863\uff0c\u9010\u6b65\u638c\u63e1\u6e38\u620f\u5f00\u53d1\u7684\u57fa\u672c\u6982\u5ff5\u548c\u6280\u5de7\u3002\u540c\u65f6\uff0c\u53c2\u4e0e\u76f8\u5173\u7684\u793e\u533a\u548c\u8bba\u575b\uff0c\u6709\u52a9\u4e8e\u83b7\u53d6\u7075\u611f\u548c\u89e3\u51b3\u95ee\u9898\u3002<\/p>\n<p><strong>\u5728Python\u6e38\u620f\u4e2d\u5982\u4f55\u5b9e\u73b0\u56fe\u50cf\u548c\u97f3\u6548\uff1f<\/strong><br \/>\u5728Python\u6e38\u620f\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528Pygame\u5e93\u6765\u52a0\u8f7d\u548c\u663e\u793a\u56fe\u50cf\u4ee5\u53ca\u64ad\u653e\u97f3\u6548\u3002\u56fe\u50cf\u53ef\u4ee5\u901a\u8fc7<code>pygame.image.load()<\/code>\u51fd\u6570\u52a0\u8f7d\uff0c\u97f3\u6548\u5219\u53ef\u4ee5\u901a\u8fc7<code>pygame.mixer<\/code>\u6a21\u5757\u8fdb\u884c\u5904\u7406\u3002\u786e\u4fdd\u4f7f\u7528\u5408\u9002\u7684\u56fe\u50cf\u683c\u5f0f\uff08\u5982PNG\u6216JPEG\uff09\u548c\u97f3\u9891\u683c\u5f0f\uff08\u5982WAV\u6216MP3\uff09\uff0c\u4ee5\u786e\u4fdd\u6e38\u620f\u7684\u8868\u73b0\u548c\u6548\u679c\u6700\u4f73\u3002\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u6e38\u620f\uff0c\u8fd8\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u66f4\u9ad8\u7ea7\u7684\u56fe\u5f62\u5e93\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u7528Python\u5236\u4f5c\u6e38\u620f\uff0c\u4f60\u9700\u8981\u638c\u63e1\u6e38\u620f\u5f00\u53d1\u5e93\u3001\u6e38\u620f\u8bbe\u8ba1\u539f\u5219\u3001\u7f16\u7a0b\u6280\u5de7\u3002\u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684Python\u6e38\u620f\u5f00\u53d1\u5e93\u662f [&hellip;]","protected":false},"author":3,"featured_media":1154296,"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\/1154293"}],"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=1154293"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1154293\/revisions"}],"predecessor-version":[{"id":1154297,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1154293\/revisions\/1154297"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1154296"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1154293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1154293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1154293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}