Crate nuclino_rs

Source
Expand description

A client for the Nuclino wiki service API. You can find documentation for the api on Nuclino’s own wiki. This client should be complete, in that it exposes functions for all the documented endpoints. Also, it can successfully deserialize all the example API response structures.

TYou are most likely to construct the nuclino_rs::Client struct, and then consume the data returned. There are only two other things the api allows you to create: a Collection and an Item. Items are regular wiki pages with markdown content. Collections are special pages that only contain lists of other pages. This library groups those two kinds of page via the Page enum, which has variants for each. Page has conveniences for getting at the data both kinds of page have in common. To build a new page, use the NewPageBuilder struct, which attempts to maintain the contraints Nuclino puts on each type. (The same endpoint is used to create both page variations, based on what data you post to it.)

Structs§

Client
A client for the Nuclino api. This struct maintains whatever state we need for making requests as a specific user. The functions provided are conveniences for accessing endpoints in the official Nuclino API.
Collection
A “collection” is a kind of page in the Nuclino wiki. Collections are lists of items shown on a single page in the Nuclino wiki. Unlike “items”, collections do not include any markdown-formatted content.
DownloadInfo
Information required to download a file.
Field
Fields at the workspace level are metadata describing what metadata a single page can have.
File
A downloadable file object, associated with a regular wiki page.
IdOnly
An id-only response structure, returned by DELETE endpoints.
Item
A Nuclino page with markdown content optionally included. The API refers to this as an “item” to distinguish it from collections, which are lists of items.
Meta
A structure holding metadata about a single item.
ModifyItem
This structure is used by the update endpoints for Items and Collections. It’s simple enough that you can create it directly.
NewPage
Use this struct if you are creating new collections or pages from scratch. Don’t create one directly; use the NewPageBuilder instead.
NewPageBuilder
The builder pattern for new items and collections.
Selection
A single selection option for a multiselect/select field.
Team
A Nuclino team.
User
A Nuclino user.
Uuid
Re-exporting the uuid crate, because types. A Universally Unique Identifier (UUID).
Workspace
A workspace.

Enums§

Config
What kind of config this field meta object has.
FieldType
The enumeration of types that a field object might be.
NuclinoError
Errors returned by this crate’s functions. These include errors derived from serde_json and ureq as well as errors representing failure responses from the Nuclino API.
Page
A Nuclino page, which might be either an “item” or a “collection”. An item is a normal wiki page with Markdown content. A collection is a list of items. The enum provides implementations for the functions its variants have in common, so you can avoid accessing the variant data unless you need to.
PageKind
An enum used by NewPage to represent the kind of page being created.

Statics§

APIKEY_ENV_VAR
The env var we check for the api key.
BASE_URL
The base url for the entire API.

Type Aliases§

NuclinoResult
A convenient alias for the error type used by all crate functions.