Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. Qionglu735
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    Qionglu735

    @Qionglu735

    2
    Posts
    761
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Qionglu735 Follow

    Posts made by Qionglu735

    • RE: /api/user/code endpoint with private servers?

      Step 1: Sign in. You will get a TOEKN in response if email and password are correct.

      requests.post(
          "http://{}/api/auth/signin".format(SERVER_URL),
          json={
              "email": USERNAME,
              "password": PASSWORD,
          }
      )
      

      Step 2: Put the TOKEN in the API request headers.

      requests.post(
          "{}/api/user/code".format(SERVER_URL),
          headers = {
              "X-Token": TOKEN,
              "X-Username": TOKEN,
          },
          json={
              "modules": CODE_TEXT,
              "branch": BRANCH_NAME,
          },
      )
      

      Here is a list about all API I could found (written in Python). Most of them are tested. https://github.com/Qionglu735/screeps_tool/blob/master/screeps_api.py#L185

      posted in Private servers
      Qionglu735
    • RE: Find empty spawn in room with full extensions.

      got the exact same issue here, after rebooting vm machine and restarting private server.

      spawn.store and spawn.storeCapacityResource become an empty object.

      if put energy into the spawn, spawn.store["energy"] will reappear, but spawn.storeCapacityResource still empty.

      posted in General Discussion
      Qionglu735