Documentation ¶
Overview ¶
Package edam handles interaction with the Evernote API, otherwise known as EDAM. Currently, a developer token is required to access an individual Evernote account. Read more at https://dev.evernote.com/doc/.
Index ¶
- Constants
- func MakeEnvFile(filename string) (err error)
- func NewNotebooksRepo() (entity.LocalRemoteRepo, error)
- func NewNotesRepo(rqp *NotesRemoteQueryParams) (entity.LocalRemoteRepo, error)
- func NewTagsRepo() (entity.LocalRemoteRepo, error)
- type CredentialsConfig
- type EvernoteService
- type Note
- type Notebook
- type Notebooks
- type Notes
- type NotesRemoteQueryParams
- type Tag
- type Tags
Constants ¶
const EvernoteServiceKey = "EVERNOTE_SERVICE"
EvernoteServiceKey is the name of the context key that stores the EDAM credential configuration values.
Variables ¶
This section is empty.
Functions ¶
func MakeEnvFile ¶
MakeEnvFile initializes a template file to store evernote production and sandbox credentials for later usage as environment variables. If a file already exists, then it exits early with an error.
func NewNotebooksRepo ¶
func NewNotebooksRepo() (entity.LocalRemoteRepo, error)
NewNotebooksRepo constructs a Notebooks repository.
func NewNotesRepo ¶
func NewNotesRepo(rqp *NotesRemoteQueryParams) (entity.LocalRemoteRepo, error)
NewNotesRepo constructs a Notes repository.
func NewTagsRepo ¶
func NewTagsRepo() (entity.LocalRemoteRepo, error)
NewTagsRepo constructs a Tags repository.
Types ¶
type CredentialsConfig ¶
type CredentialsConfig struct { EnvFilename string ServiceEnv EvernoteService }
CredentialsConfig says where to find credentials and which to ones to use.
type EvernoteService ¶
type EvernoteService uint8
EvernoteService enumerates different service environments when interacting with Evernote.
const ( // EvernoteSandboxService is a cautious default to operate on data in a // development environment, entirely separate from the production service. EvernoteSandboxService EvernoteService = iota // EvernoteProductionService signals that you want to use your production // Evernote account using production credentials. EvernoteProductionService )
func (EvernoteService) String ¶
func (d EvernoteService) String() string
type Note ¶
Note represents a note in an Evernote EDAM API call. It also provides methods to match with a Note in StandardNotes.
func (*Note) HTMLContent ¶
func (*Note) LinkValues ¶
type Notebook ¶
Notebook represents a notebook in an Evernote EDAM API call. Though it provides methods to match with a resource in StandardNotes, there is no equivalent to Notebook in StandardNotes; as of this writing, the closest thing is a Tag.
func NewNotebook ¶
NewNotebook constructs a basic *Notebook. It doesn't set all possible fields.
func (*Notebook) LinkValues ¶
type Notebooks ¶
type Notebooks struct{}
Notebooks handles input/output for notebooks from the Evernote EDAM API.
func (*Notebooks) FetchRemote ¶
FetchRemote gets Notebooks from the Evernote EDAM API.
type Notes ¶
type Notes struct {
// contains filtered or unexported fields
}
Notes handles input/output for notes from the Evernote EDAM API.
func (*Notes) FetchRemote ¶
FetchRemote gets Notes from the Evernote EDAM API. It can automatically perform pagination based on the param argument which should be of the concrete type, NotesQuery. Multiple API calls will be made until there are no more remaining results.
type NotesRemoteQueryParams ¶
type NotesRemoteQueryParams struct { LoIndex int HiIndex int PageSize int TagIDs []string NotebookID string Verbose bool }
NotesRemoteQueryParams is a set of named options for listing Evernote notes.
type Tag ¶
Tag represents a tag in an Evernote EDAM API call. It also provides methods to match with a Tag in StandardNotes.
func (*Tag) LinkValues ¶
type Tags ¶
type Tags struct{}
Tags handles input/output for tags from the Evernote EDAM API.
func (*Tags) FetchRemote ¶
FetchRemote gets Tags from the Evernote EDAM API.