<q-expansion-item
  group="extras"
  icon="swap_vertical_circle"
  label="Info"
  :content-inset-level="0.5"
>
  <q-card>
    <q-card-section>
      <h5 class="text-subtitle1 q-my-none">
        Discord Bot: Connect Discord users to LNbits.
      </h5>
      <p>
        Connect your LNbits instance to a
        <a href="https://github.com/chrislennon/lnbits-discord-bot"
          >Discord Bot</a
        >
        leveraging LNbits as a community based lightning node.<br />
        <small>
          Created by,
          <a href="https://github.com/chrislennon">Chris Lennon</a></small
        >
        <br />
        <small>
          Based on User Manager, by
          <a href="https://github.com/benarc">Ben Arc</a></small
        >
      </p>
    </q-card-section>
  </q-card>
</q-expansion-item>
<q-expansion-item
  group="extras"
  icon="swap_vertical_circle"
  label="API info"
  :content-inset-level="0.5"
>
  <q-btn flat label="Swagger API" type="a" href="../docs#/discordbot"></q-btn>
  <q-expansion-item group="api" dense expand-separator label="GET users">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-light-blue">GET</span>
          /discordbot/api/v1/users</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 201 CREATED (application/json)
        </h5>
        <code>JSON list of users</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X GET {{ request.base_url }}discordbot/api/v1/users -H
          "X-Api-Key: {{ user.wallets[0].inkey }}"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
  <q-expansion-item group="api" dense expand-separator label="GET user">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-light-blue">GET</span>
          /discordbot/api/v1/users/&lt;user_id&gt;</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 201 CREATED (application/json)
        </h5>
        <code>JSON list of users</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X GET {{ request.base_url
          }}discordbot/api/v1/users/&lt;user_id&gt; -H "X-Api-Key: {{
          user.wallets[0].inkey }}"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
  <q-expansion-item group="api" dense expand-separator label="GET wallets">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-light-blue">GET</span>
          /discordbot/api/v1/wallets/&lt;user_id&gt;</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code>{"X-Api-Key": &lt;string&gt;}</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 201 CREATED (application/json)
        </h5>
        <code>JSON wallet data</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X GET {{ request.base_url
          }}discordbot/api/v1/wallets/&lt;user_id&gt; -H "X-Api-Key: {{
          user.wallets[0].inkey }}"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
  <q-expansion-item group="api" dense expand-separator label="GET transactions">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-light-blue">GET</span>
          /discordbot/api/v1/wallets&lt;wallet_id&gt;</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code>{"X-Api-Key": &lt;string&gt;}</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 201 CREATED (application/json)
        </h5>
        <code>JSON a wallets transactions</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X GET {{ request.base_url
          }}discordbot/api/v1/wallets&lt;wallet_id&gt; -H "X-Api-Key: {{
          user.wallets[0].inkey }}"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
  <q-expansion-item
    group="api"
    dense
    expand-separator
    label="POST user + initial wallet"
  >
    <q-card>
      <q-card-section>
        <code
          ><span class="text-light-green">POST</span>
          /discordbot/api/v1/users</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code
          >{"X-Api-Key": &lt;string&gt;, "Content-type":
          "application/json"}</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">
          Body (application/json) - "admin_id" is a YOUR user ID
        </h5>
        <code
          >{"admin_id": &lt;string&gt;, "user_name": &lt;string&gt;,
          "wallet_name": &lt;string&gt;,"discord_id": &lt;string&gt;}</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 201 CREATED (application/json)
        </h5>
        <code
          >{"id": &lt;string&gt;, "name": &lt;string&gt;, "admin":
          &lt;string&gt;, "discord_id": &lt;string&gt;}</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X POST {{ request.base_url }}discordbot/api/v1/users -d
          '{"admin_id": "{{ user.id }}", "wallet_name": &lt;string&gt;,
          "user_name": &lt;string&gt;, "discord_id": &lt;string&gt;}' -H
          "X-Api-Key: {{ user.wallets[0].inkey }}" -H "Content-type:
          application/json"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
  <q-expansion-item group="api" dense expand-separator label="POST wallet">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-light-green">POST</span>
          /discordbot/api/v1/wallets</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code
          >{"X-Api-Key": &lt;string&gt;, "Content-type":
          "application/json"}</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">
          Body (application/json) - "admin_id" is a YOUR user ID
        </h5>
        <code
          >{"user_id": &lt;string&gt;, "wallet_name": &lt;string&gt;,
          "admin_id": &lt;string&gt;}</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 201 CREATED (application/json)
        </h5>
        <code
          >{"id": &lt;string&gt;, "admin": &lt;string&gt;, "name":
          &lt;string&gt;, "user": &lt;string&gt;, "adminkey": &lt;string&gt;,
          "inkey": &lt;string&gt;}</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X POST {{ request.base_url }}discordbot/api/v1/wallets -d
          '{"user_id": &lt;string&gt;, "wallet_name": &lt;string&gt;,
          "admin_id": "{{ user.id }}"}' -H "X-Api-Key: {{ user.wallets[0].inkey
          }}" -H "Content-type: application/json"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
  <q-expansion-item
    group="api"
    dense
    expand-separator
    label="DELETE user and their wallets"
  >
    <q-card>
      <q-card-section>
        <code
          ><span class="text-red">DELETE</span>
          /discordbot/api/v1/users/&lt;user_id&gt;</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code>{"X-Api-Key": &lt;string&gt;}</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X DELETE {{ request.base_url
          }}discordbot/api/v1/users/&lt;user_id&gt; -H "X-Api-Key: {{
          user.wallets[0].inkey }}"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
  <q-expansion-item group="api" dense expand-separator label="DELETE wallet">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-red">DELETE</span>
          /discordbot/api/v1/wallets/&lt;wallet_id&gt;</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code>{"X-Api-Key": &lt;string&gt;}</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X DELETE {{ request.base_url
          }}discordbot/api/v1/wallets/&lt;wallet_id&gt; -H "X-Api-Key: {{
          user.wallets[0].inkey }}"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
  <q-expansion-item
    group="api"
    dense
    expand-separator
    label="POST activate extension"
  >
    <q-card>
      <q-card-section>
        <code
          ><span class="text-green">POST</span>
          /discordbot/api/v1/extensions</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code>{"X-Api-Key": &lt;string&gt;}</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X POST {{ request.base_url }}discordbot/api/v1/extensions -d
          '{"userid": &lt;string&gt;, "extension": &lt;string&gt;, "active":
          &lt;integer&gt;}' -H "X-Api-Key: {{ user.wallets[0].inkey }}" -H
          "Content-type: application/json"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
</q-expansion-item>
