https://github.com/jonhadfield/gosn
A go library for Standard Notes
https://github.com/jonhadfield/gosn
golang golang-library standard-notes
Last synced: 5 months ago
JSON representation
A go library for Standard Notes
- Host: GitHub
- URL: https://github.com/jonhadfield/gosn
- Owner: jonhadfield
- License: mit
- Archived: true
- Created: 2018-09-10T21:03:54.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-07-09T17:26:49.000Z (almost 6 years ago)
- Last Synced: 2025-10-09T05:59:18.116Z (9 months ago)
- Topics: golang, golang-library, standard-notes
- Language: Go
- Size: 461 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gosn
[](https://www.travis-ci.org/jonhadfield/gosn) [](https://circleci.com/gh/jonhadfield/gosn/tree/master) [](https://godoc.org/github.com/jonhadfield/gosn/) [](https://goreportcard.com/report/github.com/jonhadfield/gosn)
### version 2 now available: [gosn-v2](https://github.com/jonhadfield/gosn-v2)
# about
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.
# installation
Using go get: ``` go get github.com/jonhadfield/gosn```
# documentation
- [guides](docs/index.md)
- [go docs](https://godoc.org/github.com/jonhadfield/gosn)
# basic usage
## authenticating
To interact with Standard Notes you first need to sign in:
```golang
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.
## getting items
```golang
input := GetItemsInput{
Session: sOut.Session,
}
gio, _ := GetItems(input)
```
## creating a note
```golang
# 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)
```