The studio-client Reference Manual

This is the studio-client Reference Manual, version 1.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:48:08 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 studio-client

A client library for the Studio image hosting service

Maintainer

Yukari Hafner <>

Author

Yukari Hafner <>

Home Page

https://github.com/Shinmera/studio-client

License

zlib

Version

1.1.0

Dependencies
  • documentation-utils (system).
  • north-core (system).
  • babel (system).
  • com.inuoe.jzon (system).
Source

studio-client.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 studio-client/studio-client.asd

Source

studio-client.asd.

Parent Component

studio-client (system).

ASDF Systems

studio-client.


3.1.2 studio-client/package.lisp

Source

studio-client.asd.

Parent Component

studio-client (system).

Packages

studio-client.


3.1.3 studio-client/client.lisp

Dependency

package.lisp (file).

Source

studio-client.asd.

Parent Component

studio-client (system).

Public Interface
Internals

3.1.4 studio-client/documentation.lisp

Dependency

client.lisp (file).

Source

studio-client.asd.

Parent Component

studio-client (system).


4 Packages

Packages are listed by definition order.


4.1 studio-client

Source

package.lisp.

Nickname

org.shirakumo.studio.client

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Generic functions

Generic Reader: api-base (object)

Returns the base API URL that the client will send API requests to.

See CLIENT

Package

studio-client.

Methods
Reader Method: api-base ((client client))

automatically generated reader method

Source

client.lisp.

Target Slot

api-base.

Generic Reader: author (object)

Returns the name of the author of the object.

See GALLERY
See UPLOAD

Package

studio-client.

Methods
Reader Method: author ((upload upload))

automatically generated reader method

Source

client.lisp.

Target Slot

author.

Reader Method: author ((gallery gallery))

automatically generated reader method

Source

client.lisp.

Target Slot

author.

Generic Reader: cover (object)

Returns the ID of the upload that was set as the gallery’s cover image, if any.

See GALLERY

Package

studio-client.

Methods
Reader Method: cover ((gallery gallery))

automatically generated reader method

Source

client.lisp.

Target Slot

cover.

Generic Writer: (setf cover) (object)
Package

studio-client.

Methods
Writer Method: (setf cover) ((gallery gallery))

automatically generated writer method

Source

client.lisp.

Target Slot

cover.

Generic Reader: created (object)

Returns the universal-time timestamp of when the upload was created.

See UPLOAD

Package

studio-client.

Methods
Reader Method: created ((upload upload))

automatically generated reader method

Source

client.lisp.

Target Slot

created.

Generic Writer: (setf created) (object)
Package

studio-client.

Methods
Writer Method: (setf created) ((upload upload))

automatically generated writer method

Source

client.lisp.

Target Slot

created.

Generic Function: delete (client gallery)

Delete the given object on the Studio instance.

This may fail if the authenticated user lacks the necessary permissions.

See GALLERY
See UPLOAD
See CLIENT

Package

studio-client.

Methods
Method: delete ((client client) (upload upload))
Source

client.lisp.

Method: delete ((client client) (gallery gallery))
Source

client.lisp.

Generic Reader: description (object)

Returns the object’s description string.

See GALLERY
See UPLOAD

Package

studio-client.

Methods
Reader Method: description ((upload upload))

automatically generated reader method

Source

client.lisp.

Target Slot

description.

Reader Method: description ((gallery gallery))

automatically generated reader method

Source

client.lisp.

Target Slot

description.

Generic Writer: (setf description) (object)
Package

studio-client.

Methods
Writer Method: (setf description) ((upload upload))

automatically generated writer method

Source

client.lisp.

Target Slot

description.

Writer Method: (setf description) ((gallery gallery))

automatically generated writer method

Source

client.lisp.

Target Slot

description.

Generic Function: file-content (client id &key thumb)

Returns the file’s binary payload data as returned by the server.

Returns an unsigned-byte 8 vector.

This function will error if the requested file does not exist.

Package

studio-client.

Methods
Method: file-content ((client client) id &key thumb)
Source

client.lisp.

Generic Function: file-url (client id &key thumb)

Returns the public URL to the file.

Package

studio-client.

Methods
Method: file-url ((client client) id &key thumb)
Source

client.lisp.

Generic Reader: files (object)

Accessor to the list of files of the upload.

Returned by the server are merely the file IDs, which you can turn into URLs and payloads with FILE-URL and FILE-CONTENT respectively.

If you want to add new files, add the pathname to the file at the appropriate position in the file list.

Note that setting this will only change the local object. In order to persist the changes, use SAVE.

See UPLOAD
See SAVE
See FILE-URL
See FILE-CONTENT

Package

studio-client.

Methods
Reader Method: files ((upload upload))

automatically generated reader method

Source

client.lisp.

Target Slot

files.

Generic Writer: (setf files) (object)
Package

