Changeset 37562 in project


Ignore:
Timestamp:
04/25/19 23:23:46 (4 weeks ago)
Author:
evhan
Message:

eggref/topham: Update docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/topham

    r37561 r37562  
    3333
    3434(retrieve (job 1234))
    35 ; => ((#:service "builds" #:path "/api/jobs/1234" #:method GET)
     35; => ((#:service "builds" #:path "/api/jobs/1234")
    3636;     (id . 1234)
    3737;     (status . "running")
     
    7676
    7777Resources are represented as Scheme objects per [[https://wiki.call-cc.org/eggref/5/medea|medea]]'s default
    78 JSON-to-Scheme conversion rules. Requests in particular are represented
    79 as association lists, where the first item specifies a remote endpoint:
     78JSON-to-Scheme conversion rules. Requests and responses are represented
     79as association lists, where the first item specifies a remote endpoint
     80from which a resource should be (or has been) fetched:
    8081
    8182<enscript highlight="scheme">
    8283(mailing-lists)
    83 ; => ((#:service "lists" #:path "/api/lists" #:method GET))
     84; => ((#:service "lists" #:path "/api/lists"))
     85
     86(mailing-list "foo")
     87; => ((#:service "lists" #:path "/api/lists/foo"))
    8488
    8589(mailing-list name: "foo" description: "bar")
    86 ; => ((#:service "lists" #:path "/api/lists" #:method POST)
     90; => ((#:service "lists" #:path "/api/lists")
    8791;     (name . "foo")
    8892;     (description . "bar"))
    89 
    90 (mailing-list "foo")
    91 ; => ((#:service "lists" #:path "/api/lists/foo" #:method GET))
    9293</enscript>
    9394
     
    153154{{(exn http topham)}} is signaled.
    154155
    155 If the given payload expects to be submitted with a different method, a
    156 condition of type {{(exn request topham)}} is signaled.
    157 
    158156<procedure>(page crud) => crud</procedure>
    159157
     
    199197[[https://man.sr.ht/meta.sr.ht/api.md|meta.sr.ht]].
    200198
     199<procedure>(profile) => crud</procedure>
     200<procedure>(profile #!key argument ...) => crud</procedure>
     201
     202In the first form, [[https://man.sr.ht/builds.sr.ht/api.md#get-apijobsid|fetches the active user's profile]].
     203
     204In the second form, [[https://man.sr.ht/meta.sr.ht/user-api.md#put-apiuserprofile|updates the user's profile]].
     205
     206<procedure>(audit-log) => crud</procedure>
     207
     208[[https://man.sr.ht/builds.sr.ht/api.md#get-apijobsid|Retrieves the active user's audit log]].
     209
     210This endpoint is subject to [[#pagination|pagination]].
     211
     212<procedure>(ssh-keys) => crud</procedure>
     213
     214[[https://man.sr.ht/builds.sr.ht/api.md#get-apijobsid|Retrieves the active user's SSH keys]].
     215
     216This endpoint is subject to [[#pagination|pagination]].
     217
     218<procedure>(ssh-key number) => crud</procedure>
     219<procedure>(ssh-key #!key ssh-key) => crud</procedure>
     220
     221In the first form, [[https://man.sr.ht/builds.sr.ht/api.md#get-apijobsid|fetches an SSH key by ID]].
     222
     223In the second form, [[https://man.sr.ht/builds.sr.ht/api.md#post-apijobs|creates a new SSH key]].
     224
     225{{number}} should be a key resource ID.
     226
     227<procedure>(pgp-keys) => crud</procedure>
     228
     229[[https://man.sr.ht/builds.sr.ht/api.md#get-apijobsid|Retrieves the active user's PGP keys]].
     230
     231This endpoint is subject to [[#pagination|pagination]].
     232
     233<procedure>(pgp-key number) => crud</procedure>
     234<procedure>(pgp-key #!key pgp-key) => crud</procedure>
     235
     236In the first form, [[https://man.sr.ht/builds.sr.ht/api.md#get-apijobsid|fetches a PGP key by ID]].
     237
     238In the second form, [[https://man.sr.ht/builds.sr.ht/api.md#post-apijobs|creates a new PGP key]].
     239
     240{{number}} should be a key resource ID.
     241
    201242
    202243==== paste
Note: See TracChangeset for help on using the changeset viewer.