Create Note with created and modified set

45 views
Skip to first unread message

Sampath Vangari

unread,
Dec 9, 2013, 9:49:15 AM12/9/13
to spring...@googlegroups.com
This is one of the note which I created using web interface and its fine.
[
  {
  "uuid":"/UUID(04363196-c948-42ec-827c-20030946796d)/",
  "contentId":"04363196-c948-42ec-827c-20030946796d",
  "type":"/Type(Note)/",
  "creator":"/UUID(04478215-a58d-47f3-b292-68548fa3604e)/",
  "creatorUsername":"vbsampath",
  "created":"\/Date(1357414080324)\/",
  "modified":"\/Date(1378229692015)\/",
  "name":"test note for springpad",
  "firstPublicUrl":null,
  "properties":
    {
    "workbooks":["04322887-248f-4c6f-b7d8-7fe5a88507d2"],
    "text":"test note for springpad api<br>",
    "\/meta\/url":"note\/testnoteforspringpad",
    "\/cached\/attributedUsername":"vbsampath",
    "\/cached\/old_text":"test note for springpad api<br>",
    "_text_version":2.0,
    "format":"text\/springpad",
    "\/meta\/published":false,
    "\/cached\/attributedUser":"04478215-a58d-47f3-b292-68548fa3604e",
    "\/cached\/workbooks_metadata":[
        {
        "theme":"gridpaper",
        "name":"iPhone Notes",
        "accent":"blue",
        "uuid":"04322887-248f-4c6f-b7d8-7fe5a88507d2",
        "public":false,
        "url":"notebook\/iphonenotes"
        }]
    }
  }]


Below is one note which Im trying to create using API and the data was ported from different source so 'created' and 'modified' dates are to be set as per my data and not when I create the note.
I have tried doing 'set' ,'propertyName','Value' method but the details are adding to properties section and not to main section and its not showing in web interface too (showing as created today)
Other try was to do 'add',,'propertyName','Value' method ..this didnt work and created invalid notes which I have to trash using web interface.

Output of the note which I'm trying to post by API

[
  [
    "create",
    "/Type(Note)/",
    "/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/"
  ],
  [
    "set",
    "/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
    "name",
    "Car deal"
  ],
  [
    "set",
    "/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
    "format",
    "text\/springpad"
  ],
  [
    "set",
    "/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
    "created",
    "\/Date(1331569207000)\/"
  ],
  [
    "set",
    "/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
    "modified",
    "\/Date(1331569246000)\/"
  ],
  [
    "set",
    "/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
    "_text_version",
    "2.0"
  ],
  [
    "set",
    "/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
    "text",
    "Car deal<div>Accent car</div><div>2lakhs negotiable (1.6-7)</div><div>Good condition</div><div>Satyam manager&amp;nbsp;Used only for office</div> "
  ],
  [
    "set",
    "/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
    "workbooks",
    [
      "04322887-248f-4c6f-b7d8-7fe5a88507d2"
    ]
  ]
]

My main query would be ..how to create a note with predefined created,modified date (because its data porting)

I also need more information on
_text_version
format
userAction
rich

Regis

unread,
Dec 9, 2013, 2:18:02 PM12/9/13
to spring...@googlegroups.com
Hey Sampath,

A client cannot set the created or modified time for a block. These, along with others, are set automatically when a block is created/changed. Anything a client attempts to set/modify will be always use a field within the properties object return value (the one exception being the "name" property, which is returned outside of "properties" for legacy reasons). A client will never be able to change a block's actual created or modified time.

As for the other fields you ask about:
  • _text_version - Do not worry about this, you do not need to set it or read it.
  • format - This can either be "text/springpad" or "text/html" and is what our clients distinguish between "simple" or "complex" notes. If you specify "text/springpad" the text content is assumed to be "simple" and any supplied text will be formatted and stripped of advanced HTML and styles leaving only simple formatting such as bold, italic, underline, links and lists. "text/html" will leave the notes as-is, however they will not be fully editable on mobile devices (the user will be able to switch to "text/springpad" on the fly).
  • userAction - can be "ToDo" or "Done" strings and determine whether a user wants to do something, or has done it (such as wants to cook a recipe, or has cooked a recipe). However, the note type does not use it.
Hope that helps,
Regis

Sampath Vangari

unread,
Dec 15, 2013, 1:06:35 PM12/15/13
to spring...@googlegroups.com
Thanks for the reply. I have posted many replies in this group but I got very less replies. However I got my application to be working with springpad api and with your reply I was in a dilemma whether to continue forward or not.
For now I stopped my development of porting notes from other sources because my main feature is not supported by springpad.

Sampath Vangari

unread,
Apr 1, 2014, 3:13:31 PM4/1/14
to spring...@googlegroups.com
I'm still hoping that there will be a way to set created/modified dates for a block. If there is a chance let me know because I have a lot of data to be ported into springpad. I don't know if this is the right place to say this ...but as a user I felt that springpad is damn slow and really unrealistic when taking real fast notes. This reason and data porting reason is why I switched back to evernote.


On Tuesday, December 10, 2013 12:48:02 AM UTC+5:30, Regis wrote:

Katin Miller

unread,
Apr 2, 2014, 2:43:02 PM4/2/14
to spring...@googlegroups.com
Hi Sampath - 

Thanks for your feedback.  I'm sorry to hear that you didn't have a great experience with Springpad.  We're always working to improve the performance of our app, and hearing input from users definitely helps us place a high priority on speed and ease of use.

If you do decide to come back to Springpad, I'd love to help in any way,

Katin from Springpad




--
You received this message because you are subscribed to the Google Groups "Springpad Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to springpaddev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages