opencode/private/metaclient

Types

OpencodeClient = ref object of RootObj
  baseUri*: string
  httpClient*: AsyncHttpClient
  apiKey*: string
OpencodeClientError = object of CatchableError
QueryTable = OrderedTable[string, string]

Procs

proc `$`(query: QueryTable): string {....raises: [KeyError], tags: [], forbids: [].}
proc httpDelete(client: OpencodeClient; endpoint: string): Future[AsyncResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
proc httpDelete(client: OpencodeClient; endpoint: string; query: QueryTable): Future[
    AsyncResponse] {....stackTrace: false, raises: [Exception, ValueError,
    KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
proc httpDelete[T](client: OpencodeClient; endpoint: string; body: T): Future[
    AsyncResponse] {....stackTrace: false.}
proc httpGet(client: OpencodeClient; endpoint: string): Future[AsyncResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
proc httpGet(client: OpencodeClient; endpoint: string; query: QueryTable): Future[
    AsyncResponse] {....stackTrace: false, raises: [Exception, ValueError,
    KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
proc httpPatch(client: OpencodeClient; endpoint: string): Future[AsyncResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
proc httpPatch[T](client: OpencodeClient; endpoint: string; body: T): Future[
    AsyncResponse] {....stackTrace: false.}
proc httpPost(client: OpencodeClient; endpoint: string): Future[AsyncResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
proc httpPost(client: OpencodeClient; endpoint: string; query: QueryTable): Future[
    AsyncResponse] {....stackTrace: false, raises: [Exception, ValueError,
    KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
proc httpPost[T](client: OpencodeClient; endpoint: string; body: T): Future[
    AsyncResponse] {....stackTrace: false.}
proc httpPut(client: OpencodeClient; endpoint: string): Future[AsyncResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
proc httpPut(client: OpencodeClient; endpoint: string; query: QueryTable): Future[
    AsyncResponse] {....stackTrace: false, raises: [Exception, ValueError,
    KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
proc httpPut[T](client: OpencodeClient; endpoint: string; body: T): Future[
    AsyncResponse] {....stackTrace: false.}
proc initOpencodeClient(apiKey: string): OpencodeClient {....raises: [KeyError],
    tags: [], forbids: [].}