go-jmap icon indicating copy to clipboard operation
go-jmap copied to clipboard

JMAP Core implementation

Open foxcpp opened this issue 6 years ago • 1 comments

Reference: https://jmap.io/spec-core.html List below is nowhere complete.

  • [x] Fundamental types
    • [x] Int
    • [x] UnsignedInt
    • [x] Date
    • [x] UTCDate
    • [x] Id
  • [x] Autodiscovery
  • [ ] Structures for base JMAP Core objects
    • [x] Session
    • [x] Account
    • [x] Core Capabilities
    • [x] Request-level errors
    • [x] Invocation
      • [x] Method-level errors
      • [x] Decode Invocation "subtypes" using type -> decoder mapping.
    • [x] Request
    • [x] Response
    • [ ] Set-level errors
  • [ ] Core request objects
    • [ ] Object/get
    • [ ] Object/changes
    • [ ] Object/set
    • [ ] Object/copy
    • [ ] Object/query
    • [ ] Object/queryChanges
  • [x] Core/echo
  • [ ] Binary data I/O
    • [x] Downloading
    • [x] Uploading
    • [ ] Blob/Copy method
  • [ ] Push
    • [ ] StateChange structure
    • [ ] PushSubscription structure
      • [ ] PushSubscription/get
      • [ ] PushSubscription/set
    • [ ] Event Source
  • [x] Client interface
    • [x] Get Session object
    • [x] Interface to send request objects directly
    • [x] "Call batch builder" interface
    • [x] Binary I/O interface
  • [ ] Server interface
    • [ ] Base backend interface
    • [ ] Binary I/O backend interface
    • [ ] Method call dispatching

foxcpp avatar May 15 '19 22:05 foxcpp

I wonder if an interface like that is good to make it easier to construct Request objects...

b := client.Batch{}
b.Use(MailCapability)
b.Add("Todo/get", jmap.GetArgs{AccountId: "id", Ids: []jmap.ID{...}}, b.NextCallID())

b.NthCallID(1) // returns CallID of first request, for use in references

cl := client.Client{...}
resp, err := cl.Send(b)

foxcpp avatar May 22 '19 20:05 foxcpp