zotero

package
v0.0.0-...-967dc30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2020 License: Apache-2.0 Imports: 25 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SyncDirectionId = map[string]SyncDirection{
	"none":       SyncDirection_None,
	"tocloud":    SyncDirection_ToCloud,
	"tolocal":    SyncDirection_ToLocal,
	"bothcloud":  SyncDirection_BothCloud,
	"bothlocal":  SyncDirection_BothLocal,
	"bothmanual": SyncDirection_BothManual,
}
View Source
var SyncDirectionString = map[SyncDirection]string{
	SyncDirection_None:       "none",
	SyncDirection_ToCloud:    "tocloud",
	SyncDirection_ToLocal:    "tolocal",
	SyncDirection_BothCloud:  "bothcloud",
	SyncDirection_BothLocal:  "bothlocal",
	SyncDirection_BothManual: "bothmanual",
}
View Source
var SyncStatusId = map[string]SyncStatus{
	"new":        SyncStatus_New,
	"synced":     SyncStatus_Synced,
	"modified":   SyncStatus_Modified,
	"incomplete": SyncStatus_Incomplete,
}
View Source
var SyncStatusString = map[SyncStatus]string{
	SyncStatus_New:        "new",
	SyncStatus_Synced:     "synced",
	SyncStatus_Modified:   "modified",
	SyncStatus_Incomplete: "incomplete",
}

Functions

func AppendIfMissing

func AppendIfMissing(slice []string, s string) []string

func CreateKey

func CreateKey() string

func FileExists

func FileExists(filename string) bool

func FolderExists

func FolderExists(filename string) bool

func IsEmptyResult

func IsEmptyResult(err error) bool

func IsUniqueViolation

func IsUniqueViolation(err error, constraint string) bool

func Text2Metadata

func Text2Metadata(str string) map[string][]string

func TextNoMeta

func TextNoMeta(str string) string

Types

type Access

type Access struct {
	User   AccessElements            `json:"user,omitempty"`
	Groups map[string]AccessElements `json:"groups,omitempty"`
}

type AccessElements

type AccessElements struct {
	Library bool `json:"library,omitempty"`
	Files   bool `json:"files,omitempty"`
	Notes   bool `json:"notes,omitempty"`
	Write   bool `json:"write,omitempty"`
}

type ApiKey

type ApiKey struct {
	UserId   int64  `json:"userId"`
	Username string `json:"username"`
	Access   Access `json:"access"`
}

type Collection

type Collection struct {
	Key     string         `json:"key"`
	Version int64          `json:"version"`
	Library Library        `json:"library,omitempty"`
	Links   interface{}    `json:"links,omitempty"`
	Meta    CollectionMeta `json:"meta,omitempty"`
	Data    CollectionData `json:"data,omitempty"`
	Group   *Group         `json:"-"`
	Status  SyncStatus     `json:"-"`
	Trashed bool           `json:"-"`
	Deleted bool           `json:"-"`
	Gitlab  *time.Time     `json:"-"`
}

func (*Collection) Backup

func (collection *Collection) Backup(backupFs filesystem.FileSystem) error

func (*Collection) UpdateCloud

func (collection *Collection) UpdateCloud() error

func (*Collection) UpdateLocal

func (collection *Collection) UpdateLocal() error

type CollectionData

type CollectionData struct {
	Key              string       `json:"key"`
	Name             string       `json:"name"`
	Version          int64        `json:"version"`
	Relations        RelationList `json:"relations"`
	ParentCollection Parent       `json:"parentCollection,omitempty"`
}

type CollectionGitlab

type CollectionGitlab struct {
	LibraryId int64          `json:"libraryid"`
	Key       string         `json:"key"`
	Data      CollectionData `json:"data,omitempty"`
	Meta      CollectionMeta `json:"meta,omitempty"`
}

type CollectionMeta

type CollectionMeta struct {
	NumCollections int64 `json:"numCollections"`
	NumItems       int64 `json:"numItems"`
}

type Delete

type Delete struct {
	Collections []string `json:"collections"`
	Searches    []string `json:"searches"`
	Items       []string `json:"items"`
	Tags        []string `json:"tags"`
}

type Deletions

type Deletions struct {
	Collections []string `json:"collections"`
	Searches    []string `json:"searches"`
	Items       []string `json:"items"`
	Tags        []string `json:"tags"`
	Settings    []string `json:"settings"`
}

type Group

type Group struct {
	Id      int64       `json:"id"`
	Version int64       `json:"version"`
	Links   interface{} `json:"links,omitempty"`
	Meta    GroupMeta   `json:"meta"`
	Data    GroupData   `json:"data"`
	Deleted bool        `json:"-"`
	Active  bool        `json:"-"`

	Zot               *Zotero    `json:"-"`
	ItemVersion       int64      `json:"-"`
	CollectionVersion int64      `json:"-"`
	TagVersion        int64      `json:"-"`
	IsModified        bool       `json:"-"`
	Gitlab            *time.Time `json:"-"`
	Folder            string     `json:"-"`
	// contains filtered or unexported fields
}

func (*Group) BackupLocal

func (group *Group) BackupLocal(backupFs filesystem.FileSystem) error

func (*Group) CanDownload

func (group *Group) CanDownload() bool

func (*Group) CanUpload

func (group *Group) CanUpload() bool

func (*Group) CreateCollectionLocal

func (group *Group) CreateCollectionLocal(collectionData *CollectionData) (*Collection, error)

func (*Group) CreateEmptyCollectionLocal

func (group *Group) CreateEmptyCollectionLocal(collectionId string) error

func (*Group) CreateEmptyItemLocal

func (group *Group) CreateEmptyItemLocal(itemId string, oldId string) error

func (*Group) CreateItemLocal

func (group *Group) CreateItemLocal(itemData *ItemGeneric, itemMeta *ItemMeta, oldId string) (*Item, error)

func (*Group) CreateTagLocal

func (group *Group) CreateTagLocal(tag Tag) error

func (*Group) DeleteItemLocal

func (group *Group) DeleteItemLocal(key string) error

func (*Group) DeleteTagLocal

func (group *Group) DeleteTagLocal(tag string) error

func (*Group) DownloadItems

func (group *Group) DownloadItems() (int64, int64, error)

func (*Group) GetCollectionByKeyLocal

func (group *Group) GetCollectionByKeyLocal(key string) (*Collection, error)

func (*Group) GetCollectionByNameLocal

func (group *Group) GetCollectionByNameLocal(name string, parentKey string) (*Collection, error)

func (*Group) GetCollectionVersionLocal

func (group *Group) GetCollectionVersionLocal(collectionId string) (int64, SyncStatus, error)

func (*Group) GetCollectionsCloud

func (group *Group) GetCollectionsCloud(objectKeys []string) (*[]Collection, int64, error)

func (*Group) GetCollectionsVersionCloud

func (group *Group) GetCollectionsVersionCloud(sinceVersion int64) (*map[string]int64, int64, error)

func (*Group) GetDeleted

func (group *Group) GetDeleted(sinceVersion int64) (collections *[]string, items *[]string, tags *[]string, err error)

func (*Group) GetFolder

func (group *Group) GetFolder() (string, error)

func (*Group) GetItemByKeyLocal

func (group *Group) GetItemByKeyLocal(key string) (*Item, error)

func (*Group) GetItemByOldidLocal

func (group *Group) GetItemByOldidLocal(oldid string) (*Item, error)

func (*Group) GetItemVersionLocal

func (group *Group) GetItemVersionLocal(itemId string, oldId string) (int64, SyncStatus, error)

func (*Group) GetItemsCloud

func (group *Group) GetItemsCloud(objectKeys []string) (*[]Item, error)

func (*Group) GetItemsLocal

func (group *Group) GetItemsLocal(objectKeys []string) (*[]Item, error)

func (*Group) GetItemsVersionCloud

func (group *Group) GetItemsVersionCloud(sinceVersion int64, trashed bool) (*map[string]int64, int64, error)

func (*Group) GetItemsVersionOnlyCloud

func (group *Group) GetItemsVersionOnlyCloud(trashed bool) (int64, error)

func (*Group) GetLibrary

func (group *Group) GetLibrary() *Library

func (*Group) GetTagsVersionCloud

