Tumblr Blog

Use it by getting blog data or write to a blog

Figure 1a. Instantiate Users
$blog = eden('tumblr')->blog('[TUMBLR_KEY]', '[TUMBLR_SECRET]', $_SESSION['access_token'], $_SESSION['access_secret']);
Figure 1b. Usage: Retrieve Blog Info
$blog->getInfo('http://openovate.tumblr.com/');
Figure 1c. Usage: Retrieve a Blog's Followers
$blog
	->setLimit(10)		//optional
    ->setOffset(2)		//optional
    ->getFollower('http://openovate.tumblr.com/');
Figure 1d. Usage: Create a New Blog Text Post
$blog->postText('http://openovate.tumblr.com/', 'Hello World', 'Post Title Here');
Figure 1e. Usage: Create a New Blog Video Post
$blog->postVideo('http://openovate.tumblr.com/', 'http://www.youtube.com/watch?feature=fvwp&NR=1&v=yliOXXCCGjM');
Figure 1f. Usage: Create a New Blog Quote Post
$blog->postQuote('http://openovate.tumblr.com/', 'Hello World');
Figure 1g. Usage: Delete a Post
$blog->delete('http://openovate.tumblr.com/', '29467648740');
Figure 1h. Usage: Get Profile Image
$blog
	->setSize(24)		//optional
    ->getAvatar('http://openovate.tumblr.com/');
Figure 1i. Blog Methods
Method Arguments Returns Description
$blog->setSize($size);
  1. integer
Eden_Tumblr_Blog The size of the avatar (square, one value for both length and width). Must be one of the values: 16, 24, 30, 40, 48, 64, 96, 128, 512
$blog->setLimit($limit);
  1. integer
Eden_Tumblr_Blog The number of results to return: 120, inclusive
$blog->setOffset($offset);
  1. integer
Eden_Tumblr_Blog Result to start at
$blog->setPostId($postId);
  1. integer
Eden_Tumblr_Blog A specific post ID. Returns the single post specified or (if not found) a 404 error.
$blog->setPostType($postType);
  1. string
Eden_Tumblr_Blog The type of post to return. Specify one of the following: "text, quote, link, answer, video, audio, photo, chat"
$blog->setTag($tag);
  1. string
Eden_Tumblr_Blog Limits the response to posts with the specified tag
$blog->setState($state);
  1. string
Eden_Tumblr_Blog The state of the post. Specify one of the following: published, draft, queue, private
$blog->setFormat($format);
  1. string
Eden_Tumblr_Blog Sets the format type of post. Supported formats are: html & markdown
$blog->setSlug($slug);
  1. string
Eden_Tumblr_Blog Add a short text summary to the end of the post URL
$blog->setCaption($caption);
  1. string
Eden_Tumblr_Blog The user-supplied caption, HTML allowed
$blog->setLink($link);
  1. url
Eden_Tumblr_Blog The "click-through URL" for the photo
$blog->setDescription($description);
  1. string
Eden_Tumblr_Blog A user-supplied description, HTML allowed
$blog->getInfo($baseHostName);
  1. string
  2. - The standard or custom blog hostname
Eden_Tumblr_Blog Returns general information about the blog, such as the title, number of posts, and other high-level data.
$blog->getAvatar($baseHostName);
  1. string
  2. - The standard or custom blog hostname
Eden_Tumblr_Blog Returns users Avatar
$blog->getFollower($baseHostName);
  1. string
  2. - The standard or custom blog hostname
Eden_Tumblr_Blog Returns users follower
$blog->getPost($baseHostName);
  1. string
  2. - The standard or custom blog hostname
Eden_Tumblr_Blog Retrieve Published Posts
$blog->getQueuedPost($baseHostName);
  1. string
  2. - The standard or custom blog hostname
Eden_Tumblr_Blog Retrieve Queued Posts
$blog->getDraftPost($baseHostName);
  1. string
  2. - The standard or custom blog hostname
Eden_Tumblr_Blog Retrieve Draft Posts
$blog->getSubmissionPost($baseHostName);
  1. string
  2. - The standard or custom blog hostname
Eden_Tumblr_Blog Retrieve Submission Posts
$blog->postText($baseHostName, $body, $title = NULL);
  1. string
  2. - The standard or custom blog hostname
  3. string
  4. - The full post body, HTML allowed
  5. string|null
  6. - Title of the post, HTML entities must be escaped
Eden_Tumblr_Blog Create a New Blog Text Post
$blog->postPhoto($baseHostName, $source = NULL, $data = NULL);
  1. string
  2. - The standard or custom blog hostname
  3. string|null
  4. - The photo source URL
  5. string|null
  6. - One or more image files (submit multiple times to create a slide show)
Eden_Tumblr_Blog Create a New Blog Photo Post Either source or data is required
$blog->postQuote($baseHostName ,$quote, $source = NULL);
  1. string
  2. - The standard or custom blog hostname
  3. string
  4. - The full text of the quote, HTML entities must be escpaed
  5. string|null
  6. - One or more image files (submit multiple times to create a slide show)
Eden_Tumblr_Blog Create a New Blog Quote Post
$blog->postLink($baseHostName ,$url);
  1. string
  2. - The standard or custom blog hostname
  3. string
  4. - The link
Eden_Tumblr_Blog Create a New Blog link Post
$blog->postChat($baseHostName ,$conversation);
  1. string
  2. - The standard or custom blog hostname
  3. string
  4. - The text of the conversation/chat, with dialogue labels (no HTML)
Eden_Tumblr_Blog Create a New Blog Chat Post
$blog->postAudio($baseHostName ,$externalUrl = NULL, $data = NULL);
  1. string
  2. - The standard or custom blog hostname
  3. string|null
  4. - The URL of the site that hosts the audio file (not tumblr)
  5. string|null
  6. - An audio file
Eden_Tumblr_Blog Create a New Blog Audio Post either external_url or data is requred
$blog->postVideo($baseHostName ,$embed = NULL, $data = NULL);
  1. string
  2. - The standard or custom blog hostname
  3. string|null
  4. - HTML embed code for the video
  5. string|null
  6. - An audio file
Eden_Tumblr_Blog Create a New Blog Video Post either external_url or data is requred
$blog->editPost($baseHostName ,$postId, $reblogKey, $comment = NULL);
  1. string
  2. - The standard or custom blog hostname
  3. string
  4. - The ID of the reblogged post on tumblelog
  5. string
  6. - The reblog key for the reblogged post get the reblog key with a /posts request
  7. string|null
  8. - A comment added to the reblogged post
Eden_Tumblr_Blog Reblog a Post
$blog->delete($baseHostName, $postId);
  1. string
  2. - The ID of the post to delete
  3. string
  4. - The standard or custom blog hostname
Eden_Tumblr_Blog Delete Post

© 2012 Openovate Labs. All rights reserved.