mwunsch / tumblr

Command line interface and Ruby client for the Tumblr API (v2)
MIT License
282 stars 43 forks source link

Quote posts missing quote #34

Closed elstudio closed 11 years ago

elstudio commented 11 years ago

This patch fixes a couple of problems with quote post type handling.

mwunsch commented 11 years ago

Looks great, but b/c your last point is a breaking change, want to spend some extra time considering this. I do not think source should be the main body of the post, because source is not required in the posting api.

Can we make put both "quote" and "source" keys in the body? So that post composition would look like this:

---
state: draft
---
To be or not to be, that is the question.

William Shakespeare

In reading the post from the API, it should decompose to this:

---
state: draft
text: 'To be or not to be, that is the question.'
---
William Shakespeare

This could be tricky, and will require additional testing. This is similar to photo posts where there is asymmetry between the reading and posting api, and should be handled similarly in the API.

elstudio commented 11 years ago

If we were to combine quote and source in the body field, how would we know where to split them?

Quotes can be multiline, like this: http://el-st.com/post/41780055413/today-all-the-consumerized-enterprise-stuff-is-as

On Apr 29, 2013, at 12:10 PM, Mark Wunsch notifications@github.com wrote:

Looks great, but b/c your last point is a breaking change, want to spend some extra time considering this. I do not think source should be the main body of the post, because source is not required in the posting api.

Can we make put both "quote" and "source" keys in the body? So that post composition would look like this:


state: draft

To be or not to be, that is the question.

William Shakespeare In reading the post from the API, it should decompose to this:


state: draft

text: 'To be or not to be, that is the question.'

William Shakespeare This could be tricky, and will require additional testing. This is similar to photo posts where there is asymmetry between the reading and posting api, and should be handled similarly in the API.

— Reply to this email directly or view it on GitHub.

mwunsch commented 11 years ago

Unclear to me at this time, but I'm opposed to making the body of the document be an optional piece of text.

elstudio commented 11 years ago

Understandable! I've rolled back that part of my pull request.

So the ability to save :source, :source_url, :source_title are still in there. And fetch saves :quote as the body of the post.

Thanks!

On Apr 29, 2013, at 2:25 PM, Mark Wunsch notifications@github.com wrote:

Unclear to me at this time, but I'm opposed to making the body of the document be an optional piece of text.

— Reply to this email directly or view it on GitHub.