func (group *Group) GetTagsVersionCloud(sinceVersion int64) (*[]Tag, int64, error)

func (*Group) Init

func (group *Group) Init()

func (*Group) IterateCollectionsAllLocal

func (group *Group) IterateCollectionsAllLocal(after *time.Time, f func(coll *Collection) error) error

func (*Group) IterateItemsAllLocal

func (group *Group) IterateItemsAllLocal(after *time.Time, f func(item *Item) error) error

func (*Group) Sync

func (group *Group) Sync() (err error)

func (*Group) SyncCollections

func (group *Group) SyncCollections() (int64, int64, error)

func (*Group) SyncDeleted

func (group *Group) SyncDeleted() (int64, error)

func (*Group) SyncTags

func (group *Group) SyncTags() (int64, int64, error)

func (*Group) TryDeleteCollectionLocal

func (group *Group) TryDeleteCollectionLocal(key string, lastModifiedVersion int64) error

func (*Group) TryDeleteItemLocal

func (group *Group) TryDeleteItemLocal(key string, lastModifiedVersion int64) error

func (*Group) UpdateLocal

func (group *Group) UpdateLocal() error

func (*Group) UploadItems

func (group *Group) UploadItems() (int64, int64, error)

type GroupData

type GroupData struct {
	Id             int64   `json:"id"`
	Version        int64   `json:"version"`
	Name           string  `json:"name"`
	Owner          int64   `json:owner`
	Type           string  `json:"type"`
	Description    string  `json:"description"`
	Url            string  `json:"url"`
	HasImage       int64   `json:"hasImage"`
	LibraryEditing string  `json:libraryEditing`
	LibraryReading string  `json:libraryReading`
	FileEditing    string  `json:fileEditing`
	Admins         []int64 `json:"admins"`
}

type GroupGitlab

type GroupGitlab struct {
	Id                int64     `json:"id"`
	Data              GroupData `json:"data,omitempty"`
	CollectionVersion int64     `json:"collectionversion"`
	ItemVersion       int64     `json:"itemversion"`
	TagVersion        int64     `json:tagversion`
}

type GroupMeta

type GroupMeta struct {
	Created      time.Time `json:"created"`
	LastModified time.Time `json:"lastModified"`
	NumItems     int64     `json:"numItems"`
}

type Item

type Item struct {
	Key     string      `json:"key"`
	Version int64       `json:"version"`
	Library Library     `json:"library,omitempty"`
	Links   interface{} `json:"links,omitempty"`
	Meta    ItemMeta    `json:"meta,omitempty"`
	Data    ItemGeneric `json:"data,omitempty"`
	Group   *Group      `json:"-"`
	Trashed bool        `json:"-"`
	Deleted bool        `json:"-"`
	Status  SyncStatus  `json:"-"`
	MD5     string      `json:"-"`
	OldId   string      `json:"-"`
	Gitlab  *time.Time  `json:"-"`
}

func (*Item) Backup

func (item *Item) Backup(backupFs filesystem.FileSystem) error

func (*Item) DeleteLocal

func (item *Item) DeleteLocal() error

func (*Item) DownloadAttachmentCloud

func (item *Item) DownloadAttachmentCloud() (string, error)

func (*Item) GetACL

func (item *Item) GetACL() map[string][]string

func (*Item) GetAbstract

func (item *Item) GetAbstract() string

func (*Item) GetCatalogs

func (item *Item) GetCatalogs() []string

func (*Item) GetCategories

func (item *Item) GetCategories() []string

func (*Item) GetCollectionTitle

func (item *Item) GetCollectionTitle() string

func (*Item) GetContentMime

func (item *Item) GetContentMime() string

func (*Item) GetContentString

func (item *Item) GetContentString() string

func (*Item) GetContentType

func (item *Item) GetContentType() string

func (*Item) GetDate

func (item *Item) GetDate() string

func (*Item) GetExtra

func (item *Item) GetExtra() map[string]string

func (*Item) GetMedia

func (item *Item) GetMedia(ms *zotmedia.MediaserverMySQL) map[string]gsearch.MediaList

func (*Item) GetMeta

func (item *Item) GetMeta() map[string]string

func (*Item) GetNotes

func (item *Item) GetNotes() []gsearch.Note

func (*Item) GetPersons

func (item *Item) GetPersons() []gsearch.Person

func (*Item) GetPlace

func (item *Item) GetPlace() string

func (*Item) GetPoster

func (item *Item) GetPoster(ms *zotmedia.MediaserverMySQL) *gsearch.Media

func (*Item) GetQueries

func (item *Item) GetQueries() []gsearch.Query

func (*Item) GetReferences

func (item *Item) GetReferences() []gsearch.Reference

func (*Item) GetSolrDoc

func (item *Item) GetSolrDoc() *solr.Document

func (*Item) GetTags

func (item *Item) GetTags() []string

func (*Item) GetTitle

func (item *Item) GetTitle() string

func (*Item) GetType

func (item *Item) GetType() (string, error)

func (*Item) Name

func (item *Item) Name() string

func (*Item) UpdateCloud

func (item *Item) UpdateCloud(lastModifiedVersion *int64) error

func (*Item) UpdateLocal

func (item *Item) UpdateLocal() error

type ItemArtwork

