diff --git a/app.rb b/app.rb index b71476b5..653b1fc7 100644 --- a/app.rb +++ b/app.rb @@ -506,12 +506,12 @@ get '/password_reset_confirm' do end get '/custom_domain' do + require_login slim :custom_domain end post '/custom_domain' do require_login - original_domain = current_site.domain current_site.domain = params[:domain] if current_site.valid? diff --git a/views/api.erb b/views/api.erb index 96d3d110..ff0d7b33 100644 --- a/views/api.erb +++ b/views/api.erb @@ -27,6 +27,15 @@

+

Libraries

+

+ There are client libraries available for popular programming languages to make it easier to work with the API: +

+

API Documentation

The NeoCities API is a REST API, which uses query parameters for input, and returns data in the JSON format (except for file downloads). It uses client-side HTTP AUTH to authenticate, using your user/site name and password as the credentials. It is designed to play nicely with the most common HTTP libraries available in programming languages, and can be easily used with cURL (a command-line tool for making HTTP requests you can use by opening a terminal on your computer). @@ -125,4 +134,6 @@ var api = new NeoCities('YOURUSERNAME', 'YOURPASSWORD') api.info('madamfrp', function(resp) { console.log(resp) }) - +

Need something the API doesn't provide?

+

If the API does not supply something you need, contact us and we will try to add it! +