(binary)
[rails.git] / app / views / user / api_details.builder
1 xml.instruct! :xml, :version => "1.0"
2 xml.osm("version" => API_VERSION, "generator" => GENERATOR) do
3   xml.tag! "user", :id => @user.id,
4                    :display_name => @user.display_name,
5                    :account_created => @user.creation_time.xmlschema do
6     if @user.description
7       xml.tag! "description", @user.description
8     end
9     if @user.home_lat and @user.home_lon
10       xml.tag! "home", :lat => @user.home_lat,
11                        :lon => @user.home_lon,
12                        :zoom => @user.home_zoom
13     end    
14     if @user.image
15       xml.tag! "img", :href => (url_for_file_column(@user, "image", :absolute => true))
16     end
17     if @user.languages
18       xml.tag! "languages" do
19         @user.languages.split(",") { |lang| xml.tag! "lang", lang }
20       end
21     end
22   end
23 end