tumblr-api

It turns out there are a TON of Daft Punk fans on Tumblr, posting some awesome images and GIFs. As an homage to all of you and this well-anticipated release, New Division Digital put everything together in one full-screen experience. Check out randomaccessdj.com. It plays all the posts for you, or let’s you DJ them yourself, while you listen to Random Access Memories on Spotify. 

Everything is based on the APIs that Tumblr and Spotify provide.

Perhaps this brings the old CD jacket artwork to a new level? 

Enjoy the dance party.

Tumblr project in progress that, for a given blog, will tell you how many active followers you have based on your likes and comments.

I realised that many of my followers are no longer active and wondered how many were regularly liking my blog and therefore who I really should be supporting if not already!

Full geek mode activated.

seedmanc.tumblr.com
аnimage alternative interface
and a simple way to search any tumblr by 2 tags at once

As I promised, I’ve created a way to access аnimage’s pictures without having to use his blog’s interface, that he disabled a while ago.

Just go to http://seedmanc.tumblr.com/tumblr2search, enter the tag(s) and get the pictures. No custom themes, no reblogs and likes, no bullshit, only images. 20 posts worth of pictures per page, or you can try to load all found images at once if you feel confident.

But wait, there’s more! I also implemented a long-sought feature really missing from tumblr - ability to search by 2 tags at once, getting only the posts having both of them (union search). Now if you want to get all the pictures of Nana in yukata and only them - you can do just that.

In addition, I provided an autocomplete feature for tag input fields, that has all the tags from аnimage’s Tag Category page, around 200 of them sorted alphabetically.

Although those of you poor souls still using this piece of s…oftware chrome might be having hard time making use of this. Because your browser is so progressive it doesn’t even support vertical scrollbars for this HTML5 feature. Neither Opera nor Firefox have this problem.

You know, it is in interests of the entire community to have the word spread.

Introducing Tumblr Tag Explorr (pronounced Explor-r, as if there was an E between the Rs, but not quite). A fun little “web app” built using the Tumblr API (and AngularJS and a hacked version of a script for loading grid items from Codrops).

The Explorr (Explor-r) lets you search for multiple tags at once. This is not the same as searching for posts with multiple tags. An example: let’s say I want to see all posts on Tumblr tagged cats together with all posts tagged dogs and also all posts tagged penguins. Because why not. The Tumblr search only lets me find posts that have all three tags so I would have to make three separate searches.

With Explorr (Eplor-r) you can perform those three (or two, or five or more) searches simultaneously.

Keep reading

Coding my new website

I am coding a new eax.dk using CakePHP.
The problem is; I want to learn a fuck-ton of things, but I noticed that I don’t really
know what to add.

So currently it’s just;
* Frontpage (Landing-page, about)
* Blog (Will get blogs from my tumblr blog :3)

But I am pretty sure that is too much.

What I really need, I guess, is just to have my blog as the front-page? No menu or anything like that.
Yes that will do.

Anyway,
So what I am “trying” (read: doing), to do, is get my blog-posts from my tumblr, live using jQuery/Ajax, and then show them on the page.

This is going quite fine, I am using the v1 version of Tumblrs API, simply because V2 doesn’t work for me >_>

Oh! And I ordered my VPS today :3 I will be ready in 3-6 days >_> Wtf!

//Eax

Hey all,

I’m happy to announce the release of the 0.8.0 version of our tumblr_client gem! This release is a major bump from our 0.7.5 release! An important update is the deprecation of the :raw_data parameter for posting. If you need this parameter do not update past 0.7.5.

Changelog

  • Removing support for :raw_data parameter for posting
  • Adding support for multipart file uploading
  • Removing all custom OAuth code and letting better tested libraries take care of it for us!
  • Allowing you to configure any of your favorite ruby HTTP clients supported by Faraday!

And if you have any issues, let me know here or @codingjester on Twitter or report issues directly here.

Get hacking everyone! 

OK so my code is still a work in progress, I still have to make it look pretty and I still need to make it so anyone can use it (and work out why tumblr returns old data) but………

What you see here is the number of unique supporters who have liked/commented on my blog in the last 40 posts plus the top ten of those people.

Obviously it doesn’t account for people who only read your blog, but I define a supporter as someone who is liking/commenting.

I hope when I make the functionality live you guys find it useful :)

Guys, I’m in a bigger pinch than before!  I’m out of a job, have bills to pay, and have to go to the doctor (but I lack insurance in the state that I’m in at the moment)– and on top of that, I have to find some way to pay my university $2k annnnd have spending money for studying abroad in London this Fall!  *hyperventilates*toomuchresponsibiltyomfg*blows into a bag*  I have literally $32 to my name of my own money, and only $98 left out of the generous donations from Tumblr after I paid API to secure my spot for London… *sigh*