studio-client.

Methods
Writer Method: (setf files) ((upload upload))

automatically generated writer method

Source

client.lisp.

Target Slot

files.

Generic Function: galleries (client &key start end)

Retrieve a listing of existing galleries on the Studio instance.

Note that this may return less than the specified END if the server caps the number of galleries it returns (by default limited to 10).

See GALLERY
See CLIENT

Package

studio-client.

Methods
Method: galleries ((client client) &key start end)
Source

client.lisp.

Retrieve the gallery of the given author.

See GALLERY
See CLIENT

Package

studio-client.

Methods
Source

client.lisp.

Generic Reader: id (object)

Returns an ID that identifies this object on Studio.

See GALLERY
See UPLOAD

Package

studio-client.

Methods
Reader Method: id ((upload upload))

automatically generated reader method

Source

client.lisp.

Target Slot

id.

Reader Method: id ((gallery gallery))

automatically generated reader method

Source

client.lisp.

Target Slot

id.

Generic Function: make-gallery (client &key description)

Create a gallery for the authenticated user.

Note that this will fail if a gallery already exists.

This may fail if the authenticated user lacks the necessary permissions.

Returns a fresh GALLERY instance if successful.

See GALLERY
See CLIENT

Package

studio-client.

Methods
Method: make-gallery ((client client) &key description)
Source

client.lisp.

Generic Function: make-upload (client title files &key description tags visibility arrangement)

Create a new upload.

FILES should be a list of pathnames to upload as the upload’s files. VISIBILITY can be one of :PUBLIC :HIDDEN :PRIVATE.

This may fail if the authenticated user lacks the necessary permissions.

Returns a fresh UPLOAD instance if successful.

See UPLOAD
See CLIENT

Package

studio-client.

Methods
Method: make-upload ((client client) title files &key description tags visibility arrangement)
Source

client.lisp.

Generic Function: save (client gallery)

Save potential changes made to the fields of the object on the Studio instance.

This may fail if the authenticated user lacks the necessary permissions.

Returns a fresh instance of the saved object as returned by the API.

See GALLERY
See UPLOAD
See CLIENT

Package

studio-client.

Methods
Method: save ((client client) (upload upload))
Source

client.lisp.

Method: save ((client client) (gallery gallery))
Source

client.lisp.

Generic Reader: tags (object)

Accessor to the list of tags the upload is marked with.

Note that setting this will only change the local object. In order to persist the changes, use SAVE.

See UPLOAD
See SAVE

Package

studio-client.

Methods
Reader Method: tags ((upload upload))

automatically generated reader method

Source

client.lisp.

Target Slot

tags.

Generic Writer: (setf tags) (object)
Package

studio-client.

Methods
Writer Method: (setf tags) ((upload upload))

automatically generated writer method

Source

client.lisp.

Target Slot

tags.

Generic Reader: title (object)

Accessor to the upload’s title.

Note that setting this will only change the local object. In order to persist the changes, use SAVE.

See UPLOAD
See SAVE

Package

studio-client.

Methods
Reader Method: title ((upload upload))

automatically generated reader method

Source

client.lisp.

Target Slot

title.

Generic Writer: (setf title) (object)
Package

studio-client.

Methods
Writer Method: (setf title) ((upload upload))

automatically generated writer method

Source

client.lisp.

Target Slot

title.

Generic Function: upload (client id)

Retrieve the upload with the given ID.

See UPLOAD
See CLIENT

Package

studio-client.

Methods
Method: upload ((client client) id)
Source

client.lisp.

Generic Function: uploads (client author &key tag date start end)

Retrieve a list of uploads for the given user or gallery.

DATE should be a date string in the format "MM.YYYY".

Note that this may return less than the specified END if the server caps the number of uploads it returns (by default limited to 40).

See GALLERY
See CLIENT
See UPLOAD

Package

studio-client.

Methods
Method: uploads ((client client) (gallery gallery) &rest args)
Source

client.lisp.

Method: uploads ((client client) (author string) &key tag date start end)
Source

client.lisp.

Generic Reader: url (object)

Returns the public URL to the given object.

See GALLERY
See UPLOAD

Package

studio-client.

Methods
Reader Method: url ((upload upload))

automatically generated reader method

Source

client.lisp.

Target Slot

url.

Reader Method: url ((gallery gallery))

automatically generated reader method

Source

client.lisp.

Target Slot

url.

Generic Reader: visibility (object)

Accessor to the visibility of the upload.

The value may be one of: :PUBLIC :HIDDEN :PRIVATE

Note that setting this will only change the local object. In order to persist the changes, use SAVE.

See UPLOAD
See SAVE

Package

studio-client.

Methods
Reader Method: visibility ((upload upload))

automatically generated reader method

Source

client.lisp.

Target Slot

visibility.

