tumblr-api

Legrégebbi, ma is aktív, magyar tumblik listája

Kérdezték tőlem, szóval itt van: elvileg ők a legrégebbi, ma is aktív, magyar tumblik, a legelső posztjuk linkével együtt:

penktą valandą popiet

Gal nori arbatos?
Be penkiolikos septynios ryte
Kai akių vokai dar spaudžiasi žemyn
Veikiami stiprios gravitacijos

Gal nori arbatos?
Per patį vidurdienį
Kai saulė aukščiausiame taške
Ir girdisi išalkusių skrandžių maršas

Gal nori arbatos?
Penktą valandą popiet
Kai baigiasi atsibodęs darbas
Ir prasideda begalinės spūstys gatvėse

Gal nori arbatos?
Minutę po vidurnakčio
Kai slaptos mintys išlenda į tamsą
Supančią vienišus mus

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

tumblr.js JavaScript client

Today I’m excited to announce the release of tumblr.js, the first of several official API clients we’ll be rolling out over the next few months.

You can install it now with npm, and start making something awesome:

var tumblr = require('tumblr.js');
var client = tumblr.createClient({
  consumer_key: 'consumer_key',
  consumer_secret: 'consumer_secret',
  token: 'oauth_token',
  token_secret: 'oauth_token_secret'
});

// Name all of the authenticating user's blogs
client.userInfo(function (err, data) {
  data.user.blogs.forEach(function (blog) {
    console.log(blog.name);
  });
});

It comes with full support for all of the API V2 endpoints including tag search, following, liking, and post creation. For more detail, see the GitHub page.

More to come soon!

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.

Golang and The Tumblr API

You’ve been asking for an official Golang wrapper for the Tumblr API. The wait is over! We are thrilled to unveil two new repositories on our GitHub page which can be the gateway to the Tumblr API in your Go project.

Why Two Repos

We’ve tried to structure the wrapper in a way that is as flexible as possible so we’ve put the meat of the library in one repo that contains the code for creating requests and parsing the responses, and interacts with an interface that implements methods for making basic REST requests.

The second repo is an implementation of that interface with external dependencies used to sign requests using OAuth. If you do not wish to include these dependencies, you may write your own implementation of the ClientInterface and have the wrapper library use that client instead.

Handling Dynamic Response Types

Go is a strictly typed language including the data structures you marshal JSON responses into. This means that the library could have surfaced response data as a map of string => interface{} generics which would require the engineer to further cast into an int, string, another map of string => interface{}, etc. The API Team decided to make it more convenient for you by providing typed response values from various endpoints.

If you have used the Tumblr API, you’ll know that our Post object is highly variant in what properties and types are returned based on the post type. This proved to be a challenge in codifying the response data. In Go, you’d hope to simply be able to define a dashboard response as an array of posts

type Dashboard struct {
  // ... other properties
  Posts []Post `json:"posts"`
}

However this would mean we’d need a general Post struct type with the union of all possible properties on a Post across all post types. Further complicating this approach, we found that some properties with the same name have different types across post types. The highest profile example: an Audio post’s player property is a string of HTML while a Video post’s player property is an array of embed strings. Of course we could type any property with such conflicts as interface{} but then we’re back to the same problem as before where the engineer then has to cast values to effectively use them.

Doing Work So You Don’t Have To

Instead, we decided any array of posts could in fact be represented as an array of PostInterfaces. When decoding a response, we scan through each post in the response and create a correspondingly typed instance in an array, and return the array of instances as an array of PostInterfaces. Then, when marshalling the JSON into the array, the data fills in to the proper places with the proper types. The end user can then interact with the array of PostInterface instances by accessing universal properties (those that exist on any post type) with ease. If they wish to use a type-specific property, they can cast an instance to a specific post type once, and use all the typed properties afterward.

This can be especially convenient when paired with Go’s HTML templating system:

snippet.go

// previously, we have some `var response http.ResponseWriter`
client := tumblrclient.NewClientWithToken(
    // ... auth data
)