I thought I might as well be productive about my situation– if you don’t just want to donate money and instead, want to help me get some valuable practice in as well as develop my digital sketchbook for Patreon, why not commission me?!  You can go through my blog and see my art (tagged/mine or tagged/my-art) for some more example work!

(I’m doing these cute little “Cyclops Girls” for $5 a pop, $10 w/ animations– eye blinking, hearts, blushing, etc.)

You can also donate any amount using either the PayPal button on my blog or becoming a Patron on Patreon!  Remember that digital sketchbook I mentioned like, two sentences ago?  I’ll be giving copies exclusively to $5 Patreons for free once it’s finished in December, aaand if you commission me as well, you’ll find your commission in the book!  Suuuper cooool~

Also, for any Simblrs out there, for $12 I can do a portrait of your favorite Sim (like the one above)!  That’s my personal Sim, Max– I think I’ll be drawing her more often…

All bust portraits like the one above are $12, full body drawings are $17!  Add $3 to either for some subtle animation!

gorwang asked:

hey, I read your post about the program you wrote and I was wondering if I could have it? Im a programmer myself (well studying) and I would really be interested to read your code to know how you make it works, which language you use :P

So I took my time in responding to this because I went ahead and merged my two different tools together, and then I wrote up a detailed document of what each does and how to go about using them.

My source code is currently opensource on my Bitbucket account. You can find the code and everything here: https://bitbucket.org/ahlec/theologian.

This is the Theologian suite. Currently there are two tools: the roleplay post collector mentioned earlier is known as monk, and an additional tool in there (the eponymous and original) theologian will collect all tags from all posts from all blogs you have and put them in a database so you can computer science them.

This is totes still in development but if you want to add/help/do things, let me know! This is an open invitation to people!

Phân trang trong themes Tumblr

Được hướng dẫn sử dụng trong API của Tumblr tại địa chỉ này:

http://www.tumblr.com/docs/en/custom_themes#navigation

Đây là đoạn code phân trang trong Tumblr. Phân trang được đặt trong cặp shortcode: {block:Pagination} và {/block:Pagination}

http://i.imgur.com/HiLFC78.png

Trang tiếp theo được đặt trong cặp thẻ: 

{block:NextPage} và {/block:NextPage}

Trang trước được đặt trong cặp thẻ: 

{block:PreviousPage} và {/block:PreviousPage}

Trang trước và trang tiếp sẽ có dạng:

<a href=“[link trang trước/ link trang tiếp]”>Trang trước/ Trang tiếp</a>

Với trang tiếp theo

<a href=“{NextPage}”>{lang:Next page} &rarr;</a>

{NextPage} - shortcoe lấy ra link trang tiếp theo, ví dụ: http://khuongkhukho.tumblr.com/page/2

Nội dung/ text/ hay anchor text hiển thị ra sẽ là nội dung ở giữa thẻ mở <a> và thẻ đóng </a>

{lang:Next page} &rarr;

{lang:Next page} - Là chữ “Next page”, nhưng đặt thế này để có thể translate theo người dùng tumblr đang truy cập dùng ngôn ngữ gì, để chuyển Next page thành “Trang tiếp” chẳng hạn :))

Có thể thay trực tiếp {lang:Next page} &rarr; -> Trang tiếp

&rarr; - Là biểu tượng mũi tên trong HTML.

Trang trước tương tự như trang tiếp.

- Phân trang sẽ quy định số trang hiển thị ra cho người dùng bấm ví dụ: 1, 2, 3, 4, 5.

Phần 1, 2, 3, 4,5 này sẽ nằm trong cặp thẻ: 

{block:JumpPagination length=“5”}  và {/block:JumpPagination}

Trong thẻ mở có tham số length để chỉ ra số trang tối đa hiện ra.

Trong 1, 2, 3, 4, 5 này lại chia ra làm 2 trường hợp. 

  1. Trang hiện tại - không có link
  2. Các trang khác - có link đến các trang đó để click

- Trang hiện tại nằm trong cặp thẻ: 

{block:CurrentPage} và {/block:CurrentPage}

Nội dung của trang hiện tại sẽ là:

<span class=“current_page”>{PageNumber}</span>

{PageNumber} - Là số trang của trang hiện tại

- Các trang còn lại sẽ nằm trong cặp thẻ:

{block:JumpPage} và {/block:JumpPage}

Nội dung của phần này sẽ là: 

<a class=“jump_page” href=“{URL}”>{PageNumber}</a>

Nó là vòng lặp. 

{URL} - shortcode để lấy ra link trang tương ứng với 

{PageNumber} - số trang tương ứng theo link.

Đoạn code phân trang thường được đặt ở gần dưới của themes. Ví dụ bên dưới thẻ 

{/block:Posts}

Ngoài ra có thể đặt các class, id để CSS phần phân trang cho đẹp :)))

