Module: Kinja::Author

Included in:
Client
Defined in:
lib/kinja/author.rb

Instance Method Summary collapse

Instance Method Details

#get_author(user) ⇒ Object



3
4
5
# File 'lib/kinja/author.rb', line 3

def get_author(user)
  HTTParty.get(author_path(user["id"]))["data"]
end

#get_author_id(name) ⇒ Object



7
8
9
# File 'lib/kinja/author.rb', line 7

def get_author_id(name)
  HTTParty.get(author_name_path(name))["data"]["id"]
end

#get_author_posts(id, start = nil, max = 20) ⇒ Object



15
16
17
# File 'lib/kinja/author.rb', line 15

def get_author_posts(id, start=nil, max=20)
  HTTParty.get(author_posts_path(id, start, max))["data"]
end

#get_default_blog_id(user) ⇒ Object



11
12
13
# File 'lib/kinja/author.rb', line 11

def get_default_blog_id(user)
  get_author(user)[0]["defaultBlogId"]
end