Generic Writer: (setf visibility) (object)
Package

studio-client.

Methods
Writer Method: (setf visibility) ((upload upload))

automatically generated writer method

Source

client.lisp.

Target Slot

visibility.


5.1.2 Standalone methods

Method: initialize-instance :after ((client client) &key api-base)
Source

client.lisp.

Method: print-object ((upload upload) stream)
Source

client.lisp.

Method: print-object ((gallery gallery) stream)
Source

client.lisp.


5.1.3 Classes

Class: client

The base client class for Studio connections.

To start, you should create an instance of this client with the appropriate :API-BASE, which defaults to "https://studio.tymoon.eu/api/". Then use North’s functions NORTH:INITIATE-AUTHENTICATION and NORTH:COMPLETE-AUTHENTICATION to complete the authentication cycle.

See NORTH:CLIENT
See API-BASE

Package

studio-client.

Source

client.lisp.

Direct superclasses

client.

Direct methods
Direct Default Initargs
InitargValue
:api-basehttps://studio.tymoon.eu/api/
:request-token-urinil
:authorize-urinil
:access-token-urinil
Direct slots
Slot: api-base
Readers

api-base.

Writers

This slot is read-only.

Representation of a user’s gallery in Studio.

See ID
See AUTHOR
See URL
See COVER
See DESCRIPTION
See MAKE-GALLERY
See GALLERY
See GALLERIES
See DELETE
See SAVE

Package

studio-client.

Source

client.lisp.

Direct methods
Direct slots
Slot: id
Initargs

:id

Readers

id.

Writers

This slot is read-only.

Slot: url
Initargs

:url

Readers

url.

Writers

This slot is read-only.

Slot: author
Initargs

:author

Readers

author.

Writers

This slot is read-only.

Slot: cover
Initargs

:cover

Readers

cover.

Writers

(setf cover).

Slot: description
Initargs

:description

Readers

description.

Writers

(setf description).

Class: upload

Representation of an upload in a gallery on a Studio instance.

See ID
See URL
See TITLE
See AUTHOR
See TAGS
See CREATED
See VISIBILITY
See DESCRIPTION
See FILES
See MAKE-UPLOAD
See UPLOADS
See UPLOAD

Package

studio-client.

Source

client.lisp.

Direct methods
Direct slots
Slot: id
Initargs

:id

Readers

id.

Writers

This slot is read-only.

Slot: url
Initargs

:url

Readers

url.

Writers

This slot is read-only.

Slot: title
Initargs

:title

Readers

title.

Writers

(setf title).

Slot: author
Initargs

:author

Readers

author.

Writers

This slot is read-only.

Slot: tags
Initargs

:tags

Readers

tags.

Writers

(setf tags).

Slot: created
Initargs

:created

Readers

created.

Writers

(setf created).

Slot: visibility
Initargs

:visibility

Readers

visibility.

Writers

(setf visibility).

Slot: arrangement
Initargs

:arrangement

Readers

arrangement.

Writers

(setf arrangement).

Slot: description
Initargs

:description

Readers

description.

Writers

(setf description).

Slot: files
Initargs

:files

Readers

files.

Writers

(setf files).


5.2 Internals


5.2.1 Ordinary functions

Function: decode-radiance-payload (data)
Package

studio-client.

Source

client.lisp.

Function: parse-gallery (data)
Package

studio-client.

Source

client.lisp.

Function: parse-upload (data)
Package

studio-client.

Source

client.lisp.

Function: plist->params (plist)
Package

studio-client.

Source

client.lisp.


5.2.2 Generic functions

Generic Reader: arrangement (object)
Package

studio-client.

Methods
Reader Method: arrangement ((upload upload))

automatically generated reader method

Source

client.lisp.

Target Slot

arrangement.

Generic Writer: (setf arrangement) (object)
Package

studio-client.

Methods
Writer Method: (setf arrangement) ((upload upload))

automatically generated writer method

Source

client.lisp.

Target Slot

arrangement.

Generic Function: post (client endpoint &rest parameters)
Package

studio-client.

Source

client.lisp.

Methods
Method: post ((client client) endpoint &rest parameters)
Generic Function: post-file (client endpoint data &rest parameters)
Package

studio-client.

Methods
Method: post-file ((client client) endpoint data &rest parameters)
Source

client.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   C   D   F   G   I   M   P   S   T   U   V  
Index Entry  Section

