codingjester / tumblr_client

A Ruby Wrapper for the Tumblr v2 API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

undefined method `tagged' for #<Tumblr::Client:0x007f956ddbd968>

alaxicsmith opened this issue · comments

Undefined method 'tagged' when trying to search Tumblr for tagged posts? Is this error my own mistake?

Can you provide some more detail around this?
A call to this method should look like:

client = Tumblr.new
client.tagged 'hello' # [...]

Closing this - please re-open if this is still an issue

Interesting, I was able to get it to pull the posts, but keep getting undefined methods when trying to save things in the database like the blog_name or id. Unsure if this is a bug in my code, or a problem with the gem. Here's the code I'm using to pull posts, and store them.

def self.pull_tumblr
client = Tumblr.new
client.tagged("ferrari").data.each do |data|
unless exists?(post_id: data.id.to_s)
create! (
post_id: data.id
)
end
end
end

Thanks for the issue!
I think you want to rid yourself of the data:

client = Tumblr.new
Tumblr.new.tagged('lola').each { |p| puts p['id'] }

Currently these endpoints via tumblr_client support Hash access only

PS: i hope this is on your SuperAwesomeTumblr model