if t,err := template.New("posts").ParseFiles("post.tmpl"); err == nil {
    if dash,err := client.GetDashboard(); err == nil {
        for _,p := range dash.Posts {
            t.ExecuteTemplate(response, p.GetSelf().Type, p.GetSelf())
        }
    }
}

post.tmpl

{{define "text"}}
<div>
    {{.Body | html}}
</div>
{{end}}
{{define "photo"}}
<div>
    Post: {{.Type}}
</div>
{{end}}
{{define "video"}}
<div>
    Post: {{.Type}}
</div>
{{end}}
{{define "audio"}}
<div>
    Post: {{.Type}}
</div>
{{end}}
{{define "quote"}}
<div>
    Post: {{.Type}}
</div>
{{end}}
{{define "chat"}}
<div>
    Post: {{.Type}}
</div>
{{end}}
{{define "answer"}}
<div>
    Post: {{.Type}}
</div>
{{end}}
{{define "link"}}
<div>
    Post: {{.Type}}
</div>
{{end}}

This is a rudimentary example, but the convenience and utility is fairly evident. You can define blocks to be rendered, named by the post’s type value. Those blocks can then assume the object in its named scope is a specific post struct and access the typed values directly.

Wrapping Up

This is a v1.0 release and our goal was to release a limited scope, but flexible utility for developers to use. We plan on implementing plenty of new features and improvements in the future, and to make sure that improvements to the API are brought into the wrapper. Hope you enjoy using it!

Bee glue: Honey bee (Apis mellifera), using its hind leg to collect the dark resinous sap oozing from a scarred mesquite tree. At the Rio Salado Habitat Restoration Area, in Phoenix Arizona. 

The sticky goo, called propolis, is used by bees to patch hives or seal off unused entrances. It is used by people (who steal collect it from domesticated bees) in a variety of folk remedies, and in varnishes for string musical instruments. 

Bonus etymology: Propolis is a transliteration of the Ancient Greek πρόπολις, meaning suburb. It was applied to the bees’ gooey glue because of their apparent use of the material to extend their hives. 

10.2.2017

Online-Führung durch’s Techniktagebo(o)t

Seit ein paar Tagen taucht einmal täglich neben dem bekannten Techniktagebuch-Radlader ein U-Boot auf. Nämlich der Techniktagebot. Er fördert via Twitter alte Beiträge zutage, die mindestens ein Jahr, aber auch viel länger zurückliegen. Virtualista hatte die Idee, einen solchen Bot zu programmieren, der dazu beiträgt, dass die vielen großartigen Beiträge, die zum Teil Jahrzehnte in der Vergangenheit liegen, nicht in Vergessenheit geraten. Seit ein paar Tagen läuft der Bot stabil, und es lohnt sich natürlich, diesem gleich zu followen.

In der ständigen Redaktionskonferenz ist das Interesse groß an diesem Bot, aber nicht nur an seinen Funden, sondern auch daran, wie er funktioniert. Und so kam es, dass Virtualista anbot, Führungen zu veranstalten. Heute fand die erste Führung via Google Hangout statt. Erst sehen die Teilnehmer sich zum Teil gegenseitig, dann ist mal alles grün, dann alles schwarz, irgendwo schnieft jemand, aber dann läuft alles rund, und es geht los. 

Virtualista holt uns ab und wir steigen ins erste Unterdeck hinab. Wir entdecken eine Welt, die manche schlicht als Google-Skripte bezeichnen. Wir sehen den Programm-Code, der sich auf diverse Seiten verteilt. Es geht zunächst um verschiedene APIs von Twitter und Tumblr. Tumblr ermöglicht, einige Daten nach Beiträgen sortiert abzuholen. Diese werden in diverse Tabellenfelder zu schreiben, aus denen dann die für den Tweet relevanten Daten wieder hinausgesaugt werden. Eine schwierige Aufgabe, die quasi im Maschinenraum durchgeführt wird, ist dabei, die diversen Datumsformate, die die zahlreichen Autoren verwenden, zu verarbeiten (Beispiele: 29.01.1970, 29. Januar 1970, 29. Jänner 1970, 29-1-1970, 1-29-1970 usw. usf.). Dann muss natürlich eine Auswahl getroffen werden, wenn es mehrere Einträge für einen Tag gibt. Der Bot soll ja nicht dauernd den selben Beitrag posten, sondern in den nächsten hundert Jahren (oder wie lange er läuft) möglichst viele verschiedene. 