(
(setf arrangement): Private generic functions
(setf arrangement): Private generic functions
(setf cover): Public generic functions
(setf cover): Public generic functions
(setf created): Public generic functions
(setf created): Public generic functions
(setf description): Public generic functions
(setf description): Public generic functions
(setf description): Public generic functions
(setf files): Public generic functions
(setf files): Public generic functions
(setf tags): Public generic functions
(setf tags): Public generic functions
(setf title): Public generic functions
(setf title): Public generic functions
(setf visibility): Public generic functions
(setf visibility): Public generic functions

A
api-base: Public generic functions
api-base: Public generic functions
arrangement: Private generic functions
arrangement: Private generic functions
author: Public generic functions
author: Public generic functions
author: Public generic functions

C
cover: Public generic functions
cover: Public generic functions
created: Public generic functions
created: Public generic functions

D
decode-radiance-payload: Private ordinary functions
delete: Public generic functions
delete: Public generic functions
delete: Public generic functions
description: Public generic functions
description: Public generic functions
description: Public generic functions

F
file-content: Public generic functions
file-content: Public generic functions
file-url: Public generic functions
file-url: Public generic functions
files: Public generic functions
files: Public generic functions
Function, decode-radiance-payload: Private ordinary functions
Function, parse-gallery: Private ordinary functions
Function, parse-upload: Private ordinary functions
Function, plist->params: Private ordinary functions

G
galleries: Public generic functions
galleries: Public generic functions
gallery: Public generic functions
gallery: Public generic functions
Generic Function, (setf arrangement): Private generic functions
Generic Function, (setf cover): Public generic functions
Generic Function, (setf created): Public generic functions
Generic Function, (setf description): Public generic functions
Generic Function, (setf files): Public generic functions
Generic Function, (setf tags): Public generic functions
Generic Function, (setf title): Public generic functions
Generic Function, (setf visibility): Public generic functions
Generic Function, api-base: Public generic functions
Generic Function, arrangement: Private generic functions
Generic Function, author: Public generic functions
Generic Function, cover: Public generic functions
Generic Function, created: Public generic functions
Generic Function, delete: Public generic functions
Generic Function, description: Public generic functions
Generic Function, file-content: Public generic functions
Generic Function, file-url: Public generic functions
Generic Function, files: Public generic functions
Generic Function, galleries: Public generic functions
Generic Function, gallery: Public generic functions
Generic Function, id: Public generic functions
Generic Function, make-gallery: Public generic functions
Generic Function, make-upload: Public generic functions
Generic Function, post: Private generic functions
Generic Function, post-file: Private generic functions
Generic Function, save: Public generic functions
Generic Function, tags: Public generic functions
Generic Function, title: Public generic functions
Generic Function, upload: Public generic functions
Generic Function, uploads: Public generic functions
Generic Function, url: Public generic functions
Generic Function, visibility: Public generic functions

I
id: Public generic functions
id: Public generic functions
id: Public generic functions
initialize-instance: Public standalone methods

M
make-gallery: Public generic functions
make-gallery: Public generic functions
make-upload: Public generic functions
make-upload: Public generic functions
Method, (setf arrangement): Private generic functions
Method, (setf cover): Public generic functions
Method, (setf created): Public generic functions
Method, (setf description): Public generic functions
Method, (setf description): Public generic functions
Method, (setf files): Public generic functions
Method, (setf tags): Public generic functions
Method, (setf title): Public generic functions
Method, (setf visibility): Public generic functions
Method, api-base: Public generic functions
Method, arrangement: Private generic functions
Method, author: Public generic functions
Method, author: Public generic functions
Method, cover: Public generic functions
Method, created: Public generic functions
Method, delete: Public generic functions
Method, delete: Public generic functions
Method, description: Public generic functions
Method, description: Public generic functions
Method, file-content: Public generic functions
Method, file-url: Public generic functions
Method, files: Public generic functions
Method, galleries: Public generic functions
Method, gallery: Public generic functions
Method, id: Public generic functions
Method, id: Public generic functions
Method, initialize-instance: Public standalone methods
Method, make-gallery: Public generic functions
Method, make-upload: Public generic functions
Method, post: Private generic functions
Method, post-file: Private generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, save: Public generic functions
Method, save: Public generic functions
Method, tags: Public generic functions
Method, title: Public generic functions
Method, upload: Public generic functions
Method, uploads: Public generic functions
Method, uploads: Public generic functions
Method, url: Public generic functions
Method, url: Public generic functions
Method, visibility: Public generic functions

P
parse-gallery: Private ordinary functions
parse-upload: Private ordinary functions
plist->params: Private ordinary functions
post: Private generic functions
post: Private generic functions
post-file: Private generic functions
post-file: Private generic functions
print-object: Public standalone methods
print-object: Public standalone methods

S
save: Public generic functions
save: Public generic functions
save: Public generic functions

T
tags: Public generic functions
tags: Public generic functions
title: Public generic functions
title: Public generic functions

U
upload: Public generic functions
upload: Public generic functions
uploads: Public generic functions
uploads: Public generic functions
uploads: Public generic functions
url: Public generic functions
url: Public generic functions
url: Public generic functions

V
visibility: Public generic functions
visibility: Public generic functions