type ItemArtwork struct {
	ItemDataBase
	Title           string `json:"title,omitempty"`           // Title
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	ArtworkMedium   string `json:"artworkMedium,omitempty"`   // Medium
	ArtworkSize     string `json:"artworkSize,omitempty"`     // Artwork Size
	Date            string `json:"date,omitempty"`            // Date
	Language        string `json:"language,omitempty"`        // Language
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Archive         string `json:"archive,omitempty"`         // Archive
	ArchiveLocation string `json:"archiveLocation,omitempty"` // Loc. in Archive
	LibraryCatalog  string `json:"libraryCatalog,omitempty"`  // Library Catalog
	CallNumber      string `json:"callNumber,omitempty"`      // Call Number
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemAudioRecording

type ItemAudioRecording struct {
	ItemDataBase
	Title                string `json:"title,omitempty"`                // Title
	AbstractNote         string `json:"abstractNote,omitempty"`         // Note
	AudioRecordingFormat string `json:"audioRecordingFormat,omitempty"` // Format
	SeriesTitle          string `json:"seriesTitle,omitempty"`          // Series Title
	Volume               string `json:"volume,omitempty"`               // Volume
	NumberOfVolumes      string `json:"numberOfVolumes,omitempty"`      // # of Volumes
	Place                string `json:"place,omitempty"`                // Place
	Label                string `json:"label,omitempty"`                // Label
	Date                 string `json:"date,omitempty"`                 // Date
	RunningTime          string `json:"runningTime,omitempty"`          // Running Time
	Language             string `json:"language,omitempty"`             // Language
	ISBN                 string `json:"ISBN,omitempty"`                 // ISBN
	ShortTitle           string `json:"shortTitle,omitempty"`           // Short Title
	Archive              string `json:"archive,omitempty"`              // Archive
	ArchiveLocation      string `json:"archiveLocation,omitempty"`      // Loc. in Archive
	LibraryCatalog       string `json:"libraryCatalog,omitempty"`       // Library Catalog
	CallNumber           string `json:"callNumber,omitempty"`           // Call Number
	Url                  string `json:"url,omitempty"`                  // URL
	AccessDate           string `json:"accessDate,omitempty"`           // Accessed
	Rights               string `json:"rights,omitempty"`               // Rights
	Extra                string `json:"extra,omitempty"`                // Extra
}

type ItemBill

type ItemBill struct {
	ItemDataBase
	Title           string `json:"title,omitempty"`           // Title
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	BillNumber      string `json:"billNumber,omitempty"`      // Bill Number
	Code            string `json:"code,omitempty"`            // Code
	CodeVolume      string `json:"codeVolume,omitempty"`      // Code Volume
	Section         string `json:"section,omitempty"`         // Section
	CodePages       string `json:"codePages,omitempty"`       // Code Pages
	LegislativeBody string `json:"legislativeBody,omitempty"` // Legislative Body
	Session         string `json:"session,omitempty"`         // Session
	History         string `json:"history,omitempty"`         // History
	Date            string `json:"date,omitempty"`            // Date
	Language        string `json:"language,omitempty"`        // Language
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemBlogPost

type ItemBlogPost struct {
	ItemDataBase
	Title        string `json:"title,omitempty"`        // Title
	AbstractNote string `json:"abstractNote,omitempty"` // Note
	BlogTitle    string `json:"blogTitle,omitempty"`    // Blog Title
	WebsiteType  string `json:"websiteType,omitempty"`  // Website Type
	Date         string `json:"date,omitempty"`         // Date
	Url          string `json:"url,omitempty"`          // URL
	AccessDate   string `json:"accessDate,omitempty"`   // Accessed
	Language     string `json:"language,omitempty"`     // Language
	ShortTitle   string `json:"shortTitle,omitempty"`   // Short Title
	Rights       string `json:"rights,omitempty"`       // Rights
	Extra        string `json:"extra,omitempty"`        // Extra
}

type ItemBook

type ItemBook struct {
	ItemDataBase
	Title           string `json:"title,omitempty"`           // Title
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	Series          string `json:"series,omitempty"`          // Series
	SeriesNumber    string `json:"seriesNumber,omitempty"`    // Series Number
	Volume          string `json:"volume,omitempty"`          // Volume
	NumberOfVolumes string `json:"numberOfVolumes,omitempty"` // # of Volumes
	Edition         string `json:"edition,omitempty"`         // Edition
	Place           string `json:"place,omitempty"`           // Place
	Publisher       string `json:"publisher,omitempty"`       // Publisher
	Date            string `json:"date,omitempty"`            // Date
	NumPages        string `json:"numPages,omitempty"`        // # of Pages
	Language        string `json:"language,omitempty"`        // Language
	ISBN            string `json:"ISBN,omitempty"`            // ISBN
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	Archive         string `json:"archive,omitempty"`         // Archive
	ArchiveLocation string `json:"archiveLocation,omitempty"` // Loc. in Archive
	LibraryCatalog  string `json:"libraryCatalog,omitempty"`  // Library Catalog
	CallNumber      string `json:"callNumber,omitempty"`      // Call Number
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemBookSection

type ItemBookSection struct {
	ItemDataBase
	Title           string `json:"title,omitempty"`           // Title
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	BookTitle       string `json:"bookTitle,omitempty"`       // Book Title
	Series          string `json:"series,omitempty"`          // Series
	SeriesNumber    string `json:"seriesNumber,omitempty"`    // Series Number
	Volume          string `json:"volume,omitempty"`          // Volume
	NumberOfVolumes string `json:"numberOfVolumes,omitempty"` // # of Volumes
	Edition         string `json:"edition,omitempty"`         // Edition
	Place           string `json:"place,omitempty"`           // Place
	Publisher       string `json:"publisher,omitempty"`       // Publisher
	Date            string `json:"date,omitempty"`            // Date
	Pages           string `json:"pages,omitempty"`           // Pages
	Language        string `json:"language,omitempty"`        // Language
	ISBN            string `json:"ISBN,omitempty"`            // ISBN
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	Archive         string `json:"archive,omitempty"`         // Archive
	ArchiveLocation string `json:"archiveLocation,omitempty"` // Loc. in Archive
	LibraryCatalog  string `json:"libraryCatalog,omitempty"`  // Library Catalog
	CallNumber      string `json:"callNumber,omitempty"`      // Call Number
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemCase

type ItemCase struct {
	ItemDataBase
	CaseName       string `json:"caseName,omitempty"`       // Case Name
	AbstractNote   string `json:"abstractNote,omitempty"`   // Note
	Reporter       string `json:"reporter,omitempty"`       // Reporter
	ReporterVolume string `json:"reporterVolume,omitempty"` // Reporter Volume
	Court          string `json:"court,omitempty"`          // Court
	DocketNumber   string `json:"docketNumber,omitempty"`   // Docket Number
	FirstPage      string `json:"firstPage,omitempty"`      // First Page
	History        string `json:"history,omitempty"`        // History
	DateDecided    string `json:"dateDecided,omitempty"`    // Date Decided
	Language       string `json:"language,omitempty"`       // Language
	ShortTitle     string `json:"shortTitle,omitempty"`     // Short Title
	Url            string `json:"url,omitempty"`            // URL
	AccessDate     string `json:"accessDate,omitempty"`     // Accessed
	Rights         string `json:"rights,omitempty"`         // Rights
	Extra          string `json:"extra,omitempty"`          // Extra
}

type ItemCollectionCreateResult

type ItemCollectionCreateResult struct {
	Success    map[string]string                           `json:"success"`
	Unchanged  map[string]string                           `json:"unchanged"`
	Failed     map[string]ItemCollectionCreateResultFailed `json:"failed"`
	Successful map[string]Item                             `json:"successful"`
}

type ItemCollectionCreateResultFailed

type ItemCollectionCreateResultFailed struct {
	Key     string `json:"key"`
	Code    int64  `json:"code"`
	Message string `json:"message"`
}

type ItemComputerProgram

type ItemComputerProgram struct {
	ItemDataBase
	Title               string `json:"title,omitempty"`               // Title
	AbstractNote        string `json:"abstractNote,omitempty"`        // Note
	SeriesTitle         string `json:"seriesTitle,omitempty"`         // Series Title
	VersionNumber       string `json:"versionNumber,omitempty"`       // Version
	Date                string `json:"date,omitempty"`                // Date
	System              string `json:"system,omitempty"`              // System
	Place               string `json:"place,omitempty"`               // Place
	Company             string `json:"company,omitempty"`             // Company
	ProgrammingLanguage string `json:"programmingLanguage,omitempty"` // Language
	ISBN                string `json:"ISBN,omitempty"`                // ISBN
	ShortTitle          string `json:"shortTitle,omitempty"`          // Short Title
	Url                 string `json:"url,omitempty"`                 // URL
	Rights              string `json:"rights,omitempty"`              // Rights
	Archive             string `json:"archive,omitempty"`             // Archive
	ArchiveLocation     string `json:"archiveLocation,omitempty"`     // Loc. in Archive
	LibraryCatalog      string `json:"libraryCatalog,omitempty"`      // Library Catalog
	CallNumber          string `json:"callNumber,omitempty"`          // Call Number
	AccessDate          string `json:"accessDate,omitempty"`          // Accessed
	Extra               string `json:"extra,omitempty"`               // Extra
}

type ItemConferencePaper

type ItemConferencePaper struct {
	ItemDataBase
	Title            string `json:"title,omitempty"`            // Title
	AbstractNote     string `json:"abstractNote,omitempty"`     // Note
	Date             string `json:"date,omitempty"`             // Date
	ProceedingsTitle string `json:"proceedingsTitle,omitempty"` // Proceedings Title
	ConferenceName   string `json:"conferenceName,omitempty"`   // Conference Name
	Place            string `json:"place,omitempty"`            // Place
	Publisher        string `json:"publisher,omitempty"`        // Publisher
	Volume           string `json:"volume,omitempty"`           // Volume
	Pages            string `json:"pages,omitempty"`            // Pages
	Series           string `json:"series,omitempty"`           // Series
	Language         string `json:"language,omitempty"`         // Language
	DOI              string `json:"DOI,omitempty"`              // DOI
	ISBN             string `json:"ISBN,omitempty"`             // ISBN
	ShortTitle       string `json:"shortTitle,omitempty"`       // Short Title
	Url              string `json:"url,omitempty"`              // URL
	AccessDate       string `json:"accessDate,omitempty"`       // Accessed
	Archive          string `json:"archive,omitempty"`          // Archive
	ArchiveLocation  string `json:"archiveLocation,omitempty"`  // Loc. in Archive
	LibraryCatalog   string `json:"libraryCatalog,omitempty"`   // Library Catalog
	CallNumber       string `json:"callNumber,omitempty"`       // Call Number
	Rights           string `json:"rights,omitempty"`           // Rights
	Extra            string `json:"extra,omitempty"`            // Extra
}

type ItemDataAttachment

type ItemDataAttachment struct {
	ItemDataBase
	Title       string `json:"title"`
	LinkMode    string `json:"linkMode"`
	AccessDate  string `json:"accessDate"`
	Url         string `json:"url"`
	Note        string `json:"note"`
	ContentType string `json:"contentType"`
	Charset     string `json:"charset"`
	Filename    string `json:"filename"`
	MD5         string `json:"md5,omitempty"`
	MTime       int64  `json:"mtime"`
}

type ItemDataBase

type ItemDataBase struct {
	Key          string                      `json:"key,omitempty"`
	Version      int64                       `json:"version"`
	ItemType     string                      `json:"itemType"`
	Tags         []ItemTag                   `json:"tags"`
	Relations    map[string]ZoteroStringList `json:"relations"`
	ParentItem   Parent                      `json:"parentItem,omitempty"`
	Collections  []string                    `json:"collections"`
	DateAdded    string                      `json:"dateAdded,omitempty"`
	DateModified string                      `json:"dateModified,omitempty"`
	Creators     []ItemDataPerson            `json:"creators,omitempty"`
}

type ItemDataNote

type ItemDataNote struct {
	ItemDataBase
	Note string `json:"note"`
}

type ItemDataPerson

type ItemDataPerson struct {
	CreatorType string `json:"creatorType"`
	FirstName   string `json:"firstName"`
	LastName    string `json:"lastName"`
}

type ItemDictionaryEntry

type ItemDictionaryEntry struct {
	ItemDataBase
	Title           string `json:"title,omitempty"`           // Title
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	DictionaryTitle string `json:"dictionaryTitle,omitempty"` // Dictionary Title
	Series          string `json:"series,omitempty"`          // Series
	SeriesNumber    string `json:"seriesNumber,omitempty"`    // Series Number
	Volume          string `json:"volume,omitempty"`          // Volume
	NumberOfVolumes string `json:"numberOfVolumes,omitempty"` // # of Volumes
	Edition         string `json:"edition,omitempty"`         // Edition
	Place           string `json:"place,omitempty"`           // Place
	Publisher       string `json:"publisher,omitempty"`       // Publisher
	Date            string `json:"date,omitempty"`            // Date
	Pages           string `json:"pages,omitempty"`           // Pages
	Language        string `json:"language,omitempty"`        // Language
	ISBN            string `json:"ISBN,omitempty"`            // ISBN
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	Archive         string `json:"archive,omitempty"`         // Archive
	ArchiveLocation string `json:"archiveLocation,omitempty"` // Loc. in Archive
	LibraryCatalog  string `json:"libraryCatalog,omitempty"`  // Library Catalog
	CallNumber      string `json:"callNumber,omitempty"`      // Call Number
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemDocument

type ItemDocument struct {
	ItemDataBase
	Title           string `json:"title,omitempty"`           // Title
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	Publisher       string `json:"publisher,omitempty"`       // Publisher
	Date            string `json:"date,omitempty"`            // Date
	Language        string `json:"language,omitempty"`        // Language
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	Archive         string `json:"archive,omitempty"`         // Archive
	ArchiveLocation string `json:"archiveLocation,omitempty"` // Loc. in Archive
	LibraryCatalog  string `json:"libraryCatalog,omitempty"`  // Library Catalog
	CallNumber      string `json:"callNumber,omitempty"`      // Call Number
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemEmail

type ItemEmail struct {
	ItemDataBase
	Subject      string `json:"subject,omitempty"`      // Subject
	AbstractNote string `json:"abstractNote,omitempty"` // Note
	Date         string `json:"date,omitempty"`         // Date
	ShortTitle   string `json:"shortTitle,omitempty"`   // Short Title
	Url          string `json:"url,omitempty"`          // URL
	AccessDate   string `json:"accessDate,omitempty"`   // Accessed
	Language     string `json:"language,omitempty"`     // Language
	Rights       string `json:"rights,omitempty"`       // Rights
	Extra        string `json:"extra,omitempty"`        // Extra
}

type ItemEncyclopediaArticle

type ItemEncyclopediaArticle struct {
	ItemDataBase
	Title             string `json:"title,omitempty"`             // Title
	AbstractNote      string `json:"abstractNote,omitempty"`      // Note
	EncyclopediaTitle string `json:"encyclopediaTitle,omitempty"` // Encyclopedia Title
	Series            string `json:"series,omitempty"`            // Series
	SeriesNumber      string `json:"seriesNumber,omitempty"`      // Series Number
	Volume            string `json:"volume,omitempty"`            // Volume
	NumberOfVolumes   string `json:"numberOfVolumes,omitempty"`   // # of Volumes
	Edition           string `json:"edition,omitempty"`           // Edition
	Place             string `json:"place,omitempty"`             // Place
	Publisher         string `json:"publisher,omitempty"`         // Publisher
	Date              string `json:"date,omitempty"`              // Date
	Pages             string `json:"pages,omitempty"`             // Pages
	ISBN              string `json:"ISBN,omitempty"`              // ISBN
	ShortTitle        string `json:"shortTitle,omitempty"`        // Short Title
	Url               string `json:"url,omitempty"`               // URL
	AccessDate        string `json:"accessDate,omitempty"`        // Accessed
	Language          string `json:"language,omitempty"`          // Language
	Archive           string `json:"archive,omitempty"`           // Archive
	ArchiveLocation   string `json:"archiveLocation,omitempty"`   // Loc. in Archive
	LibraryCatalog    string `json:"libraryCatalog,omitempty"`    // Library Catalog
	CallNumber        string `json:"callNumber,omitempty"`        // Call Number
	Rights            string `json:"rights,omitempty"`            // Rights
	Extra             string `json:"extra,omitempty"`             // Extra
}

type ItemFilm

type ItemFilm struct {
	ItemDataBase
	Title                string `json:"title,omitempty"`                // Title
	AbstractNote         string `json:"abstractNote,omitempty"`         // Note
	Distributor          string `json:"distributor,omitempty"`          // Distributor
	Date                 string `json:"date,omitempty"`                 // Date
	Genre                string `json:"genre,omitempty"`                // Genre
	VideoRecordingFormat string `json:"videoRecordingFormat,omitempty"` // Format
	RunningTime          string `json:"runningTime,omitempty"`          // Running Time
	Language             string `json:"language,omitempty"`             // Language
	ShortTitle           string `json:"shortTitle,omitempty"`           // Short Title
	Url                  string `json:"url,omitempty"`                  // URL
	AccessDate           string `json:"accessDate,omitempty"`           // Accessed
	Archive              string `json:"archive,omitempty"`              // Archive
	ArchiveLocation      string `json:"archiveLocation,omitempty"`      // Loc. in Archive
	LibraryCatalog       string `json:"libraryCatalog,omitempty"`       // Library Catalog
	CallNumber           string `json:"callNumber,omitempty"`           // Call Number
	Rights               string `json:"rights,omitempty"`               // Rights
	Extra                string `json:"extra,omitempty"`                // Extra
}

type ItemForumPost

type ItemForumPost struct {
	ItemDataBase
	Title        string `json:"title,omitempty"`        // Title
	AbstractNote string `json:"abstractNote,omitempty"` // Note
	ForumTitle   string `json:"forumTitle,omitempty"`   // Forum/Listserv Title
	PostType     string `json:"postType,omitempty"`     // Post Type
	Date         string `json:"date,omitempty"`         // Date
	Language     string `json:"language,omitempty"`     // Language
	ShortTitle   string `json:"shortTitle,omitempty"`   // Short Title
	Url          string `json:"url,omitempty"`          // URL
	AccessDate   string `json:"accessDate,omitempty"`   // Accessed
	Rights       string `json:"rights,omitempty"`       // Rights
	Extra        string `json:"extra,omitempty"`        // Extra
}

type ItemGeneric

type ItemGeneric struct {
	ItemDataBase
	NumPages             string `json:"numPages,omitempty"`             // # of Pages
	NumberOfVolumes      string `json:"numberOfVolumes,omitempty"`      // # of Volumes
	AbstractNote         string `json:"abstractNote,omitempty"`         // Note
	AccessDate           string `json:"accessDate,omitempty"`           // Accessed
	ApplicationNumber    string `json:"applicationNumber,omitempty"`    // Application Number
	Archive              string `json:"archive,omitempty"`              // Archive
	ArtworkSize          string `json:"artworkSize,omitempty"`          // Artwork Size
	Assignee             string `json:"assignee,omitempty"`             // Assignee
	BillNumber           string `json:"billNumber,omitempty"`           // Bill Number
	BlogTitle            string `json:"blogTitle,omitempty"`            // Blog Title
	BookTitle            string `json:"bookTitle,omitempty"`            // Book Title
	CallNumber           string `json:"callNumber,omitempty"`           // Call Number
	CaseName             string `json:"caseName,omitempty"`             // Case Name
	Code                 string `json:"code,omitempty"`                 // Code
	CodeNumber           string `json:"codeNumber,omitempty"`           // Code Number
	CodePages            string `json:"codePages,omitempty"`            // Code Pages
	CodeVolume           string `json:"codeVolume,omitempty"`           // Code Volume
	Committee            string `json:"committee,omitempty"`            // Committee
	Company              string `json:"company,omitempty"`              // Company
	ConferenceName       string `json:"conferenceName,omitempty"`       // Conference Name
	Country              string `json:"country,omitempty"`              // Country
	Court                string `json:"court,omitempty"`                // Court
	DOI                  string `json:"DOI,omitempty"`                  // DOI
	Date                 string `json:"date,omitempty"`                 // Date
	DateDecided          string `json:"dateDecided,omitempty"`          // Date Decided
	DateEnacted          string `json:"dateEnacted,omitempty"`          // Date Enacted
	DictionaryTitle      string `json:"dictionaryTitle,omitempty"`      // Dictionary Title
	Distributor          string `json:"distributor,omitempty"`          // Distributor
	DocketNumber         string `json:"docketNumber,omitempty"`         // Docket Number
	DocumentNumber       string `json:"documentNumber,omitempty"`       // Document Number
	Edition              string `json:"edition,omitempty"`              // Edition
	EncyclopediaTitle    string `json:"encyclopediaTitle,omitempty"`    // Encyclopedia Title
	EpisodeNumber        string `json:"episodeNumber,omitempty"`        // Episode Number
	Extra                string `json:"extra,omitempty"`                // Extra
	AudioFileType        string `json:"audioFileType,omitempty"`        // File Type
	FilingDate           string `json:"filingDate,omitempty"`           // Filing Date
	FirstPage            string `json:"firstPage,omitempty"`            // First Page
	AudioRecordingFormat string `json:"audioRecordingFormat,omitempty"` // Format
	VideoRecordingFormat string `json:"videoRecordingFormat,omitempty"` // Format
	ForumTitle           string `json:"forumTitle,omitempty"`           // Forum/Listserv Title
	Genre                string `json:"genre,omitempty"`                // Genre
	History              string `json:"history,omitempty"`              // History
	ISBN                 string `json:"ISBN,omitempty"`                 // ISBN
	ISSN                 string `json:"ISSN,omitempty"`                 // ISSN
	Institution          string `json:"institution,omitempty"`          // Institution
	Issue                string `json:"issue,omitempty"`                // Issue
	IssueDate            string `json:"issueDate,omitempty"`            // Issue Date
	IssuingAuthority     string `json:"issuingAuthority,omitempty"`     // Issuing Authority
	JournalAbbreviation  string `json:"journalAbbreviation,omitempty"`  // Journal Abbr
	Label                string `json:"label,omitempty"`                // Label
	Language             string `json:"language,omitempty"`             // Language
	ProgrammingLanguage  string `json:"programmingLanguage,omitempty"`  // Language
	LegalStatus          string `json:"legalStatus,omitempty"`          // Legal Status
	LegislativeBody      string `json:"legislativeBody,omitempty"`      // Legislative Body
	LibraryCatalog       string `json:"libraryCatalog,omitempty"`       // Library Catalog
	ArchiveLocation      string `json:"archiveLocation,omitempty"`      // Loc. in Archive
	InterviewMedium      string `json:"interviewMedium,omitempty"`      // Medium
	ArtworkMedium        string `json:"artworkMedium,omitempty"`        // Medium
	MeetingName          string `json:"meetingName,omitempty"`          // Meeting Name
	NameOfAct            string `json:"nameOfAct,omitempty"`            // Name of Act
	Network              string `json:"network,omitempty"`              // Network
	Pages                string `json:"pages,omitempty"`                // Pages
	PatentNumber         string `json:"patentNumber,omitempty"`         // Patent Number
	Place                string `json:"place,omitempty"`                // Place
	PostType             string `json:"postType,omitempty"`             // Post Type
	PriorityNumbers      string `json:"priorityNumbers,omitempty"`      // Priority Numbers
	ProceedingsTitle     string `json:"proceedingsTitle,omitempty"`     // Proceedings Title
	ProgramTitle         string `json:"programTitle,omitempty"`         // Program Title
	PublicLawNumber      string `json:"publicLawNumber,omitempty"`      // Public Law Number
	PublicationTitle     string `json:"publicationTitle,omitempty"`     // Publication
	Publisher            string `json:"publisher,omitempty"`            // Publisher
	References           string `json:"references,omitempty"`           // References
	ReportNumber         string `json:"reportNumber,omitempty"`         // Report Number
	ReportType           string `json:"reportType,omitempty"`           // Report Type
	Reporter             string `json:"reporter,omitempty"`             // Reporter
	ReporterVolume       string `json:"reporterVolume,omitempty"`       // Reporter Volume
	Rights               string `json:"rights,omitempty"`               // Rights
	RunningTime          string `json:"runningTime,omitempty"`          // Running Time
	Scale                string `json:"scale,omitempty"`                // Scale
	Section              string `json:"section,omitempty"`              // Section
	Series               string `json:"series,omitempty"`               // Series
	SeriesNumber         string `json:"seriesNumber,omitempty"`         // Series Number
	SeriesText           string `json:"seriesText,omitempty"`           // Series Text
	SeriesTitle          string `json:"seriesTitle,omitempty"`          // Series Title
	Session              string `json:"session,omitempty"`              // Session
	ShortTitle           string `json:"shortTitle,omitempty"`           // Short Title
	Studio               string `json:"studio,omitempty"`               // Studio
	Subject              string `json:"subject,omitempty"`              // Subject
	System               string `json:"system,omitempty"`               // System
	Title                string `json:"title,omitempty"`                // Title
	ThesisType           string `json:"thesisType,omitempty"`           // Type
	PresentationType     string `json:"presentationType,omitempty"`     // Type
	MapType              string `json:"mapType,omitempty"`              // Type
	ManuscriptType       string `json:"manuscriptType,omitempty"`       // Type
	LetterType           string `json:"letterType,omitempty"`           // Type
	Url                  string `json:"url,omitempty"`                  // URL
	University           string `json:"university,omitempty"`           // University
	VersionNumber        string `json:"versionNumber,omitempty"`        // Version
	Volume               string `json:"volume,omitempty"`               // Volume
	WebsiteTitle         string `json:"websiteTitle,omitempty"`         // Website Title
	WebsiteType          string `json:"websiteType,omitempty"`          // Website Type

	// Attachment
	LinkMode    string `json:"linkMode,omitempty"`
	Note        string `json:"note,omitempty"`
	ContentType string `json:"contentType,omitempty"`
	Charset     string `json:"charset,omitempty"`
	Filename    string `json:"filename,omitempty"`
	MD5         string `json:"md5,omitempty"`
	MTime       int64  `json:"mtime,omitempty"`
}

type ItemGitlab

type ItemGitlab struct {
	LibraryId int64       `json:libraryid`
	Key       string      `json:"id"`
	Data      ItemGeneric `json:"data"`
	Meta      ItemMeta    `json:"meta"`
}

type ItemHearing

type ItemHearing struct {
	ItemDataBase

	Title           string `json:"title,omitempty"`           // Title
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	Committee       string `json:"committee,omitempty"`       // Committee
	Place           string `json:"place,omitempty"`           // Place
	Publisher       string `json:"publisher,omitempty"`       // Publisher
	NumberOfVolumes string `json:"numberOfVolumes,omitempty"` // # of Volumes
	DocumentNumber  string `json:"documentNumber,omitempty"`  // Document Number
	Pages           string `json:"pages,omitempty"`           // Pages
	LegislativeBody string `json:"legislativeBody,omitempty"` // Legislative Body
	Session         string `json:"session,omitempty"`         // Session
	History         string `json:"history,omitempty"`         // History
	Date            string `json:"date,omitempty"`            // Date
	Language        string `json:"language,omitempty"`        // Language
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemInstantMessage

type ItemInstantMessage struct {
	ItemDataBase

	Title        string `json:"title,omitempty"`        // Title
	AbstractNote string `json:"abstractNote,omitempty"` // Note
	Date         string `json:"date,omitempty"`         // Date
	Language     string `json:"language,omitempty"`     // Language
	ShortTitle   string `json:"shortTitle,omitempty"`   // Short Title
	Url          string `json:"url,omitempty"`          // URL
	AccessDate   string `json:"accessDate,omitempty"`   // Accessed
	Rights       string `json:"rights,omitempty"`       // Rights
	Extra        string `json:"extra,omitempty"`        // Extra
}

type ItemInterview

type ItemInterview struct {
	ItemDataBase

	Title           string `json:"title,omitempty"`           // Title
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	Date            string `json:"date,omitempty"`            // Date
	InterviewMedium string `json:"interviewMedium,omitempty"` // Medium
	Language        string `json:"language,omitempty"`        // Language
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	Archive         string `json:"archive,omitempty"`         // Archive
	ArchiveLocation string `json:"archiveLocation,omitempty"` // Loc. in Archive
	LibraryCatalog  string `json:"libraryCatalog,omitempty"`  // Library Catalog
	CallNumber      string `json:"callNumber,omitempty"`      // Call Number
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemJournalArticle

type ItemJournalArticle struct {
	ItemDataBase
	Title               string `json:"title,omitempty"`               // Title
	AbstractNote        string `json:"abstractNote,omitempty"`        // Note
	PublicationTitle    string `json:"publicationTitle,omitempty"`    // Publication
	Volume              string `json:"volume,omitempty"`              // Volume
	Issue               string `json:"issue,omitempty"`               // Issue
	Pages               string `json:"pages,omitempty"`               // Pages
	Date                string `json:"date,omitempty"`                // Date
	Series              string `json:"series,omitempty"`              // Series
	SeriesTitle         string `json:"seriesTitle,omitempty"`         // Series Title
	SeriesText          string `json:"seriesText,omitempty"`          // Series Text
	JournalAbbreviation string `json:"journalAbbreviation,omitempty"` // Journal Abbr
	Language            string `json:"language,omitempty"`            // Language
	DOI                 string `json:"DOI,omitempty"`                 // DOI
	ISSN                string `json:"ISSN,omitempty"`                // ISSN
	ShortTitle          string `json:"shortTitle,omitempty"`          // Short Title
	Url                 string `json:"url,omitempty"`                 // URL
	AccessDate          string `json:"accessDate,omitempty"`          // Accessed
	Archive             string `json:"archive,omitempty"`             // Archive
	ArchiveLocation     string `json:"archiveLocation,omitempty"`     // Loc. in Archive
	LibraryCatalog      string `json:"libraryCatalog,omitempty"`      // Library Catalog
	CallNumber          string `json:"callNumber,omitempty"`          // Call Number
	Rights              string `json:"rights,omitempty"`              // Rights
	Extra               string `json:"extra,omitempty"`               // Extra
}

type ItemLetter

type ItemLetter struct {
	ItemDataBase

	Title           string `json:"title,omitempty"`           // Title
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	LetterType      string `json:"letterType,omitempty"`      // Type
	Date            string `json:"date,omitempty"`            // Date
	Language        string `json:"language,omitempty"`        // Language
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	Archive         string `json:"archive,omitempty"`         // Archive
	ArchiveLocation string `json:"archiveLocation,omitempty"` // Loc. in Archive
	LibraryCatalog  string `json:"libraryCatalog,omitempty"`  // Library Catalog
	CallNumber      string `json:"callNumber,omitempty"`      // Call Number
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemMagazineArticle

type ItemMagazineArticle struct {
	ItemDataBase
	Title            string `json:"title,omitempty"`            // Title
	AbstractNote     string `json:"abstractNote,omitempty"`     // Note
	PublicationTitle string `json:"publicationTitle,omitempty"` // Publication
	Volume           string `json:"volume,omitempty"`           // Volume
	Issue            string `json:"issue,omitempty"`            // Issue
	Date             string `json:"date,omitempty"`             // Date
	Pages            string `json:"pages,omitempty"`            // Pages
	Language         string `json:"language,omitempty"`         // Language
	ISSN             string `json:"ISSN,omitempty"`             // ISSN
	ShortTitle       string `json:"shortTitle,omitempty"`       // Short Title
	Url              string `json:"url,omitempty"`              // URL
	AccessDate       string `json:"accessDate,omitempty"`       // Accessed
	Archive          string `json:"archive,omitempty"`          // Archive
	ArchiveLocation  string `json:"archiveLocation,omitempty"`  // Loc. in Archive
	LibraryCatalog   string `json:"libraryCatalog,omitempty"`   // Library Catalog
	CallNumber       string `json:"callNumber,omitempty"`       // Call Number
	Rights           string `json:"rights,omitempty"`           // Rights
	Extra            string `json:"extra,omitempty"`            // Extra
}

type ItemManuscript

type ItemManuscript struct {
	ItemDataBase

	Title           string `json:"title,omitempty"`           // Title
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	ManuscriptType  string `json:"manuscriptType,omitempty"`  // Type
	Place           string `json:"place,omitempty"`           // Place
	Date            string `json:"date,omitempty"`            // Date
	NumPages        string `json:"numPages,omitempty"`        // # of Pages
	Language        string `json:"language,omitempty"`        // Language
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	Archive         string `json:"archive,omitempty"`         // Archive
	ArchiveLocation string `json:"archiveLocation,omitempty"` // Loc. in Archive
	LibraryCatalog  string `json:"libraryCatalog,omitempty"`  // Library Catalog
	CallNumber      string `json:"callNumber,omitempty"`      // Call Number
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemMap

type ItemMap struct {
	ItemDataBase

	Title           string `json:"title,omitempty"`           // Title
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	MapType         string `json:"mapType,omitempty"`         // Type
	Scale           string `json:"scale,omitempty"`           // Scale
	SeriesTitle     string `json:"seriesTitle,omitempty"`     // Series Title
	Edition         string `json:"edition,omitempty"`         // Edition
	Place           string `json:"place,omitempty"`           // Place
	Publisher       string `json:"publisher,omitempty"`       // Publisher
	Date            string `json:"date,omitempty"`            // Date
	Language        string `json:"language,omitempty"`        // Language
	ISBN            string `json:"ISBN,omitempty"`            // ISBN
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	Archive         string `json:"archive,omitempty"`         // Archive
	ArchiveLocation string `json:"archiveLocation,omitempty"` // Loc. in Archive
	LibraryCatalog  string `json:"libraryCatalog,omitempty"`  // Library Catalog
	CallNumber      string `json:"callNumber,omitempty"`      // Call Number
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemMeta

type ItemMeta struct {
	CreatedByUser  User         `json:"createdByUser"`
	CreatorSummary string       `json:"creatorSummary,omitempty"`
	ParsedDate     StringOrBool `json:"parsedDate,omitempty"`
	NumChildren    int64        `json:"numChildren,omitempty"`
}

type ItemNewspaperArticle

type ItemNewspaperArticle struct {
	ItemDataBase
	Title            string `json:"title,omitempty"`            // Title
	AbstractNote     string `json:"abstractNote,omitempty"`     // Note
	PublicationTitle string `json:"publicationTitle,omitempty"` // Publication
	Place            string `json:"place,omitempty"`            // Place
	Edition          string `json:"edition,omitempty"`          // Edition
	Date             string `json:"date,omitempty"`             // Date
	Section          string `json:"section,omitempty"`          // Section
	Pages            string `json:"pages,omitempty"`            // Pages
	Language         string `json:"language,omitempty"`         // Language
	ShortTitle       string `json:"shortTitle,omitempty"`       // Short Title
	ISSN             string `json:"ISSN,omitempty"`             // ISSN
	Url              string `json:"url,omitempty"`              // URL
	AccessDate       string `json:"accessDate,omitempty"`       // Accessed
	Archive          string `json:"archive,omitempty"`          // Archive
	ArchiveLocation  string `json:"archiveLocation,omitempty"`  // Loc. in Archive
	LibraryCatalog   string `json:"libraryCatalog,omitempty"`   // Library Catalog
	CallNumber       string `json:"callNumber,omitempty"`       // Call Number
	Rights           string `json:"rights,omitempty"`           // Rights
	Extra            string `json:"extra,omitempty"`            // Extra
}

type ItemPatent

type ItemPatent struct {
	ItemDataBase
	Title             string `json:"title,omitempty"`             // Title
	AbstractNote      string `json:"abstractNote,omitempty"`      // Note
	Place             string `json:"place,omitempty"`             // Place
	Country           string `json:"country,omitempty"`           // Country
	Assignee          string `json:"assignee,omitempty"`          // Assignee
	IssuingAuthority  string `json:"issuingAuthority,omitempty"`  // Issuing Authority
	PatentNumber      string `json:"patentNumber,omitempty"`      // Patent Number
	FilingDate        string `json:"filingDate,omitempty"`        // Filing Date
	Pages             string `json:"pages,omitempty"`             // Pages
	ApplicationNumber string `json:"applicationNumber,omitempty"` // Application Number
	PriorityNumbers   string `json:"priorityNumbers,omitempty"`   // Priority Numbers
	IssueDate         string `json:"issueDate,omitempty"`         // Issue Date
	References        string `json:"references,omitempty"`        // References
	LegalStatus       string `json:"legalStatus,omitempty"`       // Legal Status
	Language          string `json:"language,omitempty"`          // Language
	ShortTitle        string `json:"shortTitle,omitempty"`        // Short Title
	Url               string `json:"url,omitempty"`               // URL
	AccessDate        string `json:"accessDate,omitempty"`        // Accessed
	Rights            string `json:"rights,omitempty"`            // Rights
	Extra             string `json:"extra,omitempty"`             // Extra
}

type ItemPodcast

type ItemPodcast struct {
	ItemDataBase
	Title         string `json:"title,omitempty"`         // Title
	AbstractNote  string `json:"abstractNote,omitempty"`  // Note
	SeriesTitle   string `json:"seriesTitle,omitempty"`   // Series Title
	EpisodeNumber string `json:"episodeNumber,omitempty"` // Episode Number
	AudioFileType string `json:"audioFileType,omitempty"` // File Type
	RunningTime   string `json:"runningTime,omitempty"`   // Running Time
	Url           string `json:"url,omitempty"`           // URL
	AccessDate    string `json:"accessDate,omitempty"`    // Accessed
	Language      string `json:"language,omitempty"`      // Language
	ShortTitle    string `json:"shortTitle,omitempty"`    // Short Title
	Rights        string `json:"rights,omitempty"`        // Rights
	Extra         string `json:"extra,omitempty"`         // Extra
}

type ItemPresentation

type ItemPresentation struct {
	ItemDataBase
	Title            string `json:"title,omitempty"`            // Title
	AbstractNote     string `json:"abstractNote,omitempty"`     // Note
	PresentationType string `json:"presentationType,omitempty"` // Type
	Date             string `json:"date,omitempty"`             // Date
	Place            string `json:"place,omitempty"`            // Place
	MeetingName      string `json:"meetingName,omitempty"`      // Meeting Name
	Url              string `json:"url,omitempty"`              // URL
	AccessDate       string `json:"accessDate,omitempty"`       // Accessed
	Language         string `json:"language,omitempty"`         // Language
	ShortTitle       string `json:"shortTitle,omitempty"`       // Short Title
	Rights           string `json:"rights,omitempty"`           // Rights
	Extra            string `json:"extra,omitempty"`            // Extra
}

type ItemRadioBroadcast

type ItemRadioBroadcast struct {
	ItemDataBase
	Title                string `json:"title,omitempty"`                // Title
	AbstractNote         string `json:"abstractNote,omitempty"`         // Note
	ProgramTitle         string `json:"programTitle,omitempty"`         // Program Title
	EpisodeNumber        string `json:"episodeNumber,omitempty"`        // Episode Number
	AudioRecordingFormat string `json:"audioRecordingFormat,omitempty"` // Format
	Place                string `json:"place,omitempty"`                // Place
	Network              string `json:"network,omitempty"`              // Network
	Date                 string `json:"date,omitempty"`                 // Date
	RunningTime          string `json:"runningTime,omitempty"`          // Running Time
	Language             string `json:"language,omitempty"`             // Language
	ShortTitle           string `json:"shortTitle,omitempty"`           // Short Title
	Url                  string `json:"url,omitempty"`                  // URL
	AccessDate           string `json:"accessDate,omitempty"`           // Accessed
	Archive              string `json:"archive,omitempty"`              // Archive
	ArchiveLocation      string `json:"archiveLocation,omitempty"`      // Loc. in Archive
	LibraryCatalog       string `json:"libraryCatalog,omitempty"`       // Library Catalog
	CallNumber           string `json:"callNumber,omitempty"`           // Call Number
	Rights               string `json:"rights,omitempty"`               // Rights
	Extra                string `json:"extra,omitempty"`                // Extra
}

type ItemReport

type ItemReport struct {
	ItemDataBase

	Title           string `json:"title,omitempty"`           // Title
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	ReportNumber    string `json:"reportNumber,omitempty"`    // Report Number
	ReportType      string `json:"reportType,omitempty"`      // Report Type
	SeriesTitle     string `json:"seriesTitle,omitempty"`     // Series Title
	Place           string `json:"place,omitempty"`           // Place
	Institution     string `json:"institution,omitempty"`     // Institution
	Date            string `json:"date,omitempty"`            // Date
	Pages           string `json:"pages,omitempty"`           // Pages
	Language        string `json:"language,omitempty"`        // Language
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	Archive         string `json:"archive,omitempty"`         // Archive
	ArchiveLocation string `json:"archiveLocation,omitempty"` // Loc. in Archive
	LibraryCatalog  string `json:"libraryCatalog,omitempty"`  // Library Catalog
	CallNumber      string `json:"callNumber,omitempty"`      // Call Number
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemStatute

type ItemStatute struct {
	ItemDataBase

	NameOfAct       string `json:"nameOfAct,omitempty"`       // Name of Act
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	Code            string `json:"code,omitempty"`            // Code
	CodeNumber      string `json:"codeNumber,omitempty"`      // Code Number
	PublicLawNumber string `json:"publicLawNumber,omitempty"` // Public Law Number
	DateEnacted     string `json:"dateEnacted,omitempty"`     // Date Enacted
	Pages           string `json:"pages,omitempty"`           // Pages
	Section         string `json:"section,omitempty"`         // Section
	Session         string `json:"session,omitempty"`         // Session
	History         string `json:"history,omitempty"`         // History
	Language        string `json:"language,omitempty"`        // Language
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemTag

type ItemTag struct {
	Tag  string `json:"tag"`
	Type int64  `json:"type,omitempty"`
}

type ItemThesis

type ItemThesis struct {
	ItemDataBase

	Title           string `json:"title,omitempty"`           // Title
	AbstractNote    string `json:"abstractNote,omitempty"`    // Note
	ThesisType      string `json:"thesisType,omitempty"`      // Type
	University      string `json:"university,omitempty"`      // University
	Place           string `json:"place,omitempty"`           // Place
	Date            string `json:"date,omitempty"`            // Date
	NumPages        string `json:"numPages,omitempty"`        // # of Pages
	Language        string `json:"language,omitempty"`        // Language
	ShortTitle      string `json:"shortTitle,omitempty"`      // Short Title
	Url             string `json:"url,omitempty"`             // URL
	AccessDate      string `json:"accessDate,omitempty"`      // Accessed
	Archive         string `json:"archive,omitempty"`         // Archive
	ArchiveLocation string `json:"archiveLocation,omitempty"` // Loc. in Archive
	LibraryCatalog  string `json:"libraryCatalog,omitempty"`  // Library Catalog
	CallNumber      string `json:"callNumber,omitempty"`      // Call Number
	Rights          string `json:"rights,omitempty"`          // Rights
	Extra           string `json:"extra,omitempty"`           // Extra
}

type ItemTvBroadcast

type ItemTvBroadcast struct {
	ItemDataBase
	Title                string `json:"title,omitempty"`                // Title
	AbstractNote         string `json:"abstractNote,omitempty"`         // Note
	ProgramTitle         string `json:"programTitle,omitempty"`         // Program Title
	EpisodeNumber        string `json:"episodeNumber,omitempty"`        // Episode Number
	VideoRecordingFormat string `json:"videoRecordingFormat,omitempty"` // Format
	Place                string `json:"place,omitempty"`                // Place
	Network              string `json:"network,omitempty"`              // Network
	Date                 string `json:"date,omitempty"`                 // Date
	RunningTime          string `json:"runningTime,omitempty"`          // Running Time
	Language             string `json:"language,omitempty"`             // Language
	ShortTitle           string `json:"shortTitle,omitempty"`           // Short Title
	Url                  string `json:"url,omitempty"`                  // URL
	AccessDate           string `json:"accessDate,omitempty"`           // Accessed
	Archive              string `json:"archive,omitempty"`              // Archive
	ArchiveLocation      string `json:"archiveLocation,omitempty"`      // Loc. in Archive
	LibraryCatalog       string `json:"libraryCatalog,omitempty"`       // Library Catalog
	CallNumber           string `json:"callNumber,omitempty"`           // Call Number
	Rights               string `json:"rights,omitempty"`               // Rights
	Extra                string `json:"extra,omitempty"`                // Extra
}

type ItemVideoRecording

type ItemVideoRecording struct {
	ItemDataBase
	Title                string `json:"title,omitempty"`                // Title
	AbstractNote         string `json:"abstractNote,omitempty"`         // Note
	VideoRecordingFormat string `json:"videoRecordingFormat,omitempty"` // Format
	SeriesTitle          string `json:"seriesTitle,omitempty"`          // Series Title
	Volume               string `json:"volume,omitempty"`               // Volume
	NumberOfVolumes      string `json:"numberOfVolumes,omitempty"`      // # of Volumes
	Place                string `json:"place,omitempty"`                // Place
	Studio               string `json:"studio,omitempty"`               // Studio
	Date                 string `json:"date,omitempty"`                 // Date
	RunningTime          string `json:"runningTime,omitempty"`          // Running Time
	Language             string `json:"language,omitempty"`             // Language
	ISBN                 string `json:"ISBN,omitempty"`                 // ISBN
	ShortTitle           string `json:"shortTitle,omitempty"`           // Short Title
	Url                  string `json:"url,omitempty"`                  // URL
	AccessDate           string `json:"accessDate,omitempty"`           // Accessed
	Archive              string `json:"archive,omitempty"`              // Archive
	ArchiveLocation      string `json:"archiveLocation,omitempty"`      // Loc. in Archive
	LibraryCatalog       string `json:"libraryCatalog,omitempty"`       // Library Catalog
	CallNumber           string `json:"callNumber,omitempty"`           // Call Number
	Rights               string `json:"rights,omitempty"`               // Rights
	Extra                string `json:"extra,omitempty"`                // Extra
}

type ItemWebpage

type ItemWebpage struct {
	ItemDataBase

	Title        string `json:"title,omitempty"`        // Title
	AbstractNote string `json:"abstractNote,omitempty"` // Note
	WebsiteTitle string `json:"websiteTitle,omitempty"` // Website Title
	WebsiteType  string `json:"websiteType,omitempty"`  // Website Type
	Date         string `json:"date,omitempty"`         // Date
	ShortTitle   string `json:"shortTitle,omitempty"`   // Short Title
	Url          string `json:"url,omitempty"`          // URL
	AccessDate   string `json:"accessDate,omitempty"`   // Accessed
	Language     string `json:"language,omitempty"`     // Language
	Rights       string `json:"rights,omitempty"`       // Rights
	Extra        string `json:"extra,omitempty"`        // Extra
}

type Library

type Library struct {
	Type  string      `json:"type"`
	Id    int64       `json:"id"`
	Name  string      `json:"name"`
	Links interface{} `json:"links"`
}

type Parent

type Parent string

zotero treats empty strings as false in ParentCollection

func (*Parent) UnmarshalJSON

func (pc *Parent) UnmarshalJSON(data []byte) error

type RelationList

type RelationList map[string]string

Relations are empty array or string map

func (*RelationList) UnmarshalJSON

func (rl *RelationList) UnmarshalJSON(data []byte) error

type StringOrBool

type StringOrBool string

func (*StringOrBool) UnmarshalJSON

func (sb *StringOrBool) UnmarshalJSON(b []byte) error

type SyncDirection

type SyncDirection int64
const (
	SyncDirection_None       SyncDirection = 0
	SyncDirection_ToCloud    SyncDirection = 1 // local --> cloud
	SyncDirection_ToLocal    SyncDirection = 2 // cloud --> local
	SyncDirection_BothCloud  SyncDirection = 3 // local <--> cloud / cloud is master
	SyncDirection_BothLocal  SyncDirection = 4 // local <--> cloud / local is master
	SyncDirection_BothManual SyncDirection = 5 // local <--> cloud / manual conflict resolution
)

type SyncStatus

type SyncStatus int64
const (
	SyncStatus_New        SyncStatus = 0
	SyncStatus_Synced     SyncStatus = 1
	SyncStatus_Modified   SyncStatus = 2
	SyncStatus_Incomplete SyncStatus = 3
)

type Tag

type Tag struct {
	Tag   string      `json:"tag"`
	Links interface{} `json:"links,omitempty"`
	Meta  *TagMeta    `json:"meta,omitempty"`
}

type TagMeta

type TagMeta struct {
	Type     int64 `json:"type"`
	NumItems int64 `json:"numItems"`
}

type User

type User struct {
	Id       int64       `json:"id"`
	Username string      `json:"username"`
	Links    interface{} `json:"links,omitempty"`
}

type Zotero

type Zotero struct {
	CurrentKey *ApiKey
	// contains filtered or unexported fields
}

func NewZotero

func NewZotero(baseUrl string, apiKey string, db *sql.DB, fs filesystem.FileSystem, dbSchema string, newGroupActive bool, logger *logging.Logger, dbOnly bool) (*Zotero, error)

func (*Zotero) CheckBackoff

func (zot *Zotero) CheckBackoff(header http.Header) bool

func (*Zotero) CheckRetry

func (zot *Zotero) CheckRetry(header http.Header) bool

* Clients accessing the Zotero API should be prepared to handle two forms of rate limiting: backoff requests and hard limiting. If the API servers are overloaded, the API may include a Backoff: <seconds> HTTP header in responses, indicating that the client should perform the minimum number of requests necessary to maintain data consistency and then refrain from making further requests for the number of seconds indicated. Backoff can be included in any response, including successful ones. If a client has made too many requests within a given time period, the API may return 429 Too Many Requests with a Retry-After: <seconds> header. Clients receiving a 429 should wait the number of seconds indicated in the header before retrying the request. Retry-After can also be included with 503 Service Unavailable responses when the server is undergoing maintenance.

func (*Zotero) CreateEmptyGroupLocal

func (zot *Zotero) CreateEmptyGroupLocal(groupId int64) (bool, SyncDirection, error)

func (*Zotero) DeleteCollectionDB

func (zot *Zotero) DeleteCollectionDB(key string) error

func (*Zotero) DeleteUnknownGroupsLocal

func (zot *Zotero) DeleteUnknownGroupsLocal(knownGroups []int64) error

func (*Zotero) GetFS

func (zot *Zotero) GetFS() filesystem.FileSystem

func (*Zotero) GetGroupCloud

func (zot *Zotero) GetGroupCloud(groupId int64) (*Group, error)

func (*Zotero) GetTypeStructs

func (zot *Zotero) GetTypeStructs() (str string)

func (*Zotero) GetUserGroupVersions

func (zot *Zotero) GetUserGroupVersions(key *ApiKey) (*map[int64]int64, error)

func (*Zotero) Init

func (zot *Zotero) Init() (err error)

func (*Zotero) LoadGroupLocal

func (zot *Zotero) LoadGroupLocal(groupId int64) (*Group, error)

func (*Zotero) LoadGroupsLocal

func (zot *Zotero) LoadGroupsLocal() ([]*Group, error)

type ZoteroStringList

type ZoteroStringList []string

zotero returns single item lists as string

func (*ZoteroStringList) UnmarshalJSON

func (irl *ZoteroStringList) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL