castequality / caste

Create and Silence the Echos
1 stars 0 forks source link

Blog should pull from Tumblr #1

Closed seanpdoyle closed 11 years ago

seanpdoyle commented 11 years ago

Had to register Caste as an application through http://www.tumblr.com/oauth/apps

with

OAuth Consumer Key:  NvWaTzI30JItCIsWNf5UQe3BlI85yZ1Fq70aYiB77X4Z93wtj0

(use this link to change) Shouldn't need to use OAuth client at all, as reads are done through JSONP

seanpdoyle commented 11 years ago

Will split a separate branch and utilize the Tumblr API (according to this).

The most recent 20 posts are included by default. You may pass these optional GET parameters:

  • start - The post offset to start from. The default is 0.
  • num - The number of posts to return. The default is 20, and the maximum is 50.
  • type - The type of posts to return. If unspecified or empty, all types of posts are returned. Must be one of textquote,photolinkchatvideo, or audio.
  • id - A specific post ID to return. Use instead of startnum, or type.
  • filter - Alternate filter to run on the text content. Allowed values:
    • text  - Plain text only. No HTML.

    • none  - No post-processing. Output exactly what the author entered. (Note: Some authors write in Markdown, which will not be converted to HTML when this option is used.)

  • tagged - Return posts with this tag in reverse-chronological order (newest first). Optionally specify chrono=1 to >sort in chronological order (oldest first).
  • search - Search for posts with this query.

so that would make the resource look like this:

var Posts = $resource('http://castequality.tumblr.com/api/read/json');
Posts.get(function(posts) {
  angular.forEach(posts, function (post) {
    //  do something with the post
  });
});
seanpdoyle commented 11 years ago

I was wrong, that is an old API. Should use this instead

Request Parameters

