lib/citygrid/api/accounts/user.rb in citygrid_api-0.0.6 vs lib/citygrid/api/accounts/user.rb in citygrid_api-0.0.7
- old
+ new
@@ -1,18 +1,22 @@
class CityGrid
class API
class Accounts
class User < Accounts
- extend CityGrid::API::Mutatable
- extend CityGrid::API::Searchable
+ include CityGrid::API::Mutable
+ include CityGrid::API::Searchable
def self.login options = {}
request_and_handle :post,
"#{endpoint}/login",
- :query => options
+ :query => options,
+ :headers => merge_headers()
end
- define_action :validate, :get, "validate", :auth_token => true
+ # login behaves weird right now - expects string as body, not json encoded.
+ # define_action :login, :post, "login", :auth_token => false, :format => false
+
+ define_action :validate, :get, "validate", :auth_token => true, :format => false
end
end
end
end
\ No newline at end of file