docs: update references to list
This commit is contained in:
parent
869d4a336c
commit
8dc6c95333
@ -30,7 +30,7 @@ service:
|
|||||||
enablecaldav: true
|
enablecaldav: true
|
||||||
# Set the motd message, available from the /info endpoint
|
# Set the motd message, available from the /info endpoint
|
||||||
motd: ""
|
motd: ""
|
||||||
# Enable sharing of lists via a link
|
# Enable sharing of project via a link
|
||||||
enablelinksharing: true
|
enablelinksharing: true
|
||||||
# Whether to let new users registering themselves or not
|
# Whether to let new users registering themselves or not
|
||||||
enableregistration: true
|
enableregistration: true
|
||||||
@ -238,14 +238,14 @@ avatar:
|
|||||||
gravatarexpiration: 3600
|
gravatarexpiration: 3600
|
||||||
|
|
||||||
backgrounds:
|
backgrounds:
|
||||||
# Whether to enable backgrounds for lists at all.
|
# Whether to enable backgrounds for projects at all.
|
||||||
enabled: true
|
enabled: true
|
||||||
providers:
|
providers:
|
||||||
upload:
|
upload:
|
||||||
# Whethere to enable uploaded list backgrounds
|
# Whether to enable uploaded project backgrounds
|
||||||
enabled: true
|
enabled: true
|
||||||
unsplash:
|
unsplash:
|
||||||
# Whether to enable setting backgrounds from unsplash as list backgrounds
|
# Whether to enable setting backgrounds from unsplash as project backgrounds
|
||||||
enabled: false
|
enabled: false
|
||||||
# You need to create an application for your installation at https://unsplash.com/oauth/applications/new
|
# You need to create an application for your installation at https://unsplash.com/oauth/applications/new
|
||||||
# and set the access token below.
|
# and set the access token below.
|
||||||
@ -329,8 +329,8 @@ defaultsettings:
|
|||||||
overdue_tasks_reminders_enabled: true
|
overdue_tasks_reminders_enabled: true
|
||||||
# When to send the overdue task reminder email.
|
# When to send the overdue task reminder email.
|
||||||
overdue_tasks_reminders_time: 9:00
|
overdue_tasks_reminders_time: 9:00
|
||||||
# The id of the default list. Make sure users actually have access to this list when setting this value.
|
# The id of the default project. Make sure users actually have access to this project when setting this value.
|
||||||
default_list_id: 0
|
default_project_id: 0
|
||||||
# Start of the week for the user. `0` is sunday, `1` is monday and so on.
|
# Start of the week for the user. `0` is sunday, `1` is monday and so on.
|
||||||
week_start: 0
|
week_start: 0
|
||||||
# The language of the user interface. Must be an ISO 639-1 language code. Will default to the browser language the user uses when signing up.
|
# The language of the user interface. Must be an ISO 639-1 language code. Will default to the browser language the user uses when signing up.
|
||||||
|
@ -49,7 +49,7 @@ func (err ErrUserDoesNotExist) Error() string {
|
|||||||
// This needs to be unique, so you should check whether the error code exists or not.
|
// This needs to be unique, so you should check whether the error code exists or not.
|
||||||
// The general convention for error codes is as follows:
|
// The general convention for error codes is as follows:
|
||||||
// * Every "group" errors lives in a thousend something. For example all user issues are 1000-something, all
|
// * Every "group" errors lives in a thousend something. For example all user issues are 1000-something, all
|
||||||
// list errors are 3000-something and so on.
|
// project errors are 3000-something and so on.
|
||||||
// * New error codes should be the current max error code + 1. Don't take free numbers to prevent old errors
|
// * New error codes should be the current max error code + 1. Don't take free numbers to prevent old errors
|
||||||
// which are depricated and removed from being "new ones". For example, if there are error codes 1001, 1002, 1004,
|
// which are depricated and removed from being "new ones". For example, if there are error codes 1001, 1002, 1004,
|
||||||
// a new error should be 1005 and not 1003.
|
// a new error should be 1005 and not 1003.
|
||||||
|
@ -26,8 +26,8 @@ It returns the `limit` (max-length) and `offset` parameters needed for SQL-Queri
|
|||||||
You can feed this function directly into xorm's `Limit`-Function like so:
|
You can feed this function directly into xorm's `Limit`-Function like so:
|
||||||
|
|
||||||
{{< highlight golang >}}
|
{{< highlight golang >}}
|
||||||
lists := []List{}
|
projects := []*Project{}
|
||||||
err := x.Limit(getLimitFromPageIndex(pageIndex, itemsPerPage)).Find(&lists)
|
err := x.Limit(getLimitFromPageIndex(pageIndex, itemsPerPage)).Find(&projects)
|
||||||
{{< /highlight >}}
|
{{< /highlight >}}
|
||||||
|
|
||||||
// TODO: Add a full example from start to finish, like a tutorial on how to create a new endpoint?
|
// TODO: Add a full example from start to finish, like a tutorial on how to create a new endpoint?
|
||||||
|
@ -21,7 +21,7 @@ There are two ways of migrating data from another service:
|
|||||||
oauth flow. You can then call the service's api on behalf of your user to get all the data.
|
oauth flow. You can then call the service's api on behalf of your user to get all the data.
|
||||||
The Todoist, Trello and Microsoft To-Do Migrators use this pattern.
|
The Todoist, Trello and Microsoft To-Do Migrators use this pattern.
|
||||||
2. A file migration where the user uploads a file obtained from some third-party service. In your migrator, you need
|
2. A file migration where the user uploads a file obtained from some third-party service. In your migrator, you need
|
||||||
to parse the file and create the lists, tasks etc.
|
to parse the file and create the projects, tasks etc.
|
||||||
The Vikunja File Import uses this pattern.
|
The Vikunja File Import uses this pattern.
|
||||||
|
|
||||||
To differentiate the two, there are two different interfaces you must implement.
|
To differentiate the two, there are two different interfaces you must implement.
|
||||||
@ -61,7 +61,7 @@ type FileMigrator interface {
|
|||||||
// Name holds the name of the migration.
|
// Name holds the name of the migration.
|
||||||
// This is used to show the name to users and to keep track of users who already migrated.
|
// This is used to show the name to users and to keep track of users who already migrated.
|
||||||
Name() string
|
Name() string
|
||||||
// Migrate is the interface used to migrate a user's tasks, list and other things from a file to vikunja.
|
// Migrate is the interface used to migrate a user's tasks, projects and other things from a file to vikunja.
|
||||||
// The user object is the user who's tasks will be migrated.
|
// The user object is the user who's tasks will be migrated.
|
||||||
Migrate(user *user.User, file io.ReaderAt, size int64) error
|
Migrate(user *user.User, file io.ReaderAt, size int64) error
|
||||||
}
|
}
|
||||||
@ -103,9 +103,9 @@ You should also document the routes with [swagger annotations]({{< ref "swagger-
|
|||||||
## Insertion helper method
|
## Insertion helper method
|
||||||
|
|
||||||
There is a method available in the `migration` package which takes a fully nested Vikunja structure and creates it with all relations.
|
There is a method available in the `migration` package which takes a fully nested Vikunja structure and creates it with all relations.
|
||||||
This means you start by adding a namespace, then add lists inside of that namespace, then tasks in the lists and so on.
|
This means you start by adding a namespace, then add projects inside that namespace, then tasks in the lists and so on.
|
||||||
|
|
||||||
The root structure must be present as `[]*models.NamespaceWithListsAndTasks`. It allows to represent all of Vikunja's
|
The root structure must be present as `[]*models.NamespaceWithProjectsAndTasks`. It allows to represent all of Vikunja's
|
||||||
hierachie as a single data structure.
|
hierachie as a single data structure.
|
||||||
|
|
||||||
Then call the method like so:
|
Then call the method like so:
|
||||||
|
@ -108,7 +108,7 @@ Contains all possible avatar providers a user can choose to set their avatar.
|
|||||||
|
|
||||||
#### background
|
#### background
|
||||||
|
|
||||||
All list background providers are in sub-packages of this package.
|
All project background providers are in sub-packages of this package.
|
||||||
|
|
||||||
#### dump
|
#### dump
|
||||||
|
|
||||||
|
@ -19,29 +19,51 @@ The api documentation is generated using [swaggo](https://github.com/swaggo/swag
|
|||||||
You should always comment every field which will be exposed as a json in the api.
|
You should always comment every field which will be exposed as a json in the api.
|
||||||
These comments will show up in the documentation, it'll make it easier for developers using the api.
|
These comments will show up in the documentation, it'll make it easier for developers using the api.
|
||||||
|
|
||||||
As an example, this is the definition of a list with all comments:
|
As an example, this is the definition of a project with all comments:
|
||||||
|
|
||||||
{{< highlight golang >}}
|
{{< highlight golang >}}
|
||||||
// List represents a list of tasks
|
type Project struct {
|
||||||
type List struct {
|
// The unique, numeric id of this project.
|
||||||
// The unique, numeric id of this list.
|
ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"project"`
|
||||||
ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"list"`
|
// The title of the project. You'll see this in the namespace overview.
|
||||||
// The title of the list. You'll see this in the namespace overview.
|
Title string `xorm:"varchar(250) not null" json:"title" valid:"required,runelength(1|250)" minLength:"1" maxLength:"250"`
|
||||||
Title string `xorm:"varchar(250)" json:"title" valid:"required,runelength(3|250)" minLength:"3" maxLength:"250"`
|
// The description of the project.
|
||||||
// The description of the list.
|
Description string `xorm:"longtext null" json:"description"`
|
||||||
Description string `xorm:"varchar(1000)" json:"description" valid:"runelength(0|1000)" maxLength:"1000"`
|
// The unique project short identifier. Used to build task identifiers.
|
||||||
OwnerID int64 `xorm:"bigint INDEX" json:"-"`
|
Identifier string `xorm:"varchar(10) null" json:"identifier" valid:"runelength(0|10)" minLength:"0" maxLength:"10"`
|
||||||
NamespaceID int64 `xorm:"bigint INDEX" json:"-" param:"namespace"`
|
// The hex color of this project
|
||||||
|
HexColor string `xorm:"varchar(6) null" json:"hex_color" valid:"runelength(0|6)" maxLength:"6"`
|
||||||
|
|
||||||
// The user who created this list.
|
OwnerID int64 `xorm:"bigint INDEX not null" json:"-"`
|
||||||
Owner User `xorm:"-" json:"owner" valid:"-"`
|
NamespaceID int64 `xorm:"bigint INDEX not null" json:"namespace_id" param:"namespace"`
|
||||||
// An array of tasks which belong to the list.
|
|
||||||
Tasks []*ListTask `xorm:"-" json:"tasks"`
|
|
||||||
|
|
||||||
// A unix timestamp when this list was created. You cannot change this value.
|
// The user who created this project.
|
||||||
Created int64 `xorm:"created" json:"created"`
|
Owner *user.User `xorm:"-" json:"owner" valid:"-"`
|
||||||
// A unix timestamp when this list was last updated. You cannot change this value.
|
|
||||||
Updated int64 `xorm:"updated" json:"updated"`
|
// Whether or not a project is archived.
|
||||||
|
IsArchived bool `xorm:"not null default false" json:"is_archived" query:"is_archived"`
|
||||||
|
|
||||||
|
// The id of the file this project has set as background
|
||||||
|
BackgroundFileID int64 `xorm:"null" json:"-"`
|
||||||
|
// Holds extra information about the background set since some background providers require attribution or similar. If not null, the background can be accessed at /projects/{projectID}/background
|
||||||
|
BackgroundInformation interface{} `xorm:"-" json:"background_information"`
|
||||||
|
// Contains a very small version of the project background to use as a blurry preview until the actual background is loaded. Check out https://blurha.sh/ to learn how it works.
|
||||||
|
BackgroundBlurHash string `xorm:"varchar(50) null" json:"background_blur_hash"`
|
||||||
|
|
||||||
|
// True if a project is a favorite. Favorite projects show up in a separate namespace. This value depends on the user making the call to the api.
|
||||||
|
IsFavorite bool `xorm:"-" json:"is_favorite"`
|
||||||
|
|
||||||
|
// The subscription status for the user reading this project. You can only read this property, use the subscription endpoints to modify it.
|
||||||
|
// Will only returned when retreiving one project.
|
||||||
|
Subscription *Subscription `xorm:"-" json:"subscription,omitempty"`
|
||||||
|
|
||||||
|
// The position this project has when querying all projects. See the tasks.position property on how to use this.
|
||||||
|
Position float64 `xorm:"double null" json:"position"`
|
||||||
|
|
||||||
|
// A timestamp when this project was created. You cannot change this value.
|
||||||
|
Created time.Time `xorm:"created not null" json:"created"`
|
||||||
|
// A timestamp when this project was last updated. You cannot change this value.
|
||||||
|
Updated time.Time `xorm:"updated not null" json:"updated"`
|
||||||
|
|
||||||
web.CRUDable `xorm:"-" json:"-"`
|
web.CRUDable `xorm:"-" json:"-"`
|
||||||
web.Rights `xorm:"-" json:"-"`
|
web.Rights `xorm:"-" json:"-"`
|
||||||
|
@ -208,7 +208,7 @@ Environment path: `VIKUNJA_SERVICE_MOTD`
|
|||||||
|
|
||||||
### enablelinksharing
|
### enablelinksharing
|
||||||
|
|
||||||
Enable sharing of lists via a link
|
Enable sharing of project via a link
|
||||||
|
|
||||||
Default: `true`
|
Default: `true`
|
||||||
|
|
||||||
@ -1021,7 +1021,7 @@ Environment path: `VIKUNJA_AVATAR_GRAVATAREXPIRATION`
|
|||||||
|
|
||||||
### enabled
|
### enabled
|
||||||
|
|
||||||
Whether to enable backgrounds for lists at all.
|
Whether to enable backgrounds for projects at all.
|
||||||
|
|
||||||
Default: `true`
|
Default: `true`
|
||||||
|
|
||||||
@ -1248,15 +1248,15 @@ Full path: `defaultsettings.overdue_tasks_reminders_time`
|
|||||||
Environment path: `VIKUNJA_DEFAULTSETTINGS_OVERDUE_TASKS_REMINDERS_TIME`
|
Environment path: `VIKUNJA_DEFAULTSETTINGS_OVERDUE_TASKS_REMINDERS_TIME`
|
||||||
|
|
||||||
|
|
||||||
### default_list_id
|
### default_project_id
|
||||||
|
|
||||||
The id of the default list. Make sure users actually have access to this list when setting this value.
|
The id of the default project. Make sure users actually have access to this project when setting this value.
|
||||||
|
|
||||||
Default: `0`
|
Default: `0`
|
||||||
|
|
||||||
Full path: `defaultsettings.default_list_id`
|
Full path: `defaultsettings.default_project_id`
|
||||||
|
|
||||||
Environment path: `VIKUNJA_DEFAULTSETTINGS_DEFAULT_LIST_ID`
|
Environment path: `VIKUNJA_DEFAULTSETTINGS_DEFAULT_PROJECT_ID`
|
||||||
|
|
||||||
|
|
||||||
### week_start
|
### week_start
|
||||||
|
@ -76,7 +76,7 @@ This defines four services, each with their own container:
|
|||||||
|
|
||||||
* An api service which runs the vikunja api. Most of the core logic lives here.
|
* An api service which runs the vikunja api. Most of the core logic lives here.
|
||||||
* The frontend which will make vikunja actually usable for most people.
|
* The frontend which will make vikunja actually usable for most people.
|
||||||
* A database container which will store all lists, tasks, etc. We're using mariadb here, but you're free to use mysql or postgres if you want.
|
* A database container which will store all projects, tasks, etc. We're using mariadb here, but you're free to use mysql or postgres if you want.
|
||||||
* A proxy service which makes the frontend and api available on the same port, redirecting all requests to `/api` to the api container.
|
* A proxy service which makes the frontend and api available on the same port, redirecting all requests to `/api` to the api container.
|
||||||
If you already have a proxy on your host, you may want to check out the [reverse proxy examples]() to use that.
|
If you already have a proxy on your host, you may want to check out the [reverse proxy examples]() to use that.
|
||||||
By default, it uses port 80 on the host.
|
By default, it uses port 80 on the host.
|
||||||
@ -201,7 +201,6 @@ You should see something like this:
|
|||||||
"max_file_size": "20MB",
|
"max_file_size": "20MB",
|
||||||
"registration_enabled": true,
|
"registration_enabled": true,
|
||||||
"available_migrators": [
|
"available_migrators": [
|
||||||
"wunderlist",
|
|
||||||
"todoist"
|
"todoist"
|
||||||
],
|
],
|
||||||
"task_attachments_enabled": true
|
"task_attachments_enabled": true
|
||||||
|
@ -12,7 +12,7 @@ menu:
|
|||||||
|
|
||||||
Vikunja itself is always fully capable of handling utf-8 characters.
|
Vikunja itself is always fully capable of handling utf-8 characters.
|
||||||
However, your database might be not.
|
However, your database might be not.
|
||||||
Vikunja itself will work just fine until you want to use non-latin characters in your tasks/lists/etc.
|
Vikunja itself will work just fine until you want to use non-latin characters in your tasks/projects/etc.
|
||||||
|
|
||||||
On this page, you will find information about how to fully ensure non-latin characters like aüäß or emojis work
|
On this page, you will find information about how to fully ensure non-latin characters like aüäß or emojis work
|
||||||
with your installation.
|
with your installation.
|
||||||
|
@ -24,10 +24,10 @@ All urls are located under the `/dav` subspace.
|
|||||||
|
|
||||||
Urls are:
|
Urls are:
|
||||||
|
|
||||||
* `/principals/<username>/`: Returns urls for list discovery. *Use this url to initially make connections to new clients.*
|
* `/principals/<username>/`: Returns urls for project discovery. *Use this url to initially make connections to new clients.*
|
||||||
* `/lists/`: Used to manage lists
|
* `/projects/`: Used to manage projects
|
||||||
* `/lists/<List ID>/`: Used to manage a single list
|
* `/projects/<List ID>/`: Used to manage a single project
|
||||||
* `/lists/<List ID>/<Task UID>`: Used to manage a task on a list
|
* `/projects/<List ID>/<Task UID>`: Used to manage a task on a project
|
||||||
|
|
||||||
## Supported properties
|
## Supported properties
|
||||||
|
|
||||||
|
@ -8,9 +8,9 @@ menu:
|
|||||||
parent: "usage"
|
parent: "usage"
|
||||||
---
|
---
|
||||||
|
|
||||||
# List and namespace rights for teams and users
|
# Project and namespace rights for teams and users
|
||||||
|
|
||||||
Whenever you share a list or namespace with a user or team, you can specify a `rights` parameter.
|
Whenever you share a project or namespace with a user or team, you can specify a `rights` parameter.
|
||||||
This parameter controls the rights that team or user is going to have (or has, if you request the current sharing status).
|
This parameter controls the rights that team or user is going to have (or has, if you request the current sharing status).
|
||||||
|
|
||||||
Rights are being specified using integers.
|
Rights are being specified using integers.
|
||||||
@ -18,9 +18,9 @@ Rights are being specified using integers.
|
|||||||
The following values are possible:
|
The following values are possible:
|
||||||
|
|
||||||
| Right (int) | Meaning |
|
| Right (int) | Meaning |
|
||||||
|-------------|---------|
|
|-------------|---------------------------------------------------------------------------------------------------------------|
|
||||||
| 0 (Default) | Read only. Anything which is shared with this right cannot be edited. |
|
| 0 (Default) | Read only. Anything which is shared with this right cannot be edited. |
|
||||||
| 1 | Read and write. Namespaces or lists shared with this right can be read and written to by the team or user. |
|
| 1 | Read and write. Namespaces or projects shared with this right can be read and written to by the team or user. |
|
||||||
| 2 | Admin. Can do anything like read and write, but can additionally manage sharing options. |
|
| 2 | Admin. Can do anything like read and write, but can additionally manage sharing options. |
|
||||||
|
|
||||||
## Team admins
|
## Team admins
|
||||||
|
Loading…
x
Reference in New Issue
Block a user