In der Kombüse wird dann aus den zurechtgelegten Daten ein Tweet zusammengerührt, der natürlich nicht mehr als 140 Zutaten, äh Zeichen haben darf. Dieser wird an die Brücke weitergereicht, wo der Tweet abgenickt und zum Funkraum gegeben wird, um ihn mittels der Twitter-API durch den Äther in die weite Welt hinaus zu tragen. 

Ich höre zum ersten Mal davon, wie man Skripte schreibt, die irgendwas im Internet machen. Schon lange habe ich mich gefragt, wie das eigentlich konkret geht. Nun bin ich wenigstens etwas schlauer und habe eine gewisse Vorstellung davon, was da auf unserem “Techniktagebuchkutter” so vor sich geht. Andere Teilnehmer und Teilnehmerinnen am Hangout haben deutlich mehr Ahnung davon und stellen Detailfragen, warum dies so und das nicht so ist. Ich bin fasziniert davon, dass man sowas mal eben einfach macht und werde in der kommenden Nacht von possierlichen U-Bötchen träumen, die kurze Techniktagebuch-URLs an die Oberfläche des Internet-Ozeans blubbern. 

(Markus Winninghoff)

TumblrCards Update v0.0.2

Hi all,

GitHub here.

So I think to help promote the game and keep up interest, I will write a blog post with each release update! For those of you that don’t know right now releases are structured as follows:

For something to be considered for merging in to the master branch it must be submitted as a Pull Request to the development branch first. All Pull Requests will be given at least 24 hours before being merged in to the development branch. Pull requests may take longer to be merged if more needs to change. On every Monday the development branch will have a pull request made (assuming development is ahead of master) to be merged in to the master repository. This pull request will sit for one week to be reviewed until it is merged in on Sunday. The weekly pull request may be delayed if more changes need to be made.

Now, why is it v0.0.2?

Normally release numbers follow the format Major.Minor.Patch, and eventually we will follow this. However the game itself is not actually playable. So until we have a working alpha version, I will be increment the patch number for each development merge. Master currently sits at v0.0.1, and the current pull request will make it v0.0.2. Once we have a working single player game (no matter how awful the alpha version starts) I will set the release version to v0.1.0.

So whats new?

The biggest thing so far is the Console API I have created. What this aims to do is give us a simple set of tools to handle console output for drawing. The Console API will mainly be used for the single and multiplayer games, as well as the deck editor. v0.0.2 will contain only 2 pieces (Console and ImageMap) of this API, and it will expand as development continues.

Besides that, this update really just contains a lot of error message fixes and other minor tweaks. For a full list of changes in this update check out the pull request here!

How can I help?

Well there’s a TON we still need help with and could always use new people. The biggest need is for programmers. The game is written in C++, however it’s totally ok if you have a negative amount of experience with C++. This is a learning experience for many of us, so use this as an opportunity to learn a new programming language!

For details on contributing check out this page!

We also have a Slack chat. If you would like to stay in the loop and get to know your fellow Comp Sci blogs shoot me a message with your email so I can get you an Invite!

I’d be convinced that Tumblr changed their API, since my IG posts continue to refuse to show up here, but I see other people posting just fine?  Halp.

Intermittent downtime: February 10

You might be getting occasional 502 errors from Washboard.  90% of the time, it’s because the Tumblr API didn’t send a complete response or just didn’t respond at all.  This tends to happen to a few people per day, but there’s been an uptick in 502 errors today, so I figured I’d let you all know that it’s normal and there’s not much I can do about it.  Refresh the page if this happens to you!

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! 

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.

anonymous asked:

Is there any way you can make a slide show of your photos?

Indeed. I have setup a slideshow here. It will transition through my 300 most recent photos. 

*nerd note: I used the tumblr api, and jquery with the “Supersized” slide show plugin. 

I can’t tell if you’re asking me if I had one, or how I coded it. Let me know if you want details. it’s not trivial however and you need some javascript chops.