version 2 now available: gosn-v2
Standard Notes is a service and application for the secure management and storage of notes.
gosn is a library to help develop your own application to manage notes on the official, or your self-hosted, Standard Notes server.
Using go get: go get github.com/jonhadfield/gosn
To interact with Standard Notes you first need to sign in:
sIn := gosn.SignInInput{
Email: "someone@example.com",
Password: "mysecret,
}
sOut, _ := gosn.SignIn(sIn)
This will return a session containing the necessary secrets and information to make requests to get or put data.
input := GetItemsInput{
Session: sOut.Session,
}
gio, _ := GetItems(input)
# create note content
content := NoteContent{
Title: "Note Title",
Text: "Note Text",
}
# create note
note := NewNote()
note.Content = content
# sync note
pii := PutItemsInput{
Session: sOut.Session,
Items: []gosn.Notes{note},
}
pio, _ := PutItems(pii)