Parameter Type Description Default Required?
base-hostname String The standard or custom blog hostname See the [Overview](http://www.tumblr.com/docs/en/api/v2#hostname) for more details. N/A Yes
api_key String Your OAuth Consumer Key See [Authentication](http://www.tumblr.com/docs/en/api/v2#auth) for more details. N/A Yes
type String The type of post to return. Specify one of the following:  `text, quote, link, answer, video, audio, photo, chat` None – return all types No
id Number A specific post ID. Returns the single post specified or (if not found) a 404 error. None No
tag String Limits the response to posts with the specified tag None No
limit Number The number of posts to return: `1–20`, inclusive 20 No
offset Number Post number to start at 0 (first post) No
reblog_info Boolean Indicates whether to return reblog information (specify `true` or `false`). Returns the various `reblogged_` fields. False No
notes_info Boolean Indicates whether to return notes information (specify `true` or `false`). Returns note count and note metadata. False No
filter String Specifies the post format to return, other than HTML: * `text` – Plain text, no HTML * `raw` – As entered by the user (no post-processing); if the user writes in Markdown, the Markdown will be returned rather than HTML None (HTML) No

Responses

Each response includes a blog object that is the equivalent of an /info response. Posts are returned as an array attached to the posts field.

All Post Types

Response Field Type Description Notes
blog_name String The short name used to uniquely identify a blog  
id Number The post's unique ID  
post_url String The location of the post  
type String The type of post See the [`type` request parameter](http://www.tumblr.com/docs/en/api/v2#post-params)
timestamp Number The time of the post, in seconds since the epoch  
date String The GMT date and time of the post, as a string  
format String The post format: `html` or `markdown`  
reblog_key String The key used to reblog this post See the [`/reblog`method](http://www.tumblr.com/docs/en/api/v2#m-reblog)
tags Array (string) Tags applied to the post  
bookmarklet Boolean Indicates whether the post was created via the[Tumblr bookmarklet](http://www.tumblr.com/apps) Exists only if true
mobile Boolean Indicates whether the post was created via[mobile/email publishing](http://www.tumblr.com/docs/en/email_publishing) Exists only if true
source_url String The URL for the source of the content (for quotes, reblogs, etc.) Exists only if there's a content source
source_title String The title of the source site Exists only if there's a content source
liked Boolean Indicates if a user has already liked a post or not Exists only if the request is fully authenticated with OAuth.
state String Indicates the current state of the post States are`published`, `queued`,`draft` and `private`
total_posts Number The total number of post available for this request, useful for paginating through results  
chrisfireoved commented 11 years ago

Awesome. I read through both links, the one you most recently sent seems easier. Now, I think I get the general jist of this, but I think when it comes down to it we'll surely have to meet and go over the specification of exactly how we should go about doing all this. Hah, it is a big confusing, but shit man, I'm sure we'll all have it down in no time. Speak soon man and thanks again. Let me know when you have time in the next day or two and Hern/Zander and myself will all meet up and we'll rap out a plan!

On 30 déc. 2012, at 15:50, Sean Doyle notifications@github.com wrote:

I was wrong, that is an old API. Should use this instead

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

patheid commented 11 years ago

so this is the code well need to establish proper parameters for how we want the blog to work through tumblr?

Sent from my iPhone

On Dec 30, 2012, at 4:35 PM, chrisfireoved notifications@github.com wrote:

Awesome. I read through both links, the one you most recently sent seems easier. Now, I think I get the general jist of this, but I think when it comes down to it we'll surely have to meet and go over the specification of exactly how we should go about doing all this. Hah, it is a big confusing, but shit man, I'm sure we'll all have it down in no time. Speak soon man and thanks again. Let me know when you have time in the next day or two and Hern/Zander and myself will all meet up and we'll rap out a plan!

On 30 déc. 2012, at 15:50, Sean Doyle notifications@github.com wrote:

I was wrong, that is an old API. Should use this instead

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

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

seanpdoyle commented 11 years ago

@chrisfireoved, @patheid,

For the most part, you guys don't have to worry about the coding stuff.

This issue is more or less a reference for myself. I'll update it with any findings I get. I'll keep appending the issue just in case somebody else wants to get involved down the line. This way, theres a paper-trail of what works and what doesn't.

patheid commented 11 years ago

sick! sounds good man, were gonna meet up tomorrow round 1030-11 in no libs n work on finalizing some shit before i head back to cali. you dont need to roll thru, but i can hit you up with a general summary of where were at at this point, and some more mockups, etc... thanks again for helping us out on this. its gonna be good

Sent from my iPhone

On Dec 30, 2012, at 5:01 PM, Sean Doyle notifications@github.com wrote:

@chrisfireoved, @patheid,

For the most part, you guys don't have to worry about the coding stuff.

This issue is more or less a reference for myself. I'll update it with any findings I get. I'll keep appending the issue just in case somebody else wants to get involved down the line. This way, theres a paper-trail of what works and what doesn't.

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

chrisfireoved commented 11 years ago

Hey dude, I'm just hittin up the squad and trying to get a good idea of a date we can finalize and mark as a day that we will launch. Anything I can help with let me know (also, I assuming you and gunner have been emailing back and forth no?) either way, let me know what I can do to make things smoother for you and I'll get on it. Keep me updated, speak soon and thanks again for your help man, really. -Chris

Chris Fireoved chrisfireoved@gmail.com

chrisfireoved commented 11 years ago

Also, tomorrow we're having a meeting at a coffee shop by my house to discuss some of the print media on our site and how we want to present it and filter our selections of material. I'd b super stoked if you came. (Coffee on me !!) can you make it? 730 at the Chapter House 9th and Bainbridge

Chris Fireoved chrisfireoved@gmail.com

patheid commented 11 years ago

I have made some advances on the layers for the viewmaster navigation... i will send over a description of how it should work, and then lets try and get some tests going. Sean, have you put any thought into how we should do it?

Sent from my iPhone

On Jan 9, 2013, at 12:02 PM, chrisfireoved notifications@github.com wrote:

Hey dude, I'm just hittin up the squad and trying to get a good idea of a date we can finalize and mark as a day that we will launch. Anything I can help with let me know (also, I assuming you and gunner have been emailing back and forth no?) either way, let me know what I can do to make things smoother for you and I'll get on it. Keep me updated, speak soon and thanks again for your help man, really. -Chris

Chris Fireoved chrisfireoved@gmail.com — Reply to this email directly or view it on GitHub.