Moving spaceapi endpoint and OAC door status checking here

This commit is contained in:
2013-12-01 19:32:08 -07:00
parent 9dc8645c32
commit d2434be109
7 changed files with 121 additions and 1 deletions

View File

@@ -3,7 +3,41 @@
:welcome_body => "<p>We are a member-driven community workshop where you can learn, make cool stuff, meet other cool people, and make your city a better place to live!</p><p>You don't have to be a member to come visit, but if you're interested in volunteering or being a member, feel free to sign up here! For more information, <a href=\"/more_info\">Click Here</a>.</p>",
:more_info_page => "No info here yet, bug a member about filling this part out!",
:member_resources_inset => "No info here yet, bug a member about filling this part out!",
:analytics_code => "<!-- insert analytics code here -->"
:analytics_code => "<!-- insert analytics code here -->",
:space_api_json_template => '{
"api" : "0.12",
"space" : "Your Hackerspace Name Here",
"logo" : "http://example.com/logo.png",
"lat": 0,
"lon": -0,
"icon":{
"open": "http://example.com/open.png",
"closed":"http://example.com/closed.png"
},
"url" : "http://example.com",
"address" : "123 main st, city, state, country",
"contact" : {
"phone" : "",
"irc" : "",
"twitter" : "",
"ml" : ""
},
"cam" : [""],
"feeds" : [{"name" : "",
"url" : ""},
{"name" : "",
"url" : ""}],
"apis" : {
"oac" : {
"url" : "http://this-apps-url.example.com/door_access",
"description" : "https://github.com/heatsynclabs/Open-Source-Access-Control-Web-Interface"
},
"pamela" : {
"url" : "http://this-apps-url.example.com/macs.json",
"description" : "https://github.com/heatsynclabs/Open-Source-Access-Control-Web-Interface"
}
}
}'
}
if ActiveRecord::Base.connection.tables.include?('settings') and !defined?(::Rake)

View File

@@ -45,6 +45,8 @@ Dooraccess::Application.routes.draw do
resources :cards
match 'cards/:id/upload' => 'cards#upload', :as => :upload
match 'space_api' => 'space_api#index', :as => :space_api
match 'door_logs' => 'door_logs#index', :as => :door_logs
match 'door_logs/download' => 'door_logs#download', :as => :download
match 'door_logs/auto_download' => 'door_logs#auto_download', :as => :auto_download