TwitterAPI: Add unimplemented /friendships/no_retweets/ids.
This commit is contained in:
parent
3533bf7eac
commit
22bbe27115
|
@ -190,6 +190,7 @@ def user_fetcher(username) do
|
|||
get "/statuses/followers", TwitterAPI.Controller, :followers
|
||||
get "/statuses/friends", TwitterAPI.Controller, :friends
|
||||
get "/friends/ids", TwitterAPI.Controller, :friends_ids
|
||||
get "/friendships/no_retweets/ids", TwitterAPI.Controller, :empty_array
|
||||
|
||||
get "/externalprofile/show", TwitterAPI.Controller, :external_profile
|
||||
end
|
||||
|
|
|
@ -270,12 +270,16 @@ def friends_ids(%{assigns: %{user: user}} = conn, _params) do
|
|||
ids = friends
|
||||
|> Enum.map(fn x -> x.id end)
|
||||
|> Poison.encode!
|
||||
|
||||
json(conn, ids)
|
||||
else
|
||||
_e -> bad_request_reply(conn, "Can't get friends")
|
||||
end
|
||||
end
|
||||
|
||||
def empty_array(conn, _params) do
|
||||
json(conn, Poison.encode!([]))
|
||||
end
|
||||
|
||||
def update_profile(%{assigns: %{user: user}} = conn, params) do
|
||||
params = if bio = params["description"] do
|
||||
|
|
Loading…
Reference in New Issue