オンラインで見つけたコードを使用しています。
def person_path(options)
# This is where the path of the query is constructed.
path = "/people/" # For this section of the LinkedIn API
if id = options.delete(:id)
path += "id=#{id}"
elsif url = options.delete(:url)
path += "url=#{CGI.escape(url)}"
else
path += "~"
end
end
私はそれが何をするのか完全にはわかりません。私がやろうとしているのは、次のような文字列を作成することです:http ://api.linkedin.com/v1/people/~:(current- status)ここでLinkedIn開発者のドキュメントから取得しました:https:/ /developer.linkedin.com/documents/profile-api
この関数を何に渡す必要があるか、そしてそれがどのように正確にそれが行うことを達成するかについての考えはありますか?
ありがとう!