home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1332689547

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/1922#issuecomment-1332689547 https://api.github.com/repos/simonw/datasette/issues/1922 1332689547 IC_kwDOBm6k_c5PbzqL 9599 2022-11-30T20:16:21Z 2022-11-30T20:16:46Z OWNER

That notebook: javascript viewof token = Inputs.text({ label: "Your API token" }) javascript viewof createResponse = Inputs.button("Create table", { value: null, reduce: async () => { const response = await fetch( "https://latest.datasette.io/ephemeral/-/create", { method: "POST", mode: "cors", headers: { Authorization: `Bearer {$token}`, "Content-Type": "application/json" }, body: JSON.stringify({ table: "my_new_table", row: { task: "Demonstrate a JSON creation from another domain" } }) } ); return await response.json(); } }) Based on this tip: https://talk.observablehq.com/t/best-pattern-for-click-here-to-submit-your-results-to-an-api-backend/7353/3

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1469973742  
Powered by Datasette · Queries took 0.97ms · About: github-to-sqlite