Viết thì dài dòng vậy thôi, bạn nào thấy phức tạp quá thì nhờ mình, với mình thì chỉ 3 nốt nhạc là xong cả css luôn :))

ví dụ: Blog toilahoang.tumblr.com mình đã đổi từ load tràn lan sang phân trang kiểu next, và previous:))

ChangeLog for the Week of 11/09/12

This week, we are excited to bring a new feature to the API: the ability to consume a user’s likes if they have been made public in their Settings.

Here’s an example request:

http://api.tumblr.com/v2/blog/codingjester.tumblr.com/likes?api_key=your_key

You’ll receive a payload of Post objects that have been liked by that user. If you attempt to access a blog that has not shared their likes, you will get our standard 401.

This could become a guessing game on which blog have support the access of their likes. To prevent this, we’ve added a new field: share_likes to the blog object, accessible from the /info and the /user/info routes.

Lets look at an example payload from the /info route.

Please check out the latest documentation for any further details. As always, our Ask box is always open for feedback and questions!

Playing with Tumblr API

1. Install Ouath2
2. Install Pytumblr
3. Register an Application
https://www.tumblr.com/oauth/apps
4. Go to the application and get your ouath2 credentials
5. Enter your credentials in your python file

client = pytumblr.TumblrRestClient(
   ’<consumer_key>’,
   ’<consumer_secret>’,
   ’<oauth_token>’,
   ’<oauth_secret>’,
)

6.  To get name and title of all blogs you are following

off =0
while True:
   my_dict = client.following(offset =off)
   res = my_dict[‘blogs’]
   for rs in res:
       print(rs['name’] + “….” + rs['title’])
  
   off+=20

6. Number of posts liked for each blog

off =0
like_dict= {}
while True:
   my_dict = client.blog_likes('conflatedthought.tumblr.com’,offset =off)
   res = my_dict['liked_posts’]
   for rs in res:
       strs = str(rs['tags’]).strip(’[]’)
       #print(rs['blog_name’] +“ ”+ strs)
       #print(“..”)
       if rs['blog_name’] in like_dict.keys():
           like_dict[rs['blog_name’]] += 1
           #print rs['blog_name’] +“  ” + str(like_dict[rs['blog_name’]])
       else:
           like_dict[rs['blog_name’]] = 1    

   off+=20
for the_key, the_value in like_dict.iteritems():
   print the_key, 'corresponds to’, the_value

7.  Sample Output

sportspage….Sports Page
themobilemovement….The Mobile Movement
adidasfootball….adidas Football
instagram-engineering….Instagram Engineering
soccerdotcom….SOCCER.COM
sony….Sony on Tumblr
yahoolabs….Yahoo Labs
taylorswift….Taylor Swift
beyonce….Beyoncé | I Am
itscalledfutbol….Did someone say “futbol”?
futbolarte….Futbol Arte
fcyahoo….FC Yahoo
yahooscreen….Yahoo Screen
yahoo….Yahoo
engineering….Tumblr Engineering
yahoodevelopers….Yahoo Developer Network
mongodb….The MongoDB Community Blog
yahooeng….Yahoo Engineering
marissamayr….Marissa’s Tumblr
staff….Tumblr Staff
whoagurt….Whoagurt
narendra-modi….Narendra Modi
nytvideo….New York Times Video
bonjovi-is-my-life….Bon Jovi♥ Is My Life
etsy….Etsy
game-of-thrones….You win or you die.
seinfeld….Seinfeld
itunes….iTunes
gameofthrones….Game of Thrones: Cast A Large Shadow
forzaibra….Forza Ibra

responding to asks via tumblr API / python

hey y’all so i’m trying to do more work on jennythebot to let her interact with people, and so i’m trying to figure out how to access / respond to messages in the inbox using the python api client

does anyone know how exactly this works? i might just be misunderstanding the documentation but i can’t really find anything… 

am i supposed to be using the submissions part of the api?

idk does anyone have any ideas/advice? (i’m tagging breastforce even tho i’m pretty sure your bots are programmed in java, i’m assuming the api is similar?)

?

2

Working on a tumblr api “thing” that combines your most popular quote and photo posts. It sucks right now but accidentally makes cool things sometimes.

ChangeLog for the Week of 08/07/12

This week we have a few new features to announce for developers!

First up, We have added the ability for applications to access private blogs & posts for a user when sending a fully authenticated request to /posts and /user/info. This has been one of most requested features on the API Forum, so we’re excited to release it to you all. The full documentation is currently up and available here.

Here are a few other documentation tweaks that have gone up:

  • Liked - A Boolean field that tells you if the currently authenticated user has liked a post.
  • Queued Docs - Updates to pagination documentation.
  • Submissions Docs - Updates to pagination documentation.

We also want to let you know that we’ve opened up Asks and we’re more than happy to help field any problems or questions you may have!