Skip to content

Instantly share code, notes, and snippets.

@oldmud0
Created June 10, 2021 02:07
Show Gist options
  • Save oldmud0/2ef0011c5cc67e485ca91a3cad67c6be to your computer and use it in GitHub Desktop.
Save oldmud0/2ef0011c5cc67e485ca91a3cad67c6be to your computer and use it in GitHub Desktop.

Revisions

  1. oldmud0 created this gist Jun 10, 2021.
    62 changes: 62 additions & 0 deletions foobar.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,62 @@
    Base URL: https://foobar.withgoogle.com/api/v1

    Supports HTTP/3. Server name is "Google Frontend." You will need a `sessionid` and `SACSID` cookie.

    All POST requests use form data.

    ## `POST /commands/save`

    ### request

    - path: VFS path, including trailing slash, of file to submit
    - content: content of the file, with CRLF line endings encoded as `\r\n`, and spaces encoded as `+`

    ### response

    204 No Content

    ## `POST /commands/verify`

    ### request

    - path: VFS path, including trailing slash, of file to submit

    ### response

    ```ts
    {
    // Unescaped HTML feedback printed on terminal
    output: string
    // Score of tests (0-100?)
    score: number
    }
    ```

    ## `POST /commands/submit`

    ### request

    - path: VFS path, including trailing slash, of file to submit

    ### response

    ```ts
    {
    files: {
    // base name of file (with extension)
    name: string
    // path to file, including filename
    path: string
    type: "file"
    editable: boolean
    // parent directory
    parent: string
    // unescaped HTML content of file
    content: string
    // MIME type of content
    content_type: string
    }[]
    output: string
    score: number